From 17e6c177215ba7597f39de5adc0eccf0b103aea0 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 18 Feb 2026 11:41:58 -0700 Subject: [PATCH 1/9] qualify all format statements to use EnergyPlus::format, this is redundant for now --- src/EnergyPlus/AirLoopHVACDOAS.cc | 146 +- .../AirflowNetwork/src/Properties.cpp | 22 +- src/EnergyPlus/AirflowNetwork/src/Solver.cpp | 1150 +++--- .../Autosizing/All_Simple_Sizing.cc | 26 +- src/EnergyPlus/Autosizing/Base.cc | 12 +- .../Autosizing/CoolingAirFlowSizing.cc | 24 +- .../Autosizing/CoolingCapacitySizing.cc | 71 +- .../CoolingWaterDesAirOutletHumRatSizing.cc | 18 +- .../CoolingWaterDesAirOutletTempSizing.cc | 12 +- .../Autosizing/HeatingAirFlowSizing.cc | 2 +- .../Autosizing/HeatingCapacitySizing.cc | 54 +- .../Autosizing/SystemAirFlowSizing.cc | 637 +-- .../Autosizing/WaterHeatingCapacitySizing.cc | 14 +- .../Autosizing/WaterHeatingCoilUASizing.cc | 108 +- src/EnergyPlus/BaseboardElectric.cc | 109 +- src/EnergyPlus/BaseboardRadiator.cc | 166 +- src/EnergyPlus/BoilerSteam.cc | 61 +- src/EnergyPlus/Boilers.cc | 109 +- src/EnergyPlus/BranchInputManager.cc | 416 +- src/EnergyPlus/BranchNodeConnections.cc | 401 +- src/EnergyPlus/CTElectricGenerator.cc | 49 +- src/EnergyPlus/ChilledCeilingPanelSimple.cc | 376 +- src/EnergyPlus/ChillerAbsorption.cc | 137 +- src/EnergyPlus/ChillerElectricASHRAE205.cc | 95 +- src/EnergyPlus/ChillerElectricEIR.cc | 251 +- src/EnergyPlus/ChillerExhaustAbsorption.cc | 142 +- src/EnergyPlus/ChillerGasAbsorption.cc | 130 +- src/EnergyPlus/ChillerIndirectAbsorption.cc | 158 +- src/EnergyPlus/ChillerReformulatedEIR.cc | 374 +- src/EnergyPlus/Coils/CoilCoolingDX.cc | 6 +- .../CoilCoolingDXAshrae205Performance.cc | 15 +- .../Coils/CoilCoolingDXCurveFitPerformance.cc | 57 +- .../Coils/CoilCoolingDXCurveFitSpeed.cc | 69 +- src/EnergyPlus/CommandLineInterface.cc | 4 +- src/EnergyPlus/CondenserLoopTowers.cc | 781 ++-- src/EnergyPlus/Construction.cc | 63 +- src/EnergyPlus/ConvectionCoefficients.cc | 316 +- src/EnergyPlus/CoolTower.cc | 90 +- src/EnergyPlus/CostEstimateManager.cc | 169 +- src/EnergyPlus/CrossVentMgr.cc | 8 +- src/EnergyPlus/CurveManager.cc | 610 +-- src/EnergyPlus/DElightManagerF.cc | 85 +- src/EnergyPlus/DXCoils.cc | 2675 ++++++------ src/EnergyPlus/DXFEarClipping.cc | 14 +- src/EnergyPlus/DataEnvironment.cc | 10 +- src/EnergyPlus/DataHeatBalance.cc | 82 +- src/EnergyPlus/DataOutputs.cc | 3 +- src/EnergyPlus/DataRuntimeLanguage.cc | 32 +- src/EnergyPlus/DataSizing.cc | 133 +- src/EnergyPlus/DataSurfaceColors.cc | 24 +- src/EnergyPlus/DataSurfaceLists.cc | 49 +- src/EnergyPlus/DataSurfaces.cc | 24 +- src/EnergyPlus/DataSystemVariables.cc | 4 +- src/EnergyPlus/DataZoneEnergyDemands.cc | 50 +- src/EnergyPlus/DataZoneEquipment.cc | 340 +- src/EnergyPlus/DaylightingDevices.cc | 404 +- src/EnergyPlus/DaylightingManager.cc | 516 +-- src/EnergyPlus/DemandManager.cc | 109 +- src/EnergyPlus/DesiccantDehumidifiers.cc | 480 ++- src/EnergyPlus/DisplacementVentMgr.cc | 10 +- src/EnergyPlus/DualDuct.cc | 89 +- src/EnergyPlus/DuctLoss.cc | 58 +- src/EnergyPlus/EMSManager.cc | 148 +- src/EnergyPlus/EarthTube.cc | 148 +- src/EnergyPlus/EcoRoofManager.cc | 27 +- src/EnergyPlus/EconomicLifeCycleCost.cc | 438 +- src/EnergyPlus/EconomicTariff.cc | 272 +- src/EnergyPlus/ElectricBaseboardRadiator.cc | 69 +- src/EnergyPlus/ElectricPowerServiceManager.cc | 203 +- src/EnergyPlus/EvaporativeCoolers.cc | 266 +- src/EnergyPlus/EvaporativeFluidCoolers.cc | 693 ++-- src/EnergyPlus/ExhaustAirSystemManager.cc | 39 +- src/EnergyPlus/ExteriorEnergyUse.cc | 15 +- src/EnergyPlus/ExternalInterface.cc | 253 +- src/EnergyPlus/FanCoilUnits.cc | 416 +- src/EnergyPlus/Fans.cc | 169 +- src/EnergyPlus/FaultsManager.cc | 316 +- src/EnergyPlus/FluidCoolers.cc | 500 +-- src/EnergyPlus/FluidProperties.cc | 661 +-- src/EnergyPlus/FuelCellElectricGenerator.cc | 90 +- src/EnergyPlus/Furnaces.cc | 1720 ++++---- src/EnergyPlus/General.cc | 47 +- src/EnergyPlus/GeneralRoutines.cc | 163 +- src/EnergyPlus/GeneratorFuelSupply.cc | 29 +- src/EnergyPlus/GlobalNames.cc | 36 +- src/EnergyPlus/GroundHeatExchangers/Base.cc | 35 +- .../GroundHeatExchangers/BoreholeArray.cc | 2 +- .../GroundHeatExchangers/BoreholeSingle.cc | 2 +- .../GroundHeatExchangers/Properties.cc | 2 +- .../GroundHeatExchangers/ResponseFactors.cc | 10 +- src/EnergyPlus/GroundHeatExchangers/Slinky.cc | 16 +- .../GroundHeatExchangers/Vertical.cc | 37 +- src/EnergyPlus/HVACControllers.cc | 313 +- src/EnergyPlus/HVACCooledBeam.cc | 51 +- src/EnergyPlus/HVACDXHeatPumpSystem.cc | 132 +- src/EnergyPlus/HVACDuct.cc | 23 +- src/EnergyPlus/HVACFourPipeBeam.cc | 116 +- src/EnergyPlus/HVACHXAssistedCoolingCoil.cc | 306 +- src/EnergyPlus/HVACInterfaceManager.cc | 4 +- src/EnergyPlus/HVACManager.cc | 394 +- src/EnergyPlus/HVACMultiSpeedHeatPump.cc | 705 ++-- src/EnergyPlus/HVACSingleDuctInduc.cc | 214 +- src/EnergyPlus/HVACStandAloneERV.cc | 314 +- src/EnergyPlus/HVACUnitaryBypassVAV.cc | 797 ++-- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 1390 ++++--- src/EnergyPlus/HWBaseboardRadiator.cc | 410 +- src/EnergyPlus/HeatBalFiniteDiffManager.cc | 182 +- src/EnergyPlus/HeatBalanceAirManager.cc | 1048 ++--- src/EnergyPlus/HeatBalanceHAMTManager.cc | 104 +- src/EnergyPlus/HeatBalanceIntRadExchange.cc | 114 +- .../HeatBalanceInternalHeatGains.cc | 5 +- src/EnergyPlus/HeatBalanceKivaManager.cc | 117 +- src/EnergyPlus/HeatBalanceManager.cc | 1217 +++--- src/EnergyPlus/HeatBalanceSurfaceManager.cc | 265 +- src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc | 83 +- src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc | 91 +- src/EnergyPlus/HeatPumpWaterToWaterSimple.cc | 139 +- src/EnergyPlus/HeatRecovery.cc | 1252 +++--- src/EnergyPlus/HeatingCoils.cc | 319 +- src/EnergyPlus/HighTempRadiantSystem.cc | 260 +- src/EnergyPlus/Humidifiers.cc | 132 +- src/EnergyPlus/HybridEvapCoolingModel.cc | 153 +- src/EnergyPlus/HybridModel.cc | 109 +- .../HybridUnitaryAirConditioners.cc | 80 +- src/EnergyPlus/ICEngineElectricGenerator.cc | 54 +- src/EnergyPlus/IceThermalStorage.cc | 180 +- src/EnergyPlus/IndoorGreen.cc | 72 +- .../InputProcessing/InputProcessor.cc | 5 +- src/EnergyPlus/IntegratedHeatPump.cc | 186 +- src/EnergyPlus/InternalHeatGains.cc | 596 +-- src/EnergyPlus/LowTempRadiantSystem.cc | 550 +-- src/EnergyPlus/Material.cc | 464 ++- src/EnergyPlus/MatrixDataManager.cc | 16 +- src/EnergyPlus/MicroCHPElectricGenerator.cc | 41 +- .../MicroturbineElectricGenerator.cc | 608 +-- src/EnergyPlus/MixedAir.cc | 811 ++-- src/EnergyPlus/MixerComponent.cc | 46 +- src/EnergyPlus/MoistureBalanceEMPDManager.cc | 27 +- src/EnergyPlus/MundtSimMgr.cc | 7 +- src/EnergyPlus/NodeInputManager.cc | 115 +- src/EnergyPlus/OutAirNodeManager.cc | 17 +- src/EnergyPlus/OutdoorAirUnit.cc | 163 +- src/EnergyPlus/OutputProcessor.cc | 284 +- src/EnergyPlus/OutputReportPredefined.cc | 6 +- src/EnergyPlus/OutputReportTabular.cc | 291 +- src/EnergyPlus/OutputReportTabularAnnual.cc | 35 +- src/EnergyPlus/OutputReports.cc | 121 +- src/EnergyPlus/OutsideEnergySources.cc | 41 +- src/EnergyPlus/PCMThermalStorage.cc | 40 +- src/EnergyPlus/PVWatts.cc | 16 +- src/EnergyPlus/PackagedThermalStorageCoil.cc | 511 ++- .../PhaseChangeModeling/HysteresisModel.cc | 9 +- .../PhotovoltaicThermalCollectors.cc | 142 +- src/EnergyPlus/Photovoltaics.cc | 143 +- src/EnergyPlus/PipeHeatTransfer.cc | 121 +- src/EnergyPlus/Pipes.cc | 4 +- src/EnergyPlus/Plant/EquipAndOperations.cc | 50 +- src/EnergyPlus/Plant/Loop.cc | 12 +- src/EnergyPlus/Plant/LoopSide.cc | 28 +- src/EnergyPlus/Plant/PlantManager.cc | 84 +- src/EnergyPlus/PlantCentralGSHP.cc | 343 +- src/EnergyPlus/PlantChillers.cc | 911 +++-- .../PlantComponentTemperatureSources.cc | 34 +- src/EnergyPlus/PlantCondLoopOperation.cc | 517 +-- .../PlantHeatExchangerFluidToFluid.cc | 100 +- src/EnergyPlus/PlantLoadProfile.cc | 4 +- src/EnergyPlus/PlantLoopHeatPumpEIR.cc | 711 ++-- src/EnergyPlus/PlantPipingSystemsManager.cc | 131 +- src/EnergyPlus/PlantPressureSystem.cc | 33 +- src/EnergyPlus/PlantUtilities.cc | 223 +- src/EnergyPlus/PlantValves.cc | 6 +- src/EnergyPlus/PluginManager.cc | 101 +- src/EnergyPlus/PollutionModule.cc | 52 +- src/EnergyPlus/PondGroundHeatExchanger.cc | 94 +- src/EnergyPlus/PoweredInductionUnits.cc | 213 +- src/EnergyPlus/Psychrometrics.cc | 155 +- src/EnergyPlus/Pumps.cc | 307 +- src/EnergyPlus/PurchasedAirManager.cc | 223 +- src/EnergyPlus/PythonEngine.cc | 9 +- src/EnergyPlus/RefrigeratedCase.cc | 2581 ++++++------ src/EnergyPlus/ReportCoilSelection.cc | 15 +- src/EnergyPlus/ReturnAirPathManager.cc | 18 +- src/EnergyPlus/RoomAirModelAirflowNetwork.cc | 21 +- src/EnergyPlus/RoomAirModelManager.cc | 216 +- src/EnergyPlus/RoomAirModelUserTempPattern.cc | 14 +- src/EnergyPlus/RootFinder.cc | 79 +- src/EnergyPlus/RuntimeLanguageProcessor.cc | 243 +- src/EnergyPlus/SZVAVModel.cc | 32 +- src/EnergyPlus/ScheduleManager.cc | 389 +- src/EnergyPlus/SetPointManager.cc | 313 +- src/EnergyPlus/SimAirServingZones.cc | 303 +- src/EnergyPlus/SimulationManager.cc | 153 +- src/EnergyPlus/SingleDuct.cc | 627 +-- src/EnergyPlus/SizingManager.cc | 959 +++-- src/EnergyPlus/SolarCollectors.cc | 224 +- src/EnergyPlus/SolarReflectionManager.cc | 6 +- src/EnergyPlus/SolarShading.cc | 280 +- src/EnergyPlus/SplitterComponent.cc | 47 +- src/EnergyPlus/StandardRatings.cc | 424 +- src/EnergyPlus/SteamBaseboardRadiator.cc | 406 +- src/EnergyPlus/SteamCoils.cc | 111 +- src/EnergyPlus/SurfaceGeometry.cc | 3643 +++++++++-------- src/EnergyPlus/SurfaceGroundHeatExchanger.cc | 87 +- src/EnergyPlus/SwimmingPool.cc | 135 +- src/EnergyPlus/SystemAvailabilityManager.cc | 396 +- src/EnergyPlus/SystemReports.cc | 163 +- src/EnergyPlus/TARCOGArgs.cc | 36 +- src/EnergyPlus/ThermalChimney.cc | 145 +- src/EnergyPlus/ThermalComfort.cc | 118 +- src/EnergyPlus/TranspiredCollector.cc | 205 +- src/EnergyPlus/UFADManager.cc | 45 +- src/EnergyPlus/UnitHeater.cc | 110 +- src/EnergyPlus/UnitVentilator.cc | 273 +- src/EnergyPlus/UnitarySystem.cc | 1294 +++--- src/EnergyPlus/UserDefinedComponents.cc | 184 +- src/EnergyPlus/UtilityRoutines.cc | 275 +- src/EnergyPlus/VariableSpeedCoils.cc | 1030 +++-- src/EnergyPlus/VentilatedSlab.cc | 450 +- src/EnergyPlus/WaterCoils.cc | 312 +- src/EnergyPlus/WaterManager.cc | 81 +- src/EnergyPlus/WaterThermalTanks.cc | 1622 ++++---- src/EnergyPlus/WaterToAirHeatPump.cc | 109 +- src/EnergyPlus/WaterToAirHeatPumpSimple.cc | 797 ++-- src/EnergyPlus/WaterUse.cc | 125 +- src/EnergyPlus/WeatherManager.cc | 827 ++-- src/EnergyPlus/WindTurbine.cc | 378 +- src/EnergyPlus/WindowAC.cc | 136 +- src/EnergyPlus/WindowComplexManager.cc | 4 +- src/EnergyPlus/WindowEquivalentLayer.cc | 62 +- src/EnergyPlus/WindowManager.cc | 107 +- src/EnergyPlus/ZoneAirLoopEquipmentManager.cc | 60 +- .../ZoneContaminantPredictorCorrector.cc | 233 +- src/EnergyPlus/ZoneDehumidifier.cc | 128 +- src/EnergyPlus/ZoneEquipmentManager.cc | 233 +- src/EnergyPlus/ZonePlenum.cc | 119 +- src/EnergyPlus/ZoneTempPredictorCorrector.cc | 513 +-- src/EnergyPlus/api/datatransfer.cc | 5 +- 237 files changed, 33646 insertions(+), 28628 deletions(-) diff --git a/src/EnergyPlus/AirLoopHVACDOAS.cc b/src/EnergyPlus/AirLoopHVACDOAS.cc index a840d9000bb..10ecd1df8c0 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.cc +++ b/src/EnergyPlus/AirLoopHVACDOAS.cc @@ -204,7 +204,7 @@ namespace AirLoopHVACDOAS { } } - ShowSevereError(state, format("AirLoopMixer factory: Error getting inputs for system named: {}", objectName)); + ShowSevereError(state, EnergyPlus::format("AirLoopMixer factory: Error getting inputs for system named: {}", objectName)); return nullptr; } @@ -261,7 +261,8 @@ namespace AirLoopHVACDOAS { thisMixer.InletNodeNum.push_back(NodeNum); } else { std::string cFieldName = "Inlet Node Name"; - ShowSevereError(state, format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisMixer.name, name, cFieldName)); + ShowSevereError( + state, EnergyPlus::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisMixer.name, name, cFieldName)); errorsFound = true; } } @@ -271,7 +272,7 @@ namespace AirLoopHVACDOAS { if (thisMixer.numOfInletNodes < 1) { // No inlet nodes specified--this is not possible - ShowSevereError(state, format("{}, \"{}\" does not have any inlet nodes.", cCurrentModuleObject, thisMixer.name)); + ShowSevereError(state, EnergyPlus::format("{}, \"{}\" does not have any inlet nodes.", cCurrentModuleObject, thisMixer.name)); ShowContinueError(state, "All mixers must have at least one inlet node."); errorsFound = true; } @@ -325,7 +326,7 @@ namespace AirLoopHVACDOAS { } ++loop; } - ShowSevereError(state, format("getAirLoopMixer: did not find AirLoopHVAC:Mixer name ={}. Check inputs", objectName)); + ShowSevereError(state, EnergyPlus::format("getAirLoopMixer: did not find AirLoopHVAC:Mixer name ={}. Check inputs", objectName)); return index; } @@ -344,7 +345,7 @@ namespace AirLoopHVACDOAS { return &dSpec; } } - ShowSevereError(state, format("AirLoopSplitter factory: Error getting inputs for system named: {}", objectName)); + ShowSevereError(state, EnergyPlus::format("AirLoopSplitter factory: Error getting inputs for system named: {}", objectName)); return nullptr; } @@ -375,7 +376,7 @@ namespace AirLoopHVACDOAS { ++loop; } - ShowSevereError(state, format("getAirLoopSplitter: did not find AirLoopSplitter name ={}. Check inputs", objectName)); + ShowSevereError(state, EnergyPlus::format("getAirLoopSplitter: did not find AirLoopSplitter name ={}. Check inputs", objectName)); return index; } @@ -434,7 +435,8 @@ namespace AirLoopHVACDOAS { thisSplitter.OutletNodeNum.push_back(NodeNum); } else { std::string cFieldName = "Outlet Node Name"; - ShowSevereError(state, format("{}, \"{}\"{} not found: {}", cCurrentModuleObject, thisSplitter.name, cFieldName, name)); + ShowSevereError( + state, EnergyPlus::format("{}, \"{}\"{} not found: {}", cCurrentModuleObject, thisSplitter.name, cFieldName, name)); errorsFound = true; } } @@ -444,7 +446,8 @@ namespace AirLoopHVACDOAS { if (thisSplitter.numOfOutletNodes < 1) { // No outlet nodes specified--this is not possible - ShowSevereError(state, format(R"({}, "{}" does not have any outlet nodes.)", cCurrentModuleObject, thisSplitter.name)); + ShowSevereError(state, + EnergyPlus::format(R"({}, "{}" does not have any outlet nodes.)", cCurrentModuleObject, thisSplitter.name)); ShowContinueError(state, "All splitters must have at least one outlet node."); errorsFound = true; } @@ -483,8 +486,9 @@ namespace AirLoopHVACDOAS { if (thisDOAS.m_OASystemNum == 0) { cFieldName = "AirLoopHVAC:OutdoorAirSystem Name"; - ShowSevereError(state, - format(R"({}, "{}", {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.OASystemName)); + ShowSevereError( + state, + EnergyPlus::format(R"({}, "{}", {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.OASystemName)); errorsFound = true; } // Check controller type @@ -493,9 +497,9 @@ namespace AirLoopHVACDOAS { for (int InListNum = 1; InListNum <= thisOutsideAirSys.NumControllers; ++InListNum) { if (Util::SameString(thisOutsideAirSys.ControllerType(InListNum), "Controller:OutdoorAir")) { ShowSevereError(state, - format("When {} = {} is used in AirLoopHVAC:DedicatedOutdoorAirSystem,", - CurrentModuleObject, - thisOutsideAirSys.ControllerName(InListNum))); + EnergyPlus::format("When {} = {} is used in AirLoopHVAC:DedicatedOutdoorAirSystem,", + CurrentModuleObject, + thisOutsideAirSys.ControllerName(InListNum))); ShowContinueError(state, "The Controller:OutdoorAir can not be used as a controller. Please remove it"); errorsFound = true; } @@ -505,8 +509,9 @@ namespace AirLoopHVACDOAS { thisDOAS.m_AirLoopMixerIndex = getAirLoopMixerIndex(state, thisDOAS.AirLoopMixerName); if (thisDOAS.m_AirLoopMixerIndex < 0) { cFieldName = "AirLoopHVAC:Mixer Name"; - ShowSevereError( - state, format(R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.AirLoopMixerName)); + ShowSevereError(state, + EnergyPlus::format( + R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.AirLoopMixerName)); errorsFound = true; } thisDOAS.m_CompPointerAirLoopMixer = AirLoopMixer::factory(state, thisDOAS.m_AirLoopMixerIndex, thisDOAS.AirLoopMixerName); @@ -530,9 +535,10 @@ namespace AirLoopHVACDOAS { case ValidEquipListType::FanConstantVolume: case ValidEquipListType::FanVariableVolume: case ValidEquipListType::CoilUserDefined: - ShowSevereError(state, - format("When {} = {} is used in AirLoopHVAC:DedicatedOutdoorAirSystem,", CurrentModuleObject, CompName)); - ShowContinueError(state, format(" the {} can not be used as a component. Please remove it", typeNameUC)); + ShowSevereError( + state, + EnergyPlus::format("When {} = {} is used in AirLoopHVAC:DedicatedOutdoorAirSystem,", CurrentModuleObject, CompName)); + ShowContinueError(state, EnergyPlus::format(" the {} can not be used as a component. Please remove it", typeNameUC)); errorsFound = true; break; case ValidEquipListType::FanSystemModel: @@ -589,7 +595,8 @@ namespace AirLoopHVACDOAS { thisOutsideAirSys.OutletNodeNum(CompNum) = WaterCoils::GetCoilOutletNode(state, typeNameUC, CompName, OutletNodeErrFlag); thisDOAS.CWCtrlNodeNum = WaterCoils::GetCoilWaterInletNode(state, "COIL:COOLING:WATER", CompName, errorsFound); if (errorsFound) { - ShowContinueError(state, format("The control node number is not found in {} = {}", CurrentModuleObject, CompName)); + ShowContinueError(state, + EnergyPlus::format("The control node number is not found in {} = {}", CurrentModuleObject, CompName)); } PlantUtilities::ScanPlantLoopsForObject( state, CompName, DataPlant::PlantEquipmentType::CoilWaterCooling, thisDOAS.CWPlantLoc, errorsFound, _, _, _, _, _); @@ -605,7 +612,8 @@ namespace AirLoopHVACDOAS { thisOutsideAirSys.OutletNodeNum(CompNum) = WaterCoils::GetCoilOutletNode(state, typeNameUC, CompName, OutletNodeErrFlag); thisDOAS.HWCtrlNodeNum = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", CompName, errorsFound); if (errorsFound) { - ShowContinueError(state, format("The control node number is not found in {} = {}", CurrentModuleObject, CompName)); + ShowContinueError(state, + EnergyPlus::format("The control node number is not found in {} = {}", CurrentModuleObject, CompName)); } PlantUtilities::ScanPlantLoopsForObject( state, CompName, DataPlant::PlantEquipmentType::CoilWaterSimpleHeating, thisDOAS.HWPlantLoc, errorsFound, _, _, _, _, _); @@ -626,7 +634,8 @@ namespace AirLoopHVACDOAS { thisDOAS.CWCtrlNodeNum = WaterCoils::GetCoilWaterInletNode(state, "Coil:Cooling:Water:DetailedGeometry", CompName, errorsFound); if (errorsFound) { - ShowContinueError(state, format("The control node number is not found in {} = {}", CurrentModuleObject, CompName)); + ShowContinueError(state, + EnergyPlus::format("The control node number is not found in {} = {}", CurrentModuleObject, CompName)); } PlantUtilities::ScanPlantLoopsForObject(state, CompName, @@ -728,21 +737,21 @@ namespace AirLoopHVACDOAS { default: ShowSevereError(state, - format(R"({} = "{}" invalid Outside Air Component="{}".)", - CurrentModuleObject, - CompName, - thisOutsideAirSys.ComponentType(CompNum))); + EnergyPlus::format(R"({} = "{}" invalid Outside Air Component="{}".)", + CurrentModuleObject, + CompName, + thisOutsideAirSys.ComponentType(CompNum))); errorsFound = true; } if (CoolingCoilOrder > FanOrder && !thisDOAS.FanBeforeCoolingCoilFlag) { thisDOAS.FanBeforeCoolingCoilFlag = true; } if (InletNodeErrFlag) { - ShowSevereError(state, format("Inlet node number is not found in {} = {}", CurrentModuleObject, CompName)); + ShowSevereError(state, EnergyPlus::format("Inlet node number is not found in {} = {}", CurrentModuleObject, CompName)); errorsFound = true; } if (OutletNodeErrFlag) { - ShowSevereError(state, format("Outlet node number is not found in {} = {}", CurrentModuleObject, CompName)); + ShowSevereError(state, EnergyPlus::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 @@ -763,16 +772,17 @@ namespace AirLoopHVACDOAS { } else { ShowSevereError( state, - 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))); + 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))); ShowContinueError(state, - format("The inlet node name = {}, and the outlet node name = {}.", - state.dataLoopNodes->NodeID(thisOutsideAirSys.InletNodeNum(CompNum)), - state.dataLoopNodes->NodeID(thisOutsideAirSys.OutletNodeNum(CompNum - 1)))); + EnergyPlus::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; } } @@ -810,7 +820,9 @@ namespace AirLoopHVACDOAS { if (thisDOAS.m_AirLoopSplitterIndex < 0) { cFieldName = "AirLoopHVAC:Splitter Name"; ShowSevereError( - state, format(R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.AirLoopSplitterName)); + state, + EnergyPlus::format( + R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.AirLoopSplitterName)); errorsFound = true; } @@ -847,7 +859,8 @@ namespace AirLoopHVACDOAS { thisDOAS.m_AirLoopNum.push_back(LoopNum); } else { cFieldName = "AirLoopHVAC Name"; - ShowSevereError(state, format(R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, name)); + ShowSevereError( + state, EnergyPlus::format(R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, name)); errorsFound = true; } } @@ -858,22 +871,23 @@ namespace AirLoopHVACDOAS { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisDOAS.m_InletNodeNum)) { ShowSevereError(state, - format("Inlet node ({}) is not one of OutdoorAir:Node in {} = {}", - state.dataLoopNodes->NodeID(thisDOAS.m_InletNodeNum), - CurrentModuleObject, - thisDOAS.Name)); + EnergyPlus::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, - format("The outlet node is not the inlet node of AirLoopHVAC:Splitter in {} = {}", CurrentModuleObject, thisDOAS.Name)); + ShowSevereError(state, + EnergyPlus::format("The outlet node is not the inlet node of AirLoopHVAC:Splitter in {} = {}", + CurrentModuleObject, + thisDOAS.Name)); ShowContinueError(state, - 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))); + 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))); errorsFound = true; } } @@ -883,8 +897,8 @@ namespace AirLoopHVACDOAS { if (Util::SameString(state.dataAirLoop->OutsideAirSys(OASysNum).ControllerListName, "")) { if (state.dataAirLoop->OutsideAirSys(OASysNum).AirLoopDOASNum == -1) { ShowSevereError(state, - format(R"(AirLoopHVAC:OutdoorAirSystem = "{}" invalid Controller List Name = " not found.)", - state.dataAirLoop->OutsideAirSys(OASysNum).Name)); + EnergyPlus::format(R"(AirLoopHVAC:OutdoorAirSystem = "{}" invalid Controller List Name = " not found.)", + state.dataAirLoop->OutsideAirSys(OASysNum).Name)); errorsFound = true; } } @@ -1020,13 +1034,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, format("AirLoopHVAC:DedicatedOutdoorAirSystem = {}.", this->Name)); + ShowWarningError(state, EnergyPlus::format("AirLoopHVAC:DedicatedOutdoorAirSystem = {}.", this->Name)); ShowContinueError(state, - format("The supply fan = {} has a volumetric air flow rate = {} m3/s.", - state.dataFans->fans(this->m_FanIndex)->Name, - supplyFanVolFlow)); - ShowContinueError(state, - format("The AirLoopHVAC:DedicatedOutdoorAirSystem Design Volume Flow Rate = {} m3/s.", sizingVolumeFlow)); + 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)); ShowContinueError(state, "Consider autosizing the supply fan Maximum Air Flow Rate."); } } else { @@ -1046,13 +1060,14 @@ 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, format("AirLoopHVAC:DedicatedOutdoorAirSystem = {}.", this->Name)); - ShowContinueError(state, - format("The exhaust fan = {} has a volumetric air flow rate = {} m3/s.", - state.dataFans->fans(this->m_exhaustFanIndex)->Name, - exhaustFanVolFlow)); + ShowWarningError(state, EnergyPlus::format("AirLoopHVAC:DedicatedOutdoorAirSystem = {}.", this->Name)); ShowContinueError(state, - format("The AirLoopHVAC:DedicatedOutdoorAirSystem Design Volume Flow Rate = {} m3/s.", sizingVolumeFlow)); + EnergyPlus::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)); ShowContinueError(state, "Consider autosizing the exhaust fan Maximum Air Flow Rate."); } } else { @@ -1144,14 +1159,15 @@ namespace AirLoopHVACDOAS { if (maxDiff > 1.0e-6) { if (loop.ConveCount == 0) { ++loop.ConveCount; - ShowWarningError(state, format("Convergence limit is above 1.0e-6 for unit={}", loop.Name)); + ShowWarningError(state, EnergyPlus::format("Convergence limit is above 1.0e-6 for unit={}", loop.Name)); ShowContinueErrorTimeStamp( - state, format("The max difference of node temperatures between AirLoopDOAS outlet and OA mixer inlet ={:.6R}", maxDiff)); + state, + EnergyPlus::format("The max difference of node temperatures between AirLoopDOAS outlet and OA mixer inlet ={:.6R}", maxDiff)); } else { ++loop.ConveCount; ShowRecurringWarningErrorAtEnd( state, - format(R"("{}": The max difference of node temperatures exceeding 1.0e-6 continues...)", loop.Name), + EnergyPlus::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/src/Properties.cpp b/src/EnergyPlus/AirflowNetwork/src/Properties.cpp index 155634af81c..a19e41ae7c4 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Properties.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Properties.cpp @@ -91,21 +91,23 @@ namespace AirflowNetwork { if (lowerLimitErrIdx == 0) { ShowWarningMessage(m_state, "Air temperature below lower limit of -20C for conductivity calculation"); } - ShowRecurringWarningErrorAtEnd(m_state, - format("Air temperature below lower limit of -20C for conductivity calculation. Air temperature of {:.1R} " - "used for conductivity calculation.", - LowerLimit), - lowerLimitErrIdx); + ShowRecurringWarningErrorAtEnd( + m_state, + EnergyPlus::format("Air temperature below lower limit of -20C for conductivity calculation. Air temperature of {:.1R} " + "used for conductivity calculation.", + LowerLimit), + lowerLimitErrIdx); T = LowerLimit; } else if (T > UpperLimit) { if (upperLimitErrIdx == 0) { ShowWarningMessage(m_state, "Air temperature above upper limit of 70C for conductivity calculation"); } - ShowRecurringWarningErrorAtEnd(m_state, - format("Air temperature above upper limit of 70C for conductivity calculation. Air temperature of {:.1R} " - "used for conductivity calculation.", - UpperLimit), - upperLimitErrIdx); + ShowRecurringWarningErrorAtEnd( + m_state, + EnergyPlus::format("Air temperature above upper limit of 70C for conductivity calculation. Air temperature of {:.1R} " + "used for conductivity calculation.", + UpperLimit), + upperLimitErrIdx); T = UpperLimit; } diff --git a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp index 073bfb9c6a6..a7ea85e5302 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp @@ -355,20 +355,21 @@ namespace AirflowNetwork { if (fields.find("reference_barometric_pressure") != fields.end()) { // not required field, has default value pressure = fields.at("reference_barometric_pressure").get(); if (std::abs((pressure - m_state.dataEnvrn->StdBaroPress) / m_state.dataEnvrn->StdBaroPress) > 0.1) { // 10% off - ShowWarningError(m_state, - format("{}: {}: Pressure = {:.0R} differs by more than 10% from Standard Barometric Pressure = {:.0R}.", - RoutineName, - CurrentModuleObject, - pressure, - m_state.dataEnvrn->StdBaroPress)); + ShowWarningError( + m_state, + EnergyPlus::format("{}: {}: Pressure = {:.0R} differs by more than 10% from Standard Barometric Pressure = {:.0R}.", + RoutineName, + CurrentModuleObject, + pressure, + m_state.dataEnvrn->StdBaroPress)); ShowContinueError(m_state, "...occurs in " + CurrentModuleObject + " = " + thisObjectName); } if (pressure <= 31000.0) { ShowSevereError(m_state, - format("{}: {}: {}. Reference Barometric Pressure must be greater than 31000 Pa.", - RoutineName, - CurrentModuleObject, - thisObjectName)); + EnergyPlus::format("{}: {}: {}. Reference Barometric Pressure must be greater than 31000 Pa.", + RoutineName, + CurrentModuleObject, + thisObjectName)); success = false; } } @@ -424,11 +425,11 @@ namespace AirflowNetwork { if (result == referenceConditions.end()) { ShowSevereError(m_state, - format("{}: {}: {}. Cannot find reference crack conditions object \"{}\".", - RoutineName, - CurrentModuleObject, - thisObjectName, - refCrackCondName)); + EnergyPlus::format("{}: {}: {}. Cannot find reference crack conditions object \"{}\".", + RoutineName, + CurrentModuleObject, + thisObjectName, + refCrackCondName)); success = false; } else { refT = result->second.temperature; @@ -478,8 +479,9 @@ namespace AirflowNetwork { // This breaks the component model, need to fix int fanIndex = GetFanIndex(m_state, thisObjectName); if (fanIndex == 0) { - ShowSevereError(m_state, - format("{}: {} = {} is not found in Fan:ZoneExhaust objects.", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError( + m_state, + EnergyPlus::format("{}: {} = {} is not found in Fan:ZoneExhaust objects.", RoutineName, CurrentModuleObject, thisObjectName)); success = false; } @@ -492,10 +494,10 @@ namespace AirflowNetwork { HVAC::FanType fanType = fan->type; if (fanType != HVAC::FanType::Exhaust) { ShowSevereError(m_state, - format("{}: {} = {}. The specified Name is not found as a valid Fan:ZoneExhaust object.", - RoutineName, - CurrentModuleObject, - thisObjectName)); + EnergyPlus::format("{}: {} = {}. The specified Name is not found as a valid Fan:ZoneExhaust object.", + RoutineName, + CurrentModuleObject, + thisObjectName)); success = false; } @@ -508,11 +510,11 @@ namespace AirflowNetwork { auto result = referenceConditions.find(Util::makeUPPER(refCrackCondName)); if (result == referenceConditions.end()) { ShowSevereError(m_state, - format("{}: {}: {}. Cannot find reference crack conditions object \"{}\".", - RoutineName, - CurrentModuleObject, - thisObjectName, - fields.at("reference_crack_conditions").get())); + EnergyPlus::format("{}: {}: {}. Cannot find reference crack conditions object \"{}\".", + RoutineName, + CurrentModuleObject, + thisObjectName, + fields.at("reference_crack_conditions").get())); success = false; } else { refT = result->second.temperature; @@ -542,7 +544,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -574,11 +577,11 @@ namespace AirflowNetwork { int OAMixerNum = MixedAir::GetOAMixerNumber(m_state, mixer_name); if (OAMixerNum == 0) { ShowSevereError(m_state, - format("{}: {}: {}. Invalid Outdoor Air Mixer Name \"{}\" given.", - RoutineName, - CurrentModuleObject, - thisObjectName, - mixer_name)); + EnergyPlus::format("{}: {}: {}. Invalid Outdoor Air Mixer Name \"{}\" given.", + RoutineName, + CurrentModuleObject, + thisObjectName, + mixer_name)); success = false; } @@ -591,11 +594,11 @@ namespace AirflowNetwork { auto result = referenceConditions.find(Util::makeUPPER(refCrackCondName)); if (result == referenceConditions.end()) { ShowSevereError(m_state, - format("{}: {}: {}. Cannot find reference crack conditions object \"{}\".", - RoutineName, - CurrentModuleObject, - thisObjectName, - refCrackCondName)); + EnergyPlus::format("{}: {}: {}. Cannot find reference crack conditions object \"{}\".", + RoutineName, + CurrentModuleObject, + thisObjectName, + refCrackCondName)); success = false; } else { refT = result->second.temperature; @@ -623,7 +626,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -655,7 +659,7 @@ namespace AirflowNetwork { int OAMixerNum{MixedAir::GetOAMixerNumber(m_state, mixer_name)}; if (OAMixerNum == 0) { ShowSevereError(m_state, - format(RoutineName) + ": " + CurrentModuleObject + " object " + thisObjectName + ". Invalid " + + EnergyPlus::format(RoutineName) + ": " + CurrentModuleObject + " object " + thisObjectName + ". Invalid " + "Outdoor Air Mixer Name" + " \"" + mixer_name + "\" given."); success = false; } @@ -669,11 +673,11 @@ namespace AirflowNetwork { auto result = referenceConditions.find(Util::makeUPPER(refCrackCondName)); if (result == referenceConditions.end()) { ShowSevereError(m_state, - format("{}: {}: {}. Cannot find reference crack conditions object \"{}\".", - RoutineName, - CurrentModuleObject, - thisObjectName, - refCrackCondName)); + EnergyPlus::format("{}: {}: {}. Cannot find reference crack conditions object \"{}\".", + RoutineName, + CurrentModuleObject, + thisObjectName, + refCrackCondName)); success = false; } else { refT = result->second.temperature; @@ -699,7 +703,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -739,8 +744,8 @@ namespace AirflowNetwork { } else { // Code will never be executed, validation will catch invalid input ShowSevereError(m_state, - format(RoutineName) + "Invalid Type of Rectangular Large Vertical Opening (LVO) = " + LVOstring + "in " + - CurrentModuleObject + " = " + thisObjectName); + EnergyPlus::format(RoutineName) + "Invalid Type of Rectangular Large Vertical Opening (LVO) = " + LVOstring + + "in " + CurrentModuleObject + " = " + thisObjectName); ShowContinueError(m_state, "Valid choices are NonPivoted and HorizontallyPivoted."); success = false; } @@ -895,11 +900,11 @@ namespace AirflowNetwork { MultizoneCompDetOpeningData(i).StartHFac4 = 0.0; // Start height factor for opening factor #4 if (N == 2) { if (factors[1] != 1.0) { - ShowWarningError(m_state, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowWarningError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError( m_state, "..This object specifies that only 3 opening factors will be used. So, the value of Opening Factor #2 is set to 1.0."); - ShowContinueError(m_state, format("..Input value was {:.2R}", MultizoneCompDetOpeningData(i).OpenFac2)); + ShowContinueError(m_state, EnergyPlus::format("..Input value was {:.2R}", MultizoneCompDetOpeningData(i).OpenFac2)); MultizoneCompDetOpeningData(i).OpenFac2 = 1.0; } } else if (N >= 3) { @@ -911,11 +916,11 @@ namespace AirflowNetwork { if (N >= 4) { MultizoneCompDetOpeningData(i).OpenFac4 = factors[3]; // Opening factor #4 if (factors[3] != 1.0) { - ShowWarningError(m_state, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowWarningError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError(m_state, "..This object specifies that 4 opening factors will be used. So, the value of Opening Factor #4 " "is set to 1.0."); - ShowContinueError(m_state, format("..Input value was {:.2R}", MultizoneCompDetOpeningData(i).OpenFac4)); + ShowContinueError(m_state, EnergyPlus::format("..Input value was {:.2R}", MultizoneCompDetOpeningData(i).OpenFac4)); MultizoneCompDetOpeningData(i).OpenFac4 = 1.0; } MultizoneCompDetOpeningData(i).DischCoeff4 = cds[3]; // Discharge coefficient for opening factor #4 @@ -924,11 +929,11 @@ namespace AirflowNetwork { MultizoneCompDetOpeningData(i).StartHFac4 = start_height_factors[3]; // Start height factor for opening factor #4 } else { if (factors[2] != 1.0) { - ShowWarningError(m_state, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowWarningError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError(m_state, "..This object specifies that only 3 opening factors will be used. So, the value of Opening Factor #3 " "is set to 1.0."); - ShowContinueError(m_state, format("..Input value was {:.2R}", MultizoneCompDetOpeningData(i).OpenFac3)); + ShowContinueError(m_state, EnergyPlus::format("..Input value was {:.2R}", MultizoneCompDetOpeningData(i).OpenFac3)); MultizoneCompDetOpeningData(i).OpenFac3 = 1.0; } } @@ -936,25 +941,25 @@ namespace AirflowNetwork { // Sanity checks, check sum of Height Factor and the Start Height Factor if (MultizoneCompDetOpeningData(i).HeightFac1 + MultizoneCompDetOpeningData(i).StartHFac1 > 1.0) { - ShowSevereError(m_state, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError( m_state, "..The sum of Height Factor for Opening Factor 1 and Start Height Factor for Opening Factor 1 is greater than 1.0"); success = false; } if (MultizoneCompDetOpeningData(i).HeightFac2 + MultizoneCompDetOpeningData(i).StartHFac2 > 1.0) { - ShowSevereError(m_state, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError( m_state, "..The sum of Height Factor for Opening Factor 2 and Start Height Factor for Opening Factor 2 is greater than 1.0"); success = false; } if (MultizoneCompDetOpeningData(i).NumFac > 2) { if (MultizoneCompDetOpeningData(i).OpenFac2 >= MultizoneCompDetOpeningData(i).OpenFac3) { - ShowSevereError(m_state, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, EnergyPlus::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, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, EnergyPlus::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"); @@ -962,12 +967,12 @@ namespace AirflowNetwork { } if (MultizoneCompDetOpeningData(i).NumFac == 4) { if (MultizoneCompDetOpeningData(i).OpenFac3 >= MultizoneCompDetOpeningData(i).OpenFac4) { - ShowSevereError(m_state, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, EnergyPlus::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, format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, EnergyPlus::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"); @@ -982,7 +987,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -1025,7 +1031,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -1071,7 +1078,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -1123,7 +1131,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::format( + "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); success = false; } @@ -1160,7 +1169,8 @@ namespace AirflowNetwork { if (elements.find(thisObjectName) != elements.end()) { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::format( + "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); success = false; } @@ -1213,7 +1223,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -1255,7 +1266,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -1331,7 +1343,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -1344,10 +1357,11 @@ 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, format("The number of entered AirflowNetwork:Distribution:Component:Fan objects is {}", DisSysNumOfCVFs)); ShowSevereError(m_state, - format("The number of entered AirLoopHVAC objects is {}", - m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "AirLoopHVAC"))); + 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"))); ShowContinueError(m_state, "Both numbers should be equal. Please check your inputs."); success = false; } @@ -1414,7 +1428,8 @@ namespace AirflowNetwork { if (!(fanType2 == HVAC::FanType::Constant || fanType2 == HVAC::FanType::OnOff || fanType2 == HVAC::FanType::VAV)) { ShowSevereError( m_state, - format("{}The Supply Fan Object Type in {} = {} is not a valid fan type.", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } else { @@ -1460,8 +1475,9 @@ namespace AirflowNetwork { if (elements.find(fan_name) == elements.end()) { elements[fan_name] = &DisSysCompCVFData(i); // Yet another workaround } else { - ShowSevereError( - m_state, format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, fan_name)); + ShowSevereError(m_state, + EnergyPlus::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; } @@ -1498,10 +1514,10 @@ namespace AirflowNetwork { elements[DisSysCompCoilData(i).name] = &DisSysCompCoilData(i); // Yet another workaround } else { ShowSevereError(m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", - RoutineName, - CurrentModuleObject, - DisSysCompCoilData(i).name)); + EnergyPlus::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; } @@ -1539,10 +1555,10 @@ namespace AirflowNetwork { elements[DisSysCompHXData(i).name] = &DisSysCompHXData(i); // Yet another workaround } else { ShowSevereError(m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", - RoutineName, - CurrentModuleObject, - DisSysCompHXData(i).name)); + EnergyPlus::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; } @@ -1578,10 +1594,10 @@ namespace AirflowNetwork { elements[DisSysCompTermUnitData(i).name] = &DisSysCompTermUnitData(i); // Yet another workaround } else { ShowSevereError(m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", - RoutineName, - CurrentModuleObject, - DisSysCompTermUnitData(i).name)); + EnergyPlus::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; } @@ -1615,7 +1631,8 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); + EnergyPlus::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; } @@ -1790,18 +1807,20 @@ 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, format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(1) + " < 0.0"); - ShowContinueError(m_state, - format("..Input value = {:.1R}, Value will be reset to 0.0", OccupantVentilationControl(i).MinOpeningTime)); + ShowWarningError(m_state, EnergyPlus::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)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + OccupantVentilationControl(i).Name); OccupantVentilationControl(i).MinOpeningTime = 0.0; } OccupantVentilationControl(i).MinClosingTime = Numbers(2); if (OccupantVentilationControl(i).MinClosingTime < 0.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " < 0.0"); - ShowContinueError(m_state, - format("..Input value = {:.1R}, Value will be reset to 0.0", OccupantVentilationControl(i).MinClosingTime)); + ShowWarningError(m_state, EnergyPlus::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)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + OccupantVentilationControl(i).Name); OccupantVentilationControl(i).MinClosingTime = 0.0; } @@ -1814,7 +1833,7 @@ namespace AirflowNetwork { if (OccupantVentilationControl(i).ComfortLowTempCurveNum == 0) { OccupantVentilationControl(i).MinTimeControlOnly = true; ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(2) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(2) + " not found = " + OccupantVentilationControl(i).ComfortLowTempCurveName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ShowContinueError( @@ -1843,7 +1862,7 @@ namespace AirflowNetwork { cAlphaFields(3)); // Field Name } else { ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + + EnergyPlus::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."); @@ -1853,10 +1872,10 @@ 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, format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(3) + " < 0.0"); - ShowContinueError( - m_state, - format("..Input value = {:.1R}, Value will be reset to 10.0 as default", OccupantVentilationControl(i).ComfortBouPoint)); + ShowWarningError(m_state, EnergyPlus::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)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + OccupantVentilationControl(i).Name); OccupantVentilationControl(i).ComfortBouPoint = 10.0; } @@ -1866,11 +1885,12 @@ 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, - format(RoutineName) + CurrentModuleObject + + EnergyPlus::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(m_state, - format("The input value of {} = {:.1R}", cNumericFields(3), OccupantVentilationControl(i).ComfortBouPoint)); + ShowContinueError( + m_state, + EnergyPlus::format("The input value of {} = {:.1R}", cNumericFields(3), OccupantVentilationControl(i).ComfortBouPoint)); ErrorsFound = true; } } @@ -1879,9 +1899,11 @@ 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, - format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + " beyond 0.0 and 100.0"); - ShowContinueError( - m_state, format("..Input value = {:.1R}, Value will be reset to 10.0 as default", OccupantVentilationControl(i).MaxPPD)); + EnergyPlus::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)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + OccupantVentilationControl(i).Name); OccupantVentilationControl(i).MaxPPD = 10.0; } @@ -1894,8 +1916,8 @@ namespace AirflowNetwork { } else { // Code will never be executed, validation will catch invalid input ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" invalid " + cAlphaFields(2) + "=\"" + - Alphas(2) + "\" illegal key."); + EnergyPlus::format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" invalid " + cAlphaFields(2) + + "=\"" + Alphas(2) + "\" illegal key."); ShowContinueError(m_state, "Valid keys are: Yes or No"); ErrorsFound = true; } @@ -1905,7 +1927,7 @@ namespace AirflowNetwork { OccupantVentilationControl(i).openingProbSched = Sched::GetSchedule(m_state, OccupantVentilationControl(i).OpeningProbSchName); if (OccupantVentilationControl(i).openingProbSched == nullptr) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(5) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(5) + " not found = " + OccupantVentilationControl(i).OpeningProbSchName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ErrorsFound = true; @@ -1916,7 +1938,7 @@ namespace AirflowNetwork { OccupantVentilationControl(i).closingProbSched = Sched::GetSchedule(m_state, OccupantVentilationControl(i).ClosingProbSchName); if (OccupantVentilationControl(i).closingProbSched == nullptr) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + " not found = " + OccupantVentilationControl(i).ClosingProbSchName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ErrorsFound = true; @@ -1926,7 +1948,7 @@ namespace AirflowNetwork { } if (ErrorsFound) { - ShowFatalError(m_state, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } // *** Read AirflowNetwork simulation parameters @@ -1954,7 +1976,7 @@ namespace AirflowNetwork { simulation_control.MaxPressure = 500.0; // Maximum pressure difference by default SimAirNetworkKey = "MultizoneWithoutDistribution"; simulation_control.InitFlag = 1; - ShowWarningError(m_state, format("{}{} object is not found ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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); @@ -1967,7 +1989,7 @@ namespace AirflowNetwork { } } if (NumAirflowNetwork > 1) { - ShowFatalError(m_state, format("{}Only one (\"1\") {} object per simulation is allowed.", RoutineName, CurrentModuleObject)); + ShowFatalError(m_state, EnergyPlus::format("{}Only one (\"1\") {} object per simulation is allowed.", RoutineName, CurrentModuleObject)); } if (!control_defaulted && !simulation_control.DuctLoss) { @@ -2057,7 +2079,7 @@ namespace AirflowNetwork { m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "ZoneThermalChimney") + m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "ZoneCoolTower:Shower") == 0) { - ShowWarningError(m_state, format("{}{} = \"{}\"", RoutineName, cAlphaFields(2), SimAirNetworkKey)); + ShowWarningError(m_state, EnergyPlus::format("{}{} = \"{}\"", RoutineName, cAlphaFields(2), SimAirNetworkKey)); ShowContinueError( m_state, "..but there are no Infiltration, Ventilation, Mixing, Cross Mixing or ZoneAirBalance objects. The simulation continues..."); @@ -2071,50 +2093,50 @@ namespace AirflowNetwork { if (multizone_always_simulated) { if (m_state.dataHeatBal->TotInfiltration > 0) { - ShowWarningError(m_state, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::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."); @@ -2127,7 +2149,7 @@ namespace AirflowNetwork { if (Util::SameString(simulation_control.WPCCntr, "Input")) { simulation_control.iWPCCnt = iWPCCntr::Input; if (lAlphaBlanks(4)) { - ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + " = INPUT."); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + " = INPUT."); ShowContinueError(m_state, ".." + cAlphaFields(4) + " was not entered."); ErrorsFound = true; SimObjectError = true; @@ -2135,8 +2157,8 @@ namespace AirflowNetwork { if (!(Util::SameString(simulation_control.HeightOption, "ExternalNode") || Util::SameString(simulation_control.HeightOption, "OpeningHeight"))) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(4) + " = " + Alphas(4) + - " is invalid."); + EnergyPlus::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); @@ -2147,8 +2169,9 @@ namespace AirflowNetwork { } else if (Util::SameString(simulation_control.WPCCntr, "SurfaceAverageCalculation")) { simulation_control.iWPCCnt = iWPCCntr::SurfAvg; if (!(Util::SameString(simulation_control.BldgType, "LowRise") || Util::SameString(simulation_control.BldgType, "HighRise"))) { - ShowSevereError( - m_state, format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(5) + " = " + Alphas(5) + " is invalid."); + ShowSevereError(m_state, + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(5) + " = " + Alphas(5) + + " is invalid."); ShowContinueError(m_state, "Valid choices are LowRise or HighRise. " + CurrentModuleObject + ": " + cAlphaFields(1) + " = " + simulation_control.name); @@ -2157,7 +2180,7 @@ namespace AirflowNetwork { } for (k = 1; k <= m_state.dataLoopNodes->NumOfNodes; ++k) { if (Node(k).IsLocalNode) { - ShowSevereError(m_state, format(RoutineName) + "Invalid " + cAlphaFields(3) + "=" + Alphas(3)); + ShowSevereError(m_state, EnergyPlus::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 " @@ -2170,8 +2193,8 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + " = " + simulation_control.WPCCntr + - " is not valid."); + EnergyPlus::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); ErrorsFound = true; @@ -2190,7 +2213,8 @@ namespace AirflowNetwork { } else { // Code will never be executed, validation will catch invalid input ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + " = " + Alphas(6) + " is invalid."); + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + " = " + Alphas(6) + + " is invalid."); ShowContinueError(m_state, "Valid choices are LinearInitializationMethod or ZeroNodePressures. " + CurrentModuleObject + " = " + simulation_control.name); @@ -2210,7 +2234,7 @@ namespace AirflowNetwork { simulation_control.solver = SimulationControl::Solver::ConjugateGradient; } else { simulation_control.solver = SimulationControl::Solver::SkylineLU; - ShowWarningError(m_state, format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError(m_state, "..Specified " + cAlphaFields(8) + " = \"" + Alphas(8) + "\" is unrecognized."); ShowContinueError(m_state, "..Default value \"SkylineLU\" will be used."); } @@ -2222,12 +2246,13 @@ namespace AirflowNetwork { simulation_control.autosize_ducts = true; if (simulation_control.type == ControlType::MultizoneWithDistribution) { if (NumAPL > 1) { - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, "); + ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, "); ShowContinueError( m_state, - format("The number of AirLoopHAVC is greater than 1. The current requirement for Duct Sizing requires a " - "single AirLoopHVAC.")); - ShowContinueError(m_state, format("..Duct sizing is not performed")); + 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")); simulation_control.autosize_ducts = false; } } @@ -2235,9 +2260,10 @@ namespace AirflowNetwork { } if (SimObjectError) { - ShowFatalError( - m_state, - format("{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); + ShowFatalError(m_state, + EnergyPlus::format("{}Errors found getting {} object. Previous error(s) cause program termination.", + RoutineName, + CurrentModuleObject)); } simulation_control.maximum_iterations = static_cast(Numbers(1)); @@ -2253,20 +2279,22 @@ namespace AirflowNetwork { CurrentModuleObject = "AirflowNetwork:Distribution:DuctSizing"; int NumDuctSizing = m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, CurrentModuleObject); if (NumDuctSizing > 1) { - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, "); + ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, "); ShowContinueError( m_state, - format("The number of AirflowNetwork:Distribution:DuctSizing is greater than 1. The current requirement for Duct Sizing requires a " - "single object.")); - ShowContinueError(m_state, format("..Duct sizing is not performed")); + EnergyPlus::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")); simulation_control.autosize_ducts = false; } else if (simulation_control.autosize_ducts && NumDuctSizing == 0) { - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, "); + ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, "); ShowContinueError( m_state, - format("The number of AirflowNetwork:Distribution:DuctSizing is not available. The current requirement for Duct Sizing requires a " - "single object.")); - ShowContinueError(m_state, format("..Duct sizing is not performed")); + EnergyPlus::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")); simulation_control.autosize_ducts = false; } if (simulation_control.autosize_ducts && NumDuctSizing == 1) { @@ -2291,22 +2319,24 @@ namespace AirflowNetwork { } else if (Util::SameString(Alphas(2), Util::makeUPPER("PressureLossWithMaximumVelocity"))) { simulation_control.ductSizing.method = DuctSizingMethod::VelocityAndLoss; } else { - ShowSevereError(m_state, format("{} {} object, {} = {} is invalid.", RoutineName, CurrentModuleObject, cAlphaFields(2), Alphas(2))); - ShowContinueError(m_state, - format("Valid choices are MaximumVelocity, PressureLoss, and PressureLossWithMaximumVelocity. {}: {} = {}", - CurrentModuleObject, - cAlphaFields(1), - Alphas(1))); + 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))); ErrorsFound = true; } if (simulation_control.type != ControlType::MultizoneWithDistribution) { - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, "); + ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, "); ShowContinueError(m_state, - format("Although {} = \"{}\" is entered, but {} is not MultizoneWithoutDistribution.", - cAlphaFields(10), - Alphas(10), - cAlphaFields(2))); - ShowContinueError(m_state, format("..Duct sizing is not performed")); + 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")); simulation_control.autosize_ducts = false; } simulation_control.ductSizing.factor = Numbers(1); @@ -2366,7 +2396,7 @@ namespace AirflowNetwork { Util::FindItemInList(MultizoneZoneData(i).OccupantVentilationControlName, OccupantVentilationControl); if (MultizoneZoneData(i).OccupantVentilationControlNum == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + " not found = " + MultizoneZoneData(i).OccupantVentilationControlName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ErrorsFound = true; @@ -2406,10 +2436,11 @@ namespace AirflowNetwork { } } else if (!simulation_control.DuctLoss) { ShowSevereError(m_state, - format(RoutineName) + "For an AirflowNetwork Simulation, at least one " + CurrentModuleObject + + EnergyPlus::format(RoutineName) + "For an AirflowNetwork Simulation, at least one " + CurrentModuleObject + " object is required but none were found."); - ShowFatalError( - m_state, format("{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); + ShowFatalError(m_state, + EnergyPlus::format( + "{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); } // ==> Zone data validation @@ -2427,7 +2458,7 @@ namespace AirflowNetwork { } if (MultizoneZoneData(i).VentCtrNum == VentControlType::None) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, invalid " + cAlphaFields(2) + " = " + + EnergyPlus::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 + "\""); @@ -2456,8 +2487,9 @@ 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, format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(1) + " is out of range [0.0,1.0]"); - ShowContinueError(m_state, format("..Input value = {:.2R}, Value will be set to 1.0", MultizoneZoneData(i).OpenFactor)); + ShowWarningError( + m_state, EnergyPlus::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; } @@ -2467,25 +2499,29 @@ 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, format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " < 0.0"); - ShowContinueError(m_state, format("..Input value = {:.1R}, Value will be set to 0.0", MultizoneZoneData(i).LowValueTemp)); + ShowWarningError(m_state, EnergyPlus::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); MultizoneZoneData(i).LowValueTemp = 0.0; } if (MultizoneZoneData(i).LowValueTemp >= 100.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " >= 100.0"); - ShowContinueError(m_state, format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneZoneData(i).LowValueTemp)); + ShowWarningError(m_state, + EnergyPlus::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, - format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(3) + " <= " + cNumericFields(2)); + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(3) + + " <= " + cNumericFields(2)); ShowContinueError(m_state, - format("..Input value for {} = {:.1R}, Value will be reset to 100.0", - cNumericFields(3), - MultizoneZoneData(i).UpValueTemp)); + EnergyPlus::format("..Input value for {} = {:.1R}, Value will be reset to 100.0", + cNumericFields(3), + MultizoneZoneData(i).UpValueTemp)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + MultizoneZoneData(i).ZoneName); MultizoneZoneData(i).UpValueTemp = 100.0; } @@ -2493,25 +2529,29 @@ 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, format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + " < 0.0"); - ShowContinueError(m_state, format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneZoneData(i).LowValueEnth)); + ShowWarningError(m_state, EnergyPlus::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); MultizoneZoneData(i).LowValueEnth = 0.0; } if (MultizoneZoneData(i).LowValueEnth >= 300000.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + " >= 300000.0"); - ShowContinueError(m_state, format("..Input value = {:.1R}, Value will be reset to 0.0.", MultizoneZoneData(i).LowValueEnth)); + ShowWarningError(m_state, + EnergyPlus::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); MultizoneZoneData(i).LowValueEnth = 0.0; } if (MultizoneZoneData(i).UpValueEnth <= MultizoneZoneData(i).LowValueEnth) { - ShowWarningError(m_state, - format("{}{} object, {} <= {}", RoutineName, CurrentModuleObject, cNumericFields(5), cNumericFields(4))); + ShowWarningError( + m_state, + EnergyPlus::format("{}{} object, {} <= {}", RoutineName, CurrentModuleObject, cNumericFields(5), cNumericFields(4))); ShowContinueError(m_state, - format("..Input value for {}= {:.1R}, Value will be reset to 300000.0", - cNumericFields(5), - MultizoneZoneData(i).UpValueEnth)); + EnergyPlus::format("..Input value for {}= {:.1R}, Value will be reset to 300000.0", + cNumericFields(5), + MultizoneZoneData(i).UpValueEnth)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + MultizoneZoneData(i).ZoneName); MultizoneZoneData(i).UpValueEnth = 300000.0; } @@ -2557,14 +2597,14 @@ namespace AirflowNetwork { MultizoneExternalNodeData(i).height = Numbers(1); // Nodal height if (Util::SameString(simulation_control.HeightOption, "ExternalNode") && lNumericBlanks(1)) { ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + " object =" + Alphas(1) + ". The input of " + cNumericFields(1) + - " is required, but a blank is found."); - ShowContinueError(m_state, format("The default value is assigned as {:.1R}", Numbers(1))); + EnergyPlus::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, format(RoutineName) + "Invalid " + cAlphaFields(2) + "=" + Alphas(2)); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "Invalid " + cAlphaFields(2) + "=" + Alphas(2)); ShowContinueError(m_state, "Entered in " + CurrentModuleObject + '=' + Alphas(1)); ErrorsFound = true; } @@ -2572,8 +2612,9 @@ namespace AirflowNetwork { if (Util::SameString(Alphas(3), "Yes")) { MultizoneExternalNodeData(i).symmetricCurve = true; } else if (!Util::SameString(Alphas(3), "No")) { - ShowWarningError( - m_state, format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(3) + " = " + Alphas(3)); + ShowWarningError(m_state, + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(3) + + " = " + Alphas(3)); ShowContinueError(m_state, "The default value is assigned as No."); } } @@ -2582,8 +2623,9 @@ namespace AirflowNetwork { MultizoneExternalNodeData(i).useRelativeAngle = true; } else if (!Util::SameString(Alphas(4), "Absolute")) { // Code will never be executed, validation will catch invalid input - ShowWarningError( - m_state, format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(4) + " = " + Alphas(4)); + ShowWarningError(m_state, + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(4) + + " = " + Alphas(4)); ShowContinueError(m_state, "The default value is assigned as Absolute."); } } @@ -2609,7 +2651,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, format(RoutineName) + "Invalid " + cAlphaFields(6) + "=" + Alphas(6)); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "Invalid " + cAlphaFields(6) + "=" + Alphas(6)); ShowContinueError(m_state, "Entered in " + CurrentModuleObject + '=' + Alphas(1)); ErrorsFound = true; } @@ -2620,8 +2662,8 @@ namespace AirflowNetwork { MultizoneExternalNodeData(i).symmetricCurve = true; } else if (!Util::SameString(Alphas(7), "No")) { ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(7) + " = " + - Alphas(7)); + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(7) + + " = " + Alphas(7)); ShowContinueError(m_state, "The default value is assigned as No."); } } @@ -2631,8 +2673,8 @@ namespace AirflowNetwork { MultizoneExternalNodeData(i).useRelativeAngle = true; } else if (!Util::SameString(Alphas(8), "Absolute")) { ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(8) + " = " + - Alphas(8)); + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(8) + + " = " + Alphas(8)); ShowContinueError(m_state, "The default value is assigned as Absolute."); } } @@ -2654,7 +2696,7 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + + EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found when Wind Pressure Coefficient Type = Input."); ErrorsFound = true; } @@ -2687,7 +2729,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, format(RoutineName) + "Invalid " + cAlphaFields(3) + "=" + Alphas(3)); + ShowSevereError(m_state, EnergyPlus::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."); @@ -2696,9 +2738,10 @@ 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, - format(RoutineName) + CurrentModuleObject + " object=" + MultizoneSurfaceData(i).SurfName + ", " + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object=" + MultizoneSurfaceData(i).SurfName + ", " + cNumericFields(1) + " is out of range (0.0,1.0]"); - ShowContinueError(m_state, format("..Input value = {:.2R}, Value will be set to 1.0", MultizoneSurfaceData(i).Factor)); + ShowContinueError(m_state, + EnergyPlus::format("..Input value = {:.2R}, Value will be set to 1.0", MultizoneSurfaceData(i).Factor)); MultizoneSurfaceData(i).Factor = 1.0; } // Get input of ventilation control and associated data @@ -2744,7 +2787,7 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).VentSurfCtrNum = VentControlType::AdjEnth; MultizoneSurfaceData(i).IndVentControl = true; } else { - ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(4)); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(4)); ShowContinueError(m_state, ".." + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName + ", Specified " + cAlphaFields(4) + " = " + Alphas(4)); @@ -2772,7 +2815,7 @@ namespace AirflowNetwork { Util::FindItemInList(MultizoneSurfaceData(i).OccupantVentilationControlName, OccupantVentilationControl); if (MultizoneSurfaceData(i).OccupantVentilationControlNum == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(7) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(7) + " not found = " + MultizoneSurfaceData(i).OccupantVentilationControlName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ErrorsFound = true; @@ -2787,7 +2830,7 @@ namespace AirflowNetwork { } else if (Alphas(8) == "USERDEFINEDASPECTRATIO") { MultizoneSurfaceData(i).EquivRecMethod = EquivRec::UserAspectRatio; } else { - ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(8)); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(8)); ShowContinueError(m_state, ".." + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName + ", Specified " + cAlphaFields(8) + " = " + Alphas(8)); @@ -2805,7 +2848,7 @@ namespace AirflowNetwork { } } } else if (!simulation_control.DuctLoss) { - ShowSevereError(m_state, format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } @@ -2842,13 +2885,14 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).SurfNum = Util::FindItemInList(MultizoneSurfaceData(i).SurfName, m_state.dataSurface->Surface); if (MultizoneSurfaceData(i).SurfNum == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(1) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(1) + " given = " + MultizoneSurfaceData(i).SurfName); - ShowFatalError(m_state, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, + EnergyPlus::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, format(RoutineName) + CurrentModuleObject + " object"); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object"); ShowContinueError(m_state, "..The surface specified must be a heat transfer surface. Invalid " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); @@ -2860,7 +2904,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, format(RoutineName) + CurrentModuleObject + " object"); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object"); ShowContinueError(m_state, "..The surface facing itself is not allowed. Invalid " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); @@ -2869,7 +2913,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, format(RoutineName) + CurrentModuleObject + " object"); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object"); ShowContinueError(m_state, "..The base surface facing itself is not allowed. Invalid " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); @@ -2895,11 +2939,13 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).NodeNums[0] = j; } else { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); + EnergyPlus::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, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, + EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } // Calculate equivalent width and height @@ -2916,8 +2962,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, - format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); + ShowWarningError( + m_state, EnergyPlus::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."); @@ -2930,8 +2976,8 @@ namespace AirflowNetwork { m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Area / MultizoneSurfaceData(i).Width; // add warning if (m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); + ShowWarningError( + m_state, EnergyPlus::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."); @@ -2984,8 +3030,8 @@ namespace AirflowNetwork { m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Area / (maxHeight - minHeight); // add warning if (m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); + ShowWarningError( + m_state, EnergyPlus::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."); @@ -2998,8 +3044,8 @@ namespace AirflowNetwork { m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Area / MultizoneSurfaceData(i).Width; // add warning if (m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); + ShowWarningError( + m_state, EnergyPlus::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."); @@ -3040,7 +3086,7 @@ namespace AirflowNetwork { } if (!found) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": Invalid " + cAlphaFields(3) + " = " + + EnergyPlus::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; @@ -3055,7 +3101,7 @@ namespace AirflowNetwork { !(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond == OtherSideCoefNoCalcExt && m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtWind)) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": Invalid " + cAlphaFields(1) + " = " + + EnergyPlus::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; @@ -3072,7 +3118,7 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).NodeNums[1] = j; } else { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError( m_state, @@ -3095,7 +3141,7 @@ namespace AirflowNetwork { if (found) { MultizoneSurfaceData(i).NodeNums[1] = j; } else { - ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " = " + MultizoneSurfaceData(i).SurfName); + ShowSevereError(m_state, EnergyPlus::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"); @@ -3107,7 +3153,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, format(RoutineName) + CurrentModuleObject + " = " + MultizoneSurfaceData(i).SurfName); + ShowSevereError(m_state, EnergyPlus::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 " + @@ -3143,7 +3189,7 @@ namespace AirflowNetwork { if (MultizoneSurfaceData(i).VentSurfCtrNum == VentControlType::AdjTemp) { if (!(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond >= 1)) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "..AdjacentTemperature venting control must be defined for an interzone surface."); ErrorsFound = true; @@ -3152,7 +3198,7 @@ namespace AirflowNetwork { if (MultizoneSurfaceData(i).VentSurfCtrNum == VentControlType::AdjEnth) { if (!(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond >= 1)) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "..AdjacentEnthalpy venting control must be defined for an interzone surface."); ErrorsFound = true; @@ -3164,15 +3210,15 @@ namespace AirflowNetwork { if (Util::SameString(simulation_control.HeightOption, "OpeningHeight") && simulation_control.iWPCCnt == iWPCCntr::Input) { if (AirflowNetworkNumOfExtSurfaces != AirflowNetworkNumOfExtNode) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::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, - format("The entered number of external nodes is {}. The entered number of external surfaces is {}.", - AirflowNetworkNumOfExtNode, - AirflowNetworkNumOfExtSurfaces)); + EnergyPlus::format("The entered number of external nodes is {}. The entered number of external surfaces is {}.", + AirflowNetworkNumOfExtNode, + AirflowNetworkNumOfExtSurfaces)); ErrorsFound = true; } } @@ -3221,7 +3267,8 @@ 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, format(RoutineName) + CurrentModuleObject + "=\"" + MultizoneSurfaceData(i).SurfName + "\"."); + ShowWarningError(m_state, + EnergyPlus::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."); @@ -3230,7 +3277,7 @@ namespace AirflowNetwork { if ((m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).IsAirBoundarySurf) && (MultizoneSurfaceData(i).VentSurfCtrNum != VentControlType::Const)) { ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + "=\"" + MultizoneSurfaceData(i).SurfName + + EnergyPlus::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; @@ -3262,23 +3309,27 @@ namespace AirflowNetwork { ErrorsFound = true; } if (MultizoneSurfaceData(i).LowValueTemp < 0.0) { - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, Low Temperature difference value < 0.0d0"); - ShowContinueError(m_state, format("..Input value={:.1R}, Value will be reset to 0.0.", MultizoneSurfaceData(i).LowValueTemp)); + ShowWarningError(m_state, + EnergyPlus::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, format(RoutineName) + CurrentModuleObject + " object, Low Temperature difference value >= 100.0d0"); - ShowContinueError(m_state, - format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneSurfaceData(i).LowValueTemp)); + ShowWarningError( + m_state, EnergyPlus::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 + "\""); MultizoneZoneData(i).LowValueTemp = 0.0; } if (MultizoneSurfaceData(i).UpValueTemp <= MultizoneSurfaceData(i).LowValueTemp) { - ShowWarningError( - m_state, format(RoutineName) + CurrentModuleObject + " object, Upper Temperature <= Lower Temperature difference value."); - ShowContinueError(m_state, - format("..Input value = {:.1R}, Value will be reset to 100.0", MultizoneSurfaceData(i).UpValueTemp)); + ShowWarningError(m_state, + EnergyPlus::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)); ShowContinueError(m_state, "..for Surface = \"" + MultizoneSurfaceData(i).SurfName + "\""); MultizoneSurfaceData(i).UpValueTemp = 100.0; } @@ -3296,24 +3347,28 @@ namespace AirflowNetwork { ErrorsFound = true; } if (MultizoneSurfaceData(i).LowValueEnth < 0.0) { - ShowWarningError(m_state, format(RoutineName) + CurrentModuleObject + " object, Low Enthalpy difference value < 0.0d0"); - ShowContinueError(m_state, - format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneSurfaceData(i).LowValueEnth)); + ShowWarningError(m_state, + EnergyPlus::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, format(RoutineName) + CurrentModuleObject + " object, Low Enthalpy difference value >= 300000.0"); - ShowContinueError(m_state, - format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneSurfaceData(i).LowValueEnth)); + ShowWarningError( + m_state, EnergyPlus::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, - format(RoutineName) + CurrentModuleObject + " object, Upper Enthalpy <= Lower Enthalpy difference value."); - ShowContinueError(m_state, - format("..Input value = {:.1R}, Value will be set to 300000.0", MultizoneSurfaceData(i).UpValueEnth)); + EnergyPlus::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)); ShowContinueError(m_state, "..for Surface = \"" + MultizoneSurfaceData(i).SurfName + "\""); MultizoneSurfaceData(i).UpValueEnth = 300000.0; } @@ -3348,7 +3403,8 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - format(RoutineName) + "No zone number was found for AFN Surface " + MultizoneSurfaceData(i).SurfName); + EnergyPlus::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."); } @@ -3397,7 +3453,7 @@ namespace AirflowNetwork { found = true; if (m_state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(m_state, - format(RoutineName) + + EnergyPlus::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."); @@ -3405,14 +3461,15 @@ namespace AirflowNetwork { } } if (n < 5 && m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(m_state, format(RoutineName) + "SurfaceAverageCalculation is entered for field = Wind Pressure Coefficient Type."); + ShowWarningError( + m_state, EnergyPlus::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, - format(" There are only {} exterior surface orientations defined in this input file using " - "AirflowNetwork:MultiZone:Surface objects.", - n)); + EnergyPlus::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."); } } @@ -3449,7 +3506,7 @@ namespace AirflowNetwork { } if (ErrorsFound) { - ShowFatalError(m_state, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } // Write wind pressure coefficients in the EIO file @@ -3502,15 +3559,18 @@ namespace AirflowNetwork { // If no zone object, exit if (AirflowNetworkNumOfZones == 0) { - ShowFatalError(m_state, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, + EnergyPlus::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, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, + EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } if (MultizoneSurfaceData(j).NodeNums[1] == 0 && ErrorsFound) { - ShowFatalError(m_state, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, + EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } } } @@ -3533,13 +3593,13 @@ namespace AirflowNetwork { } for (int i = 1; i <= AirflowNetworkNumOfZones; ++i) { if (ZoneCheck(i) == 0) { - ShowSevereError(m_state, format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); + ShowSevereError(m_state, EnergyPlus::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, format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); + ShowSevereError(m_state, EnergyPlus::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; @@ -3561,7 +3621,7 @@ namespace AirflowNetwork { } } if (!SurfaceFound) { - ShowWarningError(m_state, format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); + ShowWarningError(m_state, EnergyPlus::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); @@ -3640,8 +3700,8 @@ namespace AirflowNetwork { } if (IntraZoneNodeData(i).RAFNNodeNum == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "' invalid name " + cAlphaFields(2) + "='" + - Alphas(2)); + EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "' invalid name " + cAlphaFields(2) + + "='" + Alphas(2)); ErrorsFound = true; } IntraZoneNodeData(i).AFNZoneNum = @@ -3655,7 +3715,7 @@ namespace AirflowNetwork { } if (IntraZoneNodeData(i).ZoneNum == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "' the Zone is not defined for " + + EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "' the Zone is not defined for " + cAlphaFields(3) + "='" + Alphas(3)); ErrorsFound = true; } @@ -3666,13 +3726,14 @@ namespace AirflowNetwork { if (IntraZoneNumOfNodes > 0) { if (!Util::SameString(SimAirNetworkKey, "MultizoneWithoutDistribution")) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " model requires Simulation Control = MultizoneWithoutDistribution, while the input choice is " + SimAirNetworkKey + "."); ErrorsFound = true; - ShowFatalError( - m_state, - format("{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); + ShowFatalError(m_state, + EnergyPlus::format("{}Errors found getting {} object. Previous error(s) cause program termination.", + RoutineName, + CurrentModuleObject)); } } @@ -3720,7 +3781,7 @@ namespace AirflowNetwork { Util::FindItemInList(Alphas(5), MultizoneSurfaceData, &MultizoneSurfaceProp::SurfName, AirflowNetworkNumOfSurfaces); if (IntraZoneLinkageData(i).LinkNum == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(5) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(5) + " given = " + Alphas(5) + " in AirflowNetwork:MultiZone:Surface objects"); ErrorsFound = true; } @@ -3729,8 +3790,8 @@ namespace AirflowNetwork { } if (Util::SameString(Alphas(2), Alphas(3))) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid inputs of both node name with " + - Alphas(2) + " = " + Alphas(3)); + EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + + "': Invalid inputs of both node name with " + Alphas(2) + " = " + Alphas(3)); ErrorsFound = true; } // Check valid node names @@ -3741,7 +3802,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, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(2) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(2) + " given = " + Alphas(2) + " in AirflowNetwork:IntraZone:Node and AirflowNetwork:MultiZone:Zone objects"); ErrorsFound = true; } @@ -3760,8 +3821,8 @@ namespace AirflowNetwork { IntraZoneLinkageData(i).NodeNums[1] = MultizoneSurfaceData(IntraZoneLinkageData(i).LinkNum).NodeNums[1]; if (IntraZoneLinkageData(i).NodeNums[1] == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(3) + - " given = " + Alphas(3) + + EnergyPlus::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; @@ -3770,8 +3831,8 @@ namespace AirflowNetwork { if (simulation_control.iWPCCnt == iWPCCntr::SurfAvg) { if (!lAlphaBlanks(3)) { ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + " The input of " + cAlphaFields(3) + - " is not needed, "); + EnergyPlus::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 " "simulation continues..."); @@ -3787,8 +3848,8 @@ namespace AirflowNetwork { if (IntraZoneLinkageData(i).NodeNums[1] <= AirflowNetworkNumOfZones && IntraZoneLinkageData(i).NodeNums[0] <= AirflowNetworkNumOfZones) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid node inputs " + Alphas(2) + " and " + - Alphas(3) + " are zone nodes"); + EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid node inputs " + Alphas(2) + + " and " + Alphas(3) + " are zone nodes"); ErrorsFound = true; } if (IntraZoneLinkageData(i).NodeNums[0] <= AirflowNetworkNumOfZones && @@ -3798,8 +3859,8 @@ namespace AirflowNetwork { .AFNZoneNum) { ShowSevereError( m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + ": Invalid zone inputs between Node and Link " + - Alphas(2) + " and " + + EnergyPlus::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; } @@ -3811,8 +3872,8 @@ namespace AirflowNetwork { .AFNZoneNum) { ShowSevereError( m_state, - format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + ": Invalid zone inputs between Node and Link " + - Alphas(3) + " and " + + EnergyPlus::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; } @@ -3837,10 +3898,10 @@ namespace AirflowNetwork { MultizoneSurfaceData(j).ZonePtr = MultizoneSurfaceData(j).NodeNums[0]; MultizoneSurfaceData(j).NodeNums[0] = IntraZoneLinkageData(i).NodeNums[1]; } else { - ShowSevereError(m_state, - 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, + EnergyPlus::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 { @@ -3868,10 +3929,10 @@ namespace AirflowNetwork { MultizoneSurfaceData(j).ZonePtr = MultizoneSurfaceData(j).NodeNums[0]; MultizoneSurfaceData(j).NodeNums[0] = IntraZoneLinkageData(i).NodeNums[0]; } else { - ShowSevereError(m_state, - 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, + EnergyPlus::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 if (IntraZoneLinkageData(i).NodeNums[1] > AirflowNetworkNumOfZones + AirflowNetworkNumOfExtNode) { @@ -3882,10 +3943,10 @@ namespace AirflowNetwork { MultizoneSurfaceData(j).ZonePtr = MultizoneSurfaceData(j).NodeNums[0]; MultizoneSurfaceData(j).NodeNums[0] = IntraZoneLinkageData(i).NodeNums[1]; } else { - ShowSevereError(m_state, - 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, + EnergyPlus::format(RoutineName) + "The InterZone link is not found between AirflowNetwork:IntraZone:Linkage =" + + IntraZoneLinkageData(i).Name + " and AirflowNetwork:Multizone:Surface = " + MultizoneSurfaceData(j).SurfName); ErrorsFound = true; } } @@ -3899,7 +3960,7 @@ namespace AirflowNetwork { if (IntraZoneLinkageData(link).LinkNum > 0) { if (m_state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + IntraZoneLinkageData(link).Name + + EnergyPlus::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) { @@ -3913,7 +3974,7 @@ namespace AirflowNetwork { if (IntraZoneLinkageData(link).LinkNum > 0) { if (m_state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(m_state, - format(RoutineName) + CurrentModuleObject + "='" + IntraZoneLinkageData(link).Name + + EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + IntraZoneLinkageData(link).Name + " is removed from the list due to the surface connection from Intrazone to Interzone."); } } @@ -3951,8 +4012,8 @@ namespace AirflowNetwork { } else if (simulation_control.DuctLoss && Util::SameString(Alphas(3), "Zone")) { } else { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" invalid " + cAlphaFields(3) + "=\"" + - Alphas(3) + "\" illegal key."); + EnergyPlus::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."); @@ -3964,8 +4025,8 @@ namespace AirflowNetwork { if (!Util::SameString(Alphas(2), "")) { if (Util::SameString(DisSysNodeData(j).EPlusName, Alphas(2))) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" Duplicated " + cAlphaFields(2) + - "=\"" + Alphas(2) + "\". Please make a correction."); + EnergyPlus::format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" Duplicated " + + cAlphaFields(2) + "=\"" + Alphas(2) + "\". Please make a correction."); ErrorsFound = true; } } @@ -3974,7 +4035,7 @@ namespace AirflowNetwork { } } else { if (distribution_simulated) { - ShowSevereError(m_state, format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } } @@ -3982,7 +4043,7 @@ namespace AirflowNetwork { CurrentModuleObject = "AirflowNetwork:Distribution:Component:Duct"; if (DisSysNumOfDucts == 0) { if (distribution_simulated) { - ShowSevereError(m_state, format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } } @@ -4085,7 +4146,7 @@ namespace AirflowNetwork { CurrentModuleObject = "AirflowNetwork:Distribution:Component:Fan"; if (DisSysNumOfCVFs == 0) { if (distribution_simulated) { - ShowSevereError(m_state, format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } } @@ -4095,10 +4156,11 @@ namespace AirflowNetwork { NumOfPressureControllers = m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, CurrentModuleObject); if (NumOfPressureControllers > 1) { ShowSevereError(m_state, - format(RoutineName) + "More " + CurrentModuleObject + " are found. Currently only one( \"1\") " + CurrentModuleObject + - " object per simulation is allowed when using AirflowNetwork Distribution Systems."); - ShowFatalError( - m_state, format("{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); + EnergyPlus::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)); } if (NumOfPressureControllers > 0) { @@ -4125,7 +4187,8 @@ namespace AirflowNetwork { PressureControllerData(i).AFNNodeNum = Util::FindItemInList(Alphas(2), MultizoneZoneData, &MultizoneZoneProp::ZoneName, AirflowNetworkNumOfZones); if (PressureControllerData(i).ZoneNum == 0) { - ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " object, invalid " + cAlphaFields(2) + " given."); + ShowSevereError(m_state, + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, invalid " + cAlphaFields(2) + " given."); ShowContinueError(m_state, "..invalid " + cAlphaFields(2) + " = \"" + PressureControllerData(i).ZoneName + "\""); ErrorsFound = true; } @@ -4142,7 +4205,7 @@ namespace AirflowNetwork { PressureControllerData(i).ControlTypeSet = PressureCtrlRelief; } else { // Error ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " object, The entered choice for " + cAlphaFields(3) + + EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, The entered choice for " + cAlphaFields(3) + " is not valid = \"" + PressureControllerData(i).Name + "\""); ShowContinueError(m_state, "Valid choices are " @@ -4161,7 +4224,7 @@ namespace AirflowNetwork { is_EXF = afe->second->type() == ComponentType::EXF; } if (!is_EXF) { - ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " object, an invalid name is given:"); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, an invalid name is given:"); ShowContinueError(m_state, ".. invalid " + cAlphaFields(4) + " = \"" + Alphas(4) + "\"."); ErrorsFound = true; } @@ -4174,7 +4237,7 @@ namespace AirflowNetwork { is_REL = afe->second->type() == ComponentType::REL; } if (!is_REL) { - ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " object, an invalid name is given:"); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, an invalid name is given:"); ShowContinueError(m_state, ".. invalid " + cAlphaFields(4) + " = \"" + Alphas(4) + "\"."); ErrorsFound = true; } @@ -4316,7 +4379,7 @@ namespace AirflowNetwork { AirflowNetworkNodeData(i).NodeTypeNum = 1; } else { ShowSevereError(m_state, - format(RoutineName) + "AirflowNetwork:Distribution:Node: The outdoor air node is found at " + + EnergyPlus::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."); @@ -4328,7 +4391,8 @@ namespace AirflowNetwork { AirflowNetworkNodeData(i).EPlusTypeNum = iEPlusNodeType::ZON; if (Util::FindItemInList(AirflowNetworkNodeData(i).Name, Zone) == 0) { ShowSevereError(m_state, - format(RoutineName) + "AirflowNetwork:Distribution:Node object, Component Object Type or Node Type = Zone"); + EnergyPlus::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 { @@ -4687,7 +4751,7 @@ namespace AirflowNetwork { if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; @@ -4696,7 +4760,7 @@ namespace AirflowNetwork { if (surf.OriginalClass == SurfaceClass::Door || surf.OriginalClass == SurfaceClass::GlassDoor) { if (MultizoneCompDetOpeningData(AirflowNetworkCompData(compnum).TypeNum).LVOType == 2) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetworkComponent: The opening with horizontally pivoted type must be assigned to a " "window surface at " + AirflowNetworkLinkageData(count).Name); @@ -4718,7 +4782,7 @@ namespace AirflowNetwork { if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; @@ -4740,7 +4804,7 @@ namespace AirflowNetwork { } if (AirflowNetworkLinkageData(count).NodeNums[1] > AirflowNetworkNumOfZones) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::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."); @@ -4749,7 +4813,7 @@ namespace AirflowNetwork { if (!(MultizoneZoneData(AirflowNetworkLinkageData(count).NodeNums[0]).ZoneNum > 0 && MultizoneZoneData(AirflowNetworkLinkageData(count).NodeNums[1]).ZoneNum > 0)) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetworkComponent: The horizontal opening must be located between two thermal zones at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; @@ -4766,7 +4830,7 @@ namespace AirflowNetwork { if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; @@ -4778,7 +4842,7 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": The component is not defined in " + + EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The component is not defined in " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } @@ -4807,8 +4871,8 @@ namespace AirflowNetwork { AirflowNetworkLinkageData(count).element->type() != ComponentType::SEL) { ShowSevereError(m_state, - format(RoutineName) + AirflowNetworkLinkageData(count).CompName + ": The component is not allowed in " + - AirflowNetworkLinkageData(count).Name); + EnergyPlus::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."); @@ -4816,7 +4880,7 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - format(RoutineName) + AirflowNetworkLinkageData(count).CompName + ": The component is not defined in " + + EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).CompName + ": The component is not defined in " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } @@ -4910,15 +4974,15 @@ namespace AirflowNetwork { AirflowNetworkLinkageData(count).ZoneNum = Util::FindItemInList(AirflowNetworkLinkageData(count).ZoneName, Zone); if (AirflowNetworkLinkageData(count).ZoneNum == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": Invalid " + AirflowNetworkLinkageData(count).ZoneName + - " given = " + AirflowNetworkLinkageData(count).ZoneName); + EnergyPlus::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, - format(RoutineName) + CurrentModuleObject + ", " + AirflowNetworkLinkageData(count).NodeNames[0] + " = " + - AirflowNetworkLinkageData(count).NodeNames[1] + " in " + AirflowNetworkLinkageData(count).Name); + EnergyPlus::format(RoutineName) + CurrentModuleObject + ", " + AirflowNetworkLinkageData(count).NodeNames[0] + + " = " + AirflowNetworkLinkageData(count).NodeNames[1] + " in " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } // Find component number @@ -4933,7 +4997,7 @@ namespace AirflowNetwork { AirflowNetworkLinkageData(count).CompNum = compnum; } else { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(count).CompName + + EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(count).CompName + " is not defined in " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } @@ -4949,8 +5013,9 @@ namespace AirflowNetwork { } if (!found) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(count).NodeNames[0] + - " is not found in the node data " + AirflowNetworkLinkageData(count).Name); + EnergyPlus::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) { @@ -4963,15 +5028,16 @@ namespace AirflowNetwork { } if (!found) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(count).NodeNames[1] + - " is not found in the node data " + AirflowNetworkLinkageData(count).Name); + EnergyPlus::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, - format(RoutineName) + CurrentModuleObject + ": The " + cAlphaFields(2) + " is not found in the node data " + - AirflowNetworkLinkageData(count).Name); + EnergyPlus::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) { @@ -4984,15 +5050,15 @@ namespace AirflowNetwork { } if (!found && !simulation_control.DuctLoss) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": The " + cAlphaFields(3) + " is not found in the node data " + - AirflowNetworkLinkageData(count).Name); + EnergyPlus::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, format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } } @@ -5010,19 +5076,20 @@ namespace AirflowNetwork { } if (AirflowNetworkLinkageData(i).NodeNums[0] == 0) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(i).NodeNames[0] + + EnergyPlus::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, - format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(i).NodeNames[1] + + EnergyPlus::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, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, + EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } return; @@ -5099,11 +5166,11 @@ namespace AirflowNetwork { if (!NodeFound) { if (count <= AirflowNetworkNumOfSurfaces) { ShowSevereError(m_state, - format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + + EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + " in AIRFLOWNETWORK:MULTIZONE:SURFACE = " + AirflowNetworkLinkageData(count).Name + " is not found"); } else { ShowSevereError(m_state, - format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + + EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + " in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE = " + AirflowNetworkLinkageData(count).Name + " is not found in AIRFLOWNETWORK:DISTRIBUTION:NODE objects."); } @@ -5119,11 +5186,11 @@ namespace AirflowNetwork { if (!NodeFound) { if (count <= AirflowNetworkNumOfSurfaces) { ShowSevereError(m_state, - format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + + EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + " in AIRFLOWNETWORK:MULTIZONE:SURFACE = " + AirflowNetworkLinkageData(count).Name + " is not found"); } else { ShowSevereError(m_state, - format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[1] + + EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[1] + " in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE = " + AirflowNetworkLinkageData(count).Name + " is not found in AIRFLOWNETWORK:DISTRIBUTION:NODE objects."); } @@ -5137,7 +5204,7 @@ namespace AirflowNetwork { } if (!CompFound) { ShowSevereError(m_state, - format(RoutineName) + "Component = " + AirflowNetworkLinkageData(count).CompName + + EnergyPlus::format(RoutineName) + "Component = " + AirflowNetworkLinkageData(count).CompName + " in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE = " + AirflowNetworkLinkageData(count).Name + " is not found in AirflowNetwork Component Data objects."); ErrorsFound = true; @@ -5158,7 +5225,7 @@ namespace AirflowNetwork { } if ((!NodeFound1) && count > NumOfNodesMultiZone && AirflowNetworkNodeData(count).ExtNodeNum == 0) { ShowSevereError(m_state, - format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + + EnergyPlus::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 " @@ -5167,7 +5234,7 @@ namespace AirflowNetwork { } if ((!NodeFound2) && count > NumOfNodesMultiZone && AirflowNetworkNodeData(count).ExtNodeNum == 0) { ShowSevereError(m_state, - format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + + EnergyPlus::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 " @@ -5176,7 +5243,7 @@ namespace AirflowNetwork { } if ((!NodeFound1) && (!NodeFound2) && count > NumOfNodesMultiZone && AirflowNetworkNodeData(count).ExtNodeNum > 0) { ShowSevereError(m_state, - format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + + EnergyPlus::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; @@ -5192,7 +5259,7 @@ namespace AirflowNetwork { } if (!NodeFound) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "No External Nodes found in AirflowNetwork:Multizone:ExternalNode. There must be at least 1 external node defined."); ErrorsFound = true; } @@ -5248,22 +5315,22 @@ namespace AirflowNetwork { if (DisSysCompHXData(i).CoilParentExists && count != 2) { ShowSevereError(m_state, - format(RoutineName) + "The inputs of component name field as a heat exchanger in " - "AIRFLOWNETWORK:DISTRIBUTION:LINKAGE is not correct"); + EnergyPlus::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, format("The correct appearance number is 2. The entered appearance number is {}", count)); + ShowContinueError(m_state, EnergyPlus::format("The correct appearance number is 2. The entered appearance number is {}", count)); ErrorsFound = true; } if ((!DisSysCompHXData(i).CoilParentExists) && count != 1) { ShowSevereError(m_state, - format(RoutineName) + "The inputs of component name field as a heat exchanger in " - "AIRFLOWNETWORK:DISTRIBUTION:LINKAGE is not correct"); + EnergyPlus::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, format("The correct appearance number is 1. The entered appearance number is {}", count)); + ShowContinueError(m_state, EnergyPlus::format("The correct appearance number is 1. The entered appearance number is {}", count)); ErrorsFound = true; } } @@ -5279,7 +5346,7 @@ namespace AirflowNetwork { if (AirflowNetworkCompData(i).CompTypeNum == iComponentTypeNum::OAF) { if (!Util::SameString(DisSysNodeData(j - NumOfNodesMultiZone).EPlusType, "OAMixerOutdoorAirStreamNode")) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetwork:Distribution:Linkage: When the component type is " "AirflowNetwork:Distribution:Component:OutdoorAirFlow at " + AirflowNetworkNodeData(j).Name + ","); @@ -5289,7 +5356,7 @@ namespace AirflowNetwork { } if (!Util::SameString(DisSysNodeData(k - NumOfNodesMultiZone).EPlusType, "AirLoopHVAC:OutdoorAirSystem")) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetwork:Distribution:Linkage: When the component type is " "AirflowNetwork:Distribution:Component:OutdoorAirFlow at " + AirflowNetworkNodeData(k).Name + ","); @@ -5303,7 +5370,7 @@ namespace AirflowNetwork { if (AirflowNetworkCompData(i).CompTypeNum == iComponentTypeNum::REL) { if (!Util::SameString(DisSysNodeData(j - NumOfNodesMultiZone).EPlusType, "AirLoopHVAC:OutdoorAirSystem")) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetwork:Distribution:Linkage: When the component type is " "AirflowNetwork:Distribution:Component:OutdoorAirFlow at " + AirflowNetworkNodeData(j).Name + ","); @@ -5314,7 +5381,7 @@ namespace AirflowNetwork { } if (!Util::SameString(DisSysNodeData(k - NumOfNodesMultiZone).EPlusType, "OAMixerOutdoorAirStreamNode")) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "AirflowNetwork:Distribution:Linkage: When the component type is " "AirflowNetwork:Distribution:Component:OutdoorAirFlow at " + AirflowNetworkNodeData(k).Name + ","); @@ -5326,7 +5393,7 @@ namespace AirflowNetwork { } if (ErrorsFound) { - ShowFatalError(m_state, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } Alphas.deallocate(); @@ -6588,7 +6655,8 @@ namespace AirflowNetwork { ShowWarningError(m_state, "AirflowNetwork: The window or door is open during HVAC system operation " + MultizoneSurfaceData(i).SurfName); - ShowContinueError(m_state, format("The window or door opening factor is {:.2R}", MultizoneSurfaceData(i).OpenFactor)); + ShowContinueError(m_state, + EnergyPlus::format("The window or door opening factor is {:.2R}", MultizoneSurfaceData(i).OpenFactor)); ShowContinueErrorTimeStamp(m_state, ""); } else { ShowRecurringWarningErrorAtEnd(m_state, @@ -6686,8 +6754,8 @@ namespace AirflowNetwork { ShowWarningError(m_state, "The calculated pressure with minimum exhaust fan rate is lower than the pressure setpoint. The pressure " "control is unable to perform."); - ShowContinueErrorTimeStamp(m_state, - format("Calculated pressure = {:.2R}[Pa], Pressure setpoint ={:.2R}", ZonePressure1, PressureSet)); + ShowContinueErrorTimeStamp( + m_state, EnergyPlus::format("Calculated pressure = {:.2R}[Pa], Pressure setpoint ={:.2R}", ZonePressure1, PressureSet)); } else { ++ErrCountLowPre; ShowRecurringWarningErrorAtEnd(m_state, @@ -6711,7 +6779,8 @@ namespace AirflowNetwork { "The calculated pressure with maximum exhaust fan rate is higher than the pressure setpoint. The " "pressure control is unable to perform."); ShowContinueErrorTimeStamp( - m_state, format("Calculated pressure = {:.2R}[Pa], Pressure setpoint = {:.2R}", ZonePressure2, PressureSet)); + m_state, + EnergyPlus::format("Calculated pressure = {:.2R}[Pa], Pressure setpoint = {:.2R}", ZonePressure2, PressureSet)); } else { ++ErrCountHighPre; ShowRecurringWarningErrorAtEnd( @@ -6736,7 +6805,7 @@ namespace AirflowNetwork { if (ErrCountVar == 0) { ++ErrCountVar; ShowWarningError(m_state, "Iteration limit exceeded pressure setpoint using an exhaust fan. Simulation continues."); - ShowContinueErrorTimeStamp(m_state, format("Exhaust fan flow rate = {:.4R}", ExhaustFanMassFlowRate)); + ShowContinueErrorTimeStamp(m_state, EnergyPlus::format("Exhaust fan flow rate = {:.4R}", ExhaustFanMassFlowRate)); } else { ++ErrCountVar; ShowRecurringWarningErrorAtEnd(m_state, @@ -6775,8 +6844,8 @@ namespace AirflowNetwork { ShowWarningError(m_state, "The calculated pressure with minimum relief air rate is lower than the pressure setpoint. The pressure " "control is unable to perform."); - ShowContinueErrorTimeStamp(m_state, - format("Calculated pressure = {:.2R}[Pa], Pressure setpoint ={:.2R}", ZonePressure1, PressureSet)); + ShowContinueErrorTimeStamp( + m_state, EnergyPlus::format("Calculated pressure = {:.2R}[Pa], Pressure setpoint ={:.2R}", ZonePressure1, PressureSet)); } else { ++ErrCountLowPre; ShowRecurringWarningErrorAtEnd(m_state, @@ -6801,7 +6870,8 @@ namespace AirflowNetwork { "The calculated pressure with maximum relief air rate is higher than the pressure setpoint. The " "pressure control is unable to perform."); ShowContinueErrorTimeStamp( - m_state, format("Calculated pressure = {:.2R}[Pa], Pressure setpoint = {:.2R}", ZonePressure2, PressureSet)); + m_state, + EnergyPlus::format("Calculated pressure = {:.2R}[Pa], Pressure setpoint = {:.2R}", ZonePressure2, PressureSet)); } else { ++ErrCountHighPre; ShowRecurringWarningErrorAtEnd( @@ -6825,7 +6895,7 @@ namespace AirflowNetwork { if (ErrCountVar == 0) { ++ErrCountVar; ShowWarningError(m_state, "Iteration limit exceeded pressure setpoint using relief air. Simulation continues."); - ShowContinueErrorTimeStamp(m_state, format("Relief air flow rate = {:.4R}", ReliefMassFlowRate)); + ShowContinueErrorTimeStamp(m_state, EnergyPlus::format("Relief air flow rate = {:.4R}", ReliefMassFlowRate)); } else { ++ErrCountVar; ShowRecurringWarningErrorAtEnd(m_state, @@ -7000,7 +7070,7 @@ namespace AirflowNetwork { NumOfExtNodes = AirflowNetworkNumOfExtSurfaces; for (ExtNum = 1; ExtNum <= NumOfExtNodes; ++ExtNum) { MultizoneExternalNodeData(ExtNum).ExtNum = AirflowNetworkNumOfZones + ExtNum; - MultizoneExternalNodeData(ExtNum).Name = format("ExtNode{:4}", ExtNum); + MultizoneExternalNodeData(ExtNum).Name = EnergyPlus::format("ExtNode{:4}", ExtNum); } // Associate each external node with SurfaceData @@ -7130,7 +7200,7 @@ namespace AirflowNetwork { } // End of wind direction loop // Add new table vals[12] = vals[0]; // Enforce periodicity - curveIndex[FacadeNum - 1] = AirflowNetwork::makeTable(m_state, format("!WPCTABLE{}", FacadeNum), dirs30GridIndex, vals); + curveIndex[FacadeNum - 1] = AirflowNetwork::makeTable(m_state, EnergyPlus::format("!WPCTABLE{}", FacadeNum), dirs30GridIndex, vals); } // End of facade number loop } else { //-calculate the advanced single sided wind pressure coefficients @@ -7216,17 +7286,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, format("!SSWPCTABLEFACADE{}", FacadeNum), dirs10GridIndex, valsByFacade[FacadeNum - 1]); + curveIndex[FacadeNum - 1] = AirflowNetwork::makeTable( + m_state, EnergyPlus::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, format("!SSWPCTABLEFACADE{}", FacadeNum), dirs30GridIndex, valsByFacade[FacadeNum - 1]); + curveIndex[FacadeNum - 1] = AirflowNetwork::makeTable( + m_state, EnergyPlus::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, format("!SSWPCTABLE{}", facadeNum), dirs10GridIndex, valsByFacade[facadeNum - 1]); + AirflowNetwork::makeTable(m_state, EnergyPlus::format("!SSWPCTABLE{}", facadeNum), dirs10GridIndex, valsByFacade[facadeNum - 1]); } } // Connect the external nodes to the new curves @@ -9776,9 +9846,10 @@ namespace AirflowNetwork { "calculated based on the mass flow rate during HVAC operation."); ShowContinueError( m_state, - format("The mass flow rate during HVAC operation = {:.2R} The mass flow rate during no HVAC operation = {:.2R}", - m_state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).LoopSystemOnMassFlowrate, - m_state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).LoopSystemOffMassFlowrate)); + EnergyPlus::format( + "The mass flow rate during HVAC operation = {:.2R} The mass flow rate during no HVAC operation = {:.2R}", + m_state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).LoopSystemOnMassFlowrate, + m_state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).LoopSystemOffMassFlowrate)); UpdateAirflowNetworkMyOneTimeFlag = false; } } @@ -9813,10 +9884,11 @@ namespace AirflowNetwork { "The mass flow rate difference is found between System Node = '" + m_state.dataLoopNodes->NodeID(AirflowNetworkNodeData(Node3).EPlusNodeNum) + "' and AFN Link = '" + AirflowNetworkLinkageData(i).Name + "'."); - ShowContinueError(m_state, - format("The system node max mass flow rate = {:.3R} kg/s. The AFN node mass flow rate = {:.3R} kg.s.", - NodeMass, - AFNMass)); + ShowContinueError( + m_state, + EnergyPlus::format("The system node max mass flow rate = {:.3R} kg/s. The AFN node mass flow rate = {:.3R} kg.s.", + NodeMass, + AFNMass)); WriteFlag = true; } } @@ -10392,7 +10464,7 @@ namespace AirflowNetwork { DisSysNodeData(i).AirLoopNum = get_airloop_number(j); if (DisSysNodeData(i).AirLoopNum == 0) { ShowSevereError(m_state, - format(RoutineName) + "The Node or Component Name defined in " + DisSysNodeData(i).Name + + EnergyPlus::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."); @@ -10411,7 +10483,7 @@ namespace AirflowNetwork { Util::SameString(DisSysNodeData(i).EPlusType, "OutdoorAir:Node")) { if (!LocalError) { ShowSevereError(m_state, - format(RoutineName) + "The Node or Component Name defined in " + DisSysNodeData(i).Name + + EnergyPlus::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."); @@ -10420,7 +10492,7 @@ namespace AirflowNetwork { } if (DisSysNodeData(i).EPlusNodeNum == 0) { ShowSevereError(m_state, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "Primary Air Loop Node is not found in AIRFLOWNETWORK:DISTRIBUTION:NODE = " + DisSysNodeData(i).Name); ErrorsFound = true; } @@ -10528,7 +10600,7 @@ namespace AirflowNetwork { if (m_state.dataZoneEquip->ZoneEquipConfig(zoneNum).ZoneNode == i) { if (zoneNum > AirflowNetworkNumOfNodes) { ShowSevereError(m_state, - format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + + EnergyPlus::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 + "'."); @@ -10619,14 +10691,14 @@ namespace AirflowNetwork { } if (OAMixerNum == GetNumOAMixers(m_state)) { ShowSevereError(m_state, - format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + + EnergyPlus::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, - format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + + EnergyPlus::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + "' is not defined as an AirflowNetwork:Distribution:Node object."); ErrorsFound = true; } else { @@ -10644,7 +10716,7 @@ namespace AirflowNetwork { NodeFound(i) = true; } else { ShowSevereError(m_state, - format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + + EnergyPlus::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + "' is not defined as an AirflowNetwork:Distribution:Node object."); ErrorsFound = true; } @@ -10653,30 +10725,32 @@ namespace AirflowNetwork { } if (hpwhFound) { ShowWarningError(m_state, - format(RoutineName) + "Heat pump water heater is simulated along with an AirflowNetwork but is not included in " - "the AirflowNetwork."); + EnergyPlus::format(RoutineName) + + "Heat pump water heater is simulated along with an AirflowNetwork but is not included in " + "the AirflowNetwork."); } if (standaloneERVFound) { ShowWarningError(m_state, - format(RoutineName) + "A ZoneHVAC:EnergyRecoveryVentilator is simulated along with an AirflowNetwork but is not " - "included in the AirflowNetwork."); + EnergyPlus::format(RoutineName) + + "A ZoneHVAC:EnergyRecoveryVentilator is simulated along with an AirflowNetwork but is not " + "included in the AirflowNetwork."); } if (packagedUnitaryFound) { ShowWarningError(m_state, - format(RoutineName) + "A ZoneHVAC:PackagedTerminalAirConditioner, ZoneHVAC:PackagedTerminalHeatPump, or " - "ZoneHVAC:WaterToAirHeatPump is simulated along with an AirflowNetwork but is not " - "included in the AirflowNetwork."); + EnergyPlus::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, - format(RoutineName) + + EnergyPlus::format(RoutineName) + "A ZoneHVAC:TerminalUnit:VariableRefrigerantFlow is simulated along with an AirflowNetwork but is not " "included in the AirflowNetwork."); } if (windowACFound) { ShowWarningError(m_state, - format(RoutineName) + "A ZoneHVAC:WindowAirConditioner is simulated along with an AirflowNetwork but is not " - "included in the AirflowNetwork."); + EnergyPlus::format(RoutineName) + "A ZoneHVAC:WindowAirConditioner is simulated along with an AirflowNetwork but is not " + "included in the AirflowNetwork."); } NodeFound.deallocate(); @@ -10732,7 +10806,8 @@ namespace AirflowNetwork { auto const SELECT_CASE_var(Util::makeUPPER(DisSysCompCoilData(i).EPlusType)); if (SELECT_CASE_var == "COIL:COOLING:DX") { - ValidateComponent(m_state, "Coil:Cooling:DX", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Cooling:DX", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10749,8 +10824,11 @@ namespace AirflowNetwork { } } } else if (SELECT_CASE_var == "COIL:COOLING:DX:SINGLESPEED") { - ValidateComponent( - m_state, "Coil:Cooling:DX:SingleSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Cooling:DX:SingleSpeed", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10758,8 +10836,11 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:HEATING:DX:SINGLESPEED") { - ValidateComponent( - m_state, "Coil:Heating:DX:SingleSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Heating:DX:SingleSpeed", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10767,7 +10848,8 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:HEATING:FUEL") { - ValidateComponent(m_state, "Coil:Heating:Fuel", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Heating:Fuel", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10776,7 +10858,7 @@ namespace AirflowNetwork { } else if (SELECT_CASE_var == "COIL:HEATING:ELECTRIC") { ValidateComponent( - m_state, "Coil:Heating:Electric", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + m_state, "Coil:Heating:Electric", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10784,13 +10866,15 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:COOLING:WATER") { - ValidateComponent(m_state, "Coil:Cooling:Water", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Cooling:Water", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::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, format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Heating:Water", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10800,7 +10884,7 @@ namespace AirflowNetwork { "Coil:Cooling:Water:DetailedGeometry", DisSysCompCoilData(i).name, IsNotOK, - format(RoutineName) + CurrentModuleObject); + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10810,7 +10894,7 @@ namespace AirflowNetwork { "Coil:Cooling:DX:TwoStageWithHumidityControlMode", DisSysCompCoilData(i).name, IsNotOK, - format(RoutineName) + CurrentModuleObject); + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10818,8 +10902,11 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:COOLING:DX:MULTISPEED") { - ValidateComponent( - m_state, "Coil:Cooling:DX:MultiSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Cooling:DX:MultiSpeed", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); ++MultiSpeedHPIndicator; if (IsNotOK) { ErrorsFound = true; @@ -10828,8 +10915,11 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:HEATING:DX:MULTISPEED") { - ValidateComponent( - m_state, "Coil:Heating:DX:MultiSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Heating:DX:MultiSpeed", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); ++MultiSpeedHPIndicator; if (IsNotOK) { ErrorsFound = true; @@ -10838,8 +10928,11 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:COOLING:DX:VARIABLESPEED") { - ValidateComponent( - m_state, "Coil:Cooling:DX:VariableSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Cooling:DX:VariableSpeed", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); ++MultiSpeedHPIndicator; if (IsNotOK) { ErrorsFound = true; @@ -10848,8 +10941,11 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:HEATING:DX:VARIABLESPEED") { - ValidateComponent( - m_state, "Coil:Heating:DX:VariableSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Heating:DX:VariableSpeed", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); ++MultiSpeedHPIndicator; if (IsNotOK) { ErrorsFound = true; @@ -10861,7 +10957,7 @@ namespace AirflowNetwork { "Coil:Cooling:WaterToAirHeatPump:EquationFit", DisSysCompCoilData(i).name, IsNotOK, - format(RoutineName) + CurrentModuleObject); + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10871,7 +10967,7 @@ namespace AirflowNetwork { "Coil:Heating:WaterToAirHeatPump:EquationFit", DisSysCompCoilData(i).name, IsNotOK, - format(RoutineName) + CurrentModuleObject); + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10880,7 +10976,7 @@ namespace AirflowNetwork { "Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit", DisSysCompCoilData(i).name, IsNotOK, - format(RoutineName) + CurrentModuleObject); + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10890,44 +10986,57 @@ namespace AirflowNetwork { "Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit", DisSysCompCoilData(i).name, IsNotOK, - format(RoutineName) + CurrentModuleObject); + EnergyPlus::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, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Heating:Desuperheater", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::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, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Cooling:DX:TwoSpeed", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { SetDXCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum); } } else if (SELECT_CASE_var == "COIL:HEATING:ELECTRIC:MULTISTAGE") { - ValidateComponent( - m_state, "Coil:Heating:Electric:MultiStage", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Heating:Electric:MultiStage", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::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, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "Coil:Heating:Gas:MultiStage", + DisSysCompCoilData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { SetHeatingCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum, ErrorsFound); } } else { - ShowSevereError(m_state, format(RoutineName) + CurrentModuleObject + " Invalid coil type = " + DisSysCompCoilData(i).name); + ShowSevereError(m_state, + EnergyPlus::format(RoutineName) + CurrentModuleObject + " Invalid coil type = " + DisSysCompCoilData(i).name); ErrorsFound = true; } } @@ -10960,7 +11069,7 @@ namespace AirflowNetwork { if (DisSysCompCVFData(j).AirLoopNum == DisSysCompTermUnitData(i).AirLoopNum && !Util::SameString(DisSysCompTermUnitData(i).EPlusType, "AirTerminal:SingleDuct:VAV:Reheat")) { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + + EnergyPlus::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"); @@ -10970,9 +11079,10 @@ namespace AirflowNetwork { } } } else { - ShowSevereError(m_state, - format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:COMPONENT TERMINAL UNIT: Invalid Terminal unit type = " + - DisSysCompTermUnitData(i).name); + ShowSevereError( + m_state, + EnergyPlus::format(RoutineName) + + "AIRFLOWNETWORK:DISTRIBUTION:COMPONENT TERMINAL UNIT: Invalid Terminal unit type = " + DisSysCompTermUnitData(i).name); ErrorsFound = true; } } @@ -10984,8 +11094,11 @@ namespace AirflowNetwork { auto const SELECT_CASE_var(Util::makeUPPER(DisSysCompHXData(i).EPlusType)); if (SELECT_CASE_var == "HEATEXCHANGER:AIRTOAIR:FLATPLATE") { - ValidateComponent( - m_state, "HeatExchanger:AirToAir:FlatPlate", DisSysCompHXData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject); + ValidateComponent(m_state, + "HeatExchanger:AirToAir:FlatPlate", + DisSysCompHXData(i).name, + IsNotOK, + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10995,7 +11108,7 @@ namespace AirflowNetwork { "HeatExchanger:AirToAir:SensibleAndLatent", DisSysCompHXData(i).name, IsNotOK, - format(RoutineName) + CurrentModuleObject); + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -11005,14 +11118,15 @@ namespace AirflowNetwork { "HeatExchanger:Desiccant:BalancedFlow", DisSysCompHXData(i).name, IsNotOK, - format(RoutineName) + CurrentModuleObject); + EnergyPlus::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } } else { ShowSevereError(m_state, - format(RoutineName) + CurrentModuleObject + " Invalid heat exchanger type = " + DisSysCompHXData(i).EPlusType); + EnergyPlus::format(RoutineName) + CurrentModuleObject + + " Invalid heat exchanger type = " + DisSysCompHXData(i).EPlusType); ErrorsFound = true; } } @@ -11085,8 +11199,8 @@ namespace AirflowNetwork { if (AirflowNetworkLinkageData(i).NodeNums[0] == AirflowNetworkLinkageData(j).NodeNums[1]) { if (AirflowNetworkCompData(AirflowNetworkLinkageData(j).CompNum).CompTypeNum != iComponentTypeNum::DWC) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + - ')'); + EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "must connect a duct component upstream and not " + AirflowNetworkLinkageData(j).Name); ErrorsFound = true; } @@ -11094,7 +11208,8 @@ namespace AirflowNetwork { } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).EPlusTypeNum == iEPlusNodeType::SPL) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); + EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow a AirLoopHVAC:ZoneSplitter node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).Name); @@ -11102,7 +11217,8 @@ namespace AirflowNetwork { } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).EPlusTypeNum == iEPlusNodeType::SPL) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); + EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow a AirLoopHVAC:ZoneSplitter node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).Name); @@ -11110,7 +11226,8 @@ namespace AirflowNetwork { } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).EPlusTypeNum == iEPlusNodeType::MIX) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); + EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow a AirLoopHVAC:ZoneMixer node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).Name); @@ -11118,7 +11235,8 @@ namespace AirflowNetwork { } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).EPlusTypeNum == iEPlusNodeType::MIX) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); + EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow a AirLoopHVAC:ZoneMixer node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).Name); @@ -11126,7 +11244,8 @@ namespace AirflowNetwork { } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).EPlusNodeNum > 0) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); + EnergyPlus::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); @@ -11134,7 +11253,8 @@ namespace AirflowNetwork { } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).EPlusNodeNum > 0) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); + EnergyPlus::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); @@ -11142,7 +11262,8 @@ namespace AirflowNetwork { } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).EPlusZoneNum > 0) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); + EnergyPlus::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); @@ -11150,7 +11271,8 @@ namespace AirflowNetwork { } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).EPlusZoneNum > 0) { ShowSevereError(m_state, - format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); + EnergyPlus::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); @@ -11381,8 +11503,8 @@ namespace AirflowNetwork { } if (NumOfFans > 1) { ShowSevereError(m_state, - format(RoutineName) + "An AirLoop branch, " + m_state.dataAirSystemsData->PrimaryAirSystems(1).Branch(BranchNum).Name + - ", has two or more fans: " + FanNames); + EnergyPlus::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 " "file accordingly."); @@ -11390,7 +11512,7 @@ namespace AirflowNetwork { } if (ErrorsFound) { - ShowFatalError(m_state, format("{}Program terminates for preceding reason(s).", RoutineName)); + ShowFatalError(m_state, EnergyPlus::format("{}Program terminates for preceding reason(s).", RoutineName)); } } @@ -11443,14 +11565,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, - format("{}The number of {} is not equal to the number of Fan:ZoneExhaust fans defined in ZoneHVAC:EquipmentConnections", - RoutineName, - CurrentModuleObject)); - ShowContinueError(m_state, format("The number of {} is {}", CurrentModuleObject, AirflowNetworkNumOfExhFan)); - ShowContinueError(m_state, - format("The number of Zone exhaust fans defined in ZoneHVAC:EquipmentConnections is {}", NumOfExhaustFans)); + 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)); ErrorsFound = true; } @@ -11469,10 +11591,10 @@ namespace AirflowNetwork { } if (MultizoneCompExhaustFanData(i).EPlusZoneNum == 0) { ShowSevereError(m_state, - format("{}Zone name in {} = {} does not match the zone name in ZoneHVAC:EquipmentConnections", - RoutineName, - CurrentModuleObject, - MultizoneCompExhaustFanData(i).name)); + EnergyPlus::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 @@ -11485,10 +11607,10 @@ namespace AirflowNetwork { !(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond == OtherSideCoefNoCalcExt && m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtWind)) { ShowSevereError(m_state, - format("{}The surface using {} is not an exterior surface: {}", - RoutineName, - CurrentModuleObject, - MultizoneSurfaceData(j).SurfName)); + EnergyPlus::format("{}The surface using {} is not an exterior surface: {}", + RoutineName, + CurrentModuleObject, + MultizoneSurfaceData(j).SurfName)); ErrorsFound = true; } break; @@ -11500,10 +11622,10 @@ namespace AirflowNetwork { } else { if (MultizoneCompExhaustFanData(i).EPlusZoneNum != m_state.dataSurface->Surface(MultizoneSurfaceData(j).SurfNum).Zone) { ShowSevereError(m_state, - format("{}Zone name in {} = {} does not match the zone name", - RoutineName, - CurrentModuleObject, - MultizoneCompExhaustFanData(i).name)); + EnergyPlus::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 { @@ -11529,12 +11651,12 @@ namespace AirflowNetwork { } } if (!found) { - ShowSevereError(m_state, format("{}Fan:ZoneExhaust is not defined in {}", RoutineName, CurrentModuleObject)); - ShowContinueError( - m_state, - format("The inlet node of the {} Fan:ZoneExhaust is not defined in the {}'s ZoneHVAC:EquipmentConnections", - m_state.dataZoneEquip->ZoneEquipList(j).EquipName, - m_state.dataZoneEquip->ZoneEquipConfig(j).ZoneName)); + ShowSevereError(m_state, EnergyPlus::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", + m_state.dataZoneEquip->ZoneEquipList(j).EquipName, + m_state.dataZoneEquip->ZoneEquipConfig(j).ZoneName)); ErrorsFound = true; } } @@ -11543,7 +11665,7 @@ namespace AirflowNetwork { ValidateExhaustFanInputOneTimeFlag = false; if (ErrorsFound) { - ShowFatalError(m_state, format("{}Program terminates for preceding reason(s).", RoutineName)); + ShowFatalError(m_state, EnergyPlus::format("{}Program terminates for preceding reason(s).", RoutineName)); } } // End if OneTimeFlag_FindFirstLastPtr } @@ -11666,10 +11788,11 @@ namespace AirflowNetwork { if (ControlType == GlobalCtrlType && !Found && !m_state.dataGlobal->WarmupFlag && ventCtrlStatus != Avail::VentCtrlStatus::Close) { ++HybridGlobalErrCount; if (HybridGlobalErrCount < 2) { - ShowWarningError(m_state, - format("{}The hybrid ventilation control schedule value indicates global control in the controlled zone = {}", - RoutineName, - m_state.dataHeatBal->Zone(hybridVentMgr.Master).Name)); + 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)); ShowContinueError(m_state, "The exterior surface containing an opening component in the controlled zone is not found. No global control " "will not be modeled."); @@ -11678,7 +11801,8 @@ namespace AirflowNetwork { } else { ShowRecurringWarningErrorAtEnd( m_state, - format("{}The hybrid ventilation control requires a global control. The individual control continues...", RoutineName), + EnergyPlus::format("{}The hybrid ventilation control requires a global control. The individual control continues...", + RoutineName), HybridGlobalErrIndex, double(ControlType), double(ControlType)); @@ -11811,12 +11935,12 @@ namespace AirflowNetwork { MultizoneZoneData(AFNZnNum).SingleSidedCpType = "STANDARD"; } else if (NumofExtSurfInZone(AFNZnNum) > 2) { ShowWarningError(m_state, - 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))); + 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))); ShowContinueError(m_state, "Zones must have exactly two openings in order for the \"ADVANCED\" single side wind pressure coefficient " "model to be used."); @@ -12514,7 +12638,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, format("The number of controlled zone is {}", NumOfCtrlZones)); + ShowContinueError(m_state, EnergyPlus::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; @@ -12629,7 +12753,8 @@ namespace AirflowNetwork { ++ErrCountDuct; // TODO: Why is the error count shared among all heat pump units? ShowWarningError(m_state, "AirflowNetwork Duct Autosizing: Iteration limit exceeded calculating Supply Duct Trunk size."); - ShowContinueErrorTimeStamp(m_state, format("Supply Duct Hydronic Diameter={:.2R}", hydraulicDiameter)); + ShowContinueErrorTimeStamp(m_state, + EnergyPlus::format("Supply Duct Hydronic Diameter={:.2R}", hydraulicDiameter)); } else { ++ErrCountDuct; ShowRecurringWarningErrorAtEnd( @@ -12663,9 +12788,10 @@ namespace AirflowNetwork { m_state, "AirflowNetwork Duct Sizing: Duct Sizing Method = PressureLossWithMaximumVelocity for Supply Trunk size"); ShowContinueError( m_state, - format("The Maximum Airflow Velocity at {:.1R} is less than calculated velosity at {:.1R} using PressureLoss", - simulation_control.ductSizing.max_velocity, - Velocity)); + EnergyPlus::format( + "The Maximum Airflow Velocity at {:.1R} is less than calculated velosity at {:.1R} using PressureLoss", + simulation_control.ductSizing.max_velocity, + Velocity)); ShowContinueError(m_state, "..The Maximum Airflow Velocity is used to calculate Supply Trunk Diameter"); } } @@ -12750,7 +12876,8 @@ namespace AirflowNetwork { ++ErrCountDuct; // TODO: Why is the error count shared among all heat pump units? ShowWarningError(m_state, "AirflowNetwork Duct Autosizing: Iteration limit exceeded calculating Supply Duct Branch size."); - ShowContinueErrorTimeStamp(m_state, format("Supply Duct Hydronic Diameter={:.2R}", hydraulicDiameter)); + ShowContinueErrorTimeStamp(m_state, + EnergyPlus::format("Supply Duct Hydronic Diameter={:.2R}", hydraulicDiameter)); } else { ++ErrCountDuct; ShowRecurringWarningErrorAtEnd( @@ -12784,9 +12911,10 @@ namespace AirflowNetwork { m_state, "AirflowNetwork Duct Sizing: Duct Sizing Method = PressureLossWithMaximumVelocity for Supply Branch size"); ShowContinueError( m_state, - format("The Maximum Airflow Velocity at {:.1R} is less than calculated velosity at {:.1R} using PressureLoss", - simulation_control.ductSizing.max_velocity, - Velocity)); + EnergyPlus::format( + "The Maximum Airflow Velocity at {:.1R} is less than calculated velosity at {:.1R} using PressureLoss", + simulation_control.ductSizing.max_velocity, + Velocity)); ShowContinueError(m_state, "..The Maximum Airflow Velocity is used to calculate Supply Branch Diameter"); } } @@ -12876,7 +13004,8 @@ namespace AirflowNetwork { ++ErrCountDuct; // TODO: Why is the error count shared among all heat pump units? ShowWarningError(m_state, "AirflowNetwork Duct Autosizing: Iteration limit exceeded calculating Return Duct Trunk size."); - ShowContinueErrorTimeStamp(m_state, format("Return Duct Hydronic Diameter={:.2R}", hydraulicDiameter)); + ShowContinueErrorTimeStamp(m_state, + EnergyPlus::format("Return Duct Hydronic Diameter={:.2R}", hydraulicDiameter)); } else { ++ErrCountDuct; ShowRecurringWarningErrorAtEnd( @@ -12910,9 +13039,10 @@ namespace AirflowNetwork { m_state, "AirflowNetwork Duct Sizing: Duct Sizing Method = PressureLossWithMaximumVelocity for Return Trunk size"); ShowContinueError( m_state, - format("The Maximum Airflow Velocity at {:.1R} is less than calculated velosity at {:.1R} using PressureLoss", - simulation_control.ductSizing.max_velocity, - Velocity)); + EnergyPlus::format( + "The Maximum Airflow Velocity at {:.1R} is less than calculated velosity at {:.1R} using PressureLoss", + simulation_control.ductSizing.max_velocity, + Velocity)); ShowContinueError(m_state, "..The Maximum Airflow Velocity is used to calculate Return Trunk Diameter"); } } @@ -12998,7 +13128,8 @@ namespace AirflowNetwork { ++ErrCountDuct; // TODO: Why is the error count shared among all heat pump units? ShowWarningError(m_state, "AirflowNetwork Duct Autosizing: Iteration limit exceeded calculating Return Duct Branch size."); - ShowContinueErrorTimeStamp(m_state, format("Return Duct Hydronic Diameter={:.2R}", hydraulicDiameter)); + ShowContinueErrorTimeStamp(m_state, + EnergyPlus::format("Return Duct Hydronic Diameter={:.2R}", hydraulicDiameter)); } else { ++ErrCountDuct; ShowRecurringWarningErrorAtEnd( @@ -13032,9 +13163,10 @@ namespace AirflowNetwork { m_state, "AirflowNetwork Duct Sizing: Duct Sizing Method = PressureLossWithMaximumVelocity for Return Branch size"); ShowContinueError( m_state, - format("The Maximum Airflow Velocity at {:.1R} is less than calculated velosity at {:.1R} using PressureLoss", - simulation_control.ductSizing.max_velocity, - Velocity)); + EnergyPlus::format( + "The Maximum Airflow Velocity at {:.1R} is less than calculated velosity at {:.1R} using PressureLoss", + simulation_control.ductSizing.max_velocity, + Velocity)); ShowContinueError(m_state, "..The Maximum Airflow Velocity is used to calculate Return Branch Diameter"); } } diff --git a/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc b/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc index 1092a67303c..d488687e08f 100644 --- a/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc +++ b/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc @@ -167,10 +167,11 @@ Real64 ASHRAEMinSATCoolingSizer::size(EnergyPlusData &state, Real64 _originalVal this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; this->addErrorMessage(msg); ShowSevereError(state, msg); - msg = format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); + msg = + EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); + msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -190,13 +191,15 @@ Real64 ASHRAEMinSATCoolingSizer::size(EnergyPlusData &state, Real64 _originalVal this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; this->addErrorMessage(msg); ShowSevereError(state, msg); - msg = format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); + msg = + EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); + msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("SizingString = {}, DataZoneUsedForSizing = {:.0T}", this->sizingString, Real64(this->dataZoneUsedForSizing)); + msg = + EnergyPlus::format("SizingString = {}, DataZoneUsedForSizing = {:.0T}", this->sizingString, Real64(this->dataZoneUsedForSizing)); ShowContinueError(state, msg); } } @@ -226,10 +229,11 @@ Real64 ASHRAEMaxSATHeatingSizer::size(EnergyPlusData &state, Real64 _originalVal this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; this->addErrorMessage(msg); ShowSevereError(state, msg); - msg = format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); + msg = + EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); + msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -249,13 +253,15 @@ Real64 ASHRAEMaxSATHeatingSizer::size(EnergyPlusData &state, Real64 _originalVal this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; this->addErrorMessage(msg); ShowSevereError(state, msg); - msg = format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); + msg = + EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); + msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("SizingString = {}, DataZoneUsedForSizing = {:.0T}", this->sizingString, Real64(this->dataZoneUsedForSizing)); + msg = + EnergyPlus::format("SizingString = {}, DataZoneUsedForSizing = {:.0T}", this->sizingString, Real64(this->dataZoneUsedForSizing)); ShowContinueError(state, msg); } } diff --git a/src/EnergyPlus/Autosizing/Base.cc b/src/EnergyPlus/Autosizing/Base.cc index d8cc2e32c15..61e70a3fb4c 100644 --- a/src/EnergyPlus/Autosizing/Base.cc +++ b/src/EnergyPlus/Autosizing/Base.cc @@ -425,10 +425,10 @@ void BaseSizer::selectSizerOutput(EnergyPlusData &state, bool &errorsFound) std::string msg = this->callingRoutine + ": Potential issue with equipment sizing for " + this->compType + ' ' + this->compName; this->addErrorMessage(msg); ShowMessage(state, msg); - msg = format("User-Specified {}{} = {:.5R}", this->sizingStringScalable, this->sizingString, this->originalValue); + msg = EnergyPlus::format("User-Specified {}{} = {:.5R}", this->sizingStringScalable, this->sizingString, this->originalValue); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("differs from Design Size {} = {:.5R}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("differs from Design Size {} = {:.5R}", this->sizingString, this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = "This may, or may not, indicate mismatched component sizes."; @@ -449,7 +449,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 = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->originalValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->originalValue); this->addErrorMessage(msg); ShowContinueError(state, msg); this->errorType = AutoSizingResultType::ErrorType1; @@ -561,10 +561,10 @@ void BaseSizer::select2StgDXHumCtrlSizerOutput(EnergyPlusData &state, bool &erro std::string msg = this->callingRoutine + ": Potential issue with equipment sizing for " + this->compType + ' ' + this->compName; this->addErrorMessage(msg); ShowMessage(state, msg); - msg = format("User-Specified {}{} = {:.5R}", this->sizingStringScalable, this->sizingString, this->originalValue); + msg = EnergyPlus::format("User-Specified {}{} = {:.5R}", this->sizingStringScalable, this->sizingString, this->originalValue); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("differs from Design Size {} = {:.5R}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("differs from Design Size {} = {:.5R}", this->sizingString, this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = "This may, or may not, indicate mismatched component sizes."; @@ -585,7 +585,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 = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->originalValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->originalValue); this->addErrorMessage(msg); ShowContinueError(state, msg); this->errorType = AutoSizingResultType::ErrorType1; diff --git a/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc b/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc index 34e16521107..0bfba685aac 100644 --- a/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc @@ -326,7 +326,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 = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; @@ -393,21 +393,23 @@ Real64 CoolingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b 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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (heatingFlow) { 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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } diff --git a/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc b/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc index 4c587016d2e..aa282a4b737 100644 --- a/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc @@ -223,27 +223,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, format("...Rated Total Cooling Capacity = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Rated Total Cooling Capacity = {:.2T} [W]", this->autoSizedValue)); if (this->zoneEqSizing(this->curZoneEqNum).CoolingCapacity) { - ShowContinueError(state, - format("...Capacity passed by parent object to size child component = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError( + state, + EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [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, format("...Capacity passed by parent object to size child component = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, + EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", + this->autoSizedValue)); } else { - ShowContinueError(state, format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); - ShowContinueError(state, format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); - ShowContinueError(state, format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + 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)); } } else { if (CoilOutTemp > -999.0) { - ShowContinueError(state, format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); - ShowContinueError(state, format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); - ShowContinueError(state, format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + 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)); } else { ShowContinueError(state, "...Capacity used to size child component set to 0 [W]"); } @@ -448,18 +454,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, format("...Rated Total Cooling Capacity = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Rated Total Cooling Capacity = {:.2T} [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, - format("...Capacity passed by parent object to size child component = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError( + state, + EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", this->autoSizedValue)); } else { - ShowContinueError(state, format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); - ShowContinueError(state, format("...Outdoor air fraction used for sizing = {:.2T}", OutAirFrac)); - ShowContinueError(state, format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); - ShowContinueError(state, format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + 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)); } } } @@ -471,7 +478,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 = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; @@ -500,12 +507,13 @@ 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, format("...DX coil volume flow rate [m3/s] = {:.6T}", DesVolFlow)); - ShowContinueError(state, format("...Requested capacity [W] = {:.3T}", this->autoSizedValue)); - ShowContinueError(state, format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + 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, - format("...Minimum flow/capacity ratio [m3/s/W] = {:.3T}", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + EnergyPlus::format("...Minimum flow/capacity ratio [m3/s/W] = {:.3T}", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } DXFlowPerCapMinRatio = (DesVolFlow / HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) / @@ -513,19 +521,20 @@ 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, format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3T}", 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, format("...DX coil volume flow rate [m3/s] = {:.6T}", DesVolFlow)); - ShowContinueError(state, format("...Requested capacity [W] = {:.3T}", this->autoSizedValue)); - ShowContinueError(state, format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + 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, - format("...Maximum flow/capacity ratio [m3/s/W] = {:.3T}", - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + EnergyPlus::format("...Maximum flow/capacity ratio [m3/s/W] = {:.3T}", + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } DXFlowPerCapMaxRatio = DesVolFlow / HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] / @@ -533,7 +542,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, format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); } } } diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc index bcc00bb7ac6..7105c253db9 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc @@ -101,10 +101,10 @@ Real64 CoolingWaterDesAirOutletHumRatSizer::size(EnergyPlusData &state, Real64 _ this->callingRoutine + ":" + " Coil=\"" + this->compName + "\", Cooling Coil has leaving humidity ratio > entering humidity ratio."; this->addErrorMessage(msg); ShowWarningError(state, msg); - msg = format(" Wair,in = {:.6R} [kgWater/kgDryAir]", this->dataDesInletAirHumRat); + msg = EnergyPlus::format(" Wair,in = {:.6R} [kgWater/kgDryAir]", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Wair,out = {:.6R} [kgWater/kgDryAir]", this->autoSizedValue); + msg = EnergyPlus::format(" Wair,out = {:.6R} [kgWater/kgDryAir]", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataDesInletAirHumRat > 0.016) { @@ -115,7 +115,7 @@ Real64 CoolingWaterDesAirOutletHumRatSizer::size(EnergyPlusData &state, Real64 _ msg = "....coil leaving humidity ratio will be reset to:"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Wair,out = {:.6R} [kgWater/kgDryAir]", this->autoSizedValue); + msg = EnergyPlus::format(" Wair,out = {:.6R} [kgWater/kgDryAir]", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -131,24 +131,24 @@ Real64 CoolingWaterDesAirOutletHumRatSizer::size(EnergyPlusData &state, Real64 _ "temperature > design air entering humidity ratio."; this->addErrorMessage(msg); ShowWarningError(state, msg); - msg = format(" Wair,in = {:.6R} [kgWater/kgDryAir]", this->dataDesInletAirHumRat); + msg = EnergyPlus::format(" Wair,in = {:.6R} [kgWater/kgDryAir]", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Wair,out = {:.6R} [kgWater/kgDryAir]", this->autoSizedValue); + msg = EnergyPlus::format(" Wair,out = {:.6R} [kgWater/kgDryAir]", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Inlet chilled water temperature = {:.3R} [C]", this->dataDesInletWaterTemp); + msg = EnergyPlus::format(" Inlet chilled water temperature = {:.3R} [C]", this->dataDesInletWaterTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Minimum humidity ratio at saturation for inlet chilled water temperature = {:.6R} [kgWater/kgDryAir]", - desHumRatAtWaterInTemp); + msg = EnergyPlus::format(" Minimum humidity ratio at saturation for inlet chilled water temperature = {:.6R} [kgWater/kgDryAir]", + desHumRatAtWaterInTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); this->autoSizedValue = this->dataDesInletAirHumRat; msg = "....coil leaving humidity ratio will be reset to:"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Wair,out = {:.6R} [kgWater/kgDryAir]", this->autoSizedValue); + msg = EnergyPlus::format(" Wair,out = {:.6R} [kgWater/kgDryAir]", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); } diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc index f0d720eff83..41957522c11 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc @@ -96,17 +96,17 @@ Real64 CoolingWaterDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _or "\", Cooling Coil has leaving air temperature < entering water temperature."; this->addErrorMessage(msg); ShowWarningError(state, msg); - msg = format(" Tair,out = {:.3R}", this->autoSizedValue); + msg = EnergyPlus::format(" Tair,out = {:.3R}", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Twater,in = {:.3R}", this->dataDesInletWaterTemp); + msg = EnergyPlus::format(" Twater,in = {:.3R}", this->dataDesInletWaterTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); this->autoSizedValue = this->dataDesInletWaterTemp + 0.5; msg = "....coil leaving air temperature will be reset to:"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Tair,out = {:.3R}", this->autoSizedValue); + msg = EnergyPlus::format(" Tair,out = {:.3R}", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -155,14 +155,14 @@ Real64 CoolingWaterDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _or "\", Cooling Coil has leaving air temperature < entering water temperature."; this->addErrorMessage(msg); ShowWarningError(state, msg); - msg = format(" Tair,out = {:.3R}", this->autoSizedValue); + msg = EnergyPlus::format(" Tair,out = {:.3R}", this->autoSizedValue); ShowContinueError(state, msg); - msg = format(" Twater,in = {:.3R}", this->dataDesInletWaterTemp); + msg = EnergyPlus::format(" Twater,in = {:.3R}", this->dataDesInletWaterTemp); ShowContinueError(state, msg); this->autoSizedValue = this->dataDesInletWaterTemp + 0.5; msg = "....coil leaving air temperature will be reset to:"; ShowContinueError(state, msg); - msg = format(" Tair,out = {:.3R}", this->autoSizedValue); + msg = EnergyPlus::format(" Tair,out = {:.3R}", this->autoSizedValue); ShowContinueError(state, msg); } } diff --git a/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc b/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc index 86d41e87075..7b48bd0978e 100644 --- a/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc @@ -251,7 +251,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 = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; diff --git a/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc b/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc index 7746b0fdf8f..ae17ad39c61 100644 --- a/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc @@ -181,16 +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, format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue)); if (this->zoneEqSizing(this->curZoneEqNum).HeatingCapacity || (this->dataCoolCoilCap > 0.0 && this->dataFlowUsedForSizing > 0.0)) { - ShowContinueError(state, - format("...Capacity passed by parent object to size child component = {:.2T} [W]", NominalCapacityDes)); + ShowContinueError( + state, + EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", NominalCapacityDes)); } else { if (CoilOutTemp > -999.0) { - ShowContinueError(state, format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); - ShowContinueError(state, format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); - ShowContinueError(state, format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + 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)); } else { ShowContinueError(state, "...Capacity used to size child component set to 0 [W]"); } @@ -343,14 +344,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, format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue)); if (CoilOutTemp > -999.0) { - ShowContinueError(state, format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); - ShowContinueError(state, format("...Outdoor air fraction used for sizing = {:.2T}", OutAirFrac)); - ShowContinueError(state, format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); - ShowContinueError(state, format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + 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)); } else { - ShowContinueError(state, format("...Capacity passed by parent object to size child component = {:.2T} [W]", DesCoilLoad)); + ShowContinueError( + state, EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", DesCoilLoad)); } } } @@ -362,7 +364,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 = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; @@ -385,12 +387,13 @@ 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, format("...DX coil volume flow rate [m3/s] = {:.6T}", DesVolFlow)); - ShowContinueError(state, format("...Requested capacity [W] = {:.3T}", this->autoSizedValue)); - ShowContinueError(state, format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + 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, - format("...Minimum flow/capacity ratio [m3/s/W] = {:.3T}", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + EnergyPlus::format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + ShowContinueError(state, + EnergyPlus::format("...Minimum flow/capacity ratio [m3/s/W] = {:.3T}", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } DXFlowPerCapMinRatio = (DesVolFlow / HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) / @@ -398,19 +401,20 @@ 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, format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3T}", 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, format("...DX coil volume flow rate [m3/s] = {:.6T}", DesVolFlow)); - ShowContinueError(state, format("...Requested capacity [W] = {:.3T}", this->autoSizedValue)); - ShowContinueError(state, format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + 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, - format("...Maximum flow/capacity ratio [m3/s/W] = {:.3T}", - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + EnergyPlus::format("...Maximum flow/capacity ratio [m3/s/W] = {:.3T}", + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } DXFlowPerCapMaxRatio = DesVolFlow / HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] / @@ -418,7 +422,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, format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); } } } diff --git a/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc b/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc index 48af0f8d73c..49ced2b7e91 100644 --- a/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc @@ -88,22 +88,22 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->autoSizedValue == 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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->autoSizedValue == this->zoneEqSizing(this->curZoneEqNum).AirVolFlow) { DDNameFanPeak = "Unknown"; @@ -115,11 +115,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneHeatingOnlyFan) { this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow; @@ -127,11 +127,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) { this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow; @@ -139,11 +139,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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; @@ -151,11 +151,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = max(this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow, @@ -164,23 +164,23 @@ 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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = EnergyPlus::format( + "{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = EnergyPlus::format( + "{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } else { @@ -190,23 +190,23 @@ 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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = EnergyPlus::format( + "{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->autoSizedValue == 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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = EnergyPlus::format( + "{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } @@ -217,44 +217,48 @@ 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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = @@ -266,11 +270,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->autoSizedValue == this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow) { @@ -278,11 +282,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } else { @@ -295,11 +299,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->autoSizedValue == this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow) { @@ -307,11 +311,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } @@ -321,44 +325,48 @@ 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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = @@ -370,11 +378,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->autoSizedValue == this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow) { @@ -382,11 +390,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } else { @@ -399,11 +407,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->autoSizedValue == this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow) { @@ -411,11 +419,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } @@ -425,44 +433,48 @@ 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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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, @@ -472,22 +484,22 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } else { @@ -498,22 +510,22 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } @@ -523,44 +535,48 @@ 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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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, @@ -570,22 +586,22 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } else { @@ -596,22 +612,22 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } @@ -621,22 +637,24 @@ 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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->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 = format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = @@ -646,22 +664,22 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } else { @@ -675,11 +693,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneHeatingOnlyFan) { this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow; @@ -687,11 +705,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; dateTimeFanPeak = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else { this->autoSizedValue = max(this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow, @@ -700,23 +718,23 @@ 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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = EnergyPlus::format( + "{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->autoSizedValue == 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 = - format("{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = EnergyPlus::format( + "{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } } @@ -803,22 +821,23 @@ 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 = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); + dateTimeFanPeak = EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); } } else if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesCoolVolFlow) { auto &sysSizPeakDDNum = state.dataSize->SysSizPeakDDNum(this->curSysNum); if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } } @@ -833,11 +852,12 @@ 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 = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } else if (this->autoSizedValue == unitarysysEqSizing.HeatingAirVolFlow) { @@ -845,11 +865,11 @@ 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 = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); + dateTimeFanPeak = EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); } } } else if (unitarysysEqSizing.CoolingAirFlow) { @@ -857,11 +877,12 @@ 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 = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } else if (unitarysysEqSizing.HeatingAirFlow) { this->autoSizedValue = unitarysysEqSizing.HeatingAirVolFlow; @@ -869,11 +890,11 @@ 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 = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); + dateTimeFanPeak = EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); } } else { @@ -883,21 +904,22 @@ 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 = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); + dateTimeFanPeak = EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); } } else if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesCoolVolFlow) { if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } } @@ -908,21 +930,22 @@ 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 = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); + dateTimeFanPeak = EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); } } else if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesCoolVolFlow) { if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + dateTimeFanPeak = + EnergyPlus::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } } @@ -940,7 +963,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 = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", 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 7934d0260e8..7bac6c13fde 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc @@ -110,27 +110,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 = format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue); + msg = EnergyPlus::format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesMassFlow / state.dataEnvrn->StdRhoAir); + msg = EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesMassFlow / state.dataEnvrn->StdRhoAir); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil || this->zoneEqUnitHeater) { - msg = format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesMassFlow / state.dataEnvrn->StdRhoAir); + msg = EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesMassFlow / state.dataEnvrn->StdRhoAir); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("...Plant loop temperature difference = {:.2T} [C]", this->dataWaterCoilSizHeatDeltaT); + msg = EnergyPlus::format("...Plant loop temperature difference = {:.2T} [C]", this->dataWaterCoilSizHeatDeltaT); this->addErrorMessage(msg); ShowContinueError(state, msg); } else { - msg = format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp); + msg = EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp); + msg = EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format("...Coil outlet air humidity ratio used for sizing = {:.2T} [kgWater/kgDryAir]", CoilOutHumRat); + msg = EnergyPlus::format("...Coil outlet air humidity ratio used for sizing = {:.2T} [kgWater/kgDryAir]", CoilOutHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc b/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc index 307a593766a..2d8782f6f73 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc +++ b/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc @@ -89,55 +89,56 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Iteration limit exceeded in calculating coil UA"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0); + msg = EnergyPlus::format(" Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); + msg = EnergyPlus::format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Final UA estimate when iterations exceeded limit = {:.6T} W/m2-K", this->autoSizedValue); + msg = EnergyPlus::format(" Final UA estimate when iterations exceeded limit = {:.6T} 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 = format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); + msg = EnergyPlus::format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); + msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); + msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); // TotWaterHeatingCoilRate is set in CALL to CalcSimpleHeatingCoil - msg = format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); + msg = EnergyPlus::format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataNomCapInpMeth) { - msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); + msg = EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); + msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } else if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil) { - msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); } else { - msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air temperature = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp); + msg = + EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", - this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat); + msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", + this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -151,51 +152,52 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Bad starting values for UA"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0); + msg = EnergyPlus::format(" Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); + msg = EnergyPlus::format(" Upper UA estimate = {:.6T} 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 = format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); + msg = EnergyPlus::format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); + msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); + msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); + msg = EnergyPlus::format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataNomCapInpMeth) { - msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); + msg = EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); + msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } else if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil) { - msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); } else { - msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air temperature = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp); + msg = + EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", - this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat); + msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", + this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -210,10 +212,11 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Plant Sizing object = " + this->plantSizData(this->dataPltSizHeatNum).PlantLoopName; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Plant design loop exit temperature = {:.3T} C", this->plantSizData(this->dataPltSizHeatNum).ExitTemp); + msg = EnergyPlus::format(" Plant design loop exit temperature = {:.3T} C", + this->plantSizData(this->dataPltSizHeatNum).ExitTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Plant design loop delta T = {:.3T} C", this->dataWaterCoilSizHeatDeltaT); + msg = EnergyPlus::format(" Plant design loop delta T = {:.3T} C", this->dataWaterCoilSizHeatDeltaT); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -265,39 +268,39 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Iteration limit exceeded in calculating coil UA"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0); + msg = EnergyPlus::format(" Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); + msg = EnergyPlus::format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Final UA estimate when iterations exceeded limit = {:.6T} W/m2-K", this->autoSizedValue); + msg = EnergyPlus::format(" Final UA estimate when iterations exceeded limit = {:.6T} 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 = format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); + msg = EnergyPlus::format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); + msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); + msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); + msg = EnergyPlus::format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataNomCapInpMeth) { - msg = format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); + msg = EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); + msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -311,36 +314,36 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Bad starting values for UA"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0); + msg = EnergyPlus::format(" Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); + msg = EnergyPlus::format(" Upper UA estimate = {:.6T} 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 = format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); + msg = EnergyPlus::format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); + msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); + msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); + msg = EnergyPlus::format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataNomCapInpMeth) { - msg = format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); + msg = EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); + msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -354,10 +357,11 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Plant Sizing object = " + this->plantSizData(this->dataPltSizHeatNum).PlantLoopName; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Plant design loop exit temperature = {:.3T} C", this->plantSizData(this->dataPltSizHeatNum).ExitTemp); + msg = EnergyPlus::format(" Plant design loop exit temperature = {:.3T} C", + this->plantSizData(this->dataPltSizHeatNum).ExitTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = format(" Plant design loop delta T = {:.3T} C", this->dataWaterCoilSizHeatDeltaT); + msg = EnergyPlus::format(" Plant design loop delta T = {:.3T} C", this->dataWaterCoilSizHeatDeltaT); this->addErrorMessage(msg); ShowContinueError(state, msg); } diff --git a/src/EnergyPlus/BaseboardElectric.cc b/src/EnergyPlus/BaseboardElectric.cc index 5a35e89b402..13208c6f5d6 100644 --- a/src/EnergyPlus/BaseboardElectric.cc +++ b/src/EnergyPlus/BaseboardElectric.cc @@ -106,7 +106,7 @@ namespace BaseboardElectric { if (CompIndex == 0) { BaseboardNum = Util::FindItemInList(EquipName, baseboard->baseboards, &BaseboardParams::EquipName); if (BaseboardNum == 0) { - ShowFatalError(state, format("SimElectricBaseboard: Unit not found={}", EquipName)); + ShowFatalError(state, EnergyPlus::format("SimElectricBaseboard: Unit not found={}", EquipName)); } CompIndex = BaseboardNum; } else { @@ -114,18 +114,19 @@ namespace BaseboardElectric { int numBaseboards = (int)baseboard->baseboards.size(); if (BaseboardNum > numBaseboards || BaseboardNum < 1) { ShowFatalError(state, - format("SimElectricBaseboard: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - BaseboardNum, - numBaseboards, - EquipName)); + EnergyPlus::format("SimElectricBaseboard: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + BaseboardNum, + numBaseboards, + EquipName)); } if (baseboard->baseboards(BaseboardNum).CheckEquipName) { if (EquipName != baseboard->baseboards(BaseboardNum).EquipName) { - ShowFatalError(state, - format("SimElectricBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - BaseboardNum, - EquipName, - baseboard->baseboards(BaseboardNum).EquipName)); + ShowFatalError( + state, + EnergyPlus::format("SimElectricBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + BaseboardNum, + EquipName, + baseboard->baseboards(BaseboardNum).EquipName)); } baseboard->baseboards(BaseboardNum).CheckEquipName = false; } @@ -208,7 +209,8 @@ namespace BaseboardElectric { ErrorObjectHeader eoh{routineName, cCurrentModuleObject, s_ipsc->cAlphaArgs(1)}; // ErrorsFound will be set to True if problem was found, left untouched otherwise - VerifyUniqueBaseboardName(state, cCurrentModuleObject, s_ipsc->cAlphaArgs(1), ErrorsFound, format("{} Name", cCurrentModuleObject)); + VerifyUniqueBaseboardName( + state, cCurrentModuleObject, s_ipsc->cAlphaArgs(1), ErrorsFound, EnergyPlus::format("{} Name", cCurrentModuleObject)); ++BaseboardNum; auto &thisBaseboard = baseboard->baseboards(BaseboardNum); @@ -230,18 +232,21 @@ namespace BaseboardElectric { if (!s_ipsc->lNumericFieldBlanks(iHeatDesignCapacityNumericNum)) { thisBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum); if (thisBaseboard.ScaledHeatingCapacity < 0.0 && thisBaseboard.ScaledHeatingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum), - s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum), + s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError( - state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum))); + state, EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum), "CapacityPerFloorArea")) { @@ -249,30 +254,35 @@ namespace BaseboardElectric { if (!s_ipsc->lNumericFieldBlanks(iHeatCapacityPerFloorAreaNumericNum)) { thisBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum); if (thisBaseboard.ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); - ShowContinueError( - state, - format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), - s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), + s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (thisBaseboard.ScaledHeatingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); - ShowContinueError( - state, - format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); ShowContinueError(state, - format("Illegal {} = AutoSize", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, EnergyPlus::format("Illegal {} = AutoSize", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); - ShowContinueError( - state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); ShowContinueError(state, - format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, + EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum), "FractionOfAutosizedHeatingCapacity")) { @@ -280,25 +290,29 @@ namespace BaseboardElectric { if (!s_ipsc->lNumericFieldBlanks(iHeatFracOfAutosizedCapacityNumericNum)) { thisBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum); if (thisBaseboard.ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); - ShowContinueError( - state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError( - state, format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + state, + EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); - ShowContinueError(state, - format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowContinueError( + state, + EnergyPlus::format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ErrorsFound = true; } @@ -307,7 +321,8 @@ namespace BaseboardElectric { } if (ErrorsFound) { - ShowFatalError(state, format("{} Errors found in getting input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, + EnergyPlus::format("{} Errors found in getting input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -421,7 +436,7 @@ namespace BaseboardElectric { state.dataSize->DataZoneNumber = baseboard.ZonePtr; int SizingMethod = HVAC::HeatingCapacitySizing; int FieldNum = 1; - std::string const SizingString = format("{} [W]", baseboard.FieldNames[FieldNum - 1]); + std::string const SizingString = EnergyPlus::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 1aa22047007..e46580d17e1 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -123,7 +123,7 @@ namespace BaseboardRadiator { if (CompIndex == 0) { int BaseboardNum = Util::FindItemInList(EquipName, state.dataBaseboardRadiator->baseboards, &BaseboardParams::EquipID); if (BaseboardNum == 0) { - ShowFatalError(state, format("SimBaseboard: Unit not found={}", EquipName)); + ShowFatalError(state, EnergyPlus::format("SimBaseboard: Unit not found={}", EquipName)); } CompIndex = BaseboardNum; } @@ -132,10 +132,10 @@ namespace BaseboardRadiator { if (thisBaseboard.CheckEquipName) { if (EquipName != thisBaseboard.EquipID) { ShowFatalError(state, - format("SimBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - CompIndex, - EquipName, - thisBaseboard.EquipID)); + EnergyPlus::format("SimBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + CompIndex, + EquipName, + thisBaseboard.EquipID)); } thisBaseboard.CheckEquipName = false; } @@ -306,18 +306,21 @@ namespace BaseboardRadiator { if (!s_ipsc->lNumericFieldBlanks(iHeatDesignCapacityNumericNum)) { thisBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum); if (thisBaseboard.ScaledHeatingCapacity < 0.0 && thisBaseboard.ScaledHeatingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum), - s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum), + s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError( - state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum))); + state, EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum), "CapacityPerFloorArea")) { @@ -325,30 +328,35 @@ namespace BaseboardRadiator { if (!s_ipsc->lNumericFieldBlanks(iHeatCapacityPerFloorAreaNumericNum)) { thisBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum); if (thisBaseboard.ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); - ShowContinueError( - state, - format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), - s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), + s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (thisBaseboard.ScaledHeatingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); - ShowContinueError( - state, - format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); ShowContinueError(state, - format("Illegal {} = Autosize", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, EnergyPlus::format("Illegal {} = Autosize", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); - ShowContinueError( - state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); ShowContinueError(state, - format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, + EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum), "FractionOfAutosizedHeatingCapacity")) { @@ -356,25 +364,29 @@ namespace BaseboardRadiator { if (!s_ipsc->lNumericFieldBlanks(iHeatFracOfAutosizedCapacityNumericNum)) { thisBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum); if (thisBaseboard.ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); - ShowContinueError( - state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError( - state, format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + state, + EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); - ShowContinueError(state, - format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); + ShowContinueError( + state, + EnergyPlus::format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ErrorsFound = true; } @@ -393,7 +405,7 @@ namespace BaseboardRadiator { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -606,7 +618,7 @@ namespace BaseboardRadiator { state.dataSize->DataZoneNumber = this->ZonePtr; int SizingMethod = HVAC::HeatingCapacitySizing; int FieldNum = 1; - std::string const SizingString = format("{} [W]", this->FieldNames[FieldNum - 1]); + std::string const SizingString = EnergyPlus::format("{} [W]", this->FieldNames[FieldNum - 1]); int CapSizingMethod = this->HeatingCapMethod; zoneEqSizing.SizingMethod(SizingMethod) = CapSizingMethod; if (CapSizingMethod == DataSizing::HeatingDesignCapacity || CapSizingMethod == DataSizing::CapacityPerFloorArea || @@ -674,12 +686,15 @@ namespace BaseboardRadiator { state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - format("SizeBaseboard: Potential issue with equipment sizing for ZoneHVAC:Baseboard:Convective:Water=\"{}\".", - this->EquipID)); - ShowContinueError(state, - format("User-Specified Maximum Water Flow Rate of {:.5R} [m3/s]", WaterVolFlowRateMaxUser)); + EnergyPlus::format( + "SizeBaseboard: Potential issue with equipment sizing for ZoneHVAC:Baseboard:Convective:Water=\"{}\".", + this->EquipID)); ShowContinueError( - state, format("differs from Design Size Maximum Water Flow Rate of {:.5R} [m3/s]", WaterVolFlowRateMaxDes)); + state, + EnergyPlus::format("User-Specified Maximum Water Flow Rate of {:.5R} [m3/s]", WaterVolFlowRateMaxUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Water Flow Rate of {:.5R} [m3/s]", + WaterVolFlowRateMaxDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -716,7 +731,7 @@ namespace BaseboardRadiator { state.dataSize->DataZoneNumber = this->ZonePtr; int SizingMethod = HVAC::HeatingCapacitySizing; int FieldNum = 1; - std::string const SizingString = format("{} [W]", this->FieldNames[FieldNum - 1]); + std::string const SizingString = EnergyPlus::format("{} [W]", this->FieldNames[FieldNum - 1]); int CapSizingMethod = this->HeatingCapMethod; zoneEqSizing.SizingMethod(SizingMethod) = CapSizingMethod; if (CapSizingMethod == DataSizing::HeatingDesignCapacity || CapSizingMethod == DataSizing::CapacityPerFloorArea || @@ -784,9 +799,9 @@ namespace BaseboardRadiator { // if the numerical inversion failed, issue error messages. if (SolFla == -1) { ShowSevereError(state, - format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); + EnergyPlus::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; @@ -797,9 +812,9 @@ namespace BaseboardRadiator { } } else if (SolFla == -2) { ShowSevereError(state, - format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); + EnergyPlus::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; @@ -814,27 +829,32 @@ namespace BaseboardRadiator { UADes = UA1; if (UAAutoSize) { ShowWarningError(state, - format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); + 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)); + ShowContinueError(state, EnergyPlus::format("Design coil load used during sizing = {:.5R} W.", DesCoilLoad)); ShowContinueError( - state, format("Design UA set equal to design coil load for {}=\"{}\"", cCMO_BBRadiator_Water, this->EquipID)); - ShowContinueError(state, format("Design coil load used during sizing = {:.5R} W.", DesCoilLoad)); - ShowContinueError(state, format("Inlet water temperature used during sizing = {:.5R} C.", this->WaterInletTemp)); + state, EnergyPlus::format("Inlet water temperature used during sizing = {:.5R} C.", this->WaterInletTemp)); } } } else { // baseboard design load is less than output at UA = 0.001 * design load so set UA to minimum value UADes = UA0; if (UAAutoSize) { ShowWarningError(state, - format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); - ShowContinueError( - state, - format("Design UA set equal to 0.001 * design coil load for {}=\"{}\"", cCMO_BBRadiator_Water, this->EquipID)); - ShowContinueError(state, format("Design coil load used during sizing = {:.5R} W.", DesCoilLoad)); - ShowContinueError(state, format("Inlet water temperature used during sizing = {:.5R} C.", this->WaterInletTemp)); + EnergyPlus::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)); + 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)); } } @@ -861,10 +881,12 @@ namespace BaseboardRadiator { if ((std::abs(UADes - UAUser) / UAUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - format("SizeBaseboard: Potential issue with equipment sizing for ZoneHVAC:Baseboard:Convective:Water=\"{}\".", - this->EquipID)); - ShowContinueError(state, format("User-Specified U-Factor Times Area Value of {:.2R} [W/K]", UAUser)); - ShowContinueError(state, format("differs from Design Size U-Factor Times Area Value of {:.2R} [W/K]", UADes)); + EnergyPlus::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)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size U-Factor Times Area Value of {:.2R} [W/K]", UADes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -876,7 +898,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, format("SizeBaseboard: {}=\"{}\"", cCMO_BBRadiator_Water, this->EquipID)); + ShowSevereError(state, EnergyPlus::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 18214308b3e..cff4598ad28 100644 --- a/src/EnergyPlus/BoilerSteam.cc +++ b/src/EnergyPlus/BoilerSteam.cc @@ -104,7 +104,8 @@ namespace BoilerSteam { } // If we didn't find it, fatal - ShowFatalError(state, format("LocalBoilerSteamFactory: Error getting inputs for steam boiler named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalBoilerSteamFactory: Error getting inputs for steam boiler named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -160,7 +161,7 @@ namespace BoilerSteam { int numBoilers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (numBoilers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } @@ -202,7 +203,8 @@ namespace BoilerSteam { // INPUTS from the IDF file thisBoiler.BoilerMaxOperPress = state.dataIPShortCut->rNumericArgs(1); if (thisBoiler.BoilerMaxOperPress < 1e5) { - ShowWarningMessage(state, format("{}=\"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningMessage(state, + EnergyPlus::format("{}=\"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Field: Maximum Operation Pressure units are Pa. Verify units."); } thisBoiler.NomEffic = state.dataIPShortCut->rNumericArgs(2); @@ -223,25 +225,30 @@ namespace BoilerSteam { } if ((state.dataIPShortCut->rNumericArgs(8) + state.dataIPShortCut->rNumericArgs(9) + state.dataIPShortCut->rNumericArgs(10)) == 0.0) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, " Sum of fuel use curve coefficients = 0.0"); ErrorsFound = true; } if (state.dataIPShortCut->rNumericArgs(5) < 0.0) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); ErrorsFound = true; } if (state.dataIPShortCut->rNumericArgs(3) == 0.0) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(3), state.dataIPShortCut->rNumericArgs(3))); + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(3), state.dataIPShortCut->rNumericArgs(3))); ErrorsFound = true; } thisBoiler.BoilerInletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -283,7 +290,8 @@ namespace BoilerSteam { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in processing {} input.", RoutineName, state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, + EnergyPlus::format("{}Errors found in processing {} input.", RoutineName, state.dataIPShortCut->cCurrentModuleObject)); } } @@ -324,7 +332,7 @@ namespace BoilerSteam { (state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->MissingSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for Boiler:Steam = {}", this->Name)); + ShowWarningError(state, EnergyPlus::format("Missing temperature setpoint for Boiler:Steam = {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of the boiler, use a SetpointManager"); ShowContinueError(state, " The overall loop setpoint will be assumed for this boiler. The simulation continues ..."); this->MissingSetPointErrDone = true; @@ -336,7 +344,8 @@ namespace BoilerSteam { state.dataLoopNodes->NodeSetpointCheck(this->BoilerOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->MissingSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of the boiler."); 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."); @@ -420,14 +429,14 @@ namespace BoilerSteam { OutputProcessor::Group::Plant, OutputProcessor::EndUseCat::Boilers); SetupOutputVariable(state, - format("Boiler {} Rate", sFuelType), + EnergyPlus::format("Boiler {} Rate", sFuelType), Constant::Units::W, this->FuelUsed, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("Boiler {} Energy", sFuelType), + EnergyPlus::format("Boiler {} Energy", sFuelType), Constant::Units::J, this->FuelConsumed, OutputProcessor::TimeStepType::System, @@ -577,9 +586,10 @@ namespace BoilerSteam { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePump: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, EnergyPlus::format("SizePump: 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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -591,7 +601,7 @@ namespace BoilerSteam { } else { if (this->NomCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Boiler nominal capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in Boiler:Steam object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Boiler:Steam object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && this->NomCap > 0.0 && state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -668,10 +678,11 @@ namespace BoilerSteam { if ((this->BoilerPressCheck) > this->BoilerMaxOperPress) { if (this->PressErrIndex == 0) { - ShowSevereError(state, format("Boiler:Steam=\"{}\", Saturation Pressure is greater than Maximum Operating Pressure,", this->Name)); + ShowSevereError( + state, EnergyPlus::format("Boiler:Steam=\"{}\", Saturation Pressure is greater than Maximum Operating Pressure,", this->Name)); ShowContinueError(state, "Lower Input Temperature"); - ShowContinueError(state, format("Steam temperature=[{:.2R}] C", this->BoilerOutletTemp)); - ShowContinueError(state, format("Refrigerant Saturation Pressure =[{:.0R}] Pa", this->BoilerPressCheck)); + ShowContinueError(state, EnergyPlus::format("Steam temperature=[{:.2R}] C", this->BoilerOutletTemp)); + ShowContinueError(state, EnergyPlus::format("Refrigerant Saturation Pressure =[{:.0R}] Pa", this->BoilerPressCheck)); } ShowRecurringSevereErrorAtEnd(state, "Boiler:Steam=\"" + this->Name + diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index d52034a1394..73d18d8fe69 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -107,7 +107,7 @@ BoilerSpecs *BoilerSpecs::factory(EnergyPlusData &state, std::string const &obje } // If we didn't find it, fatal - ShowFatalError(state, format("LocalBoilerFactory: Error getting inputs for boiler named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalBoilerFactory: Error getting inputs for boiler named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -173,7 +173,7 @@ void GetBoilerInput(EnergyPlusData &state) int numBoilers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (numBoilers <= 0) { - ShowSevereError(state, format("No {} Equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} Equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -217,8 +217,8 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.NomCap = s_ipsc->rNumericArgs(1); if (s_ipsc->rNumericArgs(1) == 0.0) { ShowSevereError(state, fmt::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); + ShowContinueError(state, EnergyPlus::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(1))); ErrorsFound = true; } if (thisBoiler.NomCap == DataSizing::AutoSize) { @@ -228,8 +228,8 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.NomEffic = s_ipsc->rNumericArgs(2); if (s_ipsc->rNumericArgs(2) == 0.0) { ShowSevereError(state, fmt::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={:.3R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(2))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={:.3R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); + ShowContinueError(state, EnergyPlus::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(2))); ErrorsFound = true; } else if (s_ipsc->rNumericArgs(2) > 1.0) { ShowWarningError(state, @@ -262,18 +262,19 @@ void GetBoilerInput(EnergyPlusData &state) if (thisBoiler.CurveTempMode == TempMode::NOTSET) { // throw error if (!s_ipsc->lAlphaFieldBlanks(3)) { ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); ShowContinueError(state, - format("boilers.Boiler using curve type of {} must specify {}", - Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType], - s_ipsc->cAlphaFieldNames(3))); + EnergyPlus::format("boilers.Boiler using curve type of {} must specify {}", + Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType], + s_ipsc->cAlphaFieldNames(3))); ShowContinueError(state, "Available choices are EnteringBoiler or LeavingBoiler"); } else { ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Field {} is blank", s_ipsc->cAlphaFieldNames(3))); - ShowContinueError(state, - format("boilers.Boiler using curve type of {} must specify either EnteringBoiler or LeavingBoiler", - Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType])); + ShowContinueError(state, EnergyPlus::format("Field {} is blank", s_ipsc->cAlphaFieldNames(3))); + ShowContinueError( + state, + EnergyPlus::format("boilers.Boiler using curve type of {} must specify either EnteringBoiler or LeavingBoiler", + Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType])); } ErrorsFound = true; } @@ -297,7 +298,7 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.ParasiticFuelCapacity = s_ipsc->rNumericArgs(10); if (thisBoiler.FuelType == Constant::eFuel::Electricity && thisBoiler.ParasiticFuelCapacity > 0) { ShowWarningError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} should be zero when the fuel type is electricity.", s_ipsc->cNumericFieldNames(10))); + ShowContinueError(state, EnergyPlus::format("{} should be zero when the fuel type is electricity.", s_ipsc->cNumericFieldNames(10))); ShowContinueError(state, "It will be ignored and the simulation continues."); thisBoiler.ParasiticFuelCapacity = 0.0; } @@ -336,7 +337,7 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.FlowMode = DataPlant::FlowMode::NotModulated; } else { ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); ShowContinueError(state, "Available choices are ConstantFlow, NotModulated, or LeavingSetpointModulated"); ShowContinueError(state, "Flow mode NotModulated is assumed and the simulation continues."); // We will assume variable flow if not specified @@ -352,7 +353,7 @@ void GetBoilerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}{}", RoutineName, "Errors found in processing " + s_ipsc->cCurrentModuleObject + " input.")); + ShowFatalError(state, EnergyPlus::format("{}{}", RoutineName, "Errors found in processing " + s_ipsc->cCurrentModuleObject + " input.")); } } @@ -377,14 +378,14 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state) OutputProcessor::Group::Plant, OutputProcessor::EndUseCat::Boilers); SetupOutputVariable(state, - format("Boiler {} Rate", sFuelType), + EnergyPlus::format("Boiler {} Rate", sFuelType), Constant::Units::W, this->FuelUsed, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("Boiler {} Energy", sFuelType), + EnergyPlus::format("Boiler {} Energy", sFuelType), Constant::Units::J, this->FuelConsumed, OutputProcessor::TimeStepType::System, @@ -435,14 +436,14 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state) "Boiler Parasitic"); if (this->FuelType != Constant::eFuel::Electricity) { SetupOutputVariable(state, - format("Boiler Ancillary {} Rate", sFuelType), + EnergyPlus::format("Boiler Ancillary {} Rate", sFuelType), Constant::Units::W, this->ParasiticFuelRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("Boiler Ancillary {} Energy", sFuelType), + EnergyPlus::format("Boiler Ancillary {} Energy", sFuelType), Constant::Units::J, this->ParasiticFuelConsumption, OutputProcessor::TimeStepType::System, @@ -501,7 +502,8 @@ void BoilerSpecs::initEachEnvironment(EnergyPlusData &state) (state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 ... "); @@ -514,7 +516,8 @@ void BoilerSpecs::initEachEnvironment(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->BoilerOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 "); @@ -635,9 +638,10 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, + EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -649,7 +653,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, format("Occurs in Boiler object={}", this->Name)); + ShowContinueError(state, EnergyPlus::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 @@ -689,10 +693,13 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) VolFlowRateUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpBoilerVolFlowRate - VolFlowRateUser) / VolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Design Water Flow Rate of {:.2R} [m3/s]", VolFlowRateUser)); + ShowMessage(state, + EnergyPlus::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, - format("differs from Design Size Design Water Flow Rate of {:.2R} [m3/s]", tmpBoilerVolFlowRate)); + EnergyPlus::format("User-Specified Design Water Flow Rate of {:.2R} [m3/s]", VolFlowRateUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Design Water Flow Rate of {:.2R} [m3/s]", tmpBoilerVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -705,7 +712,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, format("Occurs in Boiler object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Boiler object={}", this->Name)); ErrorsFound = true; } if (!this->VolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && @@ -912,21 +919,23 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, if (this->BoilerLoad > 0.0) { if (this->EffCurveOutputError < 1) { ++this->EffCurveOutputError; - ShowWarningError(state, format("Boiler:HotWater \"{}\"", this->Name)); + ShowWarningError(state, EnergyPlus::format("Boiler:HotWater \"{}\"", this->Name)); ShowContinueError(state, "...Normalized Boiler Efficiency Curve output is less than or equal to 0."); - ShowContinueError(state, format("...Curve input x value (PLR) = {:.5T}", this->BoilerPLR)); + ShowContinueError(state, EnergyPlus::format("...Curve input x value (PLR) = {:.5T}", this->BoilerPLR)); if (this->EfficiencyCurve->numDims == 2) { if (this->CurveTempMode == TempMode::ENTERINGBOILERTEMP) { - ShowContinueError(state, format("...Curve input y value (Tinlet) = {:.2T}", state.dataLoopNodes->Node(BoilerInletNode).Temp)); + ShowContinueError( + state, EnergyPlus::format("...Curve input y value (Tinlet) = {:.2T}", state.dataLoopNodes->Node(BoilerInletNode).Temp)); } else if (this->CurveTempMode == TempMode::LEAVINGBOILERTEMP) { - ShowContinueError(state, format("...Curve input y value (Toutlet) = {:.2T}", this->BoilerOutletTemp)); + ShowContinueError(state, EnergyPlus::format("...Curve input y value (Toutlet) = {:.2T}", this->BoilerOutletTemp)); } } - ShowContinueError(state, format("...Curve output (normalized eff) = {:.5T}", EffCurveOutput)); - ShowContinueError(state, - format("...Calculated Boiler efficiency = {:.5T} (Boiler efficiency = Nominal Thermal Efficiency * Normalized " - "Boiler Efficiency Curve output)", - BoilerEff)); + ShowContinueError(state, EnergyPlus::format("...Curve output (normalized eff) = {:.5T}", EffCurveOutput)); + ShowContinueError( + state, + EnergyPlus::format("...Calculated Boiler efficiency = {:.5T} (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, @@ -946,22 +955,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, format("Boiler:HotWater \"{}\"", this->Name)); + ShowWarningError(state, EnergyPlus::format("Boiler:HotWater \"{}\"", this->Name)); ShowContinueError(state, "...Calculated Boiler Efficiency is greater than 1.1."); ShowContinueError(state, "...Boiler Efficiency calculations shown below."); - ShowContinueError(state, format("...Curve input x value (PLR) = {:.5T}", this->BoilerPLR)); + ShowContinueError(state, EnergyPlus::format("...Curve input x value (PLR) = {:.5T}", this->BoilerPLR)); if (this->EfficiencyCurve->numDims == 2) { if (this->CurveTempMode == TempMode::ENTERINGBOILERTEMP) { - ShowContinueError(state, format("...Curve input y value (Tinlet) = {:.2T}", state.dataLoopNodes->Node(BoilerInletNode).Temp)); + ShowContinueError( + state, EnergyPlus::format("...Curve input y value (Tinlet) = {:.2T}", state.dataLoopNodes->Node(BoilerInletNode).Temp)); } else if (this->CurveTempMode == TempMode::LEAVINGBOILERTEMP) { - ShowContinueError(state, format("...Curve input y value (Toutlet) = {:.2T}", this->BoilerOutletTemp)); + ShowContinueError(state, EnergyPlus::format("...Curve input y value (Toutlet) = {:.2T}", this->BoilerOutletTemp)); } } - ShowContinueError(state, format("...Curve output (normalized eff) = {:.5T}", EffCurveOutput)); - ShowContinueError(state, - format("...Calculated Boiler efficiency = {:.5T} (Boiler efficiency = Nominal Thermal Efficiency * Normalized " - "Boiler Efficiency Curve output)", - BoilerEff)); + ShowContinueError(state, EnergyPlus::format("...Curve output (normalized eff) = {:.5T}", EffCurveOutput)); + ShowContinueError( + state, + EnergyPlus::format("...Calculated Boiler efficiency = {:.5T} (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 7326c56d032..353f13cb02c 100644 --- a/src/EnergyPlus/BranchInputManager.cc +++ b/src/EnergyPlus/BranchInputManager.cc @@ -171,7 +171,7 @@ namespace BranchInputManager { // Find this BranchList in the master BranchList Names Found = Util::FindItemInList(BranchListName, state.dataBranchInputManager->BranchList); if (Found == 0) { - ShowFatalError(state, format("GetBranchList: BranchList Name not found={}", BranchListName)); + ShowFatalError(state, EnergyPlus::format("GetBranchList: BranchList Name not found={}", BranchListName)); } // Set data @@ -181,10 +181,10 @@ namespace BranchInputManager { } else if (state.dataBranchInputManager->BranchList(Found).LoopName != LoopName) { ShowSevereError(state, "GetBranchList: BranchList Loop Name already assigned"); ShowContinueError(state, - format("BranchList={}, already assigned to loop={}", - state.dataBranchInputManager->BranchList(Found).Name, - state.dataBranchInputManager->BranchList(Found).LoopName)); - ShowContinueError(state, format("Now requesting assignment to Loop={}", LoopName)); + EnergyPlus::format("BranchList={}, already assigned to loop={}", + state.dataBranchInputManager->BranchList(Found).Name, + state.dataBranchInputManager->BranchList(Found).LoopName)); + ShowContinueError(state, EnergyPlus::format("Now requesting assignment to Loop={}", LoopName)); ErrFound = true; } @@ -192,7 +192,7 @@ namespace BranchInputManager { NumBranchNames = state.dataBranchInputManager->BranchList(Found).NumOfBranchNames; if (isize(BranchNames) < NumBranchNames) { ShowSevereError(state, "GetBranchList: Branch Names array not big enough to hold Branch Names"); - ShowContinueError(state, format("Input BranchListName={}, in Loop={}", BranchListName, LoopName)); + ShowContinueError(state, EnergyPlus::format("Input BranchListName={}, in Loop={}", BranchListName, LoopName)); ShowContinueError(state, fmt::format("BranchName Array size={}, but input size={}", size(BranchNames), (NumBranchNames))); ErrFound = true; } else { @@ -232,7 +232,7 @@ namespace BranchInputManager { // Find this BranchList in the master BranchList Names Found = Util::FindItemInList(BranchListName, state.dataBranchInputManager->BranchList); if (Found == 0) { - ShowFatalError(state, format("NumBranchesInBranchList: BranchList Name not found={}", BranchListName)); + ShowFatalError(state, EnergyPlus::format("NumBranchesInBranchList: BranchList Name not found={}", BranchListName)); } NumBranchesInBranchList = state.dataBranchInputManager->BranchList(Found).NumOfBranchNames; @@ -283,7 +283,7 @@ namespace BranchInputManager { size(CompType), size(CompName), size(CompInletNodeNames), size(CompInletNodeNums), size(CompOutletNodeNames), size(CompOutletNodeNums)); if (MinCompsAllowed < NumComps) { ShowSevereError(state, "GetBranchData: Component List arrays not big enough to hold Number of Components"); - ShowContinueError(state, format("Input BranchName={}, in Loop={}", BranchName, LoopName)); + ShowContinueError(state, EnergyPlus::format("Input BranchName={}, in Loop={}", BranchName, LoopName)); ShowContinueError(state, fmt::format("Max Component Array size={}, but input size={}", MinCompsAllowed, NumComps)); ShowFatalError(state, "Program terminates due to preceding conditions."); } @@ -325,7 +325,7 @@ namespace BranchInputManager { Found = Util::FindItemInList(BranchName, state.dataBranchInputManager->Branch); if (Found == 0) { - ShowSevereError(state, format("NumCompsInBranch: Branch not found={}", BranchName)); + ShowSevereError(state, EnergyPlus::format("NumCompsInBranch: Branch not found={}", BranchName)); NumCompsInBranch = 0; } else { NumCompsInBranch = state.dataBranchInputManager->Branch(Found).NumOfComponents; @@ -363,7 +363,7 @@ namespace BranchInputManager { NumBranches = size(state.dataBranchInputManager->Branch); if (NumBranches == 0) { - ShowSevereError(state, format("GetAirBranchIndex: Branch not found with component = {} \"{}\"", CompType, CompName)); + ShowSevereError(state, EnergyPlus::format("GetAirBranchIndex: Branch not found with component = {} \"{}\"", CompType, CompName)); } else { for (BranchNum = 1; BranchNum <= NumBranches; ++BranchNum) { for (CompNum = 1; CompNum <= state.dataBranchInputManager->Branch(BranchNum).NumOfComponents; ++CompNum) { @@ -472,7 +472,7 @@ namespace BranchInputManager { Found = Util::FindItemInList(BranchName, state.dataBranchInputManager->Branch); if (Found == 0) { - ShowSevereError(state, format("GetInternalBranchData: Branch not found={}", BranchName)); + ShowSevereError(state, EnergyPlus::format("GetInternalBranchData: Branch not found={}", BranchName)); ErrorsFound = true; NumComps = 0; } else { @@ -483,9 +483,10 @@ namespace BranchInputManager { NumComps = state.dataBranchInputManager->Branch(Found).NumOfComponents; BComponents({1, NumComps}) = state.dataBranchInputManager->Branch(Found).Component({1, NumComps}); } else if (state.dataBranchInputManager->Branch(Found).AssignedLoopName != LoopName) { - ShowSevereError(state, format("Attempt to assign branch to two different loops, Branch={}", BranchName)); - ShowContinueError(state, format("Branch already assigned to loop={}", state.dataBranchInputManager->Branch(Found).AssignedLoopName)); - ShowContinueError(state, format("New attempt to assign to loop={}", LoopName)); + ShowSevereError(state, EnergyPlus::format("Attempt to assign branch to two different loops, Branch={}", BranchName)); + ShowContinueError( + state, EnergyPlus::format("Branch already assigned to loop={}", state.dataBranchInputManager->Branch(Found).AssignedLoopName)); + ShowContinueError(state, EnergyPlus::format("New attempt to assign to loop={}", LoopName)); ErrorsFound = true; NumComps = 0; } else { @@ -532,7 +533,7 @@ namespace BranchInputManager { numSplitters = state.dataBranchInputManager->ConnectorLists(ConnNum).NumOfSplitters; numMixers = state.dataBranchInputManager->ConnectorLists(ConnNum).NumOfMixers; } else { - ShowSevereError(state, format("Ref: Loop={}, Connector List not found={}", LoopName, ConnectorListName)); + ShowSevereError(state, EnergyPlus::format("Ref: Loop={}, Connector List not found={}", LoopName, ConnectorListName)); ErrorsFound = true; } } @@ -576,7 +577,7 @@ namespace BranchInputManager { if (not_blank(ConnectorListName)) { int Count = Util::FindItemInList(ConnectorListName, state.dataBranchInputManager->ConnectorLists); if (Count == 0) { - ShowFatalError(state, format("GetConnectorList: Connector List not found={}", ConnectorListName)); + ShowFatalError(state, EnergyPlus::format("GetConnectorList: Connector List not found={}", ConnectorListName)); } Connectoid = state.dataBranchInputManager->ConnectorLists(Count); if (present(NumInList)) { @@ -640,12 +641,12 @@ namespace BranchInputManager { ++MixerNumber; } if (Count == 0) { - ShowFatalError(state, format("GetLoopMixer: No Mixer Found={}", Connectoid.ConnectorName(1))); + ShowFatalError(state, EnergyPlus::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, format("GetLoopMixer: No Mixer Found={}", Connectoid.ConnectorName(2))); + ShowFatalError(state, EnergyPlus::format("GetLoopMixer: No Mixer Found={}", Connectoid.ConnectorName(2))); } } else { Count = 0; @@ -686,7 +687,8 @@ namespace BranchInputManager { BComponents, errFlag); if (errFlag) { - ShowContinueError(state, format("..occurs for Connector:Mixer Name={}", state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, + EnergyPlus::format("..occurs for Connector:Mixer Name={}", state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } if (NumComps > 0) { @@ -706,7 +708,8 @@ namespace BranchInputManager { errFlag); if (NumInletNodes > isize(InletNodeNames) || NumInletNodes > isize(InletNodeNums)) { - ShowSevereError(state, format("GetLoopMixer: Connector:Mixer={} contains too many inlets for size of Inlet Array.", MixerName)); + 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)); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -785,7 +788,7 @@ namespace BranchInputManager { } if (ConnectorListName.empty()) { - ShowSevereError(state, format("GetLoopSplitter: ConnectorListName is blank. LoopName={}", LoopName)); + ShowSevereError(state, EnergyPlus::format("GetLoopSplitter: ConnectorListName is blank. LoopName={}", LoopName)); ShowFatalError(state, "Program terminates due to previous condition."); } GetConnectorList(state, ConnectorListName, Connectoid, ConnectorNumber); @@ -795,12 +798,12 @@ namespace BranchInputManager { ++SplitterNumber; } if (Count == 0) { - ShowFatalError(state, format("GetLoopSplitter: No Splitter Found={}", Connectoid.ConnectorName(1))); + ShowFatalError(state, EnergyPlus::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, format("GetLoopSplitter: No Splitter Found={}", Connectoid.ConnectorName(2))); + ShowFatalError(state, EnergyPlus::format("GetLoopSplitter: No Splitter Found={}", Connectoid.ConnectorName(2))); } } else { Count = 0; @@ -842,7 +845,7 @@ namespace BranchInputManager { BComponents, errFlag); if (errFlag) { - ShowContinueError(state, format("..occurs for Splitter Name={}", state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, EnergyPlus::format("..occurs for Splitter Name={}", state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } if (NumComps > 0) { @@ -862,8 +865,9 @@ namespace BranchInputManager { errFlag); if (NumOutletNodes > isize(OutletNodeNames) || NumOutletNodes > isize(OutletNodeNums)) { - ShowSevereError( - state, format("GetLoopSplitter: Connector:Splitter={} contains too many outlets for size of Outlet Array.", SplitterName)); + 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)); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -924,15 +928,15 @@ namespace BranchInputManager { int Found1 = Util::FindItemInList(BranchListName, state.dataBranchInputManager->BranchList); if (Found1 == 0) { - ShowSevereError(state, format("GetFirstBranchInletNodeName: BranchList=\"{}\", not a valid BranchList Name", BranchListName)); + ShowSevereError(state, EnergyPlus::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, - format("GetFirstBranchInletNodeName: BranchList=\"{}\", Branch=\"{}\" not a valid Branch Name", - BranchListName, - state.dataBranchInputManager->BranchList(Found1).BranchNames(1))); + EnergyPlus::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; @@ -963,7 +967,7 @@ namespace BranchInputManager { int Found1 = Util::FindItemInList(BranchListName, state.dataBranchInputManager->BranchList); if (Found1 == 0) { - ShowSevereError(state, format("GetLastBranchOutletNodeName: BranchList=\"{}\", not a valid BranchList Name", BranchListName)); + ShowSevereError(state, EnergyPlus::format("GetLastBranchOutletNodeName: BranchList=\"{}\", not a valid BranchList Name", BranchListName)); OutletNodeName = "Invalid Node Name"; } else { int Found2 = Util::FindItemInList( @@ -971,10 +975,10 @@ namespace BranchInputManager { state.dataBranchInputManager->Branch); if (Found2 == 0) { ShowSevereError(state, - format("GetLastBranchOutletNodeName: BranchList=\"{}\", Branch=\"{}\" not a valid Branch Name", - BranchListName, - state.dataBranchInputManager->BranchList(Found1).BranchNames( - state.dataBranchInputManager->BranchList(Found1).NumOfBranchNames))); + EnergyPlus::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) @@ -1114,8 +1118,8 @@ namespace BranchInputManager { state.dataBranchInputManager->Branch(BCount).Name = Alphas(1); Curve::GetPressureCurveTypeAndIndex(state, Alphas(2), pressureCurveType, PressureCurveIndex); if (pressureCurveType == DataBranchAirLoopPlant::PressureCurveType::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("..Invalid {}=\"{}\".", cAlphaFields(2), Alphas(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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"); @@ -1132,22 +1136,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, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Connector:Splitter/Connector:Mixer not allowed in object {}", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Connector:Splitter/Connector:Mixer not allowed in object {}", CurrentModuleObject)); ErrFound = true; continue; } if (Comp > NumInComps) { - ShowSevereError(state, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + 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, format("...examine {} carefully.", CurrentModuleObject)); + ShowContinueError(state, EnergyPlus::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, format("Occurs on {}={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Occurs on {}={}", CurrentModuleObject, Alphas(1))); ErrFound = true; } state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName = Alphas(Loop + 2); @@ -1172,22 +1176,25 @@ namespace BranchInputManager { false, cAlphaFields(Loop + 2)); if (NumNodes > 1) { - ShowSevereError(state, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - format("..invalid {}=\"{}\" must be a single node - appears to be a list.", - cAlphaFields(Loop + 2), - state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName)); + EnergyPlus::format("..invalid {}=\"{}\" must be a single node - appears to be a list.", + cAlphaFields(Loop + 2), + state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName)); ShowContinueError( - state, format("Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); + state, + EnergyPlus::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, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("blank required field: {}", cAlphaFields(Loop + 2))); - ShowContinueError( - state, format("Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); + 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))); ErrFound = true; } state.dataBranchInputManager->Branch(BCount).Component(Comp).OutletNodeName = Alphas(Loop + 3); @@ -1212,22 +1219,25 @@ namespace BranchInputManager { false, cAlphaFields(Loop + 3)); if (NumNodes > 1) { - ShowSevereError(state, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - format("..invalid {}=\"{}\" must be a single node - appears to be a list.", - cAlphaFields(Loop + 2), - state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName)); + EnergyPlus::format("..invalid {}=\"{}\" must be a single node - appears to be a list.", + cAlphaFields(Loop + 2), + state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName)); ShowContinueError( - state, format("Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); + state, + EnergyPlus::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, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("blank required field: {}", cAlphaFields(Loop + 3))); - ShowContinueError( - state, format("Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); + 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))); ErrFound = true; } @@ -1311,9 +1321,9 @@ namespace BranchInputManager { if (NumNumbers > 0) { ShowSevereError(state, - format("{}{} Object definition contains numbers, cannot be decoded by GetBranchListInput routine.", - RoutineName, - CurrentModuleObject)); + EnergyPlus::format("{}{} Object definition contains numbers, cannot be decoded by GetBranchListInput routine.", + RoutineName, + CurrentModuleObject)); ErrFound = true; } BCount = 0; @@ -1338,10 +1348,10 @@ namespace BranchInputManager { state.dataBranchInputManager->BranchList(BCount).BranchNames.allocate(NumAlphas - 1); if (state.dataBranchInputManager->BranchList(BCount).NumOfBranchNames == 0) { ShowSevereError(state, - format("{}{}=\"{}\", No branch names entered.", - RoutineName, - CurrentModuleObject, - state.dataBranchInputManager->BranchList(BCount).Name)); + EnergyPlus::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}); @@ -1355,13 +1365,13 @@ namespace BranchInputManager { state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid data.", - RoutineName, - CurrentModuleObject, - state.dataBranchInputManager->BranchList(BCount).Name)); + EnergyPlus::format("{}{}=\"{}\", invalid data.", + RoutineName, + CurrentModuleObject, + state.dataBranchInputManager->BranchList(BCount).Name)); ShowContinueError(state, - format("..invalid Branch Name not found=\"{}\".", - state.dataBranchInputManager->BranchList(BCount).BranchNames(Loop))); + EnergyPlus::format("..invalid Branch Name not found=\"{}\".", + state.dataBranchInputManager->BranchList(BCount).BranchNames(Loop))); ErrFound = true; } } @@ -1381,16 +1391,17 @@ namespace BranchInputManager { } ShowSevereError( state, - format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, state.dataBranchInputManager->BranchList(BCount).Name)); + EnergyPlus::format( + "{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, state.dataBranchInputManager->BranchList(BCount).Name)); ShowContinueError(state, "..invalid: duplicate branch name specified in the list."); - ShowContinueError(state, format("..Branch Name={}", TestName)); + ShowContinueError(state, EnergyPlus::format("..Branch Name={}", TestName)); ShowContinueError(state, fmt::format("..Branch Name #{} is duplicate.", Loop)); ErrFound = true; } } if (ErrFound) { - ShowSevereError(state, format("{} Invalid Input -- preceding condition(s) will likely cause termination.", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{} Invalid Input -- preceding condition(s) will likely cause termination.", RoutineName)); } NumOfBranchLists = BCount; Alphas.deallocate(); @@ -1464,9 +1475,9 @@ namespace BranchInputManager { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, CurrentModuleObject, NumParams, NumAlphas, NumNumbers); if (NumAlphas != 5 || NumNumbers != 0) { ShowWarningError(state, - format("GetConnectorList: Illegal \"extension\" to {} object. Internal code does not support > 2 connectors " - "(Connector:Splitter and Connector:Mixer)", - CurrentModuleObject)); + EnergyPlus::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); @@ -1514,7 +1525,8 @@ namespace BranchInputManager { } else { ShowWarningError( state, - format("GetConnectorListInput: Invalid {}={} in {}={}", cAlphaFields(Arg), Alphas(Arg), CurrentModuleObject, Alphas(1))); + EnergyPlus::format( + "GetConnectorListInput: Invalid {}={} in {}={}", cAlphaFields(Arg), Alphas(Arg), CurrentModuleObject, Alphas(1))); } state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(CCount) = Alphas(Arg + 1); } @@ -1558,10 +1570,10 @@ namespace BranchInputManager { // Following code sets up branch names to be matched from Splitter/Mixer data structure if (SplitNum == 0) { ShowSevereError(state, - format("Invalid Connector:Splitter(none)={}, referenced by {}={}", - state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), - CurrentModuleObject, - state.dataBranchInputManager->ConnectorLists(Count).Name)); + EnergyPlus::format("Invalid Connector:Splitter(none)={}, referenced by {}={}", + state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), + CurrentModuleObject, + state.dataBranchInputManager->ConnectorLists(Count).Name)); ErrorsFound = true; continue; } @@ -1574,10 +1586,10 @@ namespace BranchInputManager { state.dataBranchInputManager->Mixers); if (MixerNum == 0) { ShowSevereError(state, - format("Invalid Connector:Mixer(none)={}, referenced by {}={}", - state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), - CurrentModuleObject, - state.dataBranchInputManager->ConnectorLists(Count).Name)); + EnergyPlus::format("Invalid Connector:Mixer(none)={}, referenced by {}={}", + state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), + CurrentModuleObject, + state.dataBranchInputManager->ConnectorLists(Count).Name)); ErrorsFound = true; continue; } @@ -1663,11 +1675,12 @@ namespace BranchInputManager { continue; } // = 0, not matched. - ShowSevereError(state, format("For {}={}", CurrentModuleObject, state.dataBranchInputManager->ConnectorLists(Count).Name)); + ShowSevereError(state, + EnergyPlus::format("For {}={}", CurrentModuleObject, state.dataBranchInputManager->ConnectorLists(Count).Name)); ShowContinueError(state, - format("...Item={}, Type={} was not matched.", - state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), - state.dataBranchInputManager->ConnectorLists(Count).ConnectorType(Loop))); + EnergyPlus::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."); @@ -1787,10 +1800,10 @@ namespace BranchInputManager { int Found = Util::FindItemInList(state.dataBranchInputManager->Splitters(Count).InletBranchName, state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - format("GetSplitterInput: Invalid Branch={}, referenced as Inlet Branch to {}={}", - state.dataBranchInputManager->Splitters(Count).InletBranchName, - CurrentModuleObject, - state.dataBranchInputManager->Splitters(Count).Name)); + EnergyPlus::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) { @@ -1816,10 +1829,10 @@ namespace BranchInputManager { continue; } ShowSevereError(state, - format("{}={} specifies an outlet node name the same as the inlet node.", - CurrentModuleObject, - state.dataBranchInputManager->Splitters(Count).Name)); - ShowContinueError(state, format("..Inlet Node={}", TestName)); + 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)); ErrorsFound = true; } @@ -1830,9 +1843,9 @@ namespace BranchInputManager { continue; } ShowSevereError(state, - format("{}={} specifies duplicate outlet nodes in its outlet node list.", - CurrentModuleObject, - state.dataBranchInputManager->Splitters(Count).Name)); + EnergyPlus::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))); @@ -1843,7 +1856,7 @@ namespace BranchInputManager { } if (ErrorsFound) { - ShowFatalError(state, format("GetSplitterInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::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. @@ -1871,17 +1884,19 @@ namespace BranchInputManager { } else { ShowSevereError( state, - format("GetSplitterInput: Inlet Splitter Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", - TestName, - BranchListName)); + EnergyPlus::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, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, + EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } } else { - ShowSevereError(state, format("GetSplitterInput: Inlet Splitter Branch=\"{}\" not on BranchList", TestName)); + ShowSevereError(state, EnergyPlus::format("GetSplitterInput: Inlet Splitter Branch=\"{}\" not on BranchList", TestName)); ShowContinueError(state, "...and therefore, not a valid Loop Splitter."); - ShowContinueError(state, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Splitters(Count).NumOutletBranches; ++Loop) { @@ -1902,35 +1917,42 @@ namespace BranchInputManager { FindAirPlantCondenserLoopFromBranchList(state, BranchListName, FoundLoop, FoundSupplyDemandAir, MatchedLoop); if (MatchedLoop) { if (SaveSupplyDemandAir != FoundSupplyDemandAir || SaveLoop != FoundLoop) { - ShowSevereError( - state, format("GetSplitterInput: Outlet Splitter Branch=\"{}\" does not match types of Inlet Branch.", TestName)); - ShowContinueError(state, format("...Inlet Branch is on \"{}\" on \"{}\" side.", SaveLoop, SaveSupplyDemandAir)); - ShowContinueError(state, format("...Outlet Branch is on \"{}\" on \"{}\" side.", FoundLoop, FoundSupplyDemandAir)); + 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)); ShowContinueError(state, "...All branches in Loop Splitter must be on same kind of loop and supply/demand side."); - ShowContinueError(state, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError( + state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } } else { ShowSevereError( state, - format("GetSplitterInput: Outlet Splitter Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", - TestName, - BranchListName)); + EnergyPlus::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, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, + EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } } else { - ShowSevereError(state, format("GetSplitterInput: Outlet Splitter Branch=\"{}\" not on BranchList", TestName)); + ShowSevereError(state, EnergyPlus::format("GetSplitterInput: Outlet Splitter Branch=\"{}\" not on BranchList", TestName)); ShowContinueError(state, "...and therefore, not a valid Loop Splitter"); - ShowContinueError(state, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, + EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } } } if (ErrorsFound) { - ShowFatalError(state, format("GetSplitterInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetSplitterInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); } } @@ -2040,10 +2062,10 @@ namespace BranchInputManager { int Found = Util::FindItemInList(state.dataBranchInputManager->Mixers(Count).OutletBranchName, state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - format("GetMixerInput: Invalid Branch={}, referenced as Outlet Branch in {}={}", - state.dataBranchInputManager->Mixers(Count).OutletBranchName, - CurrentModuleObject, - state.dataBranchInputManager->Mixers(Count).Name)); + EnergyPlus::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) { @@ -2051,11 +2073,11 @@ namespace BranchInputManager { Util::FindItemInList(state.dataBranchInputManager->Mixers(Count).InletBranchNames(Loop), state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - format("GetMixerInput: Invalid Branch={}, referenced as Inlet Branch # {} in {}={}", - state.dataBranchInputManager->Mixers(Count).InletBranchNames(Loop), - Loop, - CurrentModuleObject, - state.dataBranchInputManager->Mixers(Count).Name)); + EnergyPlus::format("GetMixerInput: Invalid Branch={}, referenced as Inlet Branch # {} in {}={}", + state.dataBranchInputManager->Mixers(Count).InletBranchNames(Loop), + Loop, + CurrentModuleObject, + state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } @@ -2069,11 +2091,11 @@ namespace BranchInputManager { continue; } ShowSevereError(state, - format("{}={} specifies an inlet node name the same as the outlet node.", - CurrentModuleObject, - state.dataBranchInputManager->Mixers(Count).Name)); - ShowContinueError(state, format("..Outlet Node={}", TestName)); - ShowContinueError(state, format("..Inlet Node #{} is duplicate.", Loop)); + 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)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Mixers(Count).NumInletBranches; ++Loop) { @@ -2083,9 +2105,9 @@ namespace BranchInputManager { continue; } ShowSevereError(state, - format("{}={} specifies duplicate inlet nodes in its inlet node list.", - CurrentModuleObject, - state.dataBranchInputManager->Mixers(Count).Name)); + EnergyPlus::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)); @@ -2095,7 +2117,7 @@ namespace BranchInputManager { } if (ErrorsFound) { - ShowFatalError(state, format("GetMixerInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::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. @@ -2121,19 +2143,19 @@ namespace BranchInputManager { SaveSupplyDemandAir = FoundSupplyDemandAir; SaveLoop = FoundLoop; } else { - ShowSevereError( - state, - format("GetMixerInput: Outlet Mixer Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", - TestName, - BranchListName)); + ShowSevereError(state, + EnergyPlus::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, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } else { - ShowSevereError(state, format("GetMixerInput: Outlet Mixer Branch=\"{}\" not on BranchList", TestName)); + ShowSevereError(state, EnergyPlus::format("GetMixerInput: Outlet Mixer Branch=\"{}\" not on BranchList", TestName)); ShowContinueError(state, "...and therefore, not a valid Loop Mixer."); - ShowContinueError(state, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Mixers(Count).NumInletBranches; ++Loop) { @@ -2154,35 +2176,41 @@ namespace BranchInputManager { FindAirPlantCondenserLoopFromBranchList(state, BranchListName, FoundLoop, FoundSupplyDemandAir, MatchedLoop); if (MatchedLoop) { if (SaveSupplyDemandAir != FoundSupplyDemandAir || SaveLoop != FoundLoop) { - ShowSevereError(state, - format("GetMixerInput: Outlet Mixer Branch=\"{}\" does not match types of Inlet Branch.", TestName)); - ShowContinueError(state, format("...Outlet Branch is on \"{}\" on \"{}\" side.", SaveLoop, SaveSupplyDemandAir)); - ShowContinueError(state, format("...Inlet Branch is on \"{}\" on \"{}\" side.", FoundLoop, FoundSupplyDemandAir)); + 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)); ShowContinueError(state, "...All branches in Loop Mixer must be on same kind of loop and supply/demand side."); - ShowContinueError(state, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, + EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } else { ShowSevereError( state, - format("GetMixerInput: Inlet Mixer Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", - TestName, - BranchListName)); + EnergyPlus::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, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, + EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } else { - ShowSevereError(state, format("GetMixerInput: Inlet Mixer Branch=\"{}\" not on BranchList", TestName)); + ShowSevereError(state, EnergyPlus::format("GetMixerInput: Inlet Mixer Branch=\"{}\" not on BranchList", TestName)); ShowContinueError(state, "...and therefore, not a valid Loop Mixer"); - ShowContinueError(state, format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } } if (ErrorsFound) { - ShowFatalError(state, format("GetMixerInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetMixerInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); } } @@ -2482,20 +2510,22 @@ namespace BranchInputManager { ++NumDanglingCount; if (state.dataGlobal->DisplayExtraWarnings || mustprint) { if (mustprint) { - ShowContinueError( - state, format("AuditBranches: Branch=\"{}\" not found on any BranchLists.", state.dataBranchInputManager->Branch(BrN).Name)); + ShowContinueError(state, + EnergyPlus::format("AuditBranches: Branch=\"{}\" not found on any BranchLists.", + state.dataBranchInputManager->Branch(BrN).Name)); if (!FoundBranchName.empty()) { - ShowContinueError(state, format("Branch contains component, type=\"{}\", name=\"{}\"", CompType, CompName)); + ShowContinueError(state, EnergyPlus::format("Branch contains component, type=\"{}\", name=\"{}\"", CompType, CompName)); } } else { - ShowSevereMessage( - state, format("AuditBranches: Branch=\"{}\" not found on any BranchLists.", state.dataBranchInputManager->Branch(BrN).Name)); + ShowSevereMessage(state, + EnergyPlus::format("AuditBranches: Branch=\"{}\" not found on any BranchLists.", + state.dataBranchInputManager->Branch(BrN).Name)); ++state.dataErrTracking->TotalSevereErrors; } } } if (mustprint && NeverFound) { // this may be caught during branch input, not sure - ShowContinueError(state, format("Component, type=\"{}\", name=\"{}\" was not found on any Branch.", CompType, CompName)); + ShowContinueError(state, EnergyPlus::format("Component, type=\"{}\", name=\"{}\" was not found on any Branch.", CompType, CompName)); ShowContinueError(state, "Look for mistyped branch or component names/types."); } if (!mustprint && NumDanglingCount > 0) { @@ -2596,7 +2626,8 @@ namespace BranchInputManager { FoundBranches(Count) = Found; BranchPtrs(Count) = NumNodesOnBranchList; } else { - ShowSevereError(state, format("Branch not found={}", state.dataBranchInputManager->BranchList(BCount).BranchNames(Count))); + ShowSevereError(state, + EnergyPlus::format("Branch not found={}", state.dataBranchInputManager->BranchList(BCount).BranchNames(Count))); ErrFound = true; } } @@ -2624,7 +2655,7 @@ namespace BranchInputManager { MatchNodeName = state.dataBranchInputManager->Branch(Found).Component(1).InletNodeName; BranchInletNodeName = state.dataBranchInputManager->Branch(Found).Component(1).InletNodeName; } else { - ShowWarningError(state, format("Branch has no components={}", state.dataBranchInputManager->Branch(Found).Name)); + ShowWarningError(state, EnergyPlus::format("Branch has no components={}", state.dataBranchInputManager->Branch(Found).Name)); } NumErr = 0; for (Loop = 1; Loop <= state.dataBranchInputManager->Branch(Found).NumOfComponents; ++Loop) { @@ -2663,10 +2694,13 @@ namespace BranchInputManager { BranchFluidNodes(NumFluidNodes) = state.dataBranchInputManager->Branch(Found).Component(Loop).OutletNode; } if (state.dataBranchInputManager->Branch(Found).Component(Loop).InletNode != MatchNode) { - ShowSevereError(state, format("Error Detected in BranchList={}", state.dataBranchInputManager->BranchList(BCount).Name)); - ShowContinueError(state, format("Actual Error occurs in Branch={}", state.dataBranchInputManager->Branch(Found).Name)); - ShowContinueError(state, format("Branch Outlet does not match Inlet, Outlet={}", MatchNodeName)); - ShowContinueError(state, format("Inlet Name={}", state.dataBranchInputManager->Branch(Found).Component(Loop).InletNodeName)); + ShowSevereError(state, + EnergyPlus::format("Error Detected in BranchList={}", state.dataBranchInputManager->BranchList(BCount).Name)); + 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)); ErrFound = true; ++NumErr; } else { @@ -2697,22 +2731,26 @@ namespace BranchInputManager { BranchOutletNodeName); } if (MixedFluidTypesOnBranchList) { - ShowSevereError(state, - format("BranchList={} has mixed fluid types in its nodes.", state.dataBranchInputManager->BranchList(BCount).Name)); + ShowSevereError( + state, + EnergyPlus::format("BranchList={} has mixed fluid types in its nodes.", state.dataBranchInputManager->BranchList(BCount).Name)); ErrFound = true; if (OriginalBranchFluidType.empty()) { OriginalBranchFluidType = "**Unknown**"; } - ShowContinueError( - state, format("Initial Node={}, Fluid Type={}", state.dataLoopNodes->NodeID(InitialBranchFluidNode), OriginalBranchFluidType)); + ShowContinueError(state, + EnergyPlus::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, format("..Branch={}", state.dataBranchInputManager->Branch(FoundBranches(Loop)).Name)); + ShowContinueError(state, EnergyPlus::format("..Branch={}", state.dataBranchInputManager->Branch(FoundBranches(Loop)).Name)); } else { - ShowContinueError(state, format("..Illegal Branch={}", state.dataBranchInputManager->BranchList(BCount).BranchNames(Loop))); + ShowContinueError( + state, EnergyPlus::format("..Illegal Branch={}", state.dataBranchInputManager->BranchList(BCount).BranchNames(Loop))); continue; } for (Loop2 = Ptr; Loop2 <= EndPtr; ++Loop2) { @@ -2722,7 +2760,8 @@ namespace BranchInputManager { cBranchFluidType = "**Unknown**"; } ShowContinueError( - state, format("....Node={}, Fluid Type={}", state.dataLoopNodes->NodeID(BranchFluidNodes(Loop2)), cBranchFluidType)); + state, + EnergyPlus::format("....Node={}, Fluid Type={}", state.dataLoopNodes->NodeID(BranchFluidNodes(Loop2)), cBranchFluidType)); } Ptr = EndPtr + 1; EndPtr = BranchPtrs(Loop + 1); @@ -2760,9 +2799,11 @@ namespace BranchInputManager { Found = Util::FindItemInList( BranchNodes(Count).UniqueNodeNames(Loop2), BranchNodes(Loop).UniqueNodeNames, BranchNodes(Loop).NumNodes); if (Found != 0) { - ShowSevereError(state, format("Non-unique node name found, name={}", BranchNodes(Count).UniqueNodeNames(Loop2))); - ShowContinueError(state, format("..1st occurrence in Branch={}", state.dataBranchInputManager->Branch(Count).Name)); - ShowContinueError(state, format("..duplicate occurrence in Branch={}", state.dataBranchInputManager->Branch(Loop).Name)); + 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)); ErrFound = true; } } @@ -2793,21 +2834,22 @@ namespace BranchInputManager { continue; } ++BCount; - ShowWarningError(state, format("Orphan Branch=\"{}\".", state.dataBranchInputManager->Branch(Count).Name)); + ShowWarningError(state, EnergyPlus::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, format("Branch has no components={}", state.dataBranchInputManager->Branch(Count).Name)); + ShowWarningError(state, EnergyPlus::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, format("Error Detected in Branch={}", state.dataBranchInputManager->Branch(Count).Name)); - ShowContinueError(state, format("Branch Outlet does not match Inlet, Outlet={}", MatchNodeName)); - ShowContinueError(state, format("Inlet Name={}", state.dataBranchInputManager->Branch(Count).Component(Loop).InletNodeName)); + 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)); ErrFound = true; ++NumErr; } else { diff --git a/src/EnergyPlus/BranchNodeConnections.cc b/src/EnergyPlus/BranchNodeConnections.cc index b059d840f92..6a0fd5add42 100644 --- a/src/EnergyPlus/BranchNodeConnections.cc +++ b/src/EnergyPlus/BranchNodeConnections.cc @@ -680,7 +680,7 @@ void RegisterNodeConnection(EnergyPlusData &state, if ((ObjectType == DataLoopNode::ConnectionObjectType::Invalid) || (ObjectType == DataLoopNode::ConnectionObjectType::Num)) { ShowSevereError(state, "Developer Error: Invalid ObjectType"); - ShowContinueError(state, format("Occurs for Node={}, ObjectName={}", std::string{NodeName}, std::string{ObjectName})); + ShowContinueError(state, EnergyPlus::format("Occurs for Node={}, ObjectName={}", std::string{NodeName}, std::string{ObjectName})); ErrorsFoundHere = true; } @@ -688,8 +688,8 @@ void RegisterNodeConnection(EnergyPlusData &state, std::string_view const conTypeStr = ConnectionTypeNames[static_cast(ConnectionType)]; if ((ConnectionType == DataLoopNode::ConnectionType::Invalid) || (ConnectionType == DataLoopNode::ConnectionType::Num)) { - ShowSevereError(state, format("{}{}{}", RoutineName, "Invalid ConnectionType=", ConnectionType)); - ShowContinueError(state, format("Occurs for Node={}, ObjectType={}, ObjectName={}", NodeName, objTypeStr, ObjectName)); + ShowSevereError(state, EnergyPlus::format("{}{}{}", RoutineName, "Invalid ConnectionType=", ConnectionType)); + ShowContinueError(state, EnergyPlus::format("Occurs for Node={}, ObjectType={}, ObjectName={}", NodeName, objTypeStr, ObjectName)); ErrorsFoundHere = true; } @@ -712,8 +712,9 @@ void RegisterNodeConnection(EnergyPlusData &state, } if ((state.dataBranchNodeConnections->NodeConnections(Count).ObjectIsParent && !IsParent) || (!state.dataBranchNodeConnections->NodeConnections(Count).ObjectIsParent && IsParent)) { - ShowSevereError(state, format("{}{}", RoutineName, "Node registered for both Parent and \"not\" Parent")); - ShowContinueError(state, format("{}{}{}{}{}{}", "Occurs for Node=", NodeName, ", ObjectType=", ObjectType, ", ObjectName=", ObjectName)); + ShowSevereError(state, EnergyPlus::format("{}{}", RoutineName, "Node registered for both Parent and \"not\" Parent")); + ShowContinueError( + state, EnergyPlus::format("{}{}{}{}{}{}", "Occurs for Node=", NodeName, ", ObjectType=", ObjectType, ", ObjectName=", ObjectName)); ErrorsFoundHere = true; } MakeNew = false; @@ -758,19 +759,22 @@ void RegisterNodeConnection(EnergyPlusData &state, state.dataBranchNodeConnections->NumOfAirTerminalNodes - 1); if (Found != 0) { // Nodename already used ShowSevereError(state, fmt::format("{}{}=\"{}\" node name duplicated", RoutineName, ObjectType, ObjectName)); - ShowContinueError(state, format("NodeName=\"{}\", entered as type={}", NodeName, conTypeStr)); + ShowContinueError(state, EnergyPlus::format("NodeName=\"{}\", entered as type={}", NodeName, conTypeStr)); ShowContinueError(state, fmt::format("In Field={}", InputFieldName)); - ShowContinueError(state, - format("NodeName=\"{}\", entered as type={}", NodeName, ConnectionTypeNamesUC[static_cast(ConnectionType)])); - ShowContinueError(state, format("In Field={}", InputFieldName)); ShowContinueError( state, - format("Already used in {}=\"{}\".", objTypeStr, state.dataBranchNodeConnections->AirTerminalNodeConnections(Found).ObjectName)); + EnergyPlus::format("NodeName=\"{}\", entered as type={}", NodeName, ConnectionTypeNamesUC[static_cast(ConnectionType)])); + ShowContinueError(state, EnergyPlus::format("In Field={}", InputFieldName)); + ShowContinueError(state, + EnergyPlus::format("Already used in {}=\"{}\".", + objTypeStr, + state.dataBranchNodeConnections->AirTerminalNodeConnections(Found).ObjectName)); ShowContinueError( state, - format(" as type={}, In Field={}", - ConnectionTypeNamesUC[static_cast(state.dataBranchNodeConnections->AirTerminalNodeConnections(Found).ConnectionType)], - state.dataBranchNodeConnections->AirTerminalNodeConnections(Found).InputFieldName)); + EnergyPlus::format( + " as type={}, In Field={}", + ConnectionTypeNamesUC[static_cast(state.dataBranchNodeConnections->AirTerminalNodeConnections(Found).ConnectionType)], + state.dataBranchNodeConnections->AirTerminalNodeConnections(Found).InputFieldName)); ErrorsFoundHere = true; } else { state.dataBranchNodeConnections->AirTerminalNodeConnections(state.dataBranchNodeConnections->NumOfAirTerminalNodes).NodeName = @@ -820,10 +824,11 @@ void OverrideNodeConnectionType( static constexpr std::string_view RoutineName("ModifyNodeConnectionType: "); if ((ConnectionType == DataLoopNode::ConnectionType::Invalid) || (ConnectionType == DataLoopNode::ConnectionType::Num)) { - ShowSevereError(state, format("{}{}{}", RoutineName, "Invalid ConnectionType=", ConnectionType)); + ShowSevereError(state, EnergyPlus::format("{}{}{}", RoutineName, "Invalid ConnectionType=", ConnectionType)); ShowContinueError( state, - format("Occurs for Node={}, ObjectType={}, ObjectName={}", NodeName, ConnectionTypeNames[static_cast(ObjectType)], ObjectName)); + EnergyPlus::format( + "Occurs for Node={}, ObjectType={}, ObjectName={}", NodeName, ConnectionTypeNames[static_cast(ObjectType)], ObjectName)); errFlag = true; } @@ -851,10 +856,11 @@ void OverrideNodeConnectionType( if (Found > 0) { state.dataBranchNodeConnections->NodeConnections(Found).ConnectionType = ConnectionType; } else { - ShowSevereError(state, format("{}{}", RoutineName, "Existing node connection not found.")); + ShowSevereError(state, EnergyPlus::format("{}{}", RoutineName, "Existing node connection not found.")); ShowContinueError( state, - format("Occurs for Node={}, ObjectType={}, ObjectName={}", NodeName, ConnectionTypeNames[static_cast(ObjectType)], ObjectName)); + EnergyPlus::format( + "Occurs for Node={}, ObjectType={}, ObjectName={}", NodeName, ConnectionTypeNames[static_cast(ObjectType)], ObjectName)); errFlag = true; } } @@ -933,15 +939,17 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) IsValid = true; } if (!IsValid) { - ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", Sensor node did not find a matching node of appropriate type (other than " + ShowSevereError( + state, + EnergyPlus::format("Node Connection Error, Node=\"{}\", Sensor node did not find a matching node of appropriate type (other than " "Actuator or Sensor).", state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); - ShowContinueError(state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; ErrorsFound = true; } @@ -970,15 +978,17 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) IsValid = true; } if (!IsValid) { - ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", Actuator node did not find a matching node of appropriate type (other than " + ShowSevereError( + state, + EnergyPlus::format("Node Connection Error, Node=\"{}\", Actuator node did not find a matching node of appropriate type (other than " "Actuator, Sensor, OutsideAir).", state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); - ShowContinueError(state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; ErrorsFound = true; } @@ -1014,28 +1024,32 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) IsValid = true; } if (!IsValid) { - ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", Setpoint node did not find a matching node of appropriate type (other than " + 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)); - ShowContinueError(state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; ErrorsFound = true; } if (!IsInlet && !IsOutlet) { - ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", Setpoint node did not find a matching node of type Inlet or Outlet.", + 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)); ShowContinueError(state, "It appears this node is not part of the HVAC system."); - ShowContinueError(state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } } @@ -1063,13 +1077,14 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid) { ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", ZoneInlet node did not find an outlet node.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + EnergyPlus::format("Node Connection Error, Node=\"{}\", ZoneInlet node did not find an outlet node.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); - ShowContinueError(state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } } @@ -1095,13 +1110,14 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid) { ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", ZoneExhaust node did not find a matching inlet node.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + EnergyPlus::format("Node Connection Error, Node=\"{}\", ZoneExhaust node did not find a matching inlet node.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); - ShowContinueError(state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } } @@ -1126,14 +1142,16 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) IsValid = true; } if (!IsValid) { - ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", Return plenum induced air outlet node did not find a matching inlet node.", + 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)); - ShowContinueError(state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; ErrorsFound = true; } @@ -1184,16 +1202,17 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid && !MatchedAtLeastOne) { ShowSevereError(state, - format("{}{}{}", - "Node Connection Error, Node=\"", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName, - R"(", Inlet node did not find an appropriate matching "outlet" node.)")); + EnergyPlus::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, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } } @@ -1219,21 +1238,22 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (state.dataBranchNodeConnections->NodeConnections(Loop2).NodeNumber == state.dataBranchNodeConnections->NodeConnections(Loop1).NodeNumber) { - ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", The same node appears as a non-parent Inlet node more than once.", + 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)); - ShowContinueError( - state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); - ShowContinueError( - state, - format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); + ShowContinueError(state, + EnergyPlus::format( + "Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); ++ErrorCounter; break; } @@ -1263,21 +1283,22 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) if (state.dataBranchNodeConnections->NodeConnections(Loop2).NodeNumber == state.dataBranchNodeConnections->NodeConnections(Loop1).NodeNumber) { // Skip if one of the - ShowSevereError(state, - format("Node Connection Error, Node=\"{}\", The same node appears as a non-parent Outlet node more than once.", + 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)); - ShowContinueError( - state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); - ShowContinueError( - state, - format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); + ShowContinueError(state, + EnergyPlus::format( + "Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); ++ErrorCounter; break; @@ -1307,16 +1328,17 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid) { ShowSevereError(state, - format("{}{}{}", - "Node Connection Error, Node=\"", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName, - R"(", Outdoor Air Reference did not find an appropriate "outdoor air" node.)")); + EnergyPlus::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, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } @@ -1388,16 +1410,16 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid) { - ShowSevereError( - state, - format("(Developer) Node Connection Error, Object={}:{}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + ShowSevereError(state, + EnergyPlus::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, format("...occurs in Fluid Stream [{}].", Loop2)); + ShowContinueError(state, EnergyPlus::format("...occurs in Fluid Stream [{}].", Loop2)); } } ++ErrorCounter; @@ -1430,20 +1452,20 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } ShowSevereError(state, - format("Node Connection Error, Node Name=\"{}\", The same zone node appears more than once.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + EnergyPlus::format("Node Connection Error, Node Name=\"{}\", The same zone node appears more than once.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); - ShowContinueError( - state, - 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(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); - ShowContinueError( - state, - format("Reference Object={}, Object Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); + ShowContinueError(state, + EnergyPlus::format( + "Reference Object={}, Object Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); ++ErrorCounter; ErrorsFound = true; @@ -1561,16 +1583,16 @@ void GetParentData(EnergyPlusData &state, } else { ErrInObject = true; ShowWarningError(state, - format("GetParentData: Component Type={}, Component Name={} not found.", - ConnectionObjectTypeNames[static_cast(ComponentType)], - ComponentName)); + EnergyPlus::format("GetParentData: Component Type={}, Component Name={} not found.", + ConnectionObjectTypeNames[static_cast(ComponentType)], + ComponentName)); } } else { ErrInObject = true; ShowWarningError(state, - format("GetParentData: Component Type={}, Component Name={} not found.", - ConnectionObjectTypeNames[static_cast(ComponentType)], - ComponentName)); + EnergyPlus::format("GetParentData: Component Type={}, Component Name={} not found.", + ConnectionObjectTypeNames[static_cast(ComponentType)], + ComponentName)); } if (ErrInObject) { @@ -1805,16 +1827,16 @@ void GetChildrenData(EnergyPlusData &state, if (!IsParentObject(state, ComponentType, ComponentName)) { ShowWarningError(state, - format("GetChildrenData: Requested Children Data for non Parent Node={}:{}.", - ConnectionObjectTypeNames[static_cast(ComponentType)], - ComponentName)); + EnergyPlus::format("GetChildrenData: Requested Children Data for non Parent Node={}:{}.", + ConnectionObjectTypeNames[static_cast(ComponentType)], + ComponentName)); ErrorsFound = true; } else if ((NumChildren = GetNumChildren(state, ComponentType, ComponentName)) == 0) { ShowWarningError(state, - format("GetChildrenData: Parent Node has no children, node={}:{}.", - ConnectionObjectTypeNames[static_cast(ComponentType)], - ComponentName)); + EnergyPlus::format("GetChildrenData: Parent Node has no children, node={}:{}.", + ConnectionObjectTypeNames[static_cast(ComponentType)], + ComponentName)); } else { int ParentInletNodeNum; @@ -2111,19 +2133,21 @@ void SetUpCompSets(EnergyPlusData &state, } } if (Found2 == 0) { - ShowWarningError(state, format("Node used as an inlet more than once: {}", InletNode)); + ShowWarningError(state, EnergyPlus::format("Node used as an inlet more than once: {}", InletNode)); ShowContinueError( state, - format(" Used by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).ParentCName)); + EnergyPlus::format( + " Used by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).ParentCName)); ShowContinueError( state, - format(" as inlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).CName)); - ShowContinueError(state, format("{}{}{}", " and by : ", ParentTypeUC + ", name=", ParentName)); - ShowContinueError(state, format("{}{}{}", " as inlet for: ", CompTypeUC + ", name=", CompName)); + EnergyPlus::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)); } } } @@ -2165,20 +2189,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, format("Node used as an outlet more than once: {}", OutletNode)); + ShowWarningError(state, EnergyPlus::format("Node used as an outlet more than once: {}", OutletNode)); ShowContinueError( state, - format(" Used by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).ParentCName)); + EnergyPlus::format( + " Used by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).ParentCName)); ShowContinueError( state, - format( + EnergyPlus::format( " as outlet for: {}, name={}", ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], state.dataBranchNodeConnections->CompSets(Count).CName)); - ShowContinueError(state, format("{}{}{}", " and by : ", ParentTypeUC + ", name=", ParentName)); - ShowContinueError(state, format("{}{}{}", " as outlet for: ", CompTypeUC + ", name=", CompName)); + ShowContinueError(state, EnergyPlus::format("{}{}{}", " and by : ", ParentTypeUC + ", name=", ParentName)); + ShowContinueError(state, EnergyPlus::format("{}{}{}", " as outlet for: ", CompTypeUC + ", name=", CompName)); } } } @@ -2247,28 +2272,31 @@ void TestInletOutletNodes(EnergyPlusData &state) state.dataBranchNodeConnections->CompSets(Count).CName != state.dataBranchNodeConnections->CompSets(Other).CName || state.dataBranchNodeConnections->CompSets(Count).OutletNodeName != state.dataBranchNodeConnections->CompSets(Other).OutletNodeName) { AlreadyNoted(Other) = true; - ShowWarningError(state, - format("Node used as an inlet more than once: {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); + ShowWarningError( + state, + EnergyPlus::format("Node used as an inlet more than once: {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); ShowContinueError( state, - format(" Used by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).ParentCName)); + EnergyPlus::format(" Used by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).ParentCName)); ShowContinueError( state, - format(" as inlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Other).CName)); + EnergyPlus::format( + " as inlet for: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Other).CName)); ShowContinueError( state, - format(" and by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Other).ParentCName)); + EnergyPlus::format(" and by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Other).ParentCName)); ShowContinueError( state, - format(" as inlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).CName)); + EnergyPlus::format( + " as inlet for: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).CName)); } } } @@ -2292,27 +2320,30 @@ void TestInletOutletNodes(EnergyPlusData &state) state.dataBranchNodeConnections->CompSets(Count).InletNodeName != state.dataBranchNodeConnections->CompSets(Other).InletNodeName) { AlreadyNoted(Other) = true; ShowWarningError( - state, format("Node used as an outlet more than once: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + state, + EnergyPlus::format("Node used as an outlet more than once: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); ShowContinueError( state, - format(" Used by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).ParentCName)); + EnergyPlus::format(" Used by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).ParentCName)); ShowContinueError( state, - format(" as outlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Other).CName)); + EnergyPlus::format( + " as outlet for: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Other).CName)); ShowContinueError( state, - format(" and by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Other).ParentCName)); + EnergyPlus::format(" and by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Other).ParentCName)); ShowContinueError( state, - format(" as outlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).CName)); + EnergyPlus::format( + " as outlet for: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).CName)); } } } @@ -2453,21 +2484,21 @@ void TestCompSetInletOutletNodes(EnergyPlusData &state, bool &ErrorsFound) ShowSevereError(state, "Same component name and type has differing Node Names."); ShowContinueError( state, - format(" Component: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).CName)); + EnergyPlus::format(" Component: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).CName)); ShowContinueError(state, - format(" Nodes, inlet: {}, outlet: {}", - state.dataBranchNodeConnections->CompSets(Count).InletNodeName, - state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + EnergyPlus::format(" Nodes, inlet: {}, outlet: {}", + state.dataBranchNodeConnections->CompSets(Count).InletNodeName, + state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); ShowContinueError(state, - format(" & Nodes, inlet: {}, outlet: {}", - state.dataBranchNodeConnections->CompSets(Other).InletNodeName, - state.dataBranchNodeConnections->CompSets(Other).OutletNodeName)); + EnergyPlus::format(" & Nodes, inlet: {}, outlet: {}", + state.dataBranchNodeConnections->CompSets(Other).InletNodeName, + state.dataBranchNodeConnections->CompSets(Other).OutletNodeName)); ShowContinueError(state, - format(" Node Types: {} & {}", - state.dataBranchNodeConnections->CompSets(Count).Description, - state.dataBranchNodeConnections->CompSets(Other).Description)); + EnergyPlus::format(" Node Types: {} & {}", + state.dataBranchNodeConnections->CompSets(Count).Description, + state.dataBranchNodeConnections->CompSets(Other).Description)); ErrorsFound = true; } } @@ -2508,7 +2539,7 @@ void GetNodeConnectionType(EnergyPlusData &state, int const NodeNumber, EPVector } } else { if (NodeNumber > 0) { - ShowWarningError(state, format("Node not found = {}.", state.dataLoopNodes->NodeID(NodeNumber))); + ShowWarningError(state, EnergyPlus::format("Node not found = {}.", state.dataLoopNodes->NodeID(NodeNumber))); } else { ShowWarningError(state, "Invalid node number passed = 0."); } diff --git a/src/EnergyPlus/CTElectricGenerator.cc b/src/EnergyPlus/CTElectricGenerator.cc index 4bca3070ef2..a7f00ac2c61 100644 --- a/src/EnergyPlus/CTElectricGenerator.cc +++ b/src/EnergyPlus/CTElectricGenerator.cc @@ -113,8 +113,8 @@ namespace CTElectricGenerator { } // If we didn't find it, fatal ShowFatalError(state, - format("LocalCombustionTurbineGeneratorFactory: Error getting inputs for combustion turbine generator named: {}", - objectName)); // LCOV_EXCL_LINE + EnergyPlus::format("LocalCombustionTurbineGeneratorFactory: Error getting inputs for combustion turbine generator named: {}", + objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -160,7 +160,7 @@ namespace CTElectricGenerator { int NumCTGenerators = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (NumCTGenerators <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } @@ -188,8 +188,8 @@ namespace CTElectricGenerator { state.dataCTElectricGenerator->CTGenerator(genNum).RatedPowerOutput = NumArray(1); if (NumArray(1) == 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), NumArray(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), NumArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -269,8 +269,10 @@ namespace CTElectricGenerator { NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (state.dataCTElectricGenerator->CTGenerator(genNum).HeatRecInletNodeNum == 0) { - ShowSevereError( - state, format("Missing Node Name, Heat Recovery Inlet, for {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, + EnergyPlus::format("Missing Node Name, Heat Recovery Inlet, for {}={}", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1))); ErrorsFound = true; } state.dataCTElectricGenerator->CTGenerator(genNum).HeatRecOutletNodeNum = @@ -284,9 +286,10 @@ namespace CTElectricGenerator { NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (state.dataCTElectricGenerator->CTGenerator(genNum).HeatRecOutletNodeNum == 0) { - ShowSevereError( - state, - format("Missing Node Name, Heat Recovery Outlet, for {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, + EnergyPlus::format("Missing Node Name, Heat Recovery Outlet, for {}={}", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1))); ErrorsFound = true; } BranchNodeConnections::TestCompSet( @@ -300,9 +303,9 @@ namespace CTElectricGenerator { state.dataCTElectricGenerator->CTGenerator(genNum).HeatRecOutletNodeNum = 0; if (!state.dataIPShortCut->lAlphaFieldBlanks(9) || !state.dataIPShortCut->lAlphaFieldBlanks(10)) { ShowWarningError(state, - format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1))); + EnergyPlus::format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1))); ShowContinueError(state, "However, Node names were specified for Heat Recovery inlet or outlet nodes"); } } @@ -311,8 +314,8 @@ namespace CTElectricGenerator { state.dataCTElectricGenerator->CTGenerator(genNum).FuelType = static_cast(getEnumValue(Constant::eFuelNamesUC, AlphArray(11))); if (state.dataCTElectricGenerator->CTGenerator(genNum).FuelType == Constant::eFuel::Invalid) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(11), AlphArray(11))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(11), AlphArray(11))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -334,10 +337,10 @@ namespace CTElectricGenerator { DataLoopNode::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, state.dataCTElectricGenerator->CTGenerator(genNum).OAInletNode)) { ShowSevereError(state, - format("{}, \"{}\" Outdoor Air Inlet Node Name not valid Outdoor Air Node= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataCTElectricGenerator->CTGenerator(genNum).Name, - AlphArray(12))); + EnergyPlus::format("{}, \"{}\" Outdoor Air Inlet Node Name not valid Outdoor Air Node= {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataCTElectricGenerator->CTGenerator(genNum).Name, + AlphArray(12))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -345,7 +348,7 @@ namespace CTElectricGenerator { } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -372,7 +375,7 @@ namespace CTElectricGenerator { OutputProcessor::EndUseCat::Cogeneration); SetupOutputVariable(state, - format("Generator {} Rate", sFuelType), + EnergyPlus::format("Generator {} Rate", sFuelType), Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::TimeStepType::System, @@ -380,7 +383,7 @@ namespace CTElectricGenerator { this->Name); SetupOutputVariable(state, - format("Generator {} Energy", sFuelType), + EnergyPlus::format("Generator {} Energy", sFuelType), Constant::Units::J, this->FuelEnergy, OutputProcessor::TimeStepType::System, @@ -408,7 +411,7 @@ namespace CTElectricGenerator { this->Name); SetupOutputVariable(state, - format("Generator {} Mass Flow Rate", sFuelType), + EnergyPlus::format("Generator {} Mass Flow Rate", sFuelType), Constant::Units::kg_s, this->FuelMdot, OutputProcessor::TimeStepType::System, diff --git a/src/EnergyPlus/ChilledCeilingPanelSimple.cc b/src/EnergyPlus/ChilledCeilingPanelSimple.cc index 2d119d1d299..4d9391c185f 100644 --- a/src/EnergyPlus/ChilledCeilingPanelSimple.cc +++ b/src/EnergyPlus/ChilledCeilingPanelSimple.cc @@ -135,25 +135,26 @@ void SimCoolingPanel( &CoolingPanelParams::Name, (int)state.dataChilledCeilingPanelSimple->CoolingPanel.size()); if (CoolingPanelNum == 0) { - ShowFatalError(state, format("SimCoolingPanelSimple: Unit not found={}", EquipName)); + ShowFatalError(state, EnergyPlus::format("SimCoolingPanelSimple: Unit not found={}", EquipName)); } CompIndex = CoolingPanelNum; } else { CoolingPanelNum = CompIndex; if (CoolingPanelNum > (int)state.dataChilledCeilingPanelSimple->CoolingPanel.size() || CoolingPanelNum < 1) { ShowFatalError(state, - format("SimCoolingPanelSimple: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - CoolingPanelNum, - (int)state.dataChilledCeilingPanelSimple->CoolingPanel.size(), - EquipName)); + EnergyPlus::format("SimCoolingPanelSimple: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + CoolingPanelNum, + (int)state.dataChilledCeilingPanelSimple->CoolingPanel.size(), + EquipName)); } if (state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).CheckEquipName) { if (EquipName != state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).Name) { - ShowFatalError(state, - format("SimCoolingPanelSimple: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - CoolingPanelNum, - EquipName, - state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimCoolingPanelSimple: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + CoolingPanelNum, + EquipName, + state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).Name)); } state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).CheckEquipName = false; } @@ -182,12 +183,12 @@ void SimCoolingPanel( thisCP.CalcCoolingPanel(state, CoolingPanelNum); } break; default: { - ShowSevereError( - state, - format("SimCoolingPanelSimple: Errors in CoolingPanel={}", state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).Name)); - ShowContinueError( - state, - format("Invalid or unimplemented equipment type={}", state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).EquipType)); + ShowSevereError(state, + EnergyPlus::format("SimCoolingPanelSimple: Errors in CoolingPanel={}", + state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).Name)); + ShowContinueError(state, + EnergyPlus::format("Invalid or unimplemented equipment type={}", + state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).EquipType)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -199,7 +200,7 @@ void SimCoolingPanel( state.dataChilledCeilingPanelSimple->CoolingPanel(CoolingPanelNum).ReportCoolingPanel(state); } else { - ShowFatalError(state, format("SimCoolingPanelSimple: Unit not found={}", EquipName)); + ShowFatalError(state, EnergyPlus::format("SimCoolingPanelSimple: Unit not found={}", EquipName)); } } @@ -278,7 +279,7 @@ void GetCoolingPanelInput(EnergyPlusData &state) for (int CoolPanelNumI = 2; CoolPanelNumI <= NumCoolingPanels; ++CoolPanelNumI) { if (s_ipsc->cAlphaArgs(1) == state.dataChilledCeilingPanelSimple->CoolingPanel(CoolPanelNumI).Name) { ErrorsFound = true; - ShowSevereError(state, format("{} is used as a name for more than one simple COOLING PANEL.", s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{} is used as a name for more than one simple COOLING PANEL.", s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "This is not allowed."); } } @@ -324,54 +325,54 @@ void GetCoolingPanelInput(EnergyPlusData &state) thisCP.RatedWaterTemp = s_ipsc->rNumericArgs(1); if (thisCP.RatedWaterTemp > MaxWaterTempAvg + 0.001) { ShowWarningError(state, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(1))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxWaterTempAvg)); + EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(1))); + ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxWaterTempAvg)); thisCP.RatedWaterTemp = MaxWaterTempAvg; } else if (thisCP.RatedWaterTemp < MinWaterTempAvg - 0.001) { ShowWarningError(state, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(1))); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinWaterTempAvg)); + EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(1))); + ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinWaterTempAvg)); thisCP.RatedWaterTemp = MinWaterTempAvg; } thisCP.RatedZoneAirTemp = s_ipsc->rNumericArgs(2); if (thisCP.RatedZoneAirTemp > MaxWaterTempAvg + 0.001) { ShowWarningError(state, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxWaterTempAvg)); + EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(2))); + ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxWaterTempAvg)); thisCP.RatedZoneAirTemp = MaxWaterTempAvg; } else if (thisCP.RatedZoneAirTemp < MinWaterTempAvg - 0.001) { ShowWarningError(state, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinWaterTempAvg)); + EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(2))); + ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinWaterTempAvg)); thisCP.RatedZoneAirTemp = MinWaterTempAvg; } thisCP.RatedWaterFlowRate = s_ipsc->rNumericArgs(3); if (thisCP.RatedWaterFlowRate < 0.00001 || thisCP.RatedWaterFlowRate > 10.0) { ShowWarningError(state, - format("{}{}=\"{}\", {} is an invalid Standard Water mass flow rate.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, format("...reset to a default value=[{:.1R}].", WaterMassFlowDefault)); + EnergyPlus::format("{}{}=\"{}\", {} is an invalid Standard Water mass flow rate.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(2))); + ShowContinueError(state, EnergyPlus::format("...reset to a default value=[{:.1R}].", WaterMassFlowDefault)); thisCP.RatedWaterFlowRate = WaterMassFlowDefault; } @@ -380,15 +381,15 @@ void GetCoolingPanelInput(EnergyPlusData &state) if (!s_ipsc->lNumericFieldBlanks(4)) { thisCP.ScaledCoolingCapacity = s_ipsc->rNumericArgs(4); if (thisCP.ScaledCoolingCapacity < 0.0 && thisCP.ScaledCoolingCapacity != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Illegal {} = {:.7T}", s_ipsc->cNumericFieldNames(4), s_ipsc->rNumericArgs(4))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", s_ipsc->cNumericFieldNames(4), s_ipsc->rNumericArgs(4))); ErrorsFound = true; } } else { if ((!s_ipsc->lAlphaFieldBlanks(6)) || (!s_ipsc->lAlphaFieldBlanks(7))) { - ShowSevereError(state, format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(4))); + 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(4))); ErrorsFound = true; } } @@ -397,20 +398,20 @@ void GetCoolingPanelInput(EnergyPlusData &state) if (!s_ipsc->lNumericFieldBlanks(5)) { thisCP.ScaledCoolingCapacity = s_ipsc->rNumericArgs(5); if (thisCP.ScaledCoolingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, format("Illegal {} = {:.7T}", s_ipsc->cNumericFieldNames(5), s_ipsc->rNumericArgs(5))); + 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))); ErrorsFound = true; } else if (thisCP.ScaledCoolingCapacity == DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, format("Illegal {} = Autosize", s_ipsc->cNumericFieldNames(5))); + 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))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(5))); + 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))); ErrorsFound = true; } } else if (Util::SameString(s_ipsc->cAlphaArgs(5), "FractionOfAutosizedCoolingCapacity")) { @@ -418,40 +419,40 @@ void GetCoolingPanelInput(EnergyPlusData &state) if (!s_ipsc->lNumericFieldBlanks(6)) { thisCP.ScaledCoolingCapacity = s_ipsc->rNumericArgs(6); if (thisCP.ScaledCoolingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Illegal {} = {:.7T}", s_ipsc->cNumericFieldNames(6), s_ipsc->rNumericArgs(6))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", s_ipsc->cNumericFieldNames(6), s_ipsc->rNumericArgs(6))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(6))); + 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))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, EnergyPlus::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, - format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(7))); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinWaterFlowRate)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(7))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxWaterFlowRate)); + EnergyPlus::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; } @@ -471,16 +472,16 @@ void GetCoolingPanelInput(EnergyPlusData &state) } else if (Util::SameString(s_ipsc->cAlphaArgs(6), ZoneConvectiveLoad)) { thisCP.controlType = ClgPanelCtrlType::ZoneConvectiveLoad; } else { - ShowWarningError(state, format("Invalid {} ={}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); - ShowContinueError(state, format("Occurs in {} = {}", RoutineName, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("Invalid {} ={}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); + ShowContinueError(state, EnergyPlus::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, format("{}Cooling throttling range too small, reset to 0.5", cCMO_CoolingPanel_Simple)); - ShowContinueError(state, format("Occurs in Cooling Panel={}", thisCP.Name)); + 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)); thisCP.ColdThrottlRange = MinThrottlingRange; } @@ -507,32 +508,32 @@ void GetCoolingPanelInput(EnergyPlusData &state) thisCP.FracRadiant = s_ipsc->rNumericArgs(10); if (thisCP.FracRadiant < MinFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(10))); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(10))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxFraction)); + EnergyPlus::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; } // Remaining fraction is added to the zone as convective heat transfer if (thisCP.FracRadiant > MaxFraction) { ShowWarningError(state, - format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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 { @@ -542,33 +543,34 @@ void GetCoolingPanelInput(EnergyPlusData &state) thisCP.FracDistribPerson = s_ipsc->rNumericArgs(11); if (thisCP.FracDistribPerson < MinFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(11))); - ShowContinueError(state, format("...reset to minimum value=[{:.3R}].", MinFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(11))); - ShowContinueError(state, format("...reset to maximum value=[{:.3R}].", MaxFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", the number of surface/radiant fraction groups entered was less than the allowable minimum.", + 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, format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); + ShowContinueError(state, EnergyPlus::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); ErrorsFound = true; thisCP.TotSurfToDistrib = 0; // error } @@ -590,7 +592,8 @@ void GetCoolingPanelInput(EnergyPlusData &state) } } if (thisCP.ZonePtr <= 0) { - ShowSevereError(state, format("{}{}=\"{}\" is not on any ZoneHVAC:EquipmentList.", RoutineName, cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\" is not on any ZoneHVAC:EquipmentList.", RoutineName, cCMO_CoolingPanel_Simple, thisCP.Name)); ErrorsFound = true; continue; } @@ -603,22 +606,22 @@ void GetCoolingPanelInput(EnergyPlusData &state) thisCP.FracDistribToSurf(SurfNum) = s_ipsc->rNumericArgs(SurfNum + 11); if (thisCP.FracDistribToSurf(SurfNum) > MaxFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {}was greater than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(SurfNum + 8))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {}was less than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(SurfNum + 8))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MinFraction)); + EnergyPlus::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; } if (thisCP.SurfacePtr(SurfNum) != 0) { @@ -631,37 +634,39 @@ void GetCoolingPanelInput(EnergyPlusData &state) if (AllFracsSummed > (MaxFraction + 0.01)) { ShowSevereError(state, - format("{}{}=\"{}\", Summed radiant fractions for people + surface groups > 1.0", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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, - format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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, format("The sum of all radiation fractions to surfaces = {:.5T}", (AllFracsSummed - thisCP.FracDistribPerson))); - ShowContinueError(state, format("The radiant fraction to people = {:.5T}", thisCP.FracDistribPerson)); - ShowContinueError(state, format("So, all radiant fractions including surfaces and people = {:.5T}", AllFracsSummed)); - ShowContinueError(state, - 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))); + 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, + 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))); ShowContinueError(state, - format("Please check and correct this so that all radiant energy is accounted for in {} = {}", - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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, format("{}{}Errors found getting input. Program terminates.", RoutineName, cCMO_CoolingPanel_Simple)); + ShowFatalError(state, EnergyPlus::format("{}{}Errors found getting input. Program terminates.", RoutineName, cCMO_CoolingPanel_Simple)); } // Setup Report variables for the Coils @@ -791,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, - format("InitCoolingPanel: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - cCMO_CoolingPanel_Simple, - thisCP.Name)); + EnergyPlus::format("InitCoolingPanel: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + cCMO_CoolingPanel_Simple, + thisCP.Name)); } } @@ -940,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, format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, thisCP.Name)); + ShowSevereError(state, EnergyPlus::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\"."); @@ -1014,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, format("Occurs in ZoneHVAC:CoolingPanel:RadiantConvective:Water Object={}", thisCP.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in ZoneHVAC:CoolingPanel:RadiantConvective:Water Object={}", thisCP.Name)); } } @@ -1035,12 +1040,14 @@ void SizeCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum) if ((std::abs(WaterVolFlowMaxCoolDes - WaterVolFlowMaxCoolUser) / WaterVolFlowMaxCoolUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeCoolingPanel: Potential issue with equipment sizing for " - "ZoneHVAC:CoolingPanel:RadiantConvective:Water = \"{}\".", - thisCP.Name)); - ShowContinueError(state, format("User-Specified Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolUser)); + EnergyPlus::format("SizeCoolingPanel: Potential issue with equipment sizing for " + "ZoneHVAC:CoolingPanel:RadiantConvective:Water = \"{}\".", + thisCP.Name)); ShowContinueError(state, - format("differs from Design Size Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolDes)); + EnergyPlus::format("User-Specified Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1088,8 +1095,9 @@ bool CoolingPanelParams::SizeCoolingPanelUA(EnergyPlusData &state) Real64 const Tzoner = this->RatedZoneAirTemp; if (Tinletr >= Tzoner) { - ShowSevereError(state, - format("SizeCoolingPanelUA: Unit=[{},{}] has a rated water temperature that is higher than the rated zone temperature.", + ShowSevereError( + state, + EnergyPlus::format("SizeCoolingPanelUA: Unit=[{},{}] has a rated water temperature that is higher than the rated zone temperature.", cCMO_CoolingPanel_Simple, this->Name)); ShowContinueError(state, @@ -1108,9 +1116,9 @@ bool CoolingPanelParams::SizeCoolingPanelUA(EnergyPlusData &state) RatCapToTheoMax = 0.9999; } else if (RatCapToTheoMax >= 1.1) { ShowSevereError(state, - format("SizeCoolingPanelUA: Unit=[{},{}] has a cooling capacity that is greater than the maximum possible value.", - cCMO_CoolingPanel_Simple, - this->Name)); + EnergyPlus::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."); @@ -1128,8 +1136,9 @@ bool CoolingPanelParams::SizeCoolingPanelUA(EnergyPlusData &state) this->UA = -MDotXCp * log(1.0 - RatCapToTheoMax); if (this->UA <= 0.0) { - ShowSevereError(state, - format("SizeCoolingPanelUA: Unit=[{},{}] has a zero or negative calculated UA value.", cCMO_CoolingPanel_Simple, this->Name)); + ShowSevereError( + state, + EnergyPlus::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; @@ -1227,16 +1236,19 @@ 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, - format("{} [{}] inlet water temperature below dew-point temperature--potential for condensation exists", - cCMO_CoolingPanel_Simple, - this->Name)); + ShowWarningMessage( + state, + EnergyPlus::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, format("Water inlet temperature = {:.2R}", waterInletTemp)); - ShowContinueError(state, format("Zone dew-point temperature + safety delta T= {:.2R}", DewPointTemp + this->CondDewPtDeltaT)); + ShowContinueError(state, EnergyPlus::format("Water inlet temperature = {:.2R}", waterInletTemp)); + ShowContinueError( + state, EnergyPlus::format("Zone dew-point temperature + safety delta T= {:.2R}", DewPointTemp + this->CondDewPtDeltaT)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", this->CondDewPtDeltaT)); + ShowContinueError( + state, + EnergyPlus::format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", this->CondDewPtDeltaT)); } ShowRecurringWarningErrorAtEnd(state, cCMO_CoolingPanel_Simple + " [" + this->Name + "] condensation shut-off occurrence continues.", @@ -1582,19 +1594,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, format("Surface = {}", ThisSurf.Name)); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", ThisSurf.Area)); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); - ShowContinueError(state, format("Assign a larger surface area or more surfaces in {}", cCMO_CoolingPanel_Simple)); + ShowContinueError(state, EnergyPlus::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("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); + ShowContinueError(state, EnergyPlus::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, format("Surface = {}", ThisSurf.Name)); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", ThisSurf.Area)); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, format("Assign a larger surface area or more surfaces in {}", cCMO_CoolingPanel_Simple)); + ShowContinueError(state, EnergyPlus::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)); 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 a8bbebc56f3..1e23afc2356 100644 --- a/src/EnergyPlus/ChillerAbsorption.cc +++ b/src/EnergyPlus/ChillerAbsorption.cc @@ -117,7 +117,7 @@ BLASTAbsorberSpecs *BLASTAbsorberSpecs::factory(EnergyPlusData &state, std::stri return thisAbs; } // If we didn't find it, fatal - ShowFatalError(state, format("LocalBlastAbsorberFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalBlastAbsorberFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -168,14 +168,15 @@ void BLASTAbsorberSpecs::simulate( FirstHVACIteration); } else { - ShowFatalError(state, - format("SimBLASTAbsorber: Invalid LoopNum passed={}, Unit name={}, stored chilled water loop={}, stored condenser water " - "loop={}, stored generator loop={}", - calledFromLocation.loopNum, - this->Name, - this->CWPlantLoc.loopNum, - this->CDPlantLoc.loopNum, - this->GenPlantLoc.loopNum)); + ShowFatalError( + state, + EnergyPlus::format("SimBLASTAbsorber: Invalid LoopNum passed={}, Unit name={}, stored chilled water loop={}, stored condenser water " + "loop={}, stored generator loop={}", + calledFromLocation.loopNum, + this->Name, + this->CWPlantLoc.loopNum, + this->CDPlantLoc.loopNum, + this->GenPlantLoc.loopNum)); } } @@ -242,7 +243,7 @@ void GetBLASTAbsorberInput(EnergyPlusData &state) int numAbsorbers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (numAbsorbers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); // See if load distribution manager has already gotten the input ErrorsFound = true; } @@ -286,8 +287,10 @@ void GetBLASTAbsorberInput(EnergyPlusData &state) thisChiller.NomPumpPowerWasAutoSized = true; } if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } // Assign Node Numbers to specified nodes @@ -348,8 +351,10 @@ void GetBLASTAbsorberInput(EnergyPlusData &state) } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(9), "STEAM") || state.dataIPShortCut->cAlphaArgs(9).empty()) { thisChiller.GenHeatSourceType = DataLoopNode::NodeFluidType::Steam; } else { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError(state, "...Generator heat source type must be Steam or Hot Water."); ErrorsFound = true; } @@ -413,14 +418,18 @@ void GetBLASTAbsorberInput(EnergyPlusData &state) } } else if ((state.dataIPShortCut->lAlphaFieldBlanks(6) && !state.dataIPShortCut->lAlphaFieldBlanks(7)) || (!state.dataIPShortCut->lAlphaFieldBlanks(6) && state.dataIPShortCut->lAlphaFieldBlanks(7))) { - ShowSevereError(state, format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "...Generator fluid nodes must both be entered (or both left blank)."); - ShowContinueError(state, format("...{} = {}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); - ShowContinueError(state, format("...{} = {}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + ShowContinueError(state, + EnergyPlus::format("...{} = {}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); + ShowContinueError(state, + EnergyPlus::format("...{} = {}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); ErrorsFound = true; } else { if (thisChiller.GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - ShowWarningError(state, format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, + EnergyPlus::format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "...Generator fluid type must be Steam if generator inlet/outlet nodes are blank."); ShowContinueError(state, "...Generator fluid type is set to Steam and the simulation continues."); thisChiller.GenHeatSourceType = DataLoopNode::NodeFluidType::Steam; @@ -450,9 +459,11 @@ void GetBLASTAbsorberInput(EnergyPlusData &state) thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(8))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); 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; @@ -466,8 +477,10 @@ void GetBLASTAbsorberInput(EnergyPlusData &state) } if (thisChiller.GeneratorVolFlowRate == 0.0 && thisChiller.GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(16), state.dataIPShortCut->rNumericArgs(16))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(16), state.dataIPShortCut->rNumericArgs(16))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "...Generator water flow rate must be greater than 0 when absorber generator fluid type is hot water."); ErrorsFound = true; } @@ -486,7 +499,7 @@ void GetBLASTAbsorberInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -716,7 +729,8 @@ void BLASTAbsorberSpecs::oneTimeInit(EnergyPlusData &state) (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 ... "); @@ -729,8 +743,8 @@ void BLASTAbsorberSpecs::oneTimeInit(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 "); @@ -964,9 +978,10 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, + EnergyPlus::format("SizeChillerAbsorption: 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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -979,7 +994,7 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) } else { if (this->NomCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Absorption Chiller nominal capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in Chiller:Absorption object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && this->NomCap > 0.0) { @@ -1015,9 +1030,10 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) NomPumpPowerUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomPumpPower - NomPumpPowerUser) / NomPumpPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Pumping Power of {:.2R} [W]", NomPumpPowerUser)); - ShowContinueError(state, format("differs from Design Size Nominal Pumping Power of {:.2R} [W]", tmpNomPumpPower)); + ShowMessage(state, EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1065,11 +1081,13 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowMessage(state, + EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1082,7 +1100,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, format("Occurs in CHILLER:ABSORPTION object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in CHILLER:ABSORPTION object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && this->EvapVolFlowRate > 0.0) { @@ -1137,11 +1155,14 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowMessage(state, + EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + state, + EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1155,7 +1176,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, format("Occurs in CHILLER:ABSORPTION object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in CHILLER:ABSORPTION object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize && (this->CondVolFlowRate > 0.0)) { @@ -1210,13 +1231,16 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpGeneratorVolFlowRate - GeneratorVolFlowRateUser) / GeneratorVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( + ShowMessage( state, - format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", GeneratorVolFlowRateUser)); + EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, - format("differs from Design Size Design Generator Fluid Flow Rate of {:.5R} [m3/s]", - tmpGeneratorVolFlowRate)); + EnergyPlus::format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", + GeneratorVolFlowRateUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Design Generator Fluid Flow Rate of {:.5R} [m3/s]", + tmpGeneratorVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); @@ -1275,13 +1299,16 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpGeneratorVolFlowRate - GeneratorVolFlowRateUser) / GeneratorVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( + ShowMessage( state, - format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", GeneratorVolFlowRateUser)); + EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, - format("differs from Design Size Design Generator Fluid Flow Rate of {:.5R} [m3/s]", - tmpGeneratorVolFlowRate)); + EnergyPlus::format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", + GeneratorVolFlowRateUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Design Generator Fluid Flow Rate of {:.5R} [m3/s]", + tmpGeneratorVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); @@ -1307,7 +1334,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, format("Occurs in Chiller:Absorption object={}", this->Name)); + ShowContinueError(state, EnergyPlus::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 c3e3beaeb9c..f05114bdb98 100644 --- a/src/EnergyPlus/ChillerElectricASHRAE205.cc +++ b/src/EnergyPlus/ChillerElectricASHRAE205.cc @@ -117,7 +117,7 @@ void getChillerASHRAE205Input(EnergyPlusData &state) int numElectric205Chillers = s_ip->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (numElectric205Chillers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } @@ -152,11 +152,11 @@ void getChillerASHRAE205Input(EnergyPlusData &state) ShowFatalError(state, "Program terminates due to the missing ASHRAE 205 RS0001 representation file."); } // Since logger context must persist across all calls to libtk205/btwxt, it must be a member - thisChiller.LoggerContext = {&state, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, thisObjectName)}; + thisChiller.LoggerContext = {&state, EnergyPlus::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, thisObjectName)}; 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, 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)); ErrorsFound = true; } thisChiller.Representation->performance.performance_map_cooling.get_logger()->set_message_context(&thisChiller.LoggerContext); @@ -171,7 +171,8 @@ void getChillerASHRAE205Input(EnergyPlusData &state) thisChiller.MaxSequenceNumber = *(minmaxSequenceNum.second); if (fields.count("rated_capacity") != 0u) { - ShowWarningError(state, format("{}{}=\"{}\"", std::string{RoutineName}, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); + ShowWarningError( + state, EnergyPlus::format("{}{}=\"{}\"", std::string{RoutineName}, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); ShowContinueError(state, "Rated Capacity field is not yet supported for ASHRAE 205 representations."); } @@ -191,7 +192,8 @@ void getChillerASHRAE205Input(EnergyPlusData &state) std::string const evap_inlet_node_name = s_ip->getAlphaFieldValue(fields, objectSchemaProps, "chilled_water_inlet_node_name"); std::string const evap_outlet_node_name = s_ip->getAlphaFieldValue(fields, objectSchemaProps, "chilled_water_outlet_node_name"); if (evap_inlet_node_name.empty() || evap_outlet_node_name.empty()) { - ShowSevereError(state, format("{}{}=\"{}\"", std::string{RoutineName}, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\"", std::string{RoutineName}, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); ShowContinueError(state, "Evaporator Inlet or Outlet Node Name is blank."); ErrorsFound = true; } @@ -221,7 +223,8 @@ void getChillerASHRAE205Input(EnergyPlusData &state) std::string const cond_inlet_node_name = s_ip->getAlphaFieldValue(fields, objectSchemaProps, "condenser_inlet_node_name"); std::string const cond_outlet_node_name = s_ip->getAlphaFieldValue(fields, objectSchemaProps, "condenser_outlet_node_name"); if (cond_inlet_node_name.empty() || cond_outlet_node_name.empty()) { - ShowSevereError(state, format("{}{}=\"{}\"", std::string{RoutineName}, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\"", std::string{RoutineName}, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); ShowContinueError(state, "Condenser Inlet or Outlet Node Name is blank."); ErrorsFound = true; } @@ -256,8 +259,9 @@ void getChillerASHRAE205Input(EnergyPlusData &state) getEnumValue(DataPlant::FlowModeNamesUC, s_ip->getAlphaFieldValue(fields, objectSchemaProps, "chiller_flow_mode"))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\"", std::string{RoutineName}, state.dataIPShortCut->cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Invalid Chiller Flow Mode = {}", fields.at("chiller_flow_mode").get())); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\"", std::string{RoutineName}, state.dataIPShortCut->cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Invalid Chiller Flow Mode = {}", fields.at("chiller_flow_mode").get())); 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; @@ -304,10 +308,10 @@ void getChillerASHRAE205Input(EnergyPlusData &state) thisChiller.AmbientTempZone = Util::FindItemInList(ambient_temp_zone_name, state.dataHeatBal->Zone); if (thisChiller.AmbientTempZone == 0) { ShowSevereError(state, - format("{} = {}: Ambient Temperature Zone not found = {}", - state.dataIPShortCut->cCurrentModuleObject, - thisObjectName, - ambient_temp_zone_name)); + EnergyPlus::format("{} = {}: Ambient Temperature Zone not found = {}", + state.dataIPShortCut->cCurrentModuleObject, + thisObjectName, + ambient_temp_zone_name)); ErrorsFound = true; } else { SetupZoneInternalGain(state, @@ -333,14 +337,14 @@ void getChillerASHRAE205Input(EnergyPlusData &state) if (fields.count("ambient_temperature_outdoor_air_node_name") != 0u) { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisChiller.AmbientTempOutsideAirNode)) { ShowSevereError(state, - format("{} = {}: Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node", - state.dataIPShortCut->cCurrentModuleObject, - thisObjectName)); - ShowContinueError(state, format("...Referenced Node Name={}", ambient_temp_outdoor_node)); + EnergyPlus::format("{} = {}: Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node", + state.dataIPShortCut->cCurrentModuleObject, + thisObjectName)); + ShowContinueError(state, EnergyPlus::format("...Referenced Node Name={}", ambient_temp_outdoor_node)); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, ambient_temp_outdoor_node)); + ShowSevereError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, ambient_temp_outdoor_node)); ShowContinueError(state, "An Ambient Outdoor Air Node name must be used when the Ambient Temperature Indicator is Outdoors."); ErrorsFound = true; } @@ -349,10 +353,10 @@ void getChillerASHRAE205Input(EnergyPlusData &state) } default: { ShowSevereError(state, - format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - state.dataIPShortCut->cCurrentModuleObject, - thisObjectName, - s_ip->getAlphaFieldValue(fields, objectSchemaProps, "ambient_temperature_indicator"))); + EnergyPlus::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", + state.dataIPShortCut->cCurrentModuleObject, + thisObjectName, + s_ip->getAlphaFieldValue(fields, objectSchemaProps, "ambient_temperature_indicator"))); ShowContinueError(state, " Valid entries are SCHEDULE, ZONE, and OUTDOORS."); ErrorsFound = true; break; @@ -436,7 +440,7 @@ void getChillerASHRAE205Input(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -453,8 +457,9 @@ ASHRAE205ChillerSpecs *ASHRAE205ChillerSpecs::factory(EnergyPlusData &state, std return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("ASHRAE205ChillerSpecs::factory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE - return nullptr; // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("ASHRAE205ChillerSpecs::factory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + return nullptr; // LCOV_EXCL_LINE } void ASHRAE205ChillerSpecs::oneTimeInit_new(EnergyPlusData &state) @@ -542,7 +547,8 @@ void ASHRAE205ChillerSpecs::oneTimeInit_new(EnergyPlusData &state) (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 ... "); @@ -555,8 +561,8 @@ void ASHRAE205ChillerSpecs::oneTimeInit_new(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (fatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 "); @@ -728,12 +734,14 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); - ShowContinueError( - state, format("User-Specified Chilled Water Maximum Requested Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowMessage(state, EnergyPlus::format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); ShowContinueError(state, - format("differs from Design Size Chilled Water Maximum Requested Flow Rate of {:.5R} [m3/s]", - tmpEvapVolFlowRate)); + EnergyPlus::format("User-Specified Chilled Water Maximum Requested Flow Rate of {:.5R} [m3/s]", + EvapVolFlowRateUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Chilled Water Maximum Requested Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -746,7 +754,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, format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -797,12 +805,14 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); + ShowMessage(state, EnergyPlus::format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); ShowContinueError( - state, format("User-Specified Condenser Maximum Requested Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + state, + EnergyPlus::format("User-Specified Condenser Maximum Requested Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); ShowContinueError( state, - format("differs from Design Size Condenser Maximum Requested Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + EnergyPlus::format("differs from Design Size Condenser Maximum Requested Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -818,7 +828,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, format("Occurs in Electric ASHRAE 205 Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Electric ASHRAE 205 Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -894,9 +904,9 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) RefCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - RefCapUser) / RefCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); - ShowContinueError(state, format("User-Specified Rated Capacity of {:.2R} [W]", RefCapUser)); - ShowContinueError(state, format("differs from Design Size Rated Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -909,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, format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::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 @@ -1215,7 +1225,8 @@ void ASHRAE205ChillerSpecs::findEvaporatorMassFlowRate(EnergyPlusData &state, Re ++this->ChillerCapFTError; ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Evaporator DeltaTemp = 0 in mass flow calculation warning continues...", this->ObjectType, this->Name), + EnergyPlus::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 62753a956c7..4bfd23bf0d2 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -126,7 +126,7 @@ ElectricEIRChillerSpecs *ElectricEIRChillerSpecs::factory(EnergyPlusData &state, return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("LocalElectEIRChillerFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalElectEIRChillerFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -233,7 +233,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) int NumElectricEIRChillers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumElectricEIRChillers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -270,22 +270,22 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) // Performance curves thisChiller.ChillerCapFTIndex = Curve::GetCurveIndex(state, s_ipsc->cAlphaArgs(2)); if (thisChiller.ChillerCapFTIndex == 0) { - ShowSevereError(state, format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } thisChiller.ChillerEIRFTIndex = Curve::GetCurveIndex(state, s_ipsc->cAlphaArgs(3)); if (thisChiller.ChillerEIRFTIndex == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); ErrorsFound = true; } thisChiller.ChillerEIRFPLRIndex = Curve::GetCurveIndex(state, s_ipsc->cAlphaArgs(4)); if (thisChiller.ChillerEIRFPLRIndex == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); ErrorsFound = true; } @@ -317,8 +317,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } else if (Util::SameString(s_ipsc->cAlphaArgs(9), "EvaporativelyCooled")) { thisChiller.CondenserType = DataPlant::CondenserType::EvapCooled; } else { - ShowSevereError(state, format("{}{}: {}", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(9), s_ipsc->cAlphaArgs(9))); + ShowSevereError(state, EnergyPlus::format("{}{}: {}", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(9), s_ipsc->cAlphaArgs(9))); ShowContinueError(state, "Valid entries are AirCooled, WaterCooled, or EvaporativelyCooled"); ErrorsFound = true; } @@ -354,8 +354,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) bool Okay = true; OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondInletNodeNum, Okay); if (!Okay) { - ShowWarningError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Adding OutdoorAir:Node={}", s_ipsc->cAlphaArgs(7))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Adding OutdoorAir:Node={}", s_ipsc->cAlphaArgs(7))); } thisChiller.CondOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -371,7 +371,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } else if (thisChiller.CondenserType == DataPlant::CondenserType::WaterCooled) { // Condenser inlet node name is necessary for water-cooled condenser if (s_ipsc->lAlphaFieldBlanks(7) || s_ipsc->lAlphaFieldBlanks(8)) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Condenser Inlet or Outlet Node Name is blank."); ErrorsFound = true; } @@ -402,7 +402,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } else { // Condenser inlet node name is necessary (never should reach this part of code) if (s_ipsc->lAlphaFieldBlanks(7) || s_ipsc->lAlphaFieldBlanks(8)) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Condenser Inlet or Outlet Node Name is blank."); ErrorsFound = true; } @@ -436,8 +436,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, s_ipsc->cAlphaArgs(10))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(10), s_ipsc->cAlphaArgs(10))); + 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))); 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; @@ -449,14 +449,14 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) thisChiller.RefCapWasAutoSized = true; } if (s_ipsc->rNumericArgs(1) == 0.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); + ShowSevereError(state, EnergyPlus::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, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); + ShowSevereError(state, EnergyPlus::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; } thisChiller.TempRefEvapOut = s_ipsc->rNumericArgs(3); @@ -480,33 +480,36 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if (thisChiller.MinPartLoadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("{} [{:.3R}] > {} [{:.3R}]", - s_ipsc->cNumericFieldNames(7), - s_ipsc->rNumericArgs(7), - s_ipsc->cNumericFieldNames(8), - s_ipsc->rNumericArgs(8))); + EnergyPlus::format("{} [{:.3R}] > {} [{:.3R}]", + s_ipsc->cNumericFieldNames(7), + s_ipsc->rNumericArgs(7), + s_ipsc->cNumericFieldNames(8), + s_ipsc->rNumericArgs(8))); ShowContinueError(state, "Minimum part load ratio must be less than or equal to the maximum part load ratio "); ErrorsFound = true; } if (thisChiller.MinUnloadRat < thisChiller.MinPartLoadRat || thisChiller.MinUnloadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.3R}", s_ipsc->cNumericFieldNames(10), s_ipsc->rNumericArgs(10))); - ShowContinueError(state, - format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(7))); - ShowContinueError(state, - format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(8))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } if (thisChiller.OptPartLoadRat < thisChiller.MinPartLoadRat || thisChiller.OptPartLoadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.3R}", s_ipsc->cNumericFieldNames(9), s_ipsc->rNumericArgs(9))); - ShowContinueError(state, - format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(7))); - ShowContinueError(state, format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(8))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } @@ -514,10 +517,10 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) thisChiller.CompPowerToCondenserFrac = s_ipsc->rNumericArgs(12); if (thisChiller.CompPowerToCondenserFrac < 0.0 || thisChiller.CompPowerToCondenserFrac > 1.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.3R}", s_ipsc->cNumericFieldNames(12), s_ipsc->rNumericArgs(12))); - ShowContinueError(state, format("{} must be greater than or equal to zero", s_ipsc->cNumericFieldNames(12))); - ShowContinueError(state, format("{} must be less than or equal to one", s_ipsc->cNumericFieldNames(12))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } @@ -540,8 +543,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); + 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))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -554,8 +557,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); + 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))); ErrorsFound = true; } @@ -607,7 +610,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) thisChiller.HeatRecInletNodeNum = 0; thisChiller.HeatRecOutletNodeNum = 0; if (!s_ipsc->lAlphaFieldBlanks(11) || !s_ipsc->lAlphaFieldBlanks(12)) { - ShowWarningError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::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."); } @@ -621,8 +624,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if (thisChiller.CondenserFlowControl == DataPlant::CondenserFlowControl::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(17), s_ipsc->cAlphaArgs(17))); + 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))); 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; @@ -633,8 +636,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if ((thisChiller.ChillerCondLoopFlowFLoopPLRIndex == 0) && (thisChiller.CondenserFlowControl == DataPlant::CondenserFlowControl::ModulatedLoopPLR)) { - ShowSevereError(state, format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(18), s_ipsc->cAlphaArgs(18))); + 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))); ErrorsFound = true; } @@ -654,20 +657,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, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::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, format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", 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, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::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, format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); } } @@ -675,11 +678,11 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) Real64 CurveVal = Curve::CurveValue(state, thisChiller.ChillerEIRFPLRIndex, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::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, format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); } } @@ -723,7 +726,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) PLRArray[8] = 0.8; PLRArray[9] = 0.9; PLRArray[10] = 1; - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::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(state, fmt::format("PLR = {:7." + std::to_string(DecimalPrecision) + "F}", fmt::join(PLRArray, ","))); @@ -734,8 +737,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, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} must be >= 0", s_ipsc->cNumericFieldNames(16))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} must be >= 0", s_ipsc->cNumericFieldNames(16))); ErrorsFound = true; } @@ -746,8 +749,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) thisChiller.BasinHeaterSetPointTemp = 2.0; } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(17))); + 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))); } } @@ -769,8 +772,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, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, thisChiller.Name)); - ShowContinueError(state, format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(20), s_ipsc->cAlphaArgs(20))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, thisChiller.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(20), s_ipsc->cAlphaArgs(20))); ErrorsFound = true; } } @@ -778,7 +781,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); } } @@ -1149,7 +1152,8 @@ void ElectricEIRChillerSpecs::oneTimeInit(EnergyPlusData &state) (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 ... "); @@ -1162,8 +1166,8 @@ void ElectricEIRChillerSpecs::oneTimeInit(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (fatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 "); @@ -1240,7 +1244,7 @@ void ElectricEIRChillerSpecs::initEachEnvironment(EnergyPlusData &state) if (THeatRecSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HRSPErrDone) { - ShowWarningError(state, format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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"); @@ -1255,7 +1259,8 @@ void ElectricEIRChillerSpecs::initEachEnvironment(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (fatalError) { if (!this->HRSPErrDone) { - ShowWarningError(state, format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); + ShowWarningError(state, + EnergyPlus::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"); @@ -1403,11 +1408,14 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Reference Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowMessage(state, + EnergyPlus::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Reference Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + state, + EnergyPlus::format("User-Specified Reference Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Reference Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1420,7 +1428,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, format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -1462,9 +1470,10 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) RefCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - RefCapUser) / RefCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Reference Capacity of {:.2R} [W]", RefCapUser)); - ShowContinueError(state, format("differs from Design Size Reference Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, + EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1477,7 +1486,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, format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::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 @@ -1526,12 +1535,14 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Reference Condenser Fluid Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowMessage(state, + EnergyPlus::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, - format("differs from Design Size Reference Condenser Fluid Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + EnergyPlus::format("User-Specified Reference Condenser Fluid Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Reference Condenser Fluid Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1547,7 +1558,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, format("Occurs in Electric EIR Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Electric EIR Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -1634,11 +1645,14 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tempHeatRecVolFlowRate - nomHeatRecVolFlowRateUser) / nomHeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Heat Recovery Water Flow Rate of {:.5R} [m3/s]", nomHeatRecVolFlowRateUser)); + ShowMessage(state, + EnergyPlus::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Heat Recovery Water Flow Rate of {:.5R} [m3/s]", tempHeatRecVolFlowRate)); + state, + EnergyPlus::format("User-Specified Heat Recovery Water Flow Rate of {:.5R} [m3/s]", nomHeatRecVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Heat Recovery Water Flow Rate of {:.5R} [m3/s]", + tempHeatRecVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1797,7 +1811,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, format("{}.", this->MsgBuffer1)); + ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -1844,11 +1858,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 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { @@ -1867,11 +1881,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 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -1978,12 +1992,14 @@ 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, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); - ShowContinueError(state, format(" Chiller Capacity as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerCapFT)); - ShowContinueError(state, - format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.", - EvapOutletTempSetPoint, - condInletTemp)); + ShowWarningError(state, EnergyPlus::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( + state, + EnergyPlus::format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.", + EvapOutletTempSetPoint, + condInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } else if (this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerCapFTError; @@ -2249,12 +2265,14 @@ 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, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); - ShowContinueError(state, format(" Chiller EIR as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerEIRFT)); + ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); ShowContinueError(state, - format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.", - this->EvapOutletTemp, - condInletTemp)); + EnergyPlus::format(" Chiller EIR as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerEIRFT)); + ShowContinueError( + state, + EnergyPlus::format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.", + this->EvapOutletTemp, + condInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } else if (this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerEIRFTError; @@ -2272,9 +2290,10 @@ 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, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); - ShowContinueError(state, format(" Chiller EIR as a function of PLR curve output is negative ({:.3R}).", this->ChillerEIRFPLR)); - ShowContinueError(state, format(" Negative value occurs using a part-load ratio of {:.3R}.", PartLoadRat)); + ShowWarningError(state, EnergyPlus::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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } else if (this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerEIRFPLRError; @@ -2323,9 +2342,9 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b } } else { ShowFatalError(state, - format("{}: The ModulatedLoopPLR condenser flow control requires a Sizing:Plant object for " - "both loops connected to the condenser and evaporator of the chiller.", - RoutineName)); + 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)); } } break; case DataPlant::CondenserFlowControl::ModulatedDeltaTemperature: { @@ -2359,7 +2378,7 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { - ShowSevereError(state, format("CalcElectricEIRChillerModel: Condenser flow = 0, for ElectricEIRChiller={}", this->Name)); + ShowSevereError(state, EnergyPlus::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 0cccbf00ef7..31bdf3dbf1b 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.cc +++ b/src/EnergyPlus/ChillerExhaustAbsorption.cc @@ -125,7 +125,7 @@ ExhaustAbsorberSpecs *ExhaustAbsorberSpecs::factory(EnergyPlusData &state, std:: return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("LocalExhaustAbsorberFactory: Error getting inputs for comp named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalExhaustAbsorberFactory: Error getting inputs for comp named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -190,7 +190,7 @@ void ExhaustAbsorberSpecs::simulate( } } else { // Error, nodes do not match - ShowSevereError(state, format("Invalid call to Exhaust Absorber Chiller {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Invalid call to Exhaust Absorber Chiller {}", this->Name)); ShowContinueError(state, "Node connections in branch are not consistent with object nodes."); ShowFatalError(state, "Preceding conditions cause termination."); } @@ -242,7 +242,7 @@ void ExhaustAbsorberSpecs::getDesignCapacities( if (!matchfound) { // Error, nodes do not match - ShowSevereError(state, format("SimExhaustAbsorber: Invalid call to Exhaust Absorption Chiller-Heater {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("SimExhaustAbsorber: Invalid call to Exhaust Absorption Chiller-Heater {}", this->Name)); ShowContinueError(state, "Node connections in branch are not consistent with object nodes."); ShowFatalError(state, "Preceding conditions cause termination."); } // Operate as Chiller or Heater @@ -302,7 +302,7 @@ void GetExhaustAbsorberInput(EnergyPlusData &state) int NumExhaustAbsorbers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (NumExhaustAbsorbers <= 0) { - ShowSevereError(state, format("No {} equipment found in input file", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment found in input file", cCurrentModuleObject)); Get_ErrorsFound = true; } @@ -394,7 +394,7 @@ void GetExhaustAbsorberInput(EnergyPlusData &state) BranchNodeConnections::TestCompSet( state, cCurrentModuleObject, s_ipsc->cAlphaArgs(1), s_ipsc->cAlphaArgs(6), s_ipsc->cAlphaArgs(7), "Hot Water Nodes"); if (Get_ErrorsFound) { - ShowFatalError(state, format("Errors found in processing node input for {}={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowFatalError(state, EnergyPlus::format("Errors found in processing node input for {}={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); Get_ErrorsFound = false; } @@ -479,7 +479,8 @@ void GetExhaustAbsorberInput(EnergyPlusData &state) } if (Get_ErrorsFound) { - ShowFatalError(state, format("Errors found in processing curve input for {}={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowFatalError(state, + EnergyPlus::format("Errors found in processing curve input for {}={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); Get_ErrorsFound = false; } if (Util::SameString(s_ipsc->cAlphaArgs(15), "LeavingCondenser")) { @@ -488,8 +489,8 @@ void GetExhaustAbsorberInput(EnergyPlusData &state) thisChiller.isEnterCondensTemp = true; } else { thisChiller.isEnterCondensTemp = true; - ShowWarningError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(15), s_ipsc->cAlphaArgs(15))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(15), s_ipsc->cAlphaArgs(15))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "resetting to ENTERING-CONDENSER, simulation continues"); } // Assign Other Parameters @@ -499,19 +500,19 @@ void GetExhaustAbsorberInput(EnergyPlusData &state) thisChiller.isWaterCooled = true; } else { thisChiller.isWaterCooled = true; - ShowWarningError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(16), s_ipsc->cAlphaArgs(16))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(16), s_ipsc->cAlphaArgs(16))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "resetting to WATER-COOLED, simulation continues"); } if (!thisChiller.isEnterCondensTemp && !thisChiller.isWaterCooled) { thisChiller.isEnterCondensTemp = true; - ShowWarningError(state, format("{}=\"{}\", invalid value", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\", invalid value", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Invalid to have both LeavingCondenser and AirCooled."); ShowContinueError(state, "resetting to EnteringCondenser, simulation continues"); } if (thisChiller.isWaterCooled) { if (s_ipsc->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("{}=\"{}\", invalid value", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid value", cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "For WaterCooled chiller the condenser outlet node is required."); Get_ErrorsFound = true; } @@ -552,7 +553,7 @@ void GetExhaustAbsorberInput(EnergyPlusData &state) // Connection not required for air or evap cooled condenser so no call to TestCompSet here OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondReturnNodeNum, Okay); if (!Okay) { - ShowWarningError(state, format("{}, Adding OutdoorAir:Node={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(4))); + ShowWarningError(state, EnergyPlus::format("{}, Adding OutdoorAir:Node={}", cCurrentModuleObject, s_ipsc->cAlphaArgs(4))); } } @@ -570,7 +571,7 @@ void GetExhaustAbsorberInput(EnergyPlusData &state) } if (Get_ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", cCurrentModuleObject)); } } @@ -904,7 +905,7 @@ void ExhaustAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) (state.dataLoopNodes->Node(this->ChillSupplyNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ChillSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint on cool side for chiller heater named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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; @@ -916,7 +917,7 @@ void ExhaustAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->ChillSupplyNodeNum).needsSetpointChecking = false; if (errFlag) { if (!this->ChillSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint on cool side for chiller heater named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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 "); @@ -936,7 +937,7 @@ void ExhaustAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) (state.dataLoopNodes->Node(this->HeatSupplyNodeNum).TempSetPointLo == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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; @@ -948,7 +949,7 @@ void ExhaustAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->HeatSupplyNodeNum).needsSetpointChecking = false; if (errFlag) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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 "); @@ -1138,11 +1139,11 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeChillerHeaterAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, + EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1155,7 +1156,8 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->NomCoolingCapWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -1214,11 +1216,13 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeChillerAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + EnergyPlus::format("SizeChillerAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", + this->Name)); ShowContinueError( - state, format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1231,7 +1235,8 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->EvapVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -1294,13 +1299,14 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - HeatRecVolFlowRateUser) / HeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeChillerHeaterAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Hot Water Flow Rate of {:.5R} [m3/s]", HeatRecVolFlowRateUser)); + ShowMessage(state, + EnergyPlus::format( + "SizeChillerHeaterAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Design Hot Water Flow Rate of {:.5R} [m3/s]", tmpHeatRecVolFlowRate)); + state, EnergyPlus::format("User-Specified Design Hot Water Flow Rate of {:.5R} [m3/s]", HeatRecVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Hot Water Flow Rate of {:.5R} [m3/s]", + tmpHeatRecVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1313,7 +1319,8 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->HeatVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -1380,11 +1387,14 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeChillerAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + EnergyPlus::format("SizeChillerAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", + this->Name)); ShowContinueError( - state, format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + state, + EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1397,7 +1407,8 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->CondVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -1763,12 +1774,12 @@ void ExhaustAbsorberSpecs::calcChiller(EnergyPlusData &state, Real64 &MyLoad) if (lExhHeatRecPotentialCool < lCoolThermalEnergyUseRate) { if (this->ExhTempLTAbsLeavingTempIndex == 0) { - ShowWarningError(state, format("ChillerHeater:Absorption:DoubleEffect \"{}\"", this->Name)); + ShowWarningError(state, EnergyPlus::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, format("...Value of Exhaust air inlet temp ={:.4T} C.", lExhaustInTemp)); - ShowContinueError(state, format("... and Exhaust air flow rate of {:.2T} kg/s.", lExhaustInFlow)); - ShowContinueError(state, format("...Value of minimum absorber leaving temp ={:.4T} C.", AbsLeavingTemp)); + 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, "...Either increase the Exhaust temperature (min required = 350 C ) or flow or both of Micro Turbine to meet " "the min available potential criteria."); @@ -1796,16 +1807,18 @@ void ExhaustAbsorberSpecs::calcChiller(EnergyPlusData &state, Real64 &MyLoad) lCondSupplyTemp = lCondReturnTemp + lTowerLoad / (lCondWaterMassFlowRate * Cp_CD); } else { if (this->lCondWaterMassFlowRate_Index == 0) { - ShowSevereError(state, - format("CalcExhaustAbsorberChillerModel: Condenser flow = 0, for Exhaust Absorber Chiller={}", this->Name)); + ShowSevereError( + state, + EnergyPlus::format("CalcExhaustAbsorberChillerModel: Condenser flow = 0, for Exhaust Absorber Chiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); // ShowFatalError(state, "Program Terminates due to previous error condition."); } - ShowRecurringSevereErrorAtEnd(state, - 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, + 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 ); } } else { @@ -1960,7 +1973,7 @@ void ExhaustAbsorberSpecs::calcHeater(EnergyPlusData &state, Real64 &MyLoad, boo lHotWaterMassFlowRate = 0.0; ShowRecurringWarningErrorAtEnd( state, - format("ExhaustAbsorberChillerModel:Heating\"{}\", DeltaTemp = 0 in mass flow calculation", this->Name), + EnergyPlus::format("ExhaustAbsorberChillerModel:Heating\"{}\", DeltaTemp = 0 in mass flow calculation", this->Name), this->DeltaTempHeatErrCount); } lHotWaterSupplyTemp = HeatSupplySetPointTemp; @@ -2005,24 +2018,25 @@ void ExhaustAbsorberSpecs::calcHeater(EnergyPlusData &state, Real64 &MyLoad, boo lExhHeatRecPotentialHeat = lExhaustInFlow * CpAir * (lExhaustInTemp - AbsLeavingTemp); if (lExhHeatRecPotentialHeat < lHeatThermalEnergyUseRate) { if (this->ExhTempLTAbsLeavingHeatingTempIndex == 0) { - ShowWarningError(state, format("ChillerHeater:Absorption:DoubleEffect \"{}\"", this->Name)); + ShowWarningError(state, EnergyPlus::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, format("...Value of Exhaust air inlet temp ={:.4T} C.", lExhaustInTemp)); - ShowContinueError(state, format("... and Exhaust air flow rate of {:.2T} kg/s.", lExhaustInFlow)); - ShowContinueError(state, format("...Value of minimum absorber leaving temp ={:.4T} C.", AbsLeavingTemp)); + 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, "...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, - 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, + 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); // 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 46980d9a980..fc2f21fad0e 100644 --- a/src/EnergyPlus/ChillerGasAbsorption.cc +++ b/src/EnergyPlus/ChillerGasAbsorption.cc @@ -123,7 +123,7 @@ GasAbsorberSpecs *GasAbsorberSpecs::factory(EnergyPlusData &state, std::string c return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("LocalGasAbsorberFactory: Error getting inputs for comp named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalGasAbsorberFactory: Error getting inputs for comp named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -184,7 +184,7 @@ void GasAbsorberSpecs::simulate( } } else { // Error, nodes do not match - ShowSevereError(state, format("Invalid call to Gas Absorber Chiller {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Invalid call to Gas Absorber Chiller {}", this->Name)); ShowContinueError(state, "Node connections in branch are not consistent with object nodes."); ShowFatalError(state, "Preceding conditions cause termination."); } @@ -228,7 +228,7 @@ void GasAbsorberSpecs::getDesignCapacities( if (!matchfound) { // Error, nodes do not match - ShowSevereError(state, format("SimGasAbsorber: Invalid call to Gas Absorption Chiller-Heater {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("SimGasAbsorber: Invalid call to Gas Absorption Chiller-Heater {}", this->Name)); ShowContinueError(state, "Node connections in branch are not consistent with object nodes."); ShowFatalError(state, "Preceding conditions cause termination."); } // Operate as Chiller or Heater @@ -253,7 +253,7 @@ void GasAbsorberSpecs::onInitLoopEquip(EnergyPlusData &state, const PlantLocatio } else if (BranchInletNodeNum == this->CondReturnNodeNum) { // called from condenser loop // don't do anything here } else { // Error, nodes do not match - ShowSevereError(state, format("SimGasAbsorber: Invalid call to Gas Absorption Chiller-Heater {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("SimGasAbsorber: Invalid call to Gas Absorption Chiller-Heater {}", this->Name)); ShowContinueError(state, "Node connections in branch are not consistent with object nodes."); ShowFatalError(state, "Preceding conditions cause termination."); } // Operate as Chiller or Heater @@ -286,7 +286,7 @@ void GetGasAbsorberInput(EnergyPlusData &state) NumGasAbsorbers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumGasAbsorbers <= 0) { - ShowSevereError(state, format("No {} equipment found in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment found in input file", s_ipsc->cCurrentModuleObject)); Get_ErrorsFound = true; } @@ -381,7 +381,8 @@ void GetGasAbsorberInput(EnergyPlusData &state) BranchNodeConnections::TestCompSet( state, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), s_ipsc->cAlphaArgs(6), s_ipsc->cAlphaArgs(7), "Hot Water Nodes"); if (Get_ErrorsFound) { - ShowFatalError(state, format("Errors found in processing node input for {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowFatalError( + state, EnergyPlus::format("Errors found in processing node input for {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); Get_ErrorsFound = false; } @@ -466,7 +467,8 @@ void GetGasAbsorberInput(EnergyPlusData &state) } if (Get_ErrorsFound) { - ShowFatalError(state, format("Errors found in processing curve input for {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowFatalError( + state, EnergyPlus::format("Errors found in processing curve input for {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); Get_ErrorsFound = false; } if (Util::SameString(s_ipsc->cAlphaArgs(15), "LeavingCondenser")) { @@ -475,8 +477,8 @@ void GetGasAbsorberInput(EnergyPlusData &state) thisChiller.isEnterCondensTemp = true; } else { thisChiller.isEnterCondensTemp = true; - ShowWarningError(state, format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}=\"{}\"", s_ipsc->cAlphaFieldNames(15), s_ipsc->cAlphaArgs(15))); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}=\"{}\"", s_ipsc->cAlphaFieldNames(15), s_ipsc->cAlphaArgs(15))); ShowContinueError(state, "resetting to EnteringCondenser, simulation continues"); } // Assign Other Parameters @@ -486,19 +488,19 @@ void GetGasAbsorberInput(EnergyPlusData &state) thisChiller.isWaterCooled = true; } else { thisChiller.isWaterCooled = true; - ShowWarningError(state, format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(16), s_ipsc->cAlphaArgs(16))); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(16), s_ipsc->cAlphaArgs(16))); ShowContinueError(state, "resetting to WaterCooled, simulation continues"); } if (!thisChiller.isEnterCondensTemp && !thisChiller.isWaterCooled) { thisChiller.isEnterCondensTemp = true; - ShowWarningError(state, format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Invalid to have both LeavingCondenser and AirCooled."); ShowContinueError(state, "resetting to EnteringCondenser, simulation continues"); } if (thisChiller.isWaterCooled) { if (s_ipsc->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "For WaterCooled chiller the condenser outlet node is required."); Get_ErrorsFound = true; } @@ -539,7 +541,7 @@ void GetGasAbsorberInput(EnergyPlusData &state) // Connection not required for air or evap cooled condenser so no call to TestCompSet here OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondReturnNodeNum, Okay); if (!Okay) { - ShowWarningError(state, format("{}, Adding OutdoorAir:Node={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(4))); + ShowWarningError(state, EnergyPlus::format("{}, Adding OutdoorAir:Node={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(4))); } } thisChiller.CHWLowLimitTemp = s_ipsc->rNumericArgs(15); @@ -549,8 +551,8 @@ void GetGasAbsorberInput(EnergyPlusData &state) // Validate fuel type input thisChiller.FuelType = static_cast(getEnumValue(Constant::eFuelNamesUC, s_ipsc->cAlphaArgs(17))); if (thisChiller.FuelType == Constant::eFuel::Invalid) { - ShowSevereError(state, format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(17), s_ipsc->cAlphaArgs(17))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid value", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(17), s_ipsc->cAlphaArgs(17))); ShowContinueError( state, "Valid choices are Electricity, NaturalGas, Propane, Diesel, Gasoline, FuelOilNo1, FuelOilNo2,OtherFuel1 or OtherFuel2"); Get_ErrorsFound = true; @@ -558,7 +560,7 @@ void GetGasAbsorberInput(EnergyPlusData &state) } if (Get_ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); } } @@ -621,7 +623,7 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) OutputProcessor::EndUseCat::HeatRejection); SetupOutputVariable(state, - format("Chiller Heater {} Rate", sFuelType), + EnergyPlus::format("Chiller Heater {} Rate", sFuelType), Constant::Units::W, this->FuelUseRate, OutputProcessor::TimeStepType::System, @@ -629,7 +631,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, - format("Chiller Heater {} Energy", sFuelType), + EnergyPlus::format("Chiller Heater {} Energy", sFuelType), Constant::Units::J, this->FuelEnergy, OutputProcessor::TimeStepType::System, @@ -637,14 +639,14 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) this->Name); SetupOutputVariable(state, - format("Chiller Heater Cooling {} Rate", sFuelType), + EnergyPlus::format("Chiller Heater Cooling {} Rate", sFuelType), Constant::Units::W, this->CoolFuelUseRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("Chiller Heater Cooling {} Energy", sFuelType), + EnergyPlus::format("Chiller Heater Cooling {} Energy", sFuelType), Constant::Units::J, this->CoolFuelEnergy, OutputProcessor::TimeStepType::System, @@ -663,14 +665,14 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) this->Name); SetupOutputVariable(state, - format("Chiller Heater Heating {} Rate", sFuelType), + EnergyPlus::format("Chiller Heater Heating {} Rate", sFuelType), Constant::Units::W, this->HeatFuelUseRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("Chiller Heater Heating {} Energy", sFuelType), + EnergyPlus::format("Chiller Heater Heating {} Energy", sFuelType), Constant::Units::J, this->HeatFuelEnergy, OutputProcessor::TimeStepType::System, @@ -893,7 +895,7 @@ void GasAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) (state.dataLoopNodes->Node(this->ChillSupplyNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ChillSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint on cool side for chiller heater named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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; @@ -905,7 +907,7 @@ void GasAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->ChillSupplyNodeNum).needsSetpointChecking = false; if (errFlag) { if (!this->ChillSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint on cool side for chiller heater named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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 "); @@ -925,7 +927,7 @@ void GasAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) (state.dataLoopNodes->Node(this->HeatSupplyNodeNum).TempSetPointLo == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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; @@ -937,7 +939,7 @@ void GasAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->HeatSupplyNodeNum).needsSetpointChecking = false; if (errFlag) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); + ShowWarningError(state, EnergyPlus::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,11 +1120,11 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeChillerHeaterAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, + EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1135,7 +1137,8 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->NomCoolingCapWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, + EnergyPlus::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,12 +1195,14 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeChillerAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1210,7 +1215,8 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->EvapVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -1273,13 +1279,14 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - HeatRecVolFlowRateUser) / HeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeChillerHeaterAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Hot Water Flow Rate of {:.5R} [m3/s]", HeatRecVolFlowRateUser)); + ShowMessage(state, + EnergyPlus::format("SizeChillerHeaterAbsorptionDirectFired: Potential issue with equipment sizing for {}", + this->Name)); ShowContinueError( - state, format("differs from Design Size Design Hot Water Flow Rate of {:.5R} [m3/s]", tmpHeatRecVolFlowRate)); + state, EnergyPlus::format("User-Specified Design Hot Water Flow Rate of {:.5R} [m3/s]", HeatRecVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Hot Water Flow Rate of {:.5R} [m3/s]", + tmpHeatRecVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1292,7 +1299,8 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->HeatVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -1359,12 +1367,15 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeChillerAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + state, + EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1377,7 +1388,8 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->CondVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -1730,15 +1742,17 @@ void GasAbsorberSpecs::calculateChiller(EnergyPlusData &state, Real64 &MyLoad) lCondSupplyTemp = lCondReturnTemp + lTowerLoad / (lCondWaterMassFlowRate * Cp_CD); } else { if (this->lCondWaterMassFlowRate_Index == 0) { - ShowSevereError(state, format("CalcGasAbsorberChillerModel: Condenser flow = 0, for Gas Absorber Chiller={}", this->Name)); + ShowSevereError(state, + EnergyPlus::format("CalcGasAbsorberChillerModel: Condenser flow = 0, for Gas Absorber Chiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); // ShowFatalError(state, "Program Terminates due to previous error condition."); } - ShowRecurringSevereErrorAtEnd(state, - 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 + 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 + this->lCondWaterMassFlowRate_Index // Recurring message index, if zero, next available index is assigned ); } } else { diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.cc b/src/EnergyPlus/ChillerIndirectAbsorption.cc index 07cdd322abe..cd65a116f59 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.cc +++ b/src/EnergyPlus/ChillerIndirectAbsorption.cc @@ -118,7 +118,8 @@ IndirectAbsorberSpecs *IndirectAbsorberSpecs::factory(EnergyPlusData &state, std return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("LocalIndirectAbsorptionChillerFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError( + state, EnergyPlus::format("LocalIndirectAbsorptionChillerFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -160,14 +161,15 @@ void IndirectAbsorberSpecs::simulate( FirstHVACIteration); } else { - ShowFatalError(state, - format("SimIndirectAbsorber: Invalid LoopNum passed={}, Unit name={}, stored chilled water loop={}, stored condenser " - "water loop={}, stored generator loop={}", - calledFromLocation.loopNum, - this->Name, - this->CWPlantLoc.loopNum, - this->CDPlantLoc.loopNum, - this->GenPlantLoc.loopNum)); + ShowFatalError( + state, + EnergyPlus::format("SimIndirectAbsorber: Invalid LoopNum passed={}, Unit name={}, stored chilled water loop={}, stored condenser " + "water loop={}, stored generator loop={}", + calledFromLocation.loopNum, + this->Name, + this->CWPlantLoc.loopNum, + this->CDPlantLoc.loopNum, + this->GenPlantLoc.loopNum)); } } @@ -227,7 +229,7 @@ void GetIndirectAbsorberInput(EnergyPlusData &state) int NumIndirectAbsorbers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (NumIndirectAbsorbers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); // See if load distribution manager has already gotten the input ErrorsFound = true; } @@ -271,8 +273,10 @@ void GetIndirectAbsorberInput(EnergyPlusData &state) thisChiller.NomPumpPowerWasAutoSized = true; } if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } // Assign Node Numbers to specified nodes @@ -359,9 +363,10 @@ void GetIndirectAbsorberInput(EnergyPlusData &state) thisChiller.GenHeatSourceType = DataLoopNode::NodeFluidType::Steam; thisChiller.steam = Fluid::GetSteam(state); } else { - ShowWarningError(state, format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, + EnergyPlus::format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "...Generator heat source type must be Steam or Hot Water."); - ShowContinueError(state, format("...Entered generator heat source type = {}", state.dataIPShortCut->cAlphaArgs(16))); + ShowContinueError(state, EnergyPlus::format("...Entered generator heat source type = {}", state.dataIPShortCut->cAlphaArgs(16))); ErrorsFound = true; } } else { @@ -431,15 +436,17 @@ void GetIndirectAbsorberInput(EnergyPlusData &state) "Steam Nodes"); } } else if (state.dataIPShortCut->cAlphaArgs(9).empty() != state.dataIPShortCut->cAlphaArgs(10).empty()) { - ShowWarningError(state, format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, + EnergyPlus::format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "...Generator fluid nodes must both be entered (or both left blank)."); - ShowContinueError(state, format("...Generator fluid inlet node = {}", state.dataIPShortCut->cAlphaArgs(9))); - ShowContinueError(state, format("...Generator fluid outlet node = {}", state.dataIPShortCut->cAlphaArgs(10))); + ShowContinueError(state, EnergyPlus::format("...Generator fluid inlet node = {}", state.dataIPShortCut->cAlphaArgs(9))); + ShowContinueError(state, EnergyPlus::format("...Generator fluid outlet node = {}", state.dataIPShortCut->cAlphaArgs(10))); ErrorsFound = true; } else { // Generator fluid type must be steam if generator inlet/outlet nodes are not used if (thisChiller.GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - ShowWarningError(state, format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, + EnergyPlus::format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "...Generator fluid type must be Steam if generator inlet/outlet nodes are blank."); ShowContinueError(state, "...Generator fluid type is set to Steam and the simulation continues."); thisChiller.GenHeatSourceType = DataLoopNode::NodeFluidType::Steam; @@ -449,9 +456,11 @@ void GetIndirectAbsorberInput(EnergyPlusData &state) { thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(6))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); 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; @@ -541,7 +550,8 @@ void GetIndirectAbsorberInput(EnergyPlusData &state) } if (thisChiller.GeneratorVolFlowRate == 0.0 && thisChiller.GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - ShowWarningError(state, format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, + EnergyPlus::format("{}, Name={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "...Generator water flow rate must be greater than 0 when absorber generator fluid type is hot water."); ErrorsFound = true; } @@ -837,7 +847,8 @@ void IndirectAbsorberSpecs::oneTimeInit(EnergyPlusData &state) (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 ... "); @@ -850,8 +861,8 @@ void IndirectAbsorberSpecs::oneTimeInit(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 "); @@ -1079,9 +1090,11 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerAbsorptionIndirect: 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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1095,7 +1108,7 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (this->NomCapWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Absorption Chiller nominal capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); ErrorsFound = true; } } else { @@ -1135,9 +1148,11 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) NomPumpPowerUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomPumpPower - NomPumpPowerUser) / NomPumpPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Pumping Power of {:.2R} [W]", NomPumpPowerUser)); - ShowContinueError(state, format("differs from Design Size Nominal Pumping Power of {:.2R} [W]", tmpNomPumpPower)); + ShowMessage( + state, EnergyPlus::format("SizeChillerAbsorptionIndirect: 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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1187,11 +1202,14 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectricIndirect: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerElectricIndirect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1205,7 +1223,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, format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); ErrorsFound = true; } } else { @@ -1272,11 +1290,15 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + state, + EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1291,7 +1313,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, format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); ErrorsFound = true; } } else { @@ -1359,14 +1381,16 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpGeneratorVolFlowRate - GeneratorVolFlowRateUser) / GeneratorVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + EnergyPlus::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)); ShowContinueError( state, - format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", GeneratorVolFlowRateUser)); - ShowContinueError(state, - format("differs from Design Size Design Generator Fluid Flow Rate of {:.5R} [m3/s]", - tmpGeneratorVolFlowRate)); + EnergyPlus::format("differs from Design Size Design Generator Fluid Flow Rate of {:.5R} [m3/s]", + tmpGeneratorVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); @@ -1432,14 +1456,16 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpGeneratorVolFlowRate - GeneratorVolFlowRateUser) / GeneratorVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + EnergyPlus::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)); ShowContinueError( state, - format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", GeneratorVolFlowRateUser)); - ShowContinueError(state, - format("differs from Design Size Design Generator Fluid Flow Rate of {:.5R} [m3/s]", - tmpGeneratorVolFlowRate)); + EnergyPlus::format("differs from Design Size Design Generator Fluid Flow Rate of {:.5R} [m3/s]", + tmpGeneratorVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); @@ -1466,7 +1492,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, format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); ErrorsFound = true; } } else { @@ -1617,11 +1643,12 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool if (!state.dataGlobal->WarmupFlag) { if (this->MinCondInletTempCtr < 1) { ++this->MinCondInletTempCtr; - ShowWarningError(state, format("Chiller:Absorption:Indirect \"{}\"", this->Name)); - ShowContinueError(state, - format("...Entering condenser water temperature below specified minimum ({:.3R} C).", this->MinCondInletTemp)); + ShowWarningError(state, EnergyPlus::format("Chiller:Absorption:Indirect \"{}\"", this->Name)); ShowContinueError( - state, format("...Entering condenser water temperature = {:.3R} C.", state.dataLoopNodes->Node(this->CondInletNodeNum).Temp)); + state, EnergyPlus::format("...Entering condenser water temperature below specified minimum ({:.3R} C).", this->MinCondInletTemp)); + ShowContinueError(state, + EnergyPlus::format("...Entering condenser water temperature = {:.3R} C.", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp)); ShowContinueErrorTimeStamp(state, "...simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -1639,12 +1666,13 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool if (!state.dataGlobal->WarmupFlag) { if (this->MinGenInletTempCtr < 1) { ++this->MinGenInletTempCtr; - ShowWarningError(state, format("Chiller:Absorption:Indirect \"{}\"", this->Name)); - ShowContinueError( - state, format("...Entering generator fluid temperature below specified minimum ({:.3R} C).", this->MinGeneratorInletTemp)); - ShowContinueError( - state, - format("...Entering generator fluid temperature = {:.3R} C.", state.dataLoopNodes->Node(this->GeneratorInletNodeNum).Temp)); + ShowWarningError(state, EnergyPlus::format("Chiller:Absorption:Indirect \"{}\"", this->Name)); + ShowContinueError(state, + EnergyPlus::format("...Entering generator fluid temperature below specified minimum ({:.3R} C).", + this->MinGeneratorInletTemp)); + ShowContinueError(state, + EnergyPlus::format("...Entering generator fluid temperature = {:.3R} C.", + state.dataLoopNodes->Node(this->GeneratorInletNodeNum).Temp)); ShowContinueErrorTimeStamp(state, "...simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, diff --git a/src/EnergyPlus/ChillerReformulatedEIR.cc b/src/EnergyPlus/ChillerReformulatedEIR.cc index d6e386ec431..f6d7626995e 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.cc +++ b/src/EnergyPlus/ChillerReformulatedEIR.cc @@ -126,7 +126,9 @@ ReformulatedEIRChillerSpecs *ReformulatedEIRChillerSpecs::factory(EnergyPlusData return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("LocalReformulatedElectEIRChillerFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError( + state, + EnergyPlus::format("LocalReformulatedElectEIRChillerFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -233,7 +235,7 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) int NumElecReformEIRChillers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumElecReformEIRChillers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -270,16 +272,16 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) thisChiller.ChillerCapFTIndex = Curve::GetCurveIndex(state, s_ipsc->cAlphaArgs(2)); thisChiller.CAPFTName = s_ipsc->cAlphaArgs(2); if (thisChiller.ChillerCapFTIndex == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } thisChiller.ChillerEIRFTIndex = Curve::GetCurveIndex(state, s_ipsc->cAlphaArgs(3)); thisChiller.EIRFTName = s_ipsc->cAlphaArgs(3); if (thisChiller.ChillerEIRFTIndex == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); ErrorsFound = true; } @@ -294,8 +296,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) thisChiller.EIRFPLRName = s_ipsc->cAlphaArgs(5); thisChiller.ChillerEIRFPLRIndex = Curve::GetCurveIndex(state, s_ipsc->cAlphaArgs(5)); if (thisChiller.ChillerEIRFPLRIndex == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); ErrorsFound = true; } @@ -306,25 +308,25 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } else if (Util::SameString(PartLoadCurveType, "Lift") && state.dataCurveManager->curves(thisChiller.ChillerEIRFPLRIndex)->numDims == 3) { thisChiller.PartLoadCurveType = PLR::Lift; } else { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("Invalid {}={} for {}={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("Invalid {}={} for {}={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ErrorsFound = true; } // Chilled water inlet/outlet node names are necessary if (s_ipsc->lAlphaFieldBlanks(6)) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is blank.", s_ipsc->cAlphaFieldNames(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is blank.", s_ipsc->cAlphaFieldNames(6))); ErrorsFound = true; } if (s_ipsc->lAlphaFieldBlanks(7)) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is blank.", s_ipsc->cAlphaFieldNames(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is blank.", s_ipsc->cAlphaFieldNames(7))); ErrorsFound = true; } @@ -353,13 +355,13 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) // Condenser inlet/outlet node names are necessary if (s_ipsc->lAlphaFieldBlanks(8)) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is blank.", s_ipsc->cAlphaFieldNames(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is blank.", s_ipsc->cAlphaFieldNames(8))); ErrorsFound = true; } if (s_ipsc->lAlphaFieldBlanks(9)) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is blank.", s_ipsc->cAlphaFieldNames(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is blank.", s_ipsc->cAlphaFieldNames(9))); ErrorsFound = true; } @@ -388,8 +390,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) { thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, s_ipsc->cAlphaArgs(10))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(10), s_ipsc->cAlphaArgs(10))); + 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))); 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; @@ -402,28 +404,28 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) thisChiller.RefCapWasAutoSized = true; } if (s_ipsc->rNumericArgs(1) == 0.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); + ShowSevereError(state, EnergyPlus::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, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); + ShowSevereError(state, EnergyPlus::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; } thisChiller.TempRefEvapOut = s_ipsc->rNumericArgs(3); thisChiller.TempRefCondOut = s_ipsc->rNumericArgs(4); if (thisChiller.TempRefEvapOut >= thisChiller.TempRefCondOut) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("{} [{:.2R}] >= {} [{:.2R}]", - s_ipsc->cNumericFieldNames(3), - s_ipsc->rNumericArgs(3), - s_ipsc->cNumericFieldNames(4), - s_ipsc->rNumericArgs(4))); + EnergyPlus::format("{} [{:.2R}] >= {} [{:.2R}]", + s_ipsc->cNumericFieldNames(3), + s_ipsc->rNumericArgs(3), + s_ipsc->cNumericFieldNames(4), + s_ipsc->rNumericArgs(4))); ShowContinueError(state, "Reference Leaving Chilled Water Temperature must be less than Reference Leaving Condenser Water Temperature "); ErrorsFound = true; } @@ -446,43 +448,46 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if (thisChiller.MinPartLoadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("{} [{:.3R}] > {} [{:.3R}]", - s_ipsc->cNumericFieldNames(7), - s_ipsc->rNumericArgs(7), - s_ipsc->cNumericFieldNames(8), - s_ipsc->rNumericArgs(8))); + EnergyPlus::format("{} [{:.3R}] > {} [{:.3R}]", + s_ipsc->cNumericFieldNames(7), + s_ipsc->rNumericArgs(7), + s_ipsc->cNumericFieldNames(8), + s_ipsc->rNumericArgs(8))); ShowContinueError(state, "Minimum part load ratio must be less than or equal to the maximum part load ratio "); ErrorsFound = true; } if (thisChiller.MinUnloadRat < thisChiller.MinPartLoadRat || thisChiller.MinUnloadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.3R}", s_ipsc->cNumericFieldNames(10), s_ipsc->rNumericArgs(10))); - ShowContinueError(state, - format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(7))); - ShowContinueError(state, - format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(8))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } if (thisChiller.OptPartLoadRat < thisChiller.MinPartLoadRat || thisChiller.OptPartLoadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.3R}", s_ipsc->cNumericFieldNames(9), s_ipsc->rNumericArgs(9))); - ShowContinueError(state, - format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(7))); - ShowContinueError(state, format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(8))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } thisChiller.CompPowerToCondenserFrac = s_ipsc->rNumericArgs(11); if (thisChiller.CompPowerToCondenserFrac < 0.0 || thisChiller.CompPowerToCondenserFrac > 1.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.3R}", s_ipsc->cNumericFieldNames(11), s_ipsc->rNumericArgs(11))); - ShowContinueError(state, format("{} must be greater than or equal to zero", s_ipsc->cNumericFieldNames(11))); - ShowContinueError(state, format("{} must be less than or equal to one", s_ipsc->cNumericFieldNames(11))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } @@ -505,8 +510,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); + 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))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -519,8 +524,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); + 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))); ErrorsFound = true; } @@ -572,7 +577,7 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) thisChiller.HeatRecInletNodeNum = 0; thisChiller.HeatRecOutletNodeNum = 0; if ((!s_ipsc->lAlphaFieldBlanks(11)) || (!s_ipsc->lAlphaFieldBlanks(12))) { - ShowWarningError(state, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::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."); } @@ -592,8 +597,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if (thisChiller.CondenserFlowControl == DataPlant::CondenserFlowControl::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(16), s_ipsc->cAlphaArgs(16))); + 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))); ShowContinueError(state, "Available choices are ConstantFlow, ModulatedChillerPLR, ModulatedLoopPLR, or ModulatedDeltaTemperature"); thisChiller.CondenserFlowControl = DataPlant::CondenserFlowControl::ConstantFlow; ErrorsFound = true; @@ -604,8 +609,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if ((thisChiller.ChillerCondLoopFlowFLoopPLRIndex == 0) && (thisChiller.CondenserFlowControl == DataPlant::CondenserFlowControl::ModulatedLoopPLR)) { - ShowSevereError(state, format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(17), s_ipsc->cAlphaArgs(17))); + 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))); ErrorsFound = true; } @@ -623,8 +628,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, format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, thisChiller.Name)); - ShowContinueError(state, format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(19), s_ipsc->cAlphaArgs(19))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, thisChiller.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(19), s_ipsc->cAlphaArgs(19))); ErrorsFound = true; } } @@ -632,7 +637,7 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); } } @@ -940,7 +945,8 @@ void ReformulatedEIRChillerSpecs::oneTimeInit(EnergyPlusData &state) (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 ... "); @@ -953,8 +959,8 @@ void ReformulatedEIRChillerSpecs::oneTimeInit(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (fatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 "); @@ -1159,11 +1165,14 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Reference Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + EnergyPlus::format("SizeChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", + this->Name)); ShowContinueError( - state, format("differs from Design Size Reference Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + state, + EnergyPlus::format("User-Specified Reference Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Reference Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1176,7 +1185,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, format("Occurs in Reformulated Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Reformulated Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && @@ -1233,9 +1242,10 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - RefCapUser) / RefCapUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Reference Capacity of {:.2R} [W]", RefCapUser)); - ShowContinueError(state, format("differs from Design Size Reference Capacity of {:.2R} [W]", tmpNomCap)); + EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1248,7 +1258,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, format("Occurs in Reformulated Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Reformulated Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->RefCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->RefCap > 0.0)) { @@ -1302,12 +1312,14 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Reference Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + EnergyPlus::format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", + this->Name)); ShowContinueError( state, - format("differs from Design Size Reference Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + EnergyPlus::format("User-Specified Reference Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Reference Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1322,7 +1334,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, format("Occurs in Reformulated Electric EIR Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Reformulated Electric EIR Chiller object={}", this->Name)); ErrorsFound = true; } tmpCondVolFlowRate = this->CondVolFlowRateWasAutoSized ? this->RefCap * 0.000114 : this->CondVolFlowRate; @@ -1393,13 +1405,14 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if ((std::abs(tmpHeatRecVolFlowRate - DesignHeatRecVolFlowRateUser) / DesignHeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, - format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", DesignHeatRecVolFlowRateUser)); - ShowContinueError( - state, - format("differs from Design Size Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", tmpHeatRecVolFlowRate)); + EnergyPlus::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)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", + tmpHeatRecVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1511,8 +1524,9 @@ 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, format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } Curve::GetCurveMinMaxValues(state, this->ChillerCapFTIndex, @@ -1526,8 +1540,9 @@ 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, format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } Curve::GetCurveMinMaxValues(state, this->ChillerEIRFTIndex, @@ -1546,8 +1561,9 @@ 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, format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } if (this->PartLoadCurveType == PLR::LeavingCondenserWaterTemperature) { @@ -1570,19 +1586,19 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if (this->ChillerEIRFPLRPLRMin < 0 || this->ChillerEIRFPLRPLRMin >= this->ChillerEIRFPLRPLRMax || this->ChillerEIRFPLRPLRMin > 1) { ShowSevereError(state, - format("Invalid minimum value of PLR = {:.3T} in bicubic curve = {} which is used", - this->ChillerEIRFPLRPLRMin, - this->EIRFPLRName)); - ShowContinueError(state, format("by Chiller:Electric:ReformulatedEIR = {}.", equipName)); + 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)); 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, - format("Invalid maximum value of PLR = {:.3T} in bicubic curve = {} which is used", - this->ChillerEIRFPLRPLRMax, - this->EIRFPLRName)); - ShowContinueError(state, format("by Chiller:Electric:ReformulatedEIR = {}.", equipName)); + 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)); 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; } @@ -1629,7 +1645,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, format("for Chiller:Electric:ReformulatedEIR = {}.", equipName)); + ShowContinueError(state, EnergyPlus::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"); @@ -1763,8 +1779,9 @@ void ReformulatedEIRChillerSpecs::control(EnergyPlusData &state, Real64 &MyLoad, if (this->IterLimitExceededNum == 1) { ShowWarningError( state, - format("{}: Iteration limit exceeded calculating condenser outlet temperature and non-converged temperature is used", - this->Name)); + EnergyPlus::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.", @@ -1777,11 +1794,13 @@ void ReformulatedEIRChillerSpecs::control(EnergyPlusData &state, Real64 &MyLoad, if (!state.dataGlobal->WarmupFlag) { ++this->IterFailed; if (this->IterFailed == 1) { - ShowWarningError(state, - format("{}: Solution found when calculating condenser outlet temperature. The inlet temperature will used " - "and the simulation continues...", - this->Name)); - ShowContinueError(state, format("Please check minimum and maximum values of x in EIRFPLR Curve {}", this->EIRFPLRName)); + 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)); } else { ShowRecurringWarningErrorAtEnd(state, this->Name + ": Solution is not found in calculating condenser outlet temperature.", @@ -2442,9 +2461,9 @@ void ReformulatedEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoa } } else { ShowFatalError(state, - format("{}: The ModulatedLoopPLR condenser flow control requires a Sizing:Plant object for " - "both loops connected to the condenser and evaporator of the chiller.", - RoutineName)); + 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)); } } break; case DataPlant::CondenserFlowControl::ModulatedDeltaTemperature: { @@ -2475,7 +2494,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, format("ControlReformEIRChillerModel: Condenser flow = 0, for ElecReformEIRChiller={}", this->Name)); + ShowSevereError(state, EnergyPlus::format("ControlReformEIRChillerModel: Condenser flow = 0, for ElecReformEIRChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } } @@ -2512,12 +2531,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->CAPFTXIter == 1) { ShowWarningError( state, - format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The evaporator outlet temperature ({:.2T} 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, format("The range specified = {:.2T} C to {:.2T} C.", CAPFTXTmin, CAPFTXTmax)); + EnergyPlus::format( + "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The evaporator outlet temperature ({:.2T} 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)); ShowRecurringWarningErrorAtEnd(state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + "\": The evap outlet temp range in Cooling Capacity Function of Temp curve error continues.", @@ -2539,12 +2559,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->EIRFTXIter == 1) { ShowWarningError( state, - format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The evaporator outlet temperature ({:.2T} 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, format("The range specified = {:.2T} C to {:.2T} C.", EIRFTXTmin, EIRFTXTmax)); + EnergyPlus::format( + "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The evaporator outlet temperature ({:.2T} 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)); ShowRecurringWarningErrorAtEnd( state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + @@ -2599,12 +2620,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->CAPFTYIter == 1) { ShowWarningError( state, - 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, format("The range specified = {:.2T} C to {:.2T} C.", CAPFTYTmin, CAPFTYTmax)); + 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)); ShowRecurringWarningErrorAtEnd(state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + "\": The cond outlet temp range in Cooling Capacity Function of Temp curve error continues.", @@ -2626,12 +2648,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->EIRFTYIter == 1) { ShowWarningError( state, - format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The condenser outlet temperature ({:.2T} 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, format("The range specified = {:.2T} C to {:.2T} C.", EIRFTYTmin, EIRFTYTmax)); + EnergyPlus::format( + "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The condenser outlet temperature ({:.2T} 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)); ShowRecurringWarningErrorAtEnd( state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + @@ -2654,14 +2677,15 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->CondOutletTemp < EIRFPLRTmin || this->CondOutletTemp > EIRFPLRTmax) { ++this->EIRFPLRTIter; if (this->EIRFPLRTIter == 1) { - ShowWarningError(state, - 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, format("The range specified = {:.2T} C to {:.2T} C.", EIRFPLRTmin, EIRFPLRTmax)); + 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)); ShowRecurringWarningErrorAtEnd( state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + @@ -2686,12 +2710,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->EIRFPLRPLRIter == 1) { ShowWarningError( state, - 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, format("The range specified = {:.3T} to {:.3T}.", EIRFPLRPLRmin, EIRFPLRPLRmax)); + 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)); ShowRecurringWarningErrorAtEnd( state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + @@ -2743,12 +2768,14 @@ 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, format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); - ShowContinueError(state, format(" Chiller Capacity as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerCapFT)); - ShowContinueError(state, - format(" Negative value occurs using an Evaporator Leaving Temp of {:.1R} and a Condenser Leaving Temp of {:.1R}.", - EvapOutletTempSetPoint, - this->CondOutletTemp)); + ShowWarningError(state, EnergyPlus::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( + state, + EnergyPlus::format(" Negative value occurs using an Evaporator Leaving Temp of {:.1R} and a Condenser Leaving Temp of {:.1R}.", + EvapOutletTempSetPoint, + this->CondOutletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } else if (this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerCapFTError; @@ -2766,13 +2793,15 @@ 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, format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); + ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); ShowContinueError( - state, format(" Reformulated Chiller EIR as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerEIRFT)); - ShowContinueError(state, - format(" Negative value occurs using an Evaporator Leaving Temp of {:.1R} and a Condenser Leaving Temp of {:.1R}.", - this->EvapOutletTemp, - this->CondOutletTemp)); + state, + EnergyPlus::format(" Reformulated Chiller EIR as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerEIRFT)); + ShowContinueError( + state, + EnergyPlus::format(" Negative value occurs using an Evaporator Leaving Temp of {:.1R} and a Condenser Leaving Temp of {:.1R}.", + this->EvapOutletTemp, + this->CondOutletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } else if (this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerEIRFTError; @@ -2814,14 +2843,15 @@ 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, format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); + ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); ShowContinueError( state, - format(" Chiller EIR as a function of PLR and condenser water temperature curve output is negative ({:.3R}).", this->ChillerEIRFPLR)); + EnergyPlus::format(" Chiller EIR as a function of PLR and condenser water temperature curve output is negative ({:.3R}).", + this->ChillerEIRFPLR)); ShowContinueError(state, - format(" Negative value occurs using a part-load ratio of {:.3R} and a Condenser Leaving Temp of {:.1R} C.", - this->ChillerPartLoadRatio, - this->CondOutletTemp)); + EnergyPlus::format(" Negative value occurs using a part-load ratio of {:.3R} and a Condenser Leaving Temp of {:.1R} C.", + this->ChillerPartLoadRatio, + this->CondOutletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } else if (this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerEIRFPLRError; diff --git a/src/EnergyPlus/Coils/CoilCoolingDX.cc b/src/EnergyPlus/Coils/CoilCoolingDX.cc index ca09fee4a15..4a4a1233253 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDX.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDX.cc @@ -92,7 +92,7 @@ std::shared_ptr CoilCoolingDX::makePerformanceSubc return std::make_shared(state, performance_object_name); } - ShowFatalError(state, format("Could not find Coil:Cooling:DX:Performance object with name: {}", performance_object_name)); + ShowFatalError(state, EnergyPlus::format("Could not find Coil:Cooling:DX:Performance object with name: {}", performance_object_name)); return nullptr; } @@ -323,14 +323,14 @@ void CoilCoolingDX::oneTimeInit(EnergyPlusData &state) if (this->performance->compressorFuelType != Constant::eFuel::Electricity) { std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->performance->compressorFuelType)]; SetupOutputVariable(state, - format("Cooling Coil {} Rate", sFuelType), + EnergyPlus::format("Cooling Coil {} Rate", sFuelType), Constant::Units::W, this->performance->compressorFuelRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Cooling Coil {} Energy", sFuelType), + EnergyPlus::format("Cooling Coil {} Energy", sFuelType), Constant::Units::J, this->performance->compressorFuelConsumption, OutputProcessor::TimeStepType::System, diff --git a/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc b/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc index c2c9be686ba..0e54d002e39 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc @@ -80,7 +80,7 @@ CoilCoolingDX205Performance::CoilCoolingDX205Performance(EnergyPlus::EnergyPlusD auto &ip = state.dataInputProcessing->inputProcessor; int numPerformances = ip->getNumObjectsFound(state, CoilCoolingDX205Performance::object_name); if (numPerformances <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); errorsFound = true; } auto const &Coil205PerformanceInstances = ip->epJSON.find(state.dataIPShortCut->cCurrentModuleObject).value(); @@ -91,7 +91,7 @@ CoilCoolingDX205Performance::CoilCoolingDX205Performance(EnergyPlus::EnergyPlusD name = instance.key(); if (!Util::SameString(name_to_find, name)) { - ShowFatalError(state, format("Could not find Coil:Cooling:DX:Performance object with name: {}", name_to_find)); + ShowFatalError(state, EnergyPlus::format("Could not find Coil:Cooling:DX:Performance object with name: {}", name_to_find)); } std::string const rep_file_name = ip->getAlphaFieldValue(fields, objectSchemaProps, "representation_file_name"); @@ -104,12 +104,12 @@ CoilCoolingDX205Performance::CoilCoolingDX205Performance(EnergyPlus::EnergyPlusD ShowFatalError(state, "Program terminates due to the missing ASHRAE 205 RS0004 representation file."); } std::shared_ptr coil_logger = std::make_shared(); - logger_context = {&state, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, name)}; + logger_context = {&state, EnergyPlus::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, name)}; coil_logger->set_message_context(&logger_context); representation = std::dynamic_pointer_cast(RSInstanceFactory::create("RS0004", rep_file_path.string().c_str(), coil_logger)); if (nullptr == representation) { - ShowSevereError(state, format("{} is not an instance of an ASHRAE205 Coil.", rep_file_path.string())); + ShowSevereError(state, EnergyPlus::format("{} is not an instance of an ASHRAE205 Coil.", rep_file_path.string())); errorsFound = true; } else { representation->performance.performance_map_cooling.get_logger()->set_message_context(&logger_context); @@ -135,9 +135,10 @@ CoilCoolingDX205Performance::CoilCoolingDX205Performance(EnergyPlus::EnergyPlusD rated_total_cooling_capacity = ratedTotalCapacityAtSpeedIndex(state, nominal_speed_index); if (errorsFound) { - ShowFatalError( - state, - format("{} Errors found in getting {} input. Preceding condition(s) causes termination.", std::string{routineName}, object_name)); + ShowFatalError(state, + EnergyPlus::format("{} Errors found in getting {} input. Preceding condition(s) causes termination.", + std::string{routineName}, + object_name)); } } } diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc index 06f168f67da..903f6131dd4 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc @@ -84,8 +84,8 @@ void CoilCoolingDXCurveFitPerformance::instantiateFromInputSpec(EnergyPlus::Ener } else if (Util::SameString(input_data.capacity_control, "DISCRETE")) { this->capControlMethod = CapControlMethod::DISCRETE; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", routineName, this->object_name, this->name)); - ShowContinueError(state, format("...Capacity Control Method=\"{}\":", input_data.capacity_control)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", routineName, this->object_name, this->name)); + ShowContinueError(state, EnergyPlus::format("...Capacity Control Method=\"{}\":", input_data.capacity_control)); ShowContinueError(state, "...must be Discrete or Continuous."); errorsFound = true; } @@ -107,8 +107,8 @@ void CoilCoolingDXCurveFitPerformance::instantiateFromInputSpec(EnergyPlus::Ener // Validate fuel type input this->compressorFuelType = static_cast(getEnumValue(Constant::eFuelNamesUC, Util::makeUPPER(input_data.compressor_fuel_type))); if (this->compressorFuelType == Constant::eFuel::Invalid) { - ShowSevereError(state, format("{} {} =\"{}\" invalid", std::string{routineName}, this->object_name, this->name)); - ShowContinueError(state, format("...Compressor Fuel Type=\"{}\".", input_data.compressor_fuel_type)); + ShowSevereError(state, EnergyPlus::format("{} {} =\"{}\" invalid", std::string{routineName}, this->object_name, this->name)); + ShowContinueError(state, EnergyPlus::format("...Compressor Fuel Type=\"{}\".", input_data.compressor_fuel_type)); errorsFound = true; } @@ -126,11 +126,11 @@ void CoilCoolingDXCurveFitPerformance::instantiateFromInputSpec(EnergyPlus::Ener Curve::GetCurveIndex(state, input_data.outdoor_temperature_dependent_crankcase_heater_capacity_curve_name); if (this->crankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve ShowSevereError(state, - format("{} = {}: {} not found = {}", - this->object_name, - this->name, - "Crankcase Heater Capacity Function of Temperature Curve Name", - input_data.outdoor_temperature_dependent_crankcase_heater_capacity_curve_name)); + EnergyPlus::format("{} = {}: {} not found = {}", + this->object_name, + this->name, + "Crankcase Heater Capacity Function of Temperature Curve Name", + input_data.outdoor_temperature_dependent_crankcase_heater_capacity_curve_name)); errorsFound = true; } else { @@ -145,9 +145,10 @@ void CoilCoolingDXCurveFitPerformance::instantiateFromInputSpec(EnergyPlus::Ener } } if (errorsFound) { - ShowFatalError( - state, - format("{} Errors found in getting {} input. Preceding condition(s) causes termination.", std::string{routineName}, this->object_name)); + ShowFatalError(state, + EnergyPlus::format("{} Errors found in getting {} input. Preceding condition(s) causes termination.", + std::string{routineName}, + this->object_name)); } } @@ -210,7 +211,7 @@ CoilCoolingDXCurveFitPerformance::CoilCoolingDXCurveFitPerformance(EnergyPlus::E } if (!found_it) { - ShowFatalError(state, format("Could not find Coil:Cooling:DX:Performance object with name: {}", name_to_find)); + ShowFatalError(state, EnergyPlus::format("Could not find Coil:Cooling:DX:Performance object with name: {}", name_to_find)); } } @@ -622,7 +623,8 @@ void CoilCoolingDXCurveFitPerformance::calcStandardRatings210240(EnergyPlus::Ene } else { ShowSevereError( state, - format("Standard Ratings: Coil:Cooling:DX {} has zero rated total cooling capacity. Standard ratings cannot be calculated.", this->name)); + EnergyPlus::format("Standard Ratings: Coil:Cooling:DX {} has zero rated total cooling capacity. Standard ratings cannot be calculated.", + this->name)); } } @@ -637,16 +639,18 @@ void CoilCoolingDXCurveFitPerformance::setOperMode(EnergyPlus::EnergyPlusData &s currentMode.speeds[speedNum].parentOperatingMode = mode; if (mode == 2) { if (currentMode.speeds[speedNum].indexSHRFT == 0) { - ShowSevereError(state, - format("{}=\"{}\", Curve check:", currentMode.speeds[speedNum].object_name, currentMode.speeds[speedNum].name)); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", Curve check:", currentMode.speeds[speedNum].object_name, currentMode.speeds[speedNum].name)); ShowContinueError(state, "The input of Sensible Heat Ratio Modifier Function of Temperature Curve Name is required, but not available for " "SubcoolReheat mode. Please input"); errorsFound = true; } if (currentMode.speeds[speedNum].indexSHRFFF == 0) { - ShowSevereError(state, - format("{}=\"{}\", Curve check:", currentMode.speeds[speedNum].object_name, currentMode.speeds[speedNum].name)); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", Curve check:", currentMode.speeds[speedNum].object_name, currentMode.speeds[speedNum].name)); ShowContinueError(state, "The input of Sensible Heat Ratio Modifier Function of Flow Fraction Curve Name is required, but not available for " "SubcoolReheat mode. Please input"); @@ -655,16 +659,18 @@ void CoilCoolingDXCurveFitPerformance::setOperMode(EnergyPlus::EnergyPlusData &s } if (mode == 3) { if (currentMode.speeds[speedNum].indexSHRFT == 0) { - ShowSevereError(state, - format("{}=\"{}\", Curve check:", currentMode.speeds[speedNum].object_name, currentMode.speeds[speedNum].name)); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", Curve check:", currentMode.speeds[speedNum].object_name, currentMode.speeds[speedNum].name)); ShowContinueError(state, "The input of Sensible Heat Ratio Modifier Function of Temperature Curve Name is required, but not available for " "SubcoolReheat mode. Please input"); errorsFound = true; } if (currentMode.speeds[speedNum].indexSHRFFF == 0) { - ShowSevereError(state, - format("{}=\"{}\", Curve check:", currentMode.speeds[speedNum].object_name, currentMode.speeds[speedNum].name)); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", Curve check:", currentMode.speeds[speedNum].object_name, currentMode.speeds[speedNum].name)); ShowContinueError(state, "The input of Sensible Heat Ratio Modifier Function of Flow Fraction Curve Name is required, but not available for " "SubcoolReheat mode. Please input"); @@ -673,9 +679,10 @@ void CoilCoolingDXCurveFitPerformance::setOperMode(EnergyPlus::EnergyPlusData &s } } if (errorsFound) { - ShowFatalError(state, - format("CoilCoolingDXCurveFitPerformance: Errors found in getting {} input. Preceding condition(s) causes termination.", - this->object_name)); + ShowFatalError( + state, + EnergyPlus::format("CoilCoolingDXCurveFitPerformance: Errors found in getting {} input. Preceding condition(s) causes termination.", + this->object_name)); } } diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc index d32ba746eba..d470685fa5e 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc @@ -150,7 +150,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, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } @@ -181,17 +181,21 @@ void CoilCoolingDXCurveFitSpeed::instantiateFromInputSpec(EnergyPlus::EnergyPlus CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", routineName, this->object_name, this->name)); - ShowContinueError(state, format("...{}=\"{}\" has out of range value.", fieldName, input_data.part_load_fraction_correlation_curve_name)); - ShowContinueError(state, format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", routineName, this->object_name, this->name)); + 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)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, this->indexPLRFPLF, errorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", routineName, this->object_name, this->name)); - ShowContinueError(state, format("...{}=\"{}\" has out of range value.", fieldName, input_data.part_load_fraction_correlation_curve_name)); - ShowContinueError(state, format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", routineName, this->object_name, this->name)); + 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)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, this->indexPLRFPLF, errorsFound, 1.0); } @@ -625,19 +629,20 @@ Real64 CoilCoolingDXCurveFitSpeed::CalcBypassFactor(EnergyPlus::EnergyPlusData & ShowContinueError(state, "capacity, increase the rated air volume flow rate, or reduce the rated sensible heat ratio for this coil."); ShowContinueError(state, "If autosizing, it is recommended that all three of these values be autosized."); ShowContinueError(state, "...Inputs used for calculating cooling coil bypass factor."); - ShowContinueError(state, format("...Inlet Air Temperature = {:.2R} C", tdb)); - ShowContinueError(state, format("...Outlet Air Temperature = {:.2R} C", outtdb)); - ShowContinueError(state, format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", w)); - ShowContinueError(state, format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", outw)); - ShowContinueError(state, format("...Total Cooling Capacity used in calculation = {:.2R} W", q)); - ShowContinueError(state, format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", airMassFlowRate)); - ShowContinueError(state, format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", this->evap_air_flow_rate)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Temperature = {:.2R} C", tdb)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Temperature = {:.2R} C", outtdb)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", w)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", outw)); + ShowContinueError(state, EnergyPlus::format("...Total Cooling Capacity used in calculation = {:.2R} W", q)); + ShowContinueError(state, EnergyPlus::format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", airMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", this->evap_air_flow_rate)); if (q > 0.0) { if (((this->minRatedVolFlowPerRatedTotCap - this->evap_air_flow_rate / q) > SmallDifferenceTest) || ((this->evap_air_flow_rate / q - this->maxRatedVolFlowPerRatedTotCap) > SmallDifferenceTest)) { - ShowContinueError(state, - format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", - this->evap_air_flow_rate / q)); + ShowContinueError( + state, + EnergyPlus::format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", + this->evap_air_flow_rate / q)); } } Real64 outletAirTempSat = Psychrometrics::PsyTsatFnHPb(state, outh, outp, RoutineName); @@ -648,8 +653,8 @@ Real64 CoilCoolingDXCurveFitSpeed::CalcBypassFactor(EnergyPlus::EnergyPlusData & ShowWarningError(state, std::string{RoutineName} + object_name + " \"" + name + "\", SHR adjusted to achieve valid outlet air properties and the simulation continues."); - ShowContinueError(state, format("Initial SHR = {:.5R}", this->grossRatedSHR)); - ShowContinueError(state, format("Adjusted SHR = {:.5R}", adjustedSHR)); + ShowContinueError(state, EnergyPlus::format("Initial SHR = {:.5R}", this->grossRatedSHR)); + ShowContinueError(state, EnergyPlus::format("Adjusted SHR = {:.5R}", adjustedSHR)); } } @@ -665,20 +670,21 @@ Real64 CoilCoolingDXCurveFitSpeed::CalcBypassFactor(EnergyPlus::EnergyPlusData & if (slopeAtConds <= 0.0) { ShowSevereError(state, this->object_name + " \"" + this->name + "\""); ShowContinueError(state, "...Invalid slope or outlet air condition when calculating cooling coil bypass factor."); - ShowContinueError(state, format("...Slope = {:.8R}", slopeAtConds)); - ShowContinueError(state, format("...Inlet Air Temperature = {:.2R} C", tdb)); - ShowContinueError(state, format("...Outlet Air Temperature = {:.2R} C", outtdb)); - ShowContinueError(state, format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", w)); - ShowContinueError(state, format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", outw)); - ShowContinueError(state, format("...Total Cooling Capacity used in calculation = {:.2R} W", q)); - ShowContinueError(state, format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", airMassFlowRate)); - ShowContinueError(state, format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", this->evap_air_flow_rate)); + ShowContinueError(state, EnergyPlus::format("...Slope = {:.8R}", slopeAtConds)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Temperature = {:.2R} C", tdb)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Temperature = {:.2R} C", outtdb)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", w)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", outw)); + ShowContinueError(state, EnergyPlus::format("...Total Cooling Capacity used in calculation = {:.2R} W", q)); + ShowContinueError(state, EnergyPlus::format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", airMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", this->evap_air_flow_rate)); if (q > 0.0) { if (((this->minRatedVolFlowPerRatedTotCap - this->evap_air_flow_rate / q) > SmallDifferenceTest) || ((this->evap_air_flow_rate / q - this->maxRatedVolFlowPerRatedTotCap) > SmallDifferenceTest)) { - ShowContinueError(state, - format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", - this->evap_air_flow_rate / q)); + ShowContinueError( + state, + EnergyPlus::format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", + this->evap_air_flow_rate / q)); } } ShowFatalError(state, "Errors found in calculating coil bypass factors"); @@ -723,7 +729,8 @@ Real64 CoilCoolingDXCurveFitSpeed::CalcBypassFactor(EnergyPlus::EnergyPlusData & ShowSevereError(state, std::string{RoutineName} + object_name + " \"" + name + "\" -- coil bypass factor calculation did not converge after max iterations."); - ShowContinueError(state, format("The RatedSHR of [{:.3R}], entered by the user or autosized (see *.eio file),", this->grossRatedSHR)); + ShowContinueError(state, + EnergyPlus::format("The RatedSHR of [{:.3R}], entered by the user or autosized (see *.eio file),", this->grossRatedSHR)); 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"); ShowContinueError(state, "the saturation curve of the psychrometric chart. If the RatedSHR is too low, then this"); diff --git a/src/EnergyPlus/CommandLineInterface.cc b/src/EnergyPlus/CommandLineInterface.cc index ca72e5bd550..88eb5a164b1 100644 --- a/src/EnergyPlus/CommandLineInterface.cc +++ b/src/EnergyPlus/CommandLineInterface.cc @@ -905,7 +905,7 @@ state.dataStrGlobals->inputFilePath='{:g}', if (!rviFileExists) { std::ofstream ofs{RVIfile}; if (!ofs.good()) { - ShowFatalError(state, format("EnergyPlus: Could not open file \"{}\" for output (write).", RVIfile)); + ShowFatalError(state, EnergyPlus::format("EnergyPlus: Could not open file \"{}\" for output (write).", RVIfile)); } else { ofs << FileSystem::toString(state.files.eso.filePath) << '\n'; ofs << FileSystem::toString(state.files.csv.filePath) << '\n'; @@ -916,7 +916,7 @@ state.dataStrGlobals->inputFilePath='{:g}', if (!mviFileExists) { std::ofstream ofs{MVIfile}; if (!ofs.good()) { - ShowFatalError(state, format("EnergyPlus: Could not open file \"{}\" for output (write).", RVIfile)); + ShowFatalError(state, EnergyPlus::format("EnergyPlus: Could not open file \"{}\" for output (write).", RVIfile)); } 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 26c229b2a71..93ed48f082d 100644 --- a/src/EnergyPlus/CondenserLoopTowers.cc +++ b/src/EnergyPlus/CondenserLoopTowers.cc @@ -125,7 +125,7 @@ namespace CondenserLoopTowers { return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("CoolingTowerFactory: Error getting inputs for tower named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("CoolingTowerFactory: Error getting inputs for tower named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -151,7 +151,7 @@ namespace CondenserLoopTowers { this->calculateMerkelVariableSpeedTower(state, CurLoad, RunFlag); break; default: - ShowFatalError(state, format("Plant Equipment Type specified for {} is not a Cooling Tower.", this->Name)); + ShowFatalError(state, EnergyPlus::format("Plant Equipment Type specified for {} is not a Cooling Tower.", this->Name)); } this->calculateWaterUsage(state); this->update(state); @@ -388,7 +388,8 @@ namespace CondenserLoopTowers { tower.BasinHeaterSetPointTemp = 2.0; } if (tower.BasinHeaterSetPointTemp < 2.0) { - ShowWarningCustom(state, eoh, format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(18))); + ShowWarningCustom( + state, eoh, EnergyPlus::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(18))); } } @@ -446,9 +447,9 @@ namespace CondenserLoopTowers { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, tower.OutdoorAirInletNodeNum)) { ShowSevereCustom(state, eoh, - format("Outdoor Air Inlet Node Name not valid Outdoor Air Node= {}" - "does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", - AlphArray(10))); + EnergyPlus::format("Outdoor Air Inlet Node Name not valid Outdoor Air Node= {}" + "does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", + AlphArray(10))); ErrorsFound = true; } } @@ -700,7 +701,8 @@ namespace CondenserLoopTowers { tower.BasinHeaterSetPointTemp = 2.0; } if (tower.BasinHeaterSetPointTemp < 2.0) { - ShowWarningCustom(state, eoh, format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(26))); + ShowWarningCustom( + state, eoh, EnergyPlus::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(26))); } } @@ -785,40 +787,42 @@ namespace CondenserLoopTowers { // Can't tell yet if autosized, check later in initialize. if (tower.HighSpeedAirFlowRate <= tower.LowSpeedAirFlowRate && tower.HighSpeedAirFlowRate != DataSizing::AutoSize) { ShowSevereError(state, - format("{} \"{}\". Low speed air flow rate must be less than the high speed air flow rate.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format("{} \"{}\". Low speed air flow rate must be less than the high speed air flow rate.", + s_ipsc->cCurrentModuleObject, + tower.Name)); ErrorsFound = true; } // Low speed air flow rate must be greater than free convection air flow rate. // Can't tell yet if autosized, check later in initialize. if (tower.LowSpeedAirFlowRate <= tower.FreeConvAirFlowRate && tower.LowSpeedAirFlowRate != DataSizing::AutoSize) { ShowSevereError(state, - format("{} \"{}\". Free convection air flow rate must be less than the low speed air flow rate.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format("{} \"{}\". Free convection air flow rate must be less than the low speed air flow rate.", + s_ipsc->cCurrentModuleObject, + tower.Name)); ErrorsFound = true; } // Check various inputs if Performance Input Method = "UA and Design Water Flow Rate" if (tower.PerformanceInputMethod_Num == PIM::UFactor) { if (tower.DesignWaterFlowRate == 0.0) { - ShowSevereError(state, - format("{} \"{}\". Tower performance input method requires a design water flow rate greater than zero.", + ShowSevereError( + state, + EnergyPlus::format("{} \"{}\". Tower performance input method requires a design water flow rate greater than zero.", s_ipsc->cCurrentModuleObject, tower.Name)); ErrorsFound = true; } if (tower.HighSpeedTowerUA <= tower.LowSpeedTowerUA && tower.HighSpeedTowerUA != DataSizing::AutoSize) { ShowSevereError(state, - format("{} \"{}\". Tower UA at low fan speed must be less than the tower UA at high fan speed.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format("{} \"{}\". Tower UA at low fan speed must be less than the tower UA at high fan speed.", + s_ipsc->cCurrentModuleObject, + tower.Name)); ErrorsFound = true; } if (tower.LowSpeedTowerUA <= tower.FreeConvTowerUA && tower.LowSpeedTowerUA != DataSizing::AutoSize) { - ShowSevereError(state, - format("{} \"{}\". Tower UA at free convection air flow rate must be less than the tower UA at low fan speed.", + ShowSevereError( + state, + EnergyPlus::format("{} \"{}\". Tower UA at free convection air flow rate must be less than the tower UA at low fan speed.", s_ipsc->cCurrentModuleObject, tower.Name)); ErrorsFound = true; @@ -826,97 +830,105 @@ namespace CondenserLoopTowers { if (tower.FreeConvTowerUA > 0.0 && tower.FreeConvAirFlowRate == 0.0) { ShowSevereError( state, - format("{} \"{}\". Free convection air flow rate must be greater than zero when free convection UA is greater than zero.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format( + "{} \"{}\". Free convection air flow rate must be greater than zero when free convection UA is greater than zero.", + s_ipsc->cCurrentModuleObject, + tower.Name)); ErrorsFound = true; } } else if (tower.PerformanceInputMethod_Num == PIM::NominalCapacity) { if (tower.TowerNominalCapacity == 0.0) { ShowSevereError(state, - format("{} \"{}\". Tower performance input method requires valid high-speed nominal capacity.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format("{} \"{}\". Tower performance input method requires valid high-speed nominal capacity.", + s_ipsc->cCurrentModuleObject, + tower.Name)); ErrorsFound = true; } if (tower.TowerLowSpeedNomCap == 0.0) { ShowSevereError(state, - format("{} \"{}\". Tower performance input method requires valid low-speed nominal capacity.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format("{} \"{}\". Tower performance input method requires valid low-speed nominal capacity.", + s_ipsc->cCurrentModuleObject, + tower.Name)); ErrorsFound = true; } if (tower.DesignWaterFlowRate != 0.0) { if (tower.DesignWaterFlowRate > 0.0) { - ShowWarningError(state, - format("{} \"{}\". Nominal capacity input method and design water flow rate have been specified.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + ShowWarningError( + state, + EnergyPlus::format("{} \"{}\". Nominal capacity input method and design water flow rate have been specified.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } else { ShowSevereError( state, - format("{} \"{}\". Nominal capacity input method has been specified and design water flow rate is being autosized.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format( + "{} \"{}\". Nominal capacity input method has been specified and design water flow rate is being autosized.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } ShowContinueError(state, "Design water flow rate will be set according to nominal tower capacity."); } if (tower.HighSpeedTowerUA != 0.0) { if (tower.HighSpeedTowerUA > 0.0) { - ShowWarningError(state, - format("{} \"{}\". Nominal capacity input method and tower UA at high fan speed have been specified.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + ShowWarningError( + state, + EnergyPlus::format("{} \"{}\". Nominal capacity input method and tower UA at high fan speed have been specified.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } else { ShowSevereError( state, - format("{} \"{}\". Nominal capacity input method has been specified and tower UA at high fan speed is being autosized.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format( + "{} \"{}\". Nominal capacity input method has been specified and tower UA at high fan speed is being autosized.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } ShowContinueError(state, "Tower UA at high fan speed will be set according to nominal tower capacity."); } if (tower.LowSpeedTowerUA != 0.0) { if (tower.LowSpeedTowerUA > 0.0) { - ShowWarningError(state, - format("{} \"{}\". Nominal capacity input method and tower UA at low fan speed have been specified.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + ShowWarningError( + state, + EnergyPlus::format("{} \"{}\". Nominal capacity input method and tower UA at low fan speed have been specified.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } else { ShowSevereError( state, - format("{} \"{}\". Nominal capacity input method has been specified and tower UA at low fan speed is being autosized.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format( + "{} \"{}\". Nominal capacity input method has been specified and tower UA at low fan speed is being autosized.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } ShowContinueError(state, "Tower UA at low fan speed will be set according to nominal tower capacity."); } if (tower.FreeConvTowerUA != 0.0) { if (tower.FreeConvTowerUA > 0.0) { ShowWarningError(state, - format("{} \"{}\". Nominal capacity input method and free convection UA have been specified.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::format("{} \"{}\". Nominal capacity input method and free convection UA have been specified.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } else { - ShowSevereError( - state, - format("{} \"{}\". Nominal capacity input method has been specified and free convection UA is being autosized.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + ShowSevereError(state, + EnergyPlus::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, - format("{} \"{}\". Low-speed nominal capacity must be less than the high-speed nominal capacity.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + EnergyPlus::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, - format("{} \"{}\". Free convection nominal capacity must be less than the low-speed nominal capacity.", + ShowSevereError( + state, + EnergyPlus::format("{} \"{}\". Free convection nominal capacity must be less than the low-speed nominal capacity.", s_ipsc->cCurrentModuleObject, tower.Name)); ErrorsFound = true; @@ -985,9 +997,9 @@ namespace CondenserLoopTowers { s_ipsc->lAlphaFieldBlanks(5)) { ShowSevereCustom(state, eoh, - format("A {} must be specified when {} is specified as CoolToolsUserDefined or YorkCalcUserDefined", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaFieldNames(4))); + EnergyPlus::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)) { @@ -1003,12 +1015,13 @@ namespace CondenserLoopTowers { if (!s_ipsc->lAlphaFieldBlanks(6)) { tower.FanPowerfAirFlowCurve = Curve::GetCurveIndex(state, AlphArray(6)); if (tower.FanPowerfAirFlowCurve == 0) { - ShowWarningCustom(state, - eoh, - 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))); + 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))); } } @@ -1121,10 +1134,10 @@ namespace CondenserLoopTowers { // verify the correct number of coefficients for the CoolTools model if (NumNums2 != 43) { ShowSevereError(state, - format("CoolingTower:VariableSpeed \"{}\". The number of numeric inputs for object " - "CoolingTowerPerformance:CoolTools \"{}\" must equal 43.", - tower.Name, - tower.ModelCoeffObjectName)); + EnergyPlus::format("CoolingTower:VariableSpeed \"{}\". The number of numeric inputs for object " + "CoolingTowerPerformance:CoolTools \"{}\" must equal 43.", + tower.Name, + tower.ModelCoeffObjectName)); ErrorsFound = true; } else { @@ -1144,8 +1157,9 @@ namespace CondenserLoopTowers { break; } if (!vstower.FoundModelCoeff) { - ShowSevereError(state, - format("CoolingTower:VariableSpeed \"{}\". User defined name for variable speed cooling tower model coefficients " + ShowSevereError( + state, + EnergyPlus::format("CoolingTower:VariableSpeed \"{}\". User defined name for variable speed cooling tower model coefficients " "object not found = {}", tower.Name, tower.ModelCoeffObjectName)); @@ -1164,10 +1178,10 @@ namespace CondenserLoopTowers { // verify the correct number of coefficients for the YorkCalc model if (NumNums2 != 36) { ShowSevereError(state, - format("CoolingTower:VariableSpeed \"{}\". The number of numeric inputs for object " - "CoolingTowerPerformance:YorkCalc \"{}\" must equal 36.", - tower.Name, - tower.ModelCoeffObjectName)); + EnergyPlus::format("CoolingTower:VariableSpeed \"{}\". The number of numeric inputs for object " + "CoolingTowerPerformance:YorkCalc \"{}\" must equal 36.", + tower.Name, + tower.ModelCoeffObjectName)); ErrorsFound = true; } else { @@ -1189,8 +1203,9 @@ namespace CondenserLoopTowers { } if (!vstower.FoundModelCoeff) { - ShowSevereError(state, - format("{} \"{}\". User defined name for variable speed cooling tower model coefficients object not found = {}", + ShowSevereError( + state, + EnergyPlus::format("{} \"{}\". User defined name for variable speed cooling tower model coefficients object not found = {}", s_ipsc->cCurrentModuleObject, tower.Name, tower.ModelCoeffObjectName)); @@ -1235,11 +1250,11 @@ namespace CondenserLoopTowers { if (NumArray(1) < vstower.MinInletAirWBTemp || NumArray(1) > vstower.MaxInletAirWBTemp) { ShowSevereCustom(state, eoh, - 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)); + 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)); ErrorsFound = true; } @@ -1247,11 +1262,11 @@ namespace CondenserLoopTowers { if (NumArray(2) < vstower.MinApproachTemp || NumArray(2) > vstower.MaxApproachTemp) { ShowSevereCustom(state, eoh, - 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)); + 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)); ErrorsFound = true; } @@ -1259,11 +1274,11 @@ namespace CondenserLoopTowers { if (NumArray(3) < vstower.MinRangeTemp || NumArray(3) > vstower.MaxRangeTemp) { ShowSevereCustom(state, eoh, - 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)); + 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)); ErrorsFound = true; } @@ -1326,7 +1341,8 @@ namespace CondenserLoopTowers { tower.BasinHeaterSetPointTemp = 2.0; } if (tower.BasinHeaterSetPointTemp < 2.0) { - ShowWarningCustom(state, eoh, format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(10))); + ShowWarningCustom( + state, eoh, EnergyPlus::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(10))); } } @@ -1571,7 +1587,8 @@ namespace CondenserLoopTowers { tower.BasinHeaterSetPointTemp = 2.0; } if (tower.BasinHeaterSetPointTemp < 2.0) { - ShowWarningCustom(state, eoh, format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(22))); + ShowWarningCustom( + state, eoh, EnergyPlus::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(22))); } } @@ -2324,33 +2341,40 @@ namespace CondenserLoopTowers { if (PltSizCondNum > 0) { // check the tower range against the plant sizing data if (std::abs(DesTowerWaterDeltaT - PlantSizData(PltSizCondNum).DeltaT) > TolTemp) { - ShowWarningError(state, - 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, format("Tower Design Range Temperature specified in tower = {}", this->Name)); + 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)); ShowContinueError(state, - format("is inconsistent with Design Loop Delta Temperature specified in Sizing:Plant object = {}.", - PlantSizData(PltSizCondNum).PlantLoopName)); - ShowContinueError(state, format("..The Design Range Temperature specified in tower is = {:.2T}", this->DesignRange)); + EnergyPlus::format("..The Design Range Temperature specified in tower is = {:.2T}", this->DesignRange)); ShowContinueError(state, - format("..The Design Loop Delta Temperature specified in plant sizing data is = {:.2T}", - PlantSizData(PltSizCondNum).DeltaT)); + EnergyPlus::format("..The Design Loop Delta Temperature specified in plant sizing data is = {:.2T}", + 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, - 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, - format("The Design Approach Temperature from inputs specified in Sizing:Plant object = {}", - PlantSizData(PltSizCondNum).PlantLoopName)); - ShowContinueError(state, format("is inconsistent with Design Approach Temperature specified in tower = {}.", this->Name)); + 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, - format("..The Design Approach Temperature from inputs specified is = {:.2T}", DesTowerApproachFromPlant)); - ShowContinueError(state, format("..The Design Approach Temperature specified in tower is = {:.2T}", this->DesignApproach)); + 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)); + ShowContinueError( + state, EnergyPlus::format("..The Design Approach Temperature specified in tower is = {:.2T}", this->DesignApproach)); } } } @@ -2416,7 +2440,7 @@ namespace CondenserLoopTowers { } } else { if (state.dataPlnt->PlantFinalSizesOkayToReport) { - ShowSevereError(state, format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower condenser flow rate requires a loop Sizing:Plant object."); } } @@ -2485,7 +2509,7 @@ namespace CondenserLoopTowers { } else { if (state.dataPlnt->PlantFinalSizesOkayToReport) { ShowSevereError(state, "Autosizing of cooling tower fan power requires a loop Sizing:Plant object."); - ShowFatalError(state, format(" Occurs in cooling tower object= {}", this->Name)); + ShowFatalError(state, EnergyPlus::format(" Occurs in cooling tower object= {}", this->Name)); } } } @@ -2573,22 +2597,25 @@ 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, - format("Error when autosizing the UA value for cooling tower = {}. Design Loop Exit Temperature must be " + 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, - format("The Design Loop Exit Temperature specified in Sizing:Plant object = {} ({:.2T} C)", - PlantSizData(PltSizCondNum).PlantLoopName, - PlantSizData(PltSizCondNum).ExitTemp)); - ShowContinueError( - state, format("is less than or equal to the design inlet air wet-bulb temperature of {:.2T} C.", this->DesignInletWB)); + EnergyPlus::format("The Design Loop Exit Temperature specified in Sizing:Plant object = {} ({:.2T} C)", + PlantSizData(PltSizCondNum).PlantLoopName, + PlantSizData(PltSizCondNum).ExitTemp)); ShowContinueError(state, - 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, format("Autosizing of cooling tower fails for tower = {}.", this->Name)); + EnergyPlus::format("is less than or equal to the design inlet air wet-bulb temperature of {:.2T} 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)); } Real64 const solveDesignWaterMassFlow = rho * tmpDesignWaterFlowRate; // design water mass flow rate @@ -2608,10 +2635,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, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -2670,33 +2697,37 @@ namespace CondenserLoopTowers { // => This basically means that approach is negative, which is impossible (must be > 0 per IDD) // * If not, hardcoded above to 21C if (DesTowerExitWaterTemp <= this->DesignInletWB) { - ShowSevereError(state, - format("Error when autosizing the UA value for cooling tower = {}. Design Tower Exit Temperature must be " + 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, format("The User-specified Design Loop Exit Temperature={:.2T}", DesTowerExitWaterTemp)); - ShowContinueError( - state, format("is less than or equal to the design inlet air wet-bulb temperature of {:.2T} C.", 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)); if (this->TowerInletCondsAutoSize) { ShowContinueError(state, - 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)); + 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)); } else { // Should never get there... - ShowContinueError(state, - 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, + 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, - 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, format("Autosizing of cooling tower fails for tower = {}.", this->Name)); + 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)); } Real64 const solveWaterMassFlow = rho * tmpDesignWaterFlowRate; // design water mass flow rate @@ -2715,10 +2746,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, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -2788,10 +2819,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, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->HighSpeedTowerUA = UA; @@ -2962,10 +2993,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, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->LowSpeedTowerUA = UA; @@ -3053,31 +3084,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, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::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, - format("Tower load assumed to be {:.3T} times free convection capacity of {:.0T} W.", - this->HeatRejectCapNomCapSizingRatio, - this->TowerFreeConvNomCap)); + EnergyPlus::format("Tower load assumed to be {:.3T} times free convection capacity of {:.0T} 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, format("Tower capacity at lower UA guess ({:.4T}) = {:.0T} W.", UA0, CoolingOutput)); + ShowContinueError(state, EnergyPlus::format("Tower capacity at lower UA guess ({:.4T}) = {:.0T} W.", UA0, CoolingOutput)); OutWaterTemp = this->calculateSimpleTowerOutletTemp(state, solveWaterFlow, this->FreeConvAirFlowRate, UA1); CoolingOutput = Cp * solveWaterFlow * (this->WaterTemp - OutWaterTemp); - ShowContinueError(state, format("Tower capacity at upper UA guess ({:.4T}) = {:.0T} W.", UA1, CoolingOutput)); + ShowContinueError(state, EnergyPlus::format("Tower capacity at upper UA guess ({:.4T}) = {:.0T} W.", UA1, CoolingOutput)); if (CoolingOutput < DesTowerLoad) { ShowContinueError(state, "Free convection capacity should be less than tower capacity at upper UA guess."); } - ShowFatalError(state, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->FreeConvTowerUA = UA; @@ -3141,34 +3172,35 @@ 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, format("Cooling tower calibration failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::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, format("Cooling tower calibration failed for tower {}.", this->Name)); + ShowFatalError(state, EnergyPlus::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, - format("A water flow rate ratio of {:.6F} was calculated to yield an approach temperature of {:.2F}.", - WaterFlowRateRatio, - Tapproach)); - ShowFatalError(state, format("Cooling tower calibration failed for tower {}.", this->Name)); + 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)); } this->CalibratedWaterFlowRate = this->DesignWaterFlowRate / WaterFlowRatio; if (WaterFlowRatio < this->MinWaterFlowRatio || WaterFlowRatio > this->MaxWaterFlowRatio) { - ShowWarningError(state, - 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)); + 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)); } Real64 const rho = @@ -3262,15 +3294,16 @@ namespace CondenserLoopTowers { if (this->DesignWaterFlowRate > 0.0) { if (this->FreeConvAirFlowRate >= this->HighSpeedAirFlowRate) { ShowSevereError(state, - format("{} \"{}\". Free convection air flow rate must be less than the design air flow rate.", - cCoolingTower_SingleSpeed, - this->Name)); + EnergyPlus::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, - format("{} \"{}\". Free convection UA must be less than the design tower UA.", cCoolingTower_SingleSpeed, this->Name)); + ShowSevereError(state, + EnergyPlus::format("{} \"{}\". Free convection UA must be less than the design tower UA.", + cCoolingTower_SingleSpeed, + this->Name)); ErrorsFound = true; } } @@ -3280,31 +3313,31 @@ namespace CondenserLoopTowers { if (this->DesignWaterFlowRate > 0.0) { if (this->HighSpeedAirFlowRate <= this->LowSpeedAirFlowRate) { ShowSevereError(state, - format("{} \"{}\". Low speed air flow rate must be less than the high speed air flow rate.", - cCoolingTower_TwoSpeed, - this->Name)); + EnergyPlus::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, - format("{} \"{}\". Free convection air flow rate must be less than the low speed air flow rate.", - cCoolingTower_TwoSpeed, - this->Name)); + EnergyPlus::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, - format("{} \"{}\". Tower UA at low fan speed must be less than the tower UA at high fan speed.", - cCoolingTower_TwoSpeed, - this->Name)); + EnergyPlus::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, - 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, + 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)); ErrorsFound = true; } } @@ -3373,33 +3406,37 @@ namespace CondenserLoopTowers { if (PltSizCondNum > 0) { // check the tower range against the plant sizing data if (std::abs(DesTowerWaterDeltaT - PlantSizData(PltSizCondNum).DeltaT) > TolTemp) { - ShowWarningError(state, - 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, format("Tower Design Range Temperature specified in tower = {}", this->Name)); - ShowContinueError(state, - format("is inconsistent with Design Loop Delta Temperature specified in Sizing:Plant object = {}.", - PlantSizData(PltSizCondNum).PlantLoopName)); - ShowContinueError(state, format("..The Design Range Temperature specified in tower is = {:.2T}", this->DesignRange)); - ShowContinueError( + ShowWarningError( state, - format("..The Design Loop Delta Temperature specified in plant sizing data is = {:.2T}", PlantSizData(PltSizCondNum).DeltaT)); + 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)); + ShowContinueError(state, EnergyPlus::format("..The Design Range Temperature specified in tower is = {:.2T}", this->DesignRange)); + ShowContinueError(state, + EnergyPlus::format("..The Design Loop Delta Temperature specified in plant sizing data is = {:.2T}", + 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, - 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, + 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, - format("The Design Approach Temperature from inputs specified in Sizing:Plant object = {}", - PlantSizData(PltSizCondNum).PlantLoopName)); - ShowContinueError(state, format("is inconsistent with Design Approach Temperature specified in tower = {}.", this->Name)); + EnergyPlus::format("The Design Approach Temperature from inputs specified in Sizing:Plant object = {}", + PlantSizData(PltSizCondNum).PlantLoopName)); ShowContinueError(state, - format("..The Design Approach Temperature from inputs specified is = {:.2T}", DesTowerApproachFromPlant)); - ShowContinueError(state, format("..The Design Approach Temperature specified in tower is = {:.2T}", this->DesignApproach)); + 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)); + ShowContinueError(state, + EnergyPlus::format("..The Design Approach Temperature specified in tower is = {:.2T}", this->DesignApproach)); } } } @@ -3431,7 +3468,7 @@ namespace CondenserLoopTowers { } } else { // do not have enough data to size. if (state.dataPlnt->PlantFirstSizesOkayToFinalize && this->TowerNominalCapacityWasAutoSized) { - ShowSevereError(state, format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower nominal capacity requires a loop Sizing:Plant object."); } } @@ -3467,9 +3504,11 @@ namespace CondenserLoopTowers { NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomTowerCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomTowerCap)); + ShowMessage(state, + EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3512,11 +3551,13 @@ namespace CondenserLoopTowers { NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpTowerFreeConvNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Free Convection Nominal Capacity of {:.2R} [W]", NomCapUser)); + ShowMessage(state, + EnergyPlus::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, - format("differs from Design Size Free Convection Nominal Capacity of {:.2R} [W]", tmpTowerFreeConvNomCap)); + state, EnergyPlus::format("User-Specified Free Convection Nominal Capacity of {:.2R} [W]", NomCapUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Free Convection Nominal Capacity of {:.2R} [W]", + tmpTowerFreeConvNomCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3563,9 +3604,12 @@ namespace CondenserLoopTowers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpDesignWaterFlowRate - NomDesWaterFlowUser) / NomDesWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Design Water Flow Rate of {:.2R} [m3/s]", NomDesWaterFlowUser)); - ShowContinueError(state, format("differs from Design Water Flow Rate of {:.2R} [m3/s]", tmpDesignWaterFlowRate)); + ShowMessage(state, + EnergyPlus::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( + state, EnergyPlus::format("differs from Design Water Flow Rate of {:.2R} [m3/s]", tmpDesignWaterFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3614,9 +3658,11 @@ namespace CondenserLoopTowers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpDesignAirFlowRate - DesignAirFlowRateUser) / DesignAirFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Design Air Flow Rate of {:.2R} [m3/s]", DesignAirFlowRateUser)); - ShowContinueError(state, format("differs from Design Air Flow Rate of {:.2R} [m3/s]", tmpDesignAirFlowRate)); + ShowMessage(state, EnergyPlus::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, + EnergyPlus::format("differs from Design Air Flow Rate of {:.2R} [m3/s]", tmpDesignAirFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3658,13 +3704,13 @@ namespace CondenserLoopTowers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpFreeConvAirFlowRate - FreeConvAirFlowUser) / FreeConvAirFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, - format("User-Specified Design Free Convection Regime Air Flow Rate of {:.2R} [m3/s]", FreeConvAirFlowUser)); - ShowContinueError( - state, - format("differs from Design Free Convection Regime Air Flow Rate of {:.2R} [m3/s]", tmpFreeConvAirFlowRate)); + ShowMessage(state, EnergyPlus::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)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Free Convection Regime Air Flow Rate of {:.2R} [m3/s]", + tmpFreeConvAirFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3703,10 +3749,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, format("calculating cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("calculating cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } this->HighSpeedTowerUA = UA; if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -3741,10 +3787,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, format("calculating cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("calculating cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, format("Autosizing of cooling tower UA failed for free convection tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for free convection tower {}", this->Name)); } this->FreeConvTowerUA = UA; if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -3816,7 +3862,7 @@ namespace CondenserLoopTowers { } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower nominal capacity requires a loop Sizing:Plant object."); } } @@ -3915,7 +3961,7 @@ namespace CondenserLoopTowers { } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower nominal capacity requires a loop Sizing:Plant object."); } } @@ -4006,10 +4052,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, format("calculating cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("calculating cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } this->HighSpeedTowerUA = UA; if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -4044,10 +4090,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, format("calculating cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("calculating cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, format("Autosizing of cooling tower UA failed for free convection tower {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for free convection tower {}", this->Name)); } this->LowSpeedTowerUA = UA; if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -4138,7 +4184,7 @@ namespace CondenserLoopTowers { } else { tmpNomTowerCap = 0.0; // Suppress uninitialized warnings if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower nominal capacity requires a loop Sizing:Plant object."); } } @@ -4278,9 +4324,9 @@ namespace CondenserLoopTowers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHighSpeedFanPower - HighSpeedFanPowerUser) / HighSpeedFanPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Design Fan Power of {:.2R} [W]", HighSpeedFanPowerUser)); - ShowContinueError(state, format("differs from Design Fan Power of {:.2R} [W]", tmpHighSpeedFanPower)); + ShowMessage(state, EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -4614,7 +4660,8 @@ namespace CondenserLoopTowers { } if (NumIteration > MaxIteration) { ShowWarningError( - state, format("Cooling tower fluid bypass iteration exceeds maximum limit of {} for {}", MaxItChar, this->Name)); + state, + EnergyPlus::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 @@ -5107,7 +5154,8 @@ namespace CondenserLoopTowers { if (!state.dataGlobal->WarmupFlag) { ShowWarningError( state, - format("Cooling tower iteration limit exceeded when calculating air flow rate ratio for tower {}", this->Name)); + EnergyPlus::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) { @@ -5117,17 +5165,19 @@ namespace CondenserLoopTowers { ++this->CoolingTowerAFRRFailedCount; ShowWarningError( state, - format("CoolingTower:VariableSpeed \"{}\" - Cooling tower air flow rate ratio calculation failed ", this->Name)); - ShowContinueError(state, - format("...with conditions as Twb = {:5.2F}, Trange = {:5.2F}, Tapproach = {:5.2F}, and water flow " - "rate ratio = {:5.2F}", - TwbCapped, - Tr, - Ta, - WaterFlowRateRatioCapped)); + EnergyPlus::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)); ShowContinueError(state, "...a solution could not be found within the valid range of air flow rate ratios"); ShowContinueErrorTimeStamp( - state, format(" ...Valid air flow rate ratio range = {:5.2F} to 1.0.", this->MinimumVSAirFlowFrac)); + state, EnergyPlus::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, @@ -5171,9 +5221,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, this->LGBuffer2); } else { ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Liquid to gas ratio is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + EnergyPlus::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); @@ -5196,15 +5246,15 @@ namespace CondenserLoopTowers { // Report warnings only during actual simulation if (!state.dataGlobal->WarmupFlag) { this->PrintLGMessage = true; - this->LGBuffer1 = 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 = format(" ...Valid maximum ratio = {:5.2F}. Occurrence info = {}, {} {}", - this->MaxLiquidToGasRatio, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + 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->LGLast = FlowFraction; } @@ -5420,13 +5470,13 @@ namespace CondenserLoopTowers { if (this->VSMerkelAFRErrorIter < 1) { ++this->VSMerkelAFRErrorIter; ShowWarningError(state, - format("{} - Iteration limit exceeded calculating variable speed fan ratio for unit = {}", - cCoolingTower_VariableSpeedMerkel, - this->Name)); + EnergyPlus::format("{} - Iteration limit exceeded calculating variable speed fan ratio for unit = {}", + cCoolingTower_VariableSpeedMerkel, + this->Name)); ShowContinueError(state, - format("Estimated air flow ratio = {:.4R}", - (std::abs(MyLoad) - MinSpeedFanQdot) / (FullSpeedFanQdot - MinSpeedFanQdot))); - ShowContinueError(state, format("Calculated air flow ratio = {:.4R}", this->airFlowRateRatio)); + EnergyPlus::format("Estimated air flow ratio = {:.4R}", + (std::abs(MyLoad) - MinSpeedFanQdot) / (FullSpeedFanQdot - MinSpeedFanQdot))); + ShowContinueError(state, EnergyPlus::format("Calculated air flow ratio = {:.4R}", this->airFlowRateRatio)); ShowContinueErrorTimeStamp(state, "The calculated air flow ratio will be used and the simulation continues. Occurrence info:"); } @@ -5444,10 +5494,10 @@ namespace CondenserLoopTowers { if (this->VSMerkelAFRErrorFail < 1) { ++this->VSMerkelAFRErrorFail; ShowWarningError(state, - format("{} - solver failed calculating variable speed fan ratio for unit = {}", - cCoolingTower_VariableSpeedMerkel, - this->Name)); - ShowContinueError(state, format("Estimated air flow ratio = {:.4R}", this->airFlowRateRatio)); + EnergyPlus::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:"); } ShowRecurringWarningErrorAtEnd( @@ -5642,7 +5692,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, format("Cooling tower simulation failed to converge for tower {}", this->Name)); + ShowContinueError(state, EnergyPlus::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 @@ -5651,20 +5701,22 @@ namespace CondenserLoopTowers { if (this->VSErrorCountTRCalc < 2) { ShowWarningError( state, - 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)); + EnergyPlus::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, - format(" ... Occurrence info = {}, {} {}", - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state))); + EnergyPlus::format(" ... Occurrence info = {}, {} {}", + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state))); } else { ShowRecurringWarningErrorAtEnd( state, - 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), + EnergyPlus::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), this->ErrIndexTRCalc); } } @@ -5790,9 +5842,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, " ...This is not an unexpected occurrence when simulating actual conditions."); } else { ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Tower range temperature is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + EnergyPlus::format("{} \"{}\" - Tower range temperature is out of range error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->ErrIndexTR, this->TrLast, this->TrLast); @@ -5807,9 +5859,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, " ...Wet-bulb temperatures outside model boundaries may not adversely affect tower performance."); } else { ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Inlet air wet-bulb temperature is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + EnergyPlus::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); @@ -5825,9 +5877,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, " ...This is not an unexpected occurrence when simulating actual conditions."); } else { ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Tower approach temperature is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + EnergyPlus::format("{} \"{}\" - Tower approach temperature is out of range error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->ErrIndexTA, this->TaLast, this->TaLast); @@ -5842,9 +5894,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, " ...Water flow rate ratios outside model boundaries may not adversely affect tower performance."); } else { ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Water flow rate ratio is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + EnergyPlus::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); @@ -5858,9 +5910,9 @@ namespace CondenserLoopTowers { // check boundaries of independent variables and post warnings to individual buffers to print at end of time step if (Twb < this->MinInletAirWBTemp || Twb > this->MaxInletAirWBTemp) { - OutputChar = format("{:.2R}", Twb); - OutputCharLo = format("{:.2R}", this->MinInletAirWBTemp); - OutputCharHi = format("{:.2R}", this->MaxInletAirWBTemp); + OutputChar = EnergyPlus::format("{:.2R}", Twb); + OutputCharLo = EnergyPlus::format("{:.2R}", this->MinInletAirWBTemp); + OutputCharHi = EnergyPlus::format("{:.2R}", this->MaxInletAirWBTemp); if (Twb < this->MinInletAirWBTemp) { TwbCapped = this->MinInletAirWBTemp; } @@ -5869,14 +5921,14 @@ namespace CondenserLoopTowers { } if (!state.dataGlobal->WarmupFlag) { this->PrintTwbMessage = true; - this->TwbBuffer1 = format("{} \"{}\" - Inlet air wet-bulb temperature is outside model boundaries at {}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - OutputChar); + this->TwbBuffer1 = EnergyPlus::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); - TrimValue = format("{:.6R}", TwbCapped); + TrimValue = EnergyPlus::format("{:.6R}", TwbCapped); this->TwbBuffer3 = " ...Inlet air wet-bulb temperature passed to the model = " + TrimValue; this->TwbLast = Twb; } else { @@ -5887,9 +5939,9 @@ namespace CondenserLoopTowers { } if (Tr < this->MinRangeTemp || Tr > this->MaxRangeTemp) { - OutputChar = format("{:.2R}", Tr); - OutputCharLo = format("{:.2R}", this->MinRangeTemp); - OutputCharHi = format("{:.2R}", this->MaxRangeTemp); + OutputChar = EnergyPlus::format("{:.2R}", Tr); + OutputCharLo = EnergyPlus::format("{:.2R}", this->MinRangeTemp); + OutputCharHi = EnergyPlus::format("{:.2R}", this->MaxRangeTemp); if (Tr < this->MinRangeTemp) { TrCapped = this->MinRangeTemp; } @@ -5898,14 +5950,14 @@ namespace CondenserLoopTowers { } if (!state.dataGlobal->WarmupFlag) { this->PrintTrMessage = true; - this->TrBuffer1 = format("{} \"{}\" - Tower range temperature is outside model boundaries at {}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - OutputChar); + this->TrBuffer1 = EnergyPlus::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); - TrimValue = format("{:.5R}", Tr); + TrimValue = EnergyPlus::format("{:.5R}", Tr); this->TrBuffer3 = " ...Tower range temperature passed to the model = " + TrimValue; this->TrLast = Tr; } else { @@ -5916,9 +5968,9 @@ namespace CondenserLoopTowers { } if (Ta < this->MinApproachTemp || Ta > this->MaxApproachTemp) { - OutputChar = format("{:.2R}", Ta); - OutputCharLo = format("{:.2R}", this->MinApproachTemp); - OutputCharHi = format("{:.2R}", this->MaxApproachTemp); + OutputChar = EnergyPlus::format("{:.2R}", Ta); + OutputCharLo = EnergyPlus::format("{:.2R}", this->MinApproachTemp); + OutputCharHi = EnergyPlus::format("{:.2R}", this->MaxApproachTemp); if (Ta < this->MinApproachTemp) { TaCapped = this->MinApproachTemp; } @@ -5927,14 +5979,14 @@ namespace CondenserLoopTowers { } if (!state.dataGlobal->WarmupFlag) { this->PrintTaMessage = true; - this->TaBuffer1 = format("{} \"{}\" - Tower approach temperature is outside model boundaries at {}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - OutputChar); + this->TaBuffer1 = EnergyPlus::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); - TrimValue = format("{:.5R}", Ta); + TrimValue = EnergyPlus::format("{:.5R}", Ta); this->TaBuffer3 = " ...Tower approach temperature passed to the model = " + TrimValue; this->TaLast = Ta; } else { @@ -5950,9 +6002,9 @@ namespace CondenserLoopTowers { this->PrintWFRRMessage = false; } else { if (WaterFlowRateRatio < this->MinWaterFlowRatio || WaterFlowRateRatio > this->MaxWaterFlowRatio) { - OutputChar = format("{:.2R}", WaterFlowRateRatio); - OutputCharLo = format("{:.2R}", this->MinWaterFlowRatio); - OutputCharHi = format("{:.2R}", this->MaxWaterFlowRatio); + OutputChar = EnergyPlus::format("{:.2R}", WaterFlowRateRatio); + OutputCharLo = EnergyPlus::format("{:.2R}", this->MinWaterFlowRatio); + OutputCharHi = EnergyPlus::format("{:.2R}", this->MaxWaterFlowRatio); if (WaterFlowRateRatio < this->MinWaterFlowRatio) { WaterFlowRateRatioCapped = this->MinWaterFlowRatio; } @@ -5961,14 +6013,14 @@ namespace CondenserLoopTowers { } if (!state.dataGlobal->WarmupFlag) { this->PrintWFRRMessage = true; - this->WFRRBuffer1 = format("{} \"{}\" - Water flow rate ratio is outside model boundaries at {}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - OutputChar); + this->WFRRBuffer1 = EnergyPlus::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); - TrimValue = format("{:.5R}", WaterFlowRateRatioCapped); + TrimValue = EnergyPlus::format("{:.5R}", WaterFlowRateRatioCapped); this->WFRRBuffer3 = " ...Water flow rate ratio passed to the model = " + TrimValue; this->WaterFlowRateRatioLast = WaterFlowRateRatio; } else { @@ -6134,18 +6186,21 @@ namespace CondenserLoopTowers { if (state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate > this->DesWaterMassFlowRate * this->TowerMassFlowRateMultiplier) { ++this->HighMassFlowErrorCount; if (this->HighMassFlowErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); + ShowWarningError(state, + EnergyPlus::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, format(" Condenser Loop Mass Flow Rate = {:.6T}", state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate)); - ShowContinueError(state, format(" Tower Design Mass Flow Rate = {:.6T}", this->DesWaterMassFlowRate)); + 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)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( state, - 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), + 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), this->HighMassFlowErrorIndex, state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate, state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate); @@ -6159,19 +6214,22 @@ namespace CondenserLoopTowers { if (outletWaterTempTooLow && flowIsOn) { ++this->OutletWaterTempErrorCount; if (this->OutletWaterTempErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); ShowContinueError( state, - format("Cooling tower water outlet temperature ({:.2F} C) is below the specified minimum condenser loop temp of {:.2F} C", - this->OutletWaterTemp, - LoopMinTemp)); + EnergyPlus::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, - format("{} \"{}\" Cooling tower water outlet temperature is below the specified minimum condenser loop temp error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + EnergyPlus::format( + "{} \"{}\" Cooling tower water outlet temperature is below the specified minimum condenser loop temp error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->OutletWaterTempErrorIndex, this->OutletWaterTemp, this->OutletWaterTemp); @@ -6182,15 +6240,16 @@ namespace CondenserLoopTowers { if (this->WaterMassFlowRate > 0.0 && this->WaterMassFlowRate <= DataBranchAirLoopPlant::MassFlowTolerance) { ++this->SmallWaterMassFlowErrorCount; if (this->SmallWaterMassFlowErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); ShowContinueError(state, "Cooling tower water mass flow rate near zero."); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); } else { ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" Cooling tower water mass flow rate near zero error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + EnergyPlus::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/Construction.cc b/src/EnergyPlus/Construction.cc index 652ff18caf6..97ea29c232d 100644 --- a/src/EnergyPlus/Construction.cc +++ b/src/EnergyPlus/Construction.cc @@ -229,22 +229,25 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E if (thisMaterial->Thickness < ThicknessThreshold) { ShowSevereError( state, - format( + EnergyPlus::format( "InitConductionTransferFunctions: Found Material that is too thin and/or too highly conductive, material name = {}", thisMaterial->Name)); - ShowContinueError(state, - format("High conductivity Material layers are not well supported for internal source constructions, " - "material conductivity = {:.3R} [W/m-K]", - thisMaterial->Conductivity)); - ShowContinueError(state, format("Material thermal diffusivity = {:.3R} [m2/s]", Alpha)); - ShowContinueError(state, - format("Material with this thermal diffusivity should have thickness > {:.5R} [m]", ThicknessThreshold)); + ShowContinueError( + state, + EnergyPlus::format("High conductivity Material layers are not well supported for internal source constructions, " + "material conductivity = {:.3R} [W/m-K]", + thisMaterial->Conductivity)); + ShowContinueError(state, EnergyPlus::format("Material thermal diffusivity = {:.3R} [m2/s]", Alpha)); + ShowContinueError( + state, + EnergyPlus::format("Material with this thermal diffusivity should have thickness > {:.5R} [m]", ThicknessThreshold)); if (thisMaterial->Thickness < DataHeatBalance::ThinMaterialLayerThreshold) { + ShowContinueError( + state, + EnergyPlus::format("Material may be too thin to be modeled well, thickness = {:.5R} [m]", thisMaterial->Thickness)); ShowContinueError(state, - format("Material may be too thin to be modeled well, thickness = {:.5R} [m]", thisMaterial->Thickness)); - ShowContinueError(state, - format("Material with this thermal diffusivity should have thickness > {:.5R} [m]", - DataHeatBalance::ThinMaterialLayerThreshold)); + EnergyPlus::format("Material with this thermal diffusivity should have thickness > {:.5R} [m]", + DataHeatBalance::ThinMaterialLayerThreshold)); } thisMaterial->WarnedForHighDiffusivity = true; } @@ -253,7 +256,7 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E } if (thisMaterial->Thickness > 3.0) { ShowSevereError(state, "InitConductionTransferFunctions: Material too thick for CTF calculation"); - ShowContinueError(state, format("material name = {}", thisMaterial->Name)); + ShowContinueError(state, EnergyPlus::format("material name = {}", thisMaterial->Name)); ErrorsFound = true; } @@ -275,8 +278,9 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E // parameters to calculate CTFs for a building element // containing this layer. - ShowSevereError(state, format("InitConductionTransferFunctions: Material={}R Value below lowest allowed value", thisMaterial->Name)); - ShowContinueError(state, format("Lowest allowed value=[{:.3R}], Material R Value=[{:.3R}].", RValueLowLimit, lr(Layer))); + ShowSevereError( + state, EnergyPlus::format("InitConductionTransferFunctions: Material={}R Value below lowest allowed value", thisMaterial->Name)); + ShowContinueError(state, EnergyPlus::format("Lowest allowed value=[{:.3R}], Material R Value=[{:.3R}].", RValueLowLimit, lr(Layer))); ErrorsFound = true; } else { // A valid user defined R-value is available. @@ -361,7 +365,7 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E --this->TempAfterLayer; } } else { // These are not adjacent layers and there is a logic flaw here (should not happen) - ShowFatalError(state, format("Combining resistance layers failed for {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Combining resistance layers failed for {}", this->Name)); ShowContinueError(state, "This should never happen. Contact EnergyPlus Support for further assistance."); } } @@ -932,7 +936,7 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E CTFConvrg = false; } } else { // Something terribly wrong--the surface has no CTFs, not even an R-value - ShowFatalError(state, format("Illegal construction definition, no CTFs calculated for {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Illegal construction definition, no CTFs calculated for {}", this->Name)); } } @@ -942,14 +946,16 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E // Thus, if the time step reaches a certain point, error out and let the // user know that something needs to be checked in the input file. if (this->CTFTimeStep >= MaxAllowedTimeStep) { - ShowSevereError(state, format("CTF calculation convergence problem for Construction=\"{}\".", this->Name)); + ShowSevereError(state, EnergyPlus::format("CTF calculation convergence problem for Construction=\"{}\".", this->Name)); ShowContinueError(state, "...with Materials (outside layer to inside)"); - ShowContinueError(state, format("(outside)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(1))->Name)); + ShowContinueError(state, EnergyPlus::format("(outside)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(1))->Name)); for (int Layer = 2; Layer <= this->TotLayers; ++Layer) { if (Layer != this->TotLayers) { - ShowContinueError(state, format("(next)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(Layer))->Name)); + ShowContinueError(state, + EnergyPlus::format("(next)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(Layer))->Name)); } else { - ShowContinueError(state, format("(inside)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(Layer))->Name)); + ShowContinueError(state, + EnergyPlus::format("(inside)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(Layer))->Name)); } } ShowContinueError(state, @@ -1002,7 +1008,7 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E this->e(1) = 0.0; // zero. if (this->SourceSinkPresent) { - ShowSevereError(state, format("Sources/sinks not allowed in purely resistive constructions --> {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Sources/sinks not allowed in purely resistive constructions --> {}", this->Name)); ErrorsFound = true; } @@ -2002,16 +2008,19 @@ Real64 ConstructionProps::setThicknessPerpendicular(EnergyPlusData &state, Real6 ShowWarningError(state, "ConstructionProperty:InternalHeatSource has a tube spacing that is less than 2 mm. This is not allowed."); ShowContinueError( state, - format("Construction={} has this problem. The tube spacing has been reset to 0.15m (~6 inches) for this construction.", this->Name)); + EnergyPlus::format("Construction={} has this problem. The tube spacing has been reset to 0.15m (~6 inches) for this construction.", + this->Name)); ShowContinueError(state, "As per the Input Output Reference, tube spacing is only used for 2-D solutions and autosizing."); returnValue = 0.075; // default "half" tube spacing in meters (roughly equivalent to 15cm or 6 inches of tube spacing) } else if (returnValue < 0.005) { // below this value for "half" the tube spacing in meters throw a warning ShowWarningError(state, "ConstructionProperty:InternalHeatSource has a tube spacing that is less than 1 cm (0.4 inch)."); - ShowContinueError(state, format("Construction={} has this concern. Please check this construction to make sure it is correct.", this->Name)); + ShowContinueError( + state, EnergyPlus::format("Construction={} has this concern. Please check this construction to make sure it is correct.", this->Name)); ShowContinueError(state, "As per the Input Output Reference, tube spacing is only used for 2-D solutions and autosizing."); } else if (returnValue > 0.5) { // above this value for "half" the tube spacing in meters throw a warning ShowWarningError(state, "ConstructionProperty:InternalHeatSource has a tube spacing that is greater than 1 meter (39.4 inches)."); - ShowContinueError(state, format("Construction={} has this concern. Please check this construction to make sure it is correct.", this->Name)); + ShowContinueError( + state, EnergyPlus::format("Construction={} has this concern. Please check this construction to make sure it is correct.", this->Name)); ShowContinueError(state, "As per the Input Output Reference, tube spacing is only used for 2-D solutions and autosizing."); } return returnValue; @@ -2021,13 +2030,13 @@ Real64 ConstructionProps::setUserTemperatureLocationPerpendicular(EnergyPlusData { if (userValue < 0.0) { ShowWarningError(state, "ConstructionProperty:InternalHeatSource has a perpendicular temperature location parameter that is less than zero."); - ShowContinueError(state, format("Construction={} has this error. The parameter has been reset to 0.", this->Name)); + ShowContinueError(state, EnergyPlus::format("Construction={} has this error. The parameter has been reset to 0.", this->Name)); return 0.0; } if (userValue > 1.0) { ShowWarningError(state, "ConstructionProperty:InternalHeatSource has a perpendicular temperature location parameter that is greater than one."); - ShowContinueError(state, format("Construction={} has this error. The parameter has been reset to 1.", this->Name)); + ShowContinueError(state, EnergyPlus::format("Construction={} has this error. The parameter has been reset to 1.", this->Name)); return 1.0; } // Valid value between 0 and 1 return userValue; diff --git a/src/EnergyPlus/ConvectionCoefficients.cc b/src/EnergyPlus/ConvectionCoefficients.cc index c0eeb620dad..796589fda6c 100644 --- a/src/EnergyPlus/ConvectionCoefficients.cc +++ b/src/EnergyPlus/ConvectionCoefficients.cc @@ -198,8 +198,10 @@ void InitIntConvCoeff(EnergyPlusData &state, } ShowSevereError( state, - format("InitInteriorConvectionCoeffs: Inside Convection=CeilingDiffuser, but no system inlet node defined, Zone={}", zone.Name)); - ShowContinueError(state, format("Defaulting inside convection to TARP. Check ZoneHVAC:EquipmentConnections for Zone={}", zone.Name)); + 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)); zone.IntConvAlgo = HcInt::ASHRAETARP; } // insert one-time setup for adaptive inside face @@ -641,7 +643,8 @@ void InitExtConvCoeff(EnergyPlusData &state, } break; default: { - ShowFatalError(state, format("InitExtConvection Coefficients: invalid parameter -- outside convection type, Surface={}", surface.Name)); + ShowFatalError(state, + EnergyPlus::format("InitExtConvection Coefficients: invalid parameter -- outside convection type, Surface={}", surface.Name)); } break; } @@ -963,14 +966,14 @@ void GetUserConvCoeffs(EnergyPlusData &state) ++state.dataSurface->TotUserExtConvModels; } if (NumAlphas >= 2 && ipsc->lAlphaFieldBlanks(2)) { - ShowWarningError(state, - format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); - ShowContinueError(state, format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(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))); } if (NumAlphas >= 6 && ipsc->lAlphaFieldBlanks(6)) { - ShowWarningError(state, - format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); - ShowContinueError(state, format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(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))); } } CurrentModuleObject = "SurfaceProperty:ConvectionCoefficients"; @@ -1000,14 +1003,14 @@ void GetUserConvCoeffs(EnergyPlusData &state) ++state.dataSurface->TotUserExtConvModels; } if (NumAlphas >= 2 && ipsc->lAlphaFieldBlanks(2)) { - ShowWarningError(state, - format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); - ShowContinueError(state, format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(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))); } if (NumAlphas >= 6 && ipsc->lAlphaFieldBlanks(6)) { - ShowWarningError(state, - format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); - ShowContinueError(state, format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(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))); } } @@ -1053,10 +1056,11 @@ void GetUserConvCoeffs(EnergyPlusData &state) if (Surface(surfNum).OSCPtr > 0) { ShowSevereError( state, - format("GetUserSuppliedConvectionCoefficients: {}, OUTSIDE {} cannot be specified for OtherSideCoefficient Surface={}", - CurrentModuleObject, - CurrentModuleObject, - Alphas(1))); + EnergyPlus::format( + "GetUserSuppliedConvectionCoefficients: {}, OUTSIDE {} cannot be specified for OtherSideCoefficient Surface={}", + CurrentModuleObject, + CurrentModuleObject, + Alphas(1))); ErrorsFound = true; } @@ -1078,29 +1082,29 @@ void GetUserConvCoeffs(EnergyPlusData &state) userExtConvModel.SurfaceName = Alphas(1); userExtConvModel.WhichSurface = surfNum; if (Numbers(NumField) < state.dataHeatBal->LowHConvLimit || Numbers(NumField) > state.dataHeatBal->HighHConvLimit) { - ShowSevereError(state, format("{}{}=\"{}, out of range value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, out of range value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - format("{}={}, {}=[{:.5R}].", - ipsc->cAlphaFieldNames(Ptr), - Alphas(Ptr), - ipsc->cNumericFieldNames(NumField), - Numbers(NumField))); + EnergyPlus::format("{}={}, {}=[{:.5R}].", + ipsc->cAlphaFieldNames(Ptr), + Alphas(Ptr), + ipsc->cNumericFieldNames(NumField), + Numbers(NumField))); ShowContinueError(state, - format("Out-of-range from low/high limits=[>={:.9R}, <={:.1R}].", - state.dataHeatBal->LowHConvLimit, - state.dataHeatBal->HighHConvLimit)); + EnergyPlus::format("Out-of-range from low/high limits=[>={:.9R}, <={:.1R}].", + state.dataHeatBal->LowHConvLimit, + state.dataHeatBal->HighHConvLimit)); ShowContinueError(state, "Limits are set (or default) in HeatBalanceAlgorithm object."); ErrorsFound = true; } userExtConvModel.overrideType = OverrideType::Value; userExtConvModel.OverrideValue = Numbers(NumField); if (!ipsc->lAlphaFieldBlanks(Ptr + 2)) { - ShowWarningError(state, format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - format("Since VALUE is used for \"{}\", {}={} is ignored.", - ipsc->cAlphaFieldNames(FieldNo + 2), - ipsc->cAlphaFieldNames(Ptr + 2), - Alphas(Ptr + 2))); + EnergyPlus::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; @@ -1150,8 +1154,8 @@ void GetUserConvCoeffs(EnergyPlusData &state) case HcExt::ASHRAETARP: case HcExt::BLASTHcOutside: case HcExt::None: { - ShowSevereError(state, format("{}{}=\"{}, check input", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Check Input Entered :{}", Alphas(Ptr + 1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, check input", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Check Input Entered :{}", Alphas(Ptr + 1))); ErrorsFound = true; } break; @@ -1170,7 +1174,7 @@ void GetUserConvCoeffs(EnergyPlusData &state) } else if (Alphas(Ptr) == "INSIDE") { if (state.dataSurface->surfIntConv(surfNum).userModelNum != 0) { - ShowSevereError(state, format("{}{}=\"{}, duplicate (inside)", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, duplicate (inside)", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Duplicate (Inside) assignment attempt."); ErrorsFound = true; continue; @@ -1183,20 +1187,20 @@ void GetUserConvCoeffs(EnergyPlusData &state) case HcInt::UserValue: case HcInt::UserSchedule: case HcInt::SetByZone: { - ShowSevereError(state, format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Invalid Value Entered, for {}={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); - ShowContinueError(state, format("invalid value in {}={}", ipsc->cAlphaFieldNames(Ptr + 1), Alphas(Ptr + 1))); + 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))); ErrorsFound = true; } break; case HcInt::CeilingDiffuser: case HcInt::TrombeWall: { - ShowSevereError(state, format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Invalid Value Entered, for {}={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); + 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, - format("invalid value in {}={}\". This type is only applicable at a Zone level.", - ipsc->cAlphaFieldNames(Ptr + 1), - Alphas(Ptr + 1))); + EnergyPlus::format("invalid value in {}={}\". This type is only applicable at a Zone level.", + ipsc->cAlphaFieldNames(Ptr + 1), + Alphas(Ptr + 1))); ErrorsFound = true; } break; @@ -1227,12 +1231,12 @@ void GetUserConvCoeffs(EnergyPlusData &state) userIntConvModel.overrideType = OverrideType::Value; userIntConvModel.OverrideValue = Numbers(NumField); if (!ipsc->lAlphaFieldBlanks(Ptr + 2)) { - ShowWarningError(state, format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - format("Since VALUE is used for \"{}\", {}={} is ignored.", - ipsc->cAlphaFieldNames(FieldNo + 1), - ipsc->cAlphaFieldNames(Ptr + 2), - Alphas(Ptr + 2))); + EnergyPlus::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; @@ -1327,8 +1331,8 @@ void GetUserConvCoeffs(EnergyPlusData &state) case HcExt::BLASTHcOutside: case HcExt::UserValue: case HcExt::UserSchedule: { - ShowSevereError(state, format("{}{}=\"{}, check input", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Check Input Entered :{}", Alphas(Ptr + 1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, check input", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Check Input Entered :{}", Alphas(Ptr + 1))); ErrorsFound = true; } break; @@ -1361,12 +1365,12 @@ void GetUserConvCoeffs(EnergyPlusData &state) userExtConvModel.overrideType = OverrideType::Value; userExtConvModel.OverrideValue = Numbers(NumField); if (!ipsc->lAlphaFieldBlanks(Ptr + 2)) { - ShowWarningError(state, format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - format("Since VALUE is used for \"{}\", {}={} is ignored.", - ipsc->cAlphaFieldNames(FieldNo + 2), - ipsc->cAlphaFieldNames(Ptr + 2), - Alphas(Ptr + 2))); + EnergyPlus::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; @@ -1431,19 +1435,19 @@ void GetUserConvCoeffs(EnergyPlusData &state) case HcInt::SetByZone: case HcInt::UserValue: case HcInt::UserSchedule: { - ShowSevereError(state, format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr + 1), Alphas(Ptr + 1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr + 1), Alphas(Ptr + 1))); ErrorsFound = true; } break; case HcInt::CeilingDiffuser: case HcInt::TrombeWall: { - ShowSevereError(state, format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); ShowContinueError(state, - format("invalid value in {}={}\". This type is only applicable at a Zone level.", - ipsc->cAlphaFieldNames(Ptr + 1), - Alphas(Ptr + 1))); + EnergyPlus::format("invalid value in {}={}\". This type is only applicable at a Zone level.", + ipsc->cAlphaFieldNames(Ptr + 1), + Alphas(Ptr + 1))); ErrorsFound = true; } break; @@ -1475,12 +1479,12 @@ void GetUserConvCoeffs(EnergyPlusData &state) userIntConvModel.overrideType = OverrideType::Value; userIntConvModel.OverrideValue = Numbers(NumField); if (!ipsc->lAlphaFieldBlanks(Ptr + 2)) { - ShowWarningError(state, format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - format("Since VALUE is used for \"{}\", {}={} is ignored.", - ipsc->cAlphaFieldNames(FieldNo + 2), - ipsc->cAlphaFieldNames(Ptr + 2), - Alphas(Ptr + 2))); + EnergyPlus::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; @@ -1540,8 +1544,8 @@ void GetUserConvCoeffs(EnergyPlusData &state) } // switch (hcIn) } else { // Error Case - ShowSevereError(state, format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); ErrorsFound = true; } } // for (Pass) @@ -1565,15 +1569,17 @@ void GetUserConvCoeffs(EnergyPlusData &state) userExtConvModel.overrideType != OverrideType::SpecifiedModel)) { ++Count; if (state.dataGlobal->DisplayExtraWarnings) { - ShowSevereError(state, format("{}Surface=\"{}\", mixed algorithms.", RoutineName, userExtConvModel.SurfaceName)); + ShowSevereError(state, EnergyPlus::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, - format("{}{}", RoutineName, format("{} surfaces had different outside convection algorithms specified when", Count))); + ShowSevereMessage( + state, + EnergyPlus::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) { @@ -1660,7 +1666,7 @@ void GetUserConvCoeffs(EnergyPlusData &state) } // if (Count == 1) if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found getting input. Program termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found getting input. Program termination.", RoutineName)); } SetupAdaptiveConvStaticMetaData(state); @@ -1676,8 +1682,8 @@ void ApplyIntConvValue(EnergyPlusData &state, int surfNum, HcInt model, int conv surfIntConv.userModelNum = convUserCoeffNum; } else { ShowWarningError(state, - format("User Supplied Convection Coefficients not overwriting already assigned value for (Inside) in Surface={}", - state.dataSurface->Surface(surfNum).Name)); + EnergyPlus::format("User Supplied Convection Coefficients not overwriting already assigned value for (Inside) in Surface={}", + state.dataSurface->Surface(surfNum).Name)); } } @@ -1692,10 +1698,11 @@ void ApplyIntConvValueMulti(EnergyPlusData &state, SurfaceFilter surfaceFilter, // This subroutine applies a convection type to a set of surfaces. if (state.dataSurface->SurfaceFilterLists[(int)surfaceFilter].empty()) { - ShowWarningError(state, - format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", there were no surfaces of that type " - "found for Inside assignment.", - SurfaceFilterNamesUC[(int)surfaceFilter])); + 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])); return; } @@ -1709,21 +1716,22 @@ void ApplyIntConvValueMulti(EnergyPlusData &state, SurfaceFilter surfaceFilter, surfIntConv.userModelNum = userModelNum; } else if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - 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)); + 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)); } else { ++numWarnings; } } // for (surfNum) if (!state.dataGlobal->DisplayExtraWarnings && numWarnings > 0) { - ShowWarningError(state, - format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already assigned " - "values for {} Inside assignments.", - SurfaceFilterNamesUC[(int)surfaceFilter], - numWarnings)); + ShowWarningError( + state, + EnergyPlus::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already assigned " + "values for {} Inside assignments.", + SurfaceFilterNamesUC[(int)surfaceFilter], + numWarnings)); } } @@ -1740,9 +1748,10 @@ void ApplyExtConvValue(EnergyPlusData &state, int surfNum, HcExt model, int user surfExtConv.model = model; surfExtConv.userModelNum = userModelNum; } else { - ShowWarningError(state, - format("User Supplied Convection Coefficients not overwriting already assigned value for (Outside) in Surface={}", - state.dataSurface->Surface(surfNum).Name)); + ShowWarningError( + state, + EnergyPlus::format("User Supplied Convection Coefficients not overwriting already assigned value for (Outside) in Surface={}", + state.dataSurface->Surface(surfNum).Name)); } } @@ -1773,21 +1782,22 @@ void ApplyExtConvValueMulti(EnergyPlusData &state, SurfaceFilter surfaceFilter, surfExtConv.userModelNum = convUserCoeffNum; } else if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - 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)); + 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)); } else { ++numWarnings; } } // for (surfNum) if (!state.dataGlobal->DisplayExtraWarnings && numWarnings > 0) { - ShowWarningError(state, - format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already assigned " - "values for {} Outside assignments.", - SurfaceFilterNamesUC[(int)surfaceFilter], - numWarnings)); + ShowWarningError( + state, + EnergyPlus::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already assigned " + "values for {} Outside assignments.", + SurfaceFilterNamesUC[(int)surfaceFilter], + numWarnings)); } } @@ -2429,7 +2439,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, format("Trombe wall convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, EnergyPlus::format("Trombe wall convection model not applicable for foundation surface ={}", surface.Name)); } state.dataHeatBalSurf->SurfHConvInt(SurfNum) = 2.0 * HConvNet; } @@ -2769,7 +2779,7 @@ void CalcISO15099WindowIntConvCoeff(EnergyPlusData &state, Real64 sineTilt = surface.SinTilt; if (surface.ExtBoundCond == DataSurfaces::KivaFoundation) { - ShowFatalError(state, format("ISO15099 convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, EnergyPlus::format("ISO15099 convection model not applicable for foundation surface ={}", surface.Name)); } state.dataHeatBalSurf->SurfHConvInt(SurfNum) = @@ -3653,7 +3663,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, format("Fohanno Polidori convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, EnergyPlus::format("Fohanno Polidori convection model not applicable for foundation surface ={}", surface.Name)); } Hn = CallCalcFohannoPolidoriVerticalWall(state, (SurfOutTemp - state.dataSurface->SurfOutDryBulbTemp(SurfNum)), @@ -3880,7 +3890,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, format("Blocken Windward convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, EnergyPlus::format("Blocken Windward convection model not applicable for foundation surface ={}", surface.Name)); } } break; @@ -3888,7 +3898,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, format("Emmel Vertical convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, EnergyPlus::format("Emmel Vertical convection model not applicable for foundation surface ={}", surface.Name)); } } break; @@ -3896,7 +3906,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, format("Emmel Roof convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, EnergyPlus::format("Emmel Roof convection model not applicable for foundation surface ={}", surface.Name)); } break; } break; @@ -4437,7 +4447,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError(state, format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A1 surface named{}", surface.Name)); + ShowSevereError( + state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A1 surface named{}", surface.Name)); } } break; // A1 @@ -4464,7 +4475,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError(state, format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A2 surface named{}", surface.Name)); + ShowSevereError( + state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A2 surface named{}", surface.Name)); } } break; // A2 @@ -4492,7 +4504,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError(state, format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A3 surface named{}", surface.Name)); + ShowSevereError( + state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A3 surface named{}", surface.Name)); } } break; // A3 @@ -4522,7 +4535,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError(state, format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for B surface named{}", surface.Name)); + ShowSevereError( + state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for B surface named{}", surface.Name)); } } break; // B @@ -4552,7 +4566,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError(state, format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for C surface named{}", surface.Name)); + ShowSevereError( + state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for C surface named{}", surface.Name)); } } break; // C @@ -4580,7 +4595,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError(state, format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for D surface named{}", surface.Name)); + ShowSevereError( + state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for D surface named{}", surface.Name)); } } break; // D @@ -4634,15 +4650,17 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError(state, - format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for E surface named {}", surface.Name)); + ShowSevereError( + state, + EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for E surface named {}", surface.Name)); } } } break; // E default: - ShowSevereError(state, - format("DynamicIntConvSurfaceClassification: failed to determine zone flow regime for surface named {}", surface.Name)); + ShowSevereError( + state, + EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to determine zone flow regime for surface named {}", surface.Name)); } // Set report var after surface has been classified @@ -5449,74 +5467,76 @@ Real64 CalcBeausoleilMorrisonMixedStableFloor(Real64 const DeltaTemp, // void ShowWarningHydraulicDiameterZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh) { if (errorIdx == 0) { - ShowWarningMessage(state, format("{}: Convection model not evaluated (would divide by zero)", eoh.routineName)); - ShowContinueError( - state, format("Effective hydraulic diameter is zero, convection model not applicable for {} named {}", eoh.objectType, eoh.objectName)); + 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)); ShowContinueError(state, "Convection heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringWarningErrorAtEnd(state, - format("{}: Convection model not evaluated because effective hydraulic diameter is zero " - "and set to 9.999 [W/m2-K]", - eoh.routineName), + EnergyPlus::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, format("{}: Convection model not evaluated (would divide by zero)", eoh.routineName)); + ShowWarningMessage(state, EnergyPlus::format("{}: Convection model not evaluated (would divide by zero)", eoh.routineName)); ShowContinueError(state, "The temperature difference between surface and air is zero"); - ShowContinueError(state, format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::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, - format("{}: Convection model not evaluated because of zero temperature " - "difference and set to 9.999 [W/m2-K]", - eoh.routineName), + EnergyPlus::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, format("{}: Convection model not evaluated (bad relative window location)", eoh.routineName)); - ShowContinueError(state, format("Value for window location = {}", winLoc)); - ShowContinueError(state, format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); + ShowSevereMessage(state, EnergyPlus::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, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringSevereErrorAtEnd(state, - format("{}: Convection model not evaluated because bad window " - "location and set to 9.999 [W/m2-K]", - eoh.routineName), + EnergyPlus::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, format("{}: Convection model not evaluated (zero zone exterior perimeter length)", eoh.routineName)); + ShowWarningError(state, EnergyPlus::format("{}: Convection model not evaluated (zero zone exterior perimeter length)", eoh.routineName)); ShowContinueError(state, "Value for zone exterior perimeter length = 0.0"); - ShowContinueError(state, format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::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, - format("{}: Convection model not evaluated because bad perimeter " - "length and set to 9.999 [W/m2-K]", - eoh.routineName), + EnergyPlus::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, format("{}: Convection model not evaluated (bad face area)", eoh.routineName)); + ShowSevereMessage(state, EnergyPlus::format("{}: Convection model not evaluated (bad face area)", eoh.routineName)); ShowContinueError(state, "Value for effective face area = 0.0"); - ShowContinueError(state, format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::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, format("{}: Convection model not evaluated because bad face area and set to 9.999 [W/m2-k]", eoh.routineName), errorIdx); + state, EnergyPlus::format("{}: Convection model not evaluated because bad face area and set to 9.999 [W/m2-k]", eoh.routineName), errorIdx); } Real64 CalcBeausoleilMorrisonMixedStableFloor(EnergyPlusData &state, @@ -6202,8 +6222,8 @@ 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, format("Value for effective length scale = {:.5R}", LengthScale)); - ShowContinueError(state, format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); + 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, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringSevereErrorAtEnd(state, @@ -6262,8 +6282,8 @@ Real64 CalcBlockenWindward(EnergyPlusData &state, } if (state.dataConvect->CalcBlockenWindwardErrorIDX == 0) { ShowSevereMessage(state, "CalcBlockenWindward: Convection model wind angle calculation suspect (developer issue)"); - ShowContinueError(state, format("Value for theta angle = {:.5R}", Theta)); - ShowContinueError(state, format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); + 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, "Convection model uses EmmelVertical correlation and the simulation continues"); } ShowRecurringSevereErrorAtEnd( @@ -6403,8 +6423,8 @@ Real64 CalcClearRoof(EnergyPlusData &state, if (state.dataSurface->Surface(SurfNum).ExtBoundCond != DataSurfaces::OtherSideCondModeledExt) { if (state.dataConvect->CalcClearRoofErrorIDX == 0) { ShowSevereMessage(state, "CalcClearRoof: Convection model not evaluated (bad value for distance to roof edge)"); - ShowContinueError(state, format("Value for distance to roof edge ={:.3R}", x)); - ShowContinueError(state, format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); + 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, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringSevereErrorAtEnd( diff --git a/src/EnergyPlus/CoolTower.cc b/src/EnergyPlus/CoolTower.cc index b03f62f5c62..92b99ff8891 100644 --- a/src/EnergyPlus/CoolTower.cc +++ b/src/EnergyPlus/CoolTower.cc @@ -207,14 +207,15 @@ namespace CoolTower { if (lAlphaBlanks(3)) { ShowSevereError( state, - format("{}=\"{}\" invalid {} is required but input is blank.", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cAlphaFields(3))); + EnergyPlus::format( + "{}=\"{}\" invalid {} is required but input is blank.", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cAlphaFields(3))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - CurrentModuleObject, - s_ipsc->cAlphaArgs(1), - cAlphaFields(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + CurrentModuleObject, + s_ipsc->cAlphaArgs(1), + cAlphaFields(3), + s_ipsc->cAlphaArgs(3))); } ErrorsFound = true; } else if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr == 0) { @@ -241,7 +242,8 @@ namespace CoolTower { if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).FlowCtrlType == FlowCtrl::Invalid) { ShowSevereError( state, - format("{}=\"{}\" invalid {}=\"{}\".", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cAlphaFields(5), s_ipsc->cAlphaArgs(5))); + EnergyPlus::format( + "{}=\"{}\" invalid {}=\"{}\".", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cAlphaFields(5), s_ipsc->cAlphaArgs(5))); ErrorsFound = true; } } @@ -256,15 +258,17 @@ namespace CoolTower { state.dataCoolTower->CoolTowerSys(CoolTowerNum).MaxWaterFlowRate = MaximumWaterFlowRate; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, format("...Maximum Allowable=[{:.2R}].", MaximumWaterFlowRate)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(1), s_ipsc->rNumericArgs(1))); + ShowContinueError(state, EnergyPlus::format("...Maximum Allowable=[{:.2R}].", MaximumWaterFlowRate)); } if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).MaxWaterFlowRate < MinimumWaterFlowRate) { state.dataCoolTower->CoolTowerSys(CoolTowerNum).MaxWaterFlowRate = MinimumWaterFlowRate; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, format("...Minimum Allowable=[{:.2R}].", MinimumWaterFlowRate)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(1), s_ipsc->rNumericArgs(1))); + ShowContinueError(state, EnergyPlus::format("...Minimum Allowable=[{:.2R}].", MinimumWaterFlowRate)); } state.dataCoolTower->CoolTowerSys(CoolTowerNum).TowerHeight = s_ipsc->rNumericArgs(2); // Get effective tower height @@ -272,15 +276,17 @@ namespace CoolTower { state.dataCoolTower->CoolTowerSys(CoolTowerNum).TowerHeight = MaxHeight; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, format("...Maximum Allowable=[{:.2R}].", MaxHeight)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(2), s_ipsc->rNumericArgs(2))); + ShowContinueError(state, EnergyPlus::format("...Maximum Allowable=[{:.2R}].", MaxHeight)); } if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).TowerHeight < MinHeight) { state.dataCoolTower->CoolTowerSys(CoolTowerNum).TowerHeight = MinHeight; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, format("...Minimum Allowable=[{:.2R}].", MinHeight)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(2), s_ipsc->rNumericArgs(2))); + ShowContinueError(state, EnergyPlus::format("...Minimum Allowable=[{:.2R}].", MinHeight)); } state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletArea = s_ipsc->rNumericArgs(3); // Get outlet area @@ -288,15 +294,17 @@ namespace CoolTower { state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletArea = MaxValue; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(3), s_ipsc->rNumericArgs(3))); - ShowContinueError(state, format("...Maximum Allowable=[{:.2R}].", MaxValue)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(3), s_ipsc->rNumericArgs(3))); + ShowContinueError(state, EnergyPlus::format("...Maximum Allowable=[{:.2R}].", MaxValue)); } if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletArea < MinValue) { state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletArea = MinValue; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(3), s_ipsc->rNumericArgs(3))); - ShowContinueError(state, format("...Minimum Allowable=[{:.2R}].", MinValue)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(3), s_ipsc->rNumericArgs(3))); + ShowContinueError(state, EnergyPlus::format("...Minimum Allowable=[{:.2R}].", MinValue)); } state.dataCoolTower->CoolTowerSys(CoolTowerNum).MaxAirVolFlowRate = s_ipsc->rNumericArgs(4); // Maximum limit of air flow to the space @@ -304,15 +312,17 @@ namespace CoolTower { state.dataCoolTower->CoolTowerSys(CoolTowerNum).MaxAirVolFlowRate = MaxValue; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(4), s_ipsc->rNumericArgs(4))); - ShowContinueError(state, format("...Maximum Allowable=[{:.2R}].", MaxValue)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(4), s_ipsc->rNumericArgs(4))); + ShowContinueError(state, EnergyPlus::format("...Maximum Allowable=[{:.2R}].", MaxValue)); } if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).MaxAirVolFlowRate < MinValue) { state.dataCoolTower->CoolTowerSys(CoolTowerNum).MaxAirVolFlowRate = MinValue; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(4), s_ipsc->rNumericArgs(4))); - ShowContinueError(state, format("...Minimum Allowable=[{:.2R}].", MinValue)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(4), s_ipsc->rNumericArgs(4))); + ShowContinueError(state, EnergyPlus::format("...Minimum Allowable=[{:.2R}].", MinValue)); } state.dataCoolTower->CoolTowerSys(CoolTowerNum).MinZoneTemp = @@ -321,15 +331,17 @@ namespace CoolTower { state.dataCoolTower->CoolTowerSys(CoolTowerNum).MinZoneTemp = MaxValue; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(5), s_ipsc->rNumericArgs(5))); - ShowContinueError(state, format("...Maximum Allowable=[{:.2R}].", MaxValue)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(5), s_ipsc->rNumericArgs(5))); + ShowContinueError(state, EnergyPlus::format("...Maximum Allowable=[{:.2R}].", MaxValue)); } if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).MinZoneTemp < MinValue) { state.dataCoolTower->CoolTowerSys(CoolTowerNum).MinZoneTemp = MinValue; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(5), s_ipsc->rNumericArgs(5))); - ShowContinueError(state, format("...Minimum Allowable=[{:.2R}].", MinValue)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(5), s_ipsc->rNumericArgs(5))); + ShowContinueError(state, EnergyPlus::format("...Minimum Allowable=[{:.2R}].", MinValue)); } state.dataCoolTower->CoolTowerSys(CoolTowerNum).FracWaterLoss = s_ipsc->rNumericArgs(6); // Fraction of water loss @@ -337,15 +349,17 @@ namespace CoolTower { state.dataCoolTower->CoolTowerSys(CoolTowerNum).FracWaterLoss = MaxFrac; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(6), s_ipsc->rNumericArgs(6))); - ShowContinueError(state, format("...Maximum Allowable=[{:.2R}].", MaxFrac)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(6), s_ipsc->rNumericArgs(6))); + ShowContinueError(state, EnergyPlus::format("...Maximum Allowable=[{:.2R}].", MaxFrac)); } if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).FracWaterLoss < MinFrac) { state.dataCoolTower->CoolTowerSys(CoolTowerNum).FracWaterLoss = MinFrac; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(6), s_ipsc->rNumericArgs(6))); - ShowContinueError(state, format("...Minimum Allowable=[{:.2R}].", MinFrac)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(6), s_ipsc->rNumericArgs(6))); + ShowContinueError(state, EnergyPlus::format("...Minimum Allowable=[{:.2R}].", MinFrac)); } state.dataCoolTower->CoolTowerSys(CoolTowerNum).FracFlowSched = s_ipsc->rNumericArgs(7); // Fraction of loss of air flow @@ -353,15 +367,17 @@ namespace CoolTower { state.dataCoolTower->CoolTowerSys(CoolTowerNum).FracFlowSched = MaxFrac; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(7), s_ipsc->rNumericArgs(7))); - ShowContinueError(state, format("...Maximum Allowable=[{:.2R}].", MaxFrac)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.2R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(7), s_ipsc->rNumericArgs(7))); + ShowContinueError(state, EnergyPlus::format("...Maximum Allowable=[{:.2R}].", MaxFrac)); } if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).FracFlowSched < MinFrac) { state.dataCoolTower->CoolTowerSys(CoolTowerNum).FracFlowSched = MinFrac; ShowWarningError( state, - format("{}=\"{}\" invalid {}=[{:.5R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(7), s_ipsc->rNumericArgs(7))); - ShowContinueError(state, format("...Minimum Allowable=[{:.2R}].", MinFrac)); + EnergyPlus::format( + "{}=\"{}\" invalid {}=[{:.5R}].", CurrentModuleObject, s_ipsc->cAlphaArgs(1), cNumericFields(7), s_ipsc->rNumericArgs(7))); + ShowContinueError(state, EnergyPlus::format("...Minimum Allowable=[{:.2R}].", MinFrac)); } state.dataCoolTower->CoolTowerSys(CoolTowerNum).RatedPumpPower = s_ipsc->rNumericArgs(8); // Get rated pump power @@ -375,7 +391,7 @@ namespace CoolTower { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); } for (int CoolTowerNum = 1; CoolTowerNum <= NumCoolTowers; ++CoolTowerNum) { @@ -620,7 +636,7 @@ namespace CoolTower { if (OutletTemp < state.dataEnvrn->OutWetBulbTemp) { ShowSevereError(state, "Cooltower outlet temperature exceed the outdoor wet bulb temperature reset to input values"); - ShowContinueError(state, format("Occurs in Cooltower ={}", state.dataCoolTower->CoolTowerSys(CoolTowerNum).Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Cooltower ={}", state.dataCoolTower->CoolTowerSys(CoolTowerNum).Name)); } WaterFlowRate /= UCFactor; diff --git a/src/EnergyPlus/CostEstimateManager.cc b/src/EnergyPlus/CostEstimateManager.cc index 8dff3c12fc4..98401cb4bf4 100644 --- a/src/EnergyPlus/CostEstimateManager.cc +++ b/src/EnergyPlus/CostEstimateManager.cc @@ -218,7 +218,7 @@ namespace CostEstimateManager { state.dataCostEstimateManager->CurntBldg.RegionalModifier = state.dataIPShortCut->rNumericArgs(7); } else if (NumCostAdjust > 1) { - ShowSevereError(state, format("{}: Only one instance of this object is allowed.", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Only one instance of this object is allowed.", cCurrentModuleObject)); ErrorsFound = true; } @@ -243,7 +243,7 @@ namespace CostEstimateManager { state.dataCostEstimateManager->RefrncBldg.RegionalModifier = state.dataIPShortCut->rNumericArgs(8); } else if (NumRefAdjust > 1) { - ShowSevereError(state, format("{} : Only one instance of this object is allowed.", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{} : Only one instance of this object is allowed.", cCurrentModuleObject)); ErrorsFound = true; } @@ -298,8 +298,9 @@ namespace CostEstimateManager { // is PerSquareMeter non-zero? if it is are other cost per values set? // issue warning that 'Cost Estimate requested for Constructions with zero cost per unit area if (state.dataCostEstimateManager->CostLineItem(Item).PerSquareMeter == 0) { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\" Construction object needs non-zero construction costs per square meter", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\" Construction object needs non-zero construction costs per square meter", state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } @@ -307,10 +308,11 @@ namespace CostEstimateManager { ThisConstructStr = state.dataCostEstimateManager->CostLineItem(Item).ParentObjName; ThisConstructID = Util::FindItem(ThisConstructStr, state.dataConstruction->Construct); if (ThisConstructID == 0) { // do any surfaces have the specified construction? If not issue warning. - ShowWarningError(state, - format("ComponentCost:LineItem: \"{}\" Construction=\"{}\", no surfaces have the Construction specified", - state.dataCostEstimateManager->CostLineItem(Item).LineName, - state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + ShowWarningError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\" Construction=\"{}\", no surfaces have the Construction specified", + state.dataCostEstimateManager->CostLineItem(Item).LineName, + state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); ShowContinueError(state, "No costs will be calculated for this Construction."); // ErrorsFound = .TRUE. continue; @@ -322,24 +324,27 @@ namespace CostEstimateManager { // test if too many pricing methods are set in user input if ((state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap > 0.0) && (state.dataCostEstimateManager->CostLineItem(Item).PerEach > 0.0)) { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", {}, too many pricing methods specified", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", {}, too many pricing methods specified", state.dataCostEstimateManager->CostLineItem(Item).LineName, ParentObjectNamesUC[static_cast(state.dataCostEstimateManager->CostLineItem(Item).ParentObjType)])); ErrorsFound = true; } if ((state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap > 0.0) && (state.dataCostEstimateManager->CostLineItem(Item).PerKWCapPerCOP > 0.0)) { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", {}, too many pricing methods specified", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", {}, too many pricing methods specified", state.dataCostEstimateManager->CostLineItem(Item).LineName, ParentObjectNamesUC[static_cast(state.dataCostEstimateManager->CostLineItem(Item).ParentObjType)])); ErrorsFound = true; } if ((state.dataCostEstimateManager->CostLineItem(Item).PerEach > 0.0) && (state.dataCostEstimateManager->CostLineItem(Item).PerKWCapPerCOP > 0.0)) { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", {}, too many pricing methods specified", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", {}, too many pricing methods specified", state.dataCostEstimateManager->CostLineItem(Item).LineName, ParentObjectNamesUC[static_cast(state.dataCostEstimateManager->CostLineItem(Item).ParentObjType)])); ErrorsFound = true; @@ -348,8 +353,9 @@ namespace CostEstimateManager { if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName == "*") { // wildcard, apply to all such components } else if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName.empty()) { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", {}, too many pricing methods specified", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", {}, too many pricing methods specified", state.dataCostEstimateManager->CostLineItem(Item).LineName, ParentObjectNamesUC[static_cast(state.dataCostEstimateManager->CostLineItem(Item).ParentObjType)])); ErrorsFound = true; @@ -368,14 +374,14 @@ namespace CostEstimateManager { } } if (!coilFound) { - ShowWarningError( - state, - format("ComponentCost:LineItem: \"{}\", {}, invalid coil specified", - state.dataCostEstimateManager->CostLineItem(Item).LineName, - ParentObjectNamesUC[static_cast(state.dataCostEstimateManager->CostLineItem(Item).ParentObjType)])); + ShowWarningError(state, + EnergyPlus::format( + "ComponentCost:LineItem: \"{}\", {}, invalid coil specified", + state.dataCostEstimateManager->CostLineItem(Item).LineName, + ParentObjectNamesUC[static_cast(state.dataCostEstimateManager->CostLineItem(Item).ParentObjType)])); ShowContinueError(state, - format("Coil Specified=\"{}\", calculations will not be completed for this item.", - state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + EnergyPlus::format("Coil Specified=\"{}\", calculations will not be completed for this item.", + state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); } } } break; @@ -384,22 +390,22 @@ namespace CostEstimateManager { if ((state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap > 0.0) && (state.dataCostEstimateManager->CostLineItem(Item).PerEach > 0.0)) { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, too many pricing methods specified", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, too many pricing methods specified", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } if ((state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap > 0.0) && (state.dataCostEstimateManager->CostLineItem(Item).PerKWCapPerCOP > 0.0)) { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, too many pricing methods specified", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, too many pricing methods specified", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } if ((state.dataCostEstimateManager->CostLineItem(Item).PerEach > 0.0) && (state.dataCostEstimateManager->CostLineItem(Item).PerKWCapPerCOP > 0.0)) { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, too many pricing methods specified", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, too many pricing methods specified", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } // check for wildcard * in object name.. @@ -407,27 +413,27 @@ namespace CostEstimateManager { } else if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName.empty()) { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, need to specify a Reference Object Name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, need to specify a Reference Object Name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } else { // assume name is probably useful thisCoil = Util::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, state.dataHeatingCoils->HeatingCoil); if (thisCoil == 0) { ShowWarningError(state, - format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, invalid coil specified", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Coil:Heating:Fuel, invalid coil specified", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ShowContinueError(state, - format("Coil Specified=\"{}\", calculations will not be completed for this item.", - state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + EnergyPlus::format("Coil Specified=\"{}\", calculations will not be completed for this item.", + state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); } } } break; case ParentObject::ChillerElectric: { if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName.empty()) { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Chiller:Electric, need to specify a Reference Object Name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Chiller:Electric, need to specify a Reference Object Name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } thisChil = 0; @@ -440,18 +446,19 @@ namespace CostEstimateManager { } if (thisChil == 0) { ShowWarningError(state, - format("ComponentCost:LineItem: \"{}\", Chiller:Electric, invalid chiller specified.", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Chiller:Electric, invalid chiller specified.", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ShowContinueError(state, - format("Chiller Specified=\"{}\", calculations will not be completed for this item.", - state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + EnergyPlus::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, - format("ComponentCost:LineItem: \"{}\", Daylighting:Controls, need to specify a Reference Object Name", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Daylighting:Controls, need to specify a Reference Object Name", state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } else { @@ -460,9 +467,10 @@ namespace CostEstimateManager { state.dataCostEstimateManager->CostLineItem(Item).Qty = state.dataDayltg->ZoneDaylight(ThisZoneID).totRefPts; } else { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Daylighting:Controls, need to specify a valid zone name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError(state, format("Zone specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + 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)); ErrorsFound = true; } } @@ -473,24 +481,26 @@ namespace CostEstimateManager { if (ThisSurfID > 0) { ThisZoneID = Util::FindItem(state.dataSurface->Surface(ThisSurfID).ZoneName, Zone); if (ThisZoneID == 0) { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, need to specify a valid zone name", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, need to specify a valid zone name", state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError(state, format("Zone specified=\"{}\".", state.dataSurface->Surface(ThisSurfID).ZoneName)); + ShowContinueError(state, EnergyPlus::format("Zone specified=\"{}\".", state.dataSurface->Surface(ThisSurfID).ZoneName)); ErrorsFound = true; } } else { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, need to specify a valid surface name", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, need to specify a valid surface name", state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError(state, - format("Surface specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + ShowContinueError( + state, EnergyPlus::format("Surface specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); ErrorsFound = true; } } else { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, specify a Reference Object Name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, specify a Reference Object Name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } break; @@ -498,8 +508,8 @@ namespace CostEstimateManager { if ((state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap > 0.0) && (state.dataCostEstimateManager->CostLineItem(Item).PerEach > 0.0)) { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Lights, too many pricing methods specified", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Lights, too many pricing methods specified", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } if (state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap != 0.0) { @@ -507,16 +517,16 @@ namespace CostEstimateManager { ThisZoneID = Util::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, Zone); if (ThisZoneID == 0) { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Lights, need to specify a valid zone name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError(state, - format("Zone specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + 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)); ErrorsFound = true; } } else { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Lights, need to specify a Reference Object Name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Lights, need to specify a Reference Object Name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } @@ -527,41 +537,46 @@ 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, - format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, only available for model type " + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, only available for model type " "PhotovoltaicPerformance:Simple", state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } else { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a valid PV array", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a valid PV array", state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError(state, - format("PV Array specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + ShowContinueError( + state, + EnergyPlus::format("PV Array specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); ErrorsFound = true; } } else { - ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a Reference Object Name", + ShowSevereError( + state, + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a Reference Object Name", state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } else { ShowSevereError(state, - format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a per-kilowatt cost ", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a per-kilowatt cost ", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } break; default: { ShowWarningError(state, - format("ComponentCost:LineItem: \"{}\", invalid cost item -- not included in cost estimate.", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + EnergyPlus::format("ComponentCost:LineItem: \"{}\", invalid cost item -- not included in cost estimate.", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ShowContinueError( state, - format("... invalid object type={}", - format(ParentObjectNamesUC[static_cast(state.dataCostEstimateManager->CostLineItem(Item).ParentObjType)]))); + EnergyPlus::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 19b4b1c4b10..c12f61a2459 100644 --- a/src/EnergyPlus/CrossVentMgr.cc +++ b/src/EnergyPlus/CrossVentMgr.cc @@ -444,10 +444,10 @@ namespace RoomAir { ShowSevereError( state, "RoomAirModelCrossVent:EvolveParaUCSDCV: Illegal leakage component referenced in the cross ventilation room air model"); ShowContinueError(state, - format("Surface {} in zone {} uses leakage component {}", - state.afn->AirflowNetworkLinkageData(Ctd).Name, - state.dataHeatBal->Zone(ZoneNum).Name, - state.afn->AirflowNetworkLinkageData(Ctd).CompName)); + EnergyPlus::format("Surface {} in zone {} uses leakage component {}", + state.afn->AirflowNetworkLinkageData(Ctd).Name, + state.dataHeatBal->Zone(ZoneNum).Name, + state.afn->AirflowNetworkLinkageData(Ctd).CompName)); ShowContinueError(state, "Only leakage component types AirflowNetwork:MultiZone:Component:DetailedOpening and "); ShowContinueError(state, "AirflowNetwork:MultiZone:Surface:Crack can be used with the cross ventilation room air model"); ShowFatalError(state, "Previous severe error causes program termination"); diff --git a/src/EnergyPlus/CurveManager.cc b/src/EnergyPlus/CurveManager.cc index 0bfe15eda86..cad53dc5423 100644 --- a/src/EnergyPlus/CurveManager.cc +++ b/src/EnergyPlus/CurveManager.cc @@ -770,38 +770,40 @@ namespace Curve { } if (Numbers(7) > Numbers(8)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(7), - Numbers(7), - state.dataIPShortCut->cNumericFieldNames(8), - Numbers(8))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(7), + Numbers(7), + state.dataIPShortCut->cNumericFieldNames(8), + Numbers(8))); ErrorsFound = true; } if (Numbers(9) > Numbers(10)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(9), - Numbers(9), - state.dataIPShortCut->cNumericFieldNames(10), - Numbers(10))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(9), + Numbers(9), + state.dataIPShortCut->cNumericFieldNames(10), + Numbers(10))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveOutputTypeValid(Alphas(4))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -841,39 +843,39 @@ namespace Curve { thisCurve->inputLimits[0].min = Numbers(13); thisCurve->inputLimits[0].max = Numbers(14); if (Numbers(13) > Numbers(14)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(13), - Numbers(13), - state.dataIPShortCut->cNumericFieldNames(14), - Numbers(14))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(13), + Numbers(13), + state.dataIPShortCut->cNumericFieldNames(14), + Numbers(14))); ErrorsFound = true; } thisCurve->inputLimits[1].min = Numbers(15); thisCurve->inputLimits[1].max = Numbers(16); if (Numbers(15) > Numbers(16)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(15), - Numbers(15), - state.dataIPShortCut->cNumericFieldNames(16), - Numbers(16))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(15), + Numbers(15), + state.dataIPShortCut->cNumericFieldNames(16), + Numbers(16))); ErrorsFound = true; } thisCurve->inputLimits[2].min = Numbers(17); thisCurve->inputLimits[2].max = Numbers(18); if (Numbers(17) > Numbers(18)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(17), - Numbers(17), - state.dataIPShortCut->cNumericFieldNames(18), - Numbers(18))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(17), + Numbers(17), + state.dataIPShortCut->cNumericFieldNames(18), + Numbers(18))); ErrorsFound = true; } @@ -888,22 +890,25 @@ namespace Curve { if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveInputTypeValid(Alphas(4))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for Z is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for Z is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 5) { if (!IsCurveOutputTypeValid(Alphas(5))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -950,23 +955,24 @@ namespace Curve { } if (Numbers(5) > Numbers(6)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(5), - Numbers(5), - state.dataIPShortCut->cNumericFieldNames(6), - Numbers(6))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(5), + Numbers(5), + state.dataIPShortCut->cNumericFieldNames(6), + Numbers(6))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1012,23 +1018,24 @@ namespace Curve { } if (Numbers(6) > Numbers(7)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(6), - Numbers(6), - state.dataIPShortCut->cNumericFieldNames(7), - Numbers(7))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(6), + Numbers(6), + state.dataIPShortCut->cNumericFieldNames(7), + Numbers(7))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1074,23 +1081,24 @@ namespace Curve { } if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(4), - Numbers(4), - state.dataIPShortCut->cNumericFieldNames(5), - Numbers(5))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(4), + Numbers(4), + state.dataIPShortCut->cNumericFieldNames(5), + Numbers(5))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1138,38 +1146,40 @@ namespace Curve { } if (Numbers(7) > Numbers(8)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(7), - Numbers(7), - state.dataIPShortCut->cNumericFieldNames(8), - Numbers(8))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(7), + Numbers(7), + state.dataIPShortCut->cNumericFieldNames(8), + Numbers(8))); ErrorsFound = true; } if (Numbers(9) > Numbers(10)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(9), - Numbers(9), - state.dataIPShortCut->cNumericFieldNames(10), - Numbers(10))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(9), + Numbers(9), + state.dataIPShortCut->cNumericFieldNames(10), + Numbers(10))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveOutputTypeValid(Alphas(4))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1217,38 +1227,40 @@ namespace Curve { } if (Numbers(7) > Numbers(8)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(7), - Numbers(7), - state.dataIPShortCut->cNumericFieldNames(8), - Numbers(8))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(7), + Numbers(7), + state.dataIPShortCut->cNumericFieldNames(8), + Numbers(8))); ErrorsFound = true; } if (Numbers(9) > Numbers(10)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(9), - Numbers(9), - state.dataIPShortCut->cNumericFieldNames(10), - Numbers(10))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(9), + Numbers(9), + state.dataIPShortCut->cNumericFieldNames(10), + Numbers(10))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveOutputTypeValid(Alphas(4))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1294,23 +1306,24 @@ namespace Curve { } if (Numbers(3) > Numbers(4)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(3), - Numbers(3), - state.dataIPShortCut->cNumericFieldNames(4), - Numbers(4))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(3), + Numbers(3), + state.dataIPShortCut->cNumericFieldNames(4), + Numbers(4))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1358,38 +1371,40 @@ namespace Curve { } if (Numbers(11) > Numbers(12)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(11), - Numbers(11), - state.dataIPShortCut->cNumericFieldNames(12), - Numbers(12))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(11), + Numbers(11), + state.dataIPShortCut->cNumericFieldNames(12), + Numbers(12))); ErrorsFound = true; } if (Numbers(13) > Numbers(14)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(13), - Numbers(13), - state.dataIPShortCut->cNumericFieldNames(14), - Numbers(14))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(13), + Numbers(13), + state.dataIPShortCut->cNumericFieldNames(14), + Numbers(14))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveOutputTypeValid(Alphas(4))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1463,53 +1478,56 @@ namespace Curve { } if (Numbers(28) > Numbers(29)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(28), - Numbers(28), - state.dataIPShortCut->cNumericFieldNames(29), - Numbers(29))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(28), + Numbers(28), + state.dataIPShortCut->cNumericFieldNames(29), + Numbers(29))); ErrorsFound = true; } if (Numbers(30) > Numbers(31)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(30), - Numbers(30), - state.dataIPShortCut->cNumericFieldNames(31), - Numbers(31))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(30), + Numbers(30), + state.dataIPShortCut->cNumericFieldNames(31), + Numbers(31))); ErrorsFound = true; } if (Numbers(32) > Numbers(33)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(32), - Numbers(32), - state.dataIPShortCut->cNumericFieldNames(33), - Numbers(33))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(32), + Numbers(32), + state.dataIPShortCut->cNumericFieldNames(33), + Numbers(33))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveInputTypeValid(Alphas(4))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for Z is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for Z is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 5) { if (!IsCurveOutputTypeValid(Alphas(5))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1567,26 +1585,27 @@ namespace Curve { int MinIndex = 2 * i + 4; int MaxIndex = MinIndex + 1; if (Numbers(MinIndex) > Numbers(MaxIndex)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(MinIndex), - Numbers(MinIndex), - state.dataIPShortCut->cNumericFieldNames(MaxIndex), - Numbers(MaxIndex))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(MinIndex), + Numbers(MinIndex), + state.dataIPShortCut->cNumericFieldNames(MaxIndex), + Numbers(MaxIndex))); ErrorsFound = true; } int InputTypeIndex = i + 1; if (NumAlphas >= InputTypeIndex) { if (!IsCurveInputTypeValid(Alphas(InputTypeIndex))) { ShowWarningError( - state, format("In {} named {} the Input Unit Type for {} is invalid.", CurrentModuleObject, Alphas(1), VarNames[i])); + state, + EnergyPlus::format("In {} named {} the Input Unit Type for {} is invalid.", CurrentModuleObject, Alphas(1), VarNames[i])); } } } if (NumAlphas >= 6) { if (!IsCurveOutputTypeValid(Alphas(6))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1645,26 +1664,27 @@ namespace Curve { int MinIndex = 2 * i + 5; int MaxIndex = MinIndex + 1; if (Numbers(MinIndex) > Numbers(MaxIndex)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(MinIndex), - Numbers(MinIndex), - state.dataIPShortCut->cNumericFieldNames(MaxIndex), - Numbers(MaxIndex))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(MinIndex), + Numbers(MinIndex), + state.dataIPShortCut->cNumericFieldNames(MaxIndex), + Numbers(MaxIndex))); ErrorsFound = true; } int InputTypeIndex = i + 1; if (NumAlphas >= InputTypeIndex) { if (!IsCurveInputTypeValid(Alphas(InputTypeIndex))) { ShowWarningError( - state, format("In {} named {} the Input Unit Type for {} is invalid.", CurrentModuleObject, Alphas(1), VarNames[i])); + state, + EnergyPlus::format("In {} named {} the Input Unit Type for {} is invalid.", CurrentModuleObject, Alphas(1), VarNames[i])); } } } if (NumAlphas >= 7) { if (!IsCurveOutputTypeValid(Alphas(7))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1702,13 +1722,13 @@ namespace Curve { thisCurve->inputLimits[0].max = Numbers(5); if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(4), - Numbers(4), - state.dataIPShortCut->cNumericFieldNames(5), - Numbers(5))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(4), + Numbers(4), + state.dataIPShortCut->cNumericFieldNames(5), + Numbers(5))); ErrorsFound = true; } @@ -1722,12 +1742,13 @@ namespace Curve { } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1776,23 +1797,23 @@ namespace Curve { } if (Numbers(5) > Numbers(6)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(5), - Numbers(5), - state.dataIPShortCut->cNumericFieldNames(6), - Numbers(6))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(5), + Numbers(5), + state.dataIPShortCut->cNumericFieldNames(6), + Numbers(6))); ErrorsFound = true; } if (Numbers(7) > Numbers(8)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(7), - Numbers(7), - state.dataIPShortCut->cNumericFieldNames(8), - Numbers(8))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(7), + Numbers(7), + state.dataIPShortCut->cNumericFieldNames(8), + Numbers(8))); ErrorsFound = true; } @@ -1840,24 +1861,25 @@ namespace Curve { } if (Numbers(5) > Numbers(6)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(5), - Numbers(5), - state.dataIPShortCut->cNumericFieldNames(6), - Numbers(6))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(5), + Numbers(5), + state.dataIPShortCut->cNumericFieldNames(6), + Numbers(6))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Exponential Skew Normal @@ -1904,24 +1926,25 @@ namespace Curve { } if (Numbers(6) > Numbers(7)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(6), - Numbers(6), - state.dataIPShortCut->cNumericFieldNames(7), - Numbers(7))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(6), + Numbers(6), + state.dataIPShortCut->cNumericFieldNames(7), + Numbers(7))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Sigmoid @@ -1968,24 +1991,25 @@ namespace Curve { } if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(4), - Numbers(4), - state.dataIPShortCut->cNumericFieldNames(5), - Numbers(5))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(4), + Numbers(4), + state.dataIPShortCut->cNumericFieldNames(5), + Numbers(5))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Rectangular Hyperbola Type 1 @@ -2032,24 +2056,25 @@ namespace Curve { } if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(4), - Numbers(4), - state.dataIPShortCut->cNumericFieldNames(5), - Numbers(5))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(4), + Numbers(4), + state.dataIPShortCut->cNumericFieldNames(5), + Numbers(5))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Rectangular Hyperbola Type 2 @@ -2096,24 +2121,25 @@ namespace Curve { } if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(4), - Numbers(4), - state.dataIPShortCut->cNumericFieldNames(5), - Numbers(5))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(4), + Numbers(4), + state.dataIPShortCut->cNumericFieldNames(5), + Numbers(5))); ErrorsFound = true; } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Exponential Decay @@ -2151,13 +2177,13 @@ namespace Curve { thisCurve->inputLimits[0].max = Numbers(7); if (Numbers(6) > Numbers(7)) { // error - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(6), - Numbers(6), - state.dataIPShortCut->cNumericFieldNames(7), - Numbers(7))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(6), + Numbers(6), + state.dataIPShortCut->cNumericFieldNames(7), + Numbers(7))); ErrorsFound = true; } @@ -2172,12 +2198,13 @@ namespace Curve { if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Exponential Decay @@ -2191,8 +2218,9 @@ namespace Curve { if (numOfCPArray != 1) { ShowSevereError( state, - format("GetCurveInput: Currently exactly one (\"1\") {} object per simulation is required when using the AirflowNetwork model.", - CurrentModuleObject)); + EnergyPlus::format( + "GetCurveInput: Currently exactly one (\"1\") {} object per simulation is required when using the AirflowNetwork model.", + CurrentModuleObject)); ErrorsFound = true; } else { state.dataInputProcessing->inputProcessor->getObjectItem(state, @@ -2220,25 +2248,25 @@ namespace Curve { dirMax = std::max(dirMax, Numbers(j)); if (j > 1) { if (windDirs[j - 2] >= windDirs[j - 1]) { - ShowSevereError(state, format("GetCurveInput: An {} object ", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::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."); ShowContinueError(state, "Wind direction values must be entered in ascending order."); ShowContinueError(state, - format("{} = {:.2R} {} = {:.2R}", - state.dataIPShortCut->cNumericFieldNames(j), - windDirs[j - 2], - state.dataIPShortCut->cNumericFieldNames[j + 1], - windDirs[j - 1])); + EnergyPlus::format("{} = {:.2R} {} = {:.2R}", + state.dataIPShortCut->cNumericFieldNames(j), + windDirs[j - 2], + state.dataIPShortCut->cNumericFieldNames[j + 1], + windDirs[j - 1])); ErrorsFound = true; } } } // Check that the first table value is zero if (dirMin != 0.0) { - ShowSevereError(state, format("GetCurveInput: An {} object ", CurrentModuleObject)); - ShowContinueError(state, format("has a nonzero minimum value of {:.2R}", dirMin)); + ShowSevereError(state, EnergyPlus::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; } @@ -2270,11 +2298,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, - format("GetCurveInput: Invalid {} = {} in {} = ", - state.dataIPShortCut->cAlphaFieldNames(2), - Alphas(2), - CurrentModuleObject)); - ShowContinueError(state, format("The valid name is {}", wpcName)); + EnergyPlus::format("GetCurveInput: Invalid {} = {} in {} = ", + state.dataIPShortCut->cAlphaFieldNames(2), + Alphas(2), + CurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("The valid name is {}", wpcName)); ErrorsFound = true; } @@ -2282,7 +2310,7 @@ namespace Curve { thisCurve->curveType = CurveType::BtwxtTableLookup; - thisCurve->contextString = format("Table:Lookup \"{}\"", Alphas(1)); + thisCurve->contextString = EnergyPlus::format("Table:Lookup \"{}\"", Alphas(1)); std::pair callbackPair{&state, thisCurve->contextString}; state.dataCurveManager->btwxtManager.setLoggingContext(&callbackPair); @@ -2298,11 +2326,12 @@ namespace Curve { int MaxTableNums = NumNumbers; if (NumNumbers != numWindDir) { - ShowSevereError(state, format("GetCurveInput: For {}: ", CurrentModuleObject)); - ShowContinueError(state, - 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)); + ShowSevereError(state, EnergyPlus::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)); ErrorsFound = true; } else { std::vector axis; @@ -2370,7 +2399,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 = format("Table:IndependentVariable \"{}\"", indVarName); + std::string contextString = EnergyPlus::format("Table:IndependentVariable \"{}\"", indVarName); std::pair callbackPair{&state, contextString}; state.dataCurveManager->btwxtManager.setLoggingContext(&callbackPair); @@ -2383,7 +2412,7 @@ namespace Curve { if (indVarInstance.count("unit_type") != 0u) { std::string unitType = indVarInstance.at("unit_type").get(); if (!IsCurveInputTypeValid(unitType)) { - ShowSevereError(state, format("{}: Unit Type [{}] is invalid", contextString, unitType)); + ShowSevereError(state, EnergyPlus::format("{}: Unit Type [{}] is invalid", contextString, unitType)); } } @@ -2393,12 +2422,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, format("{}: No column number defined for external file \"{}\"", contextString, filePath)); + ShowSevereError(state, + EnergyPlus::format("{}: No column number defined for external file \"{}\"", contextString, filePath)); ErrorsFound = true; } if (indVarInstance.count("external_file_starting_row_number") == 0u) { - ShowSevereError(state, - format("{}: No starting row number defined for external file \"{}\"", contextString, filePath)); + ShowSevereError( + state, + EnergyPlus::format("{}: No starting row number defined for external file \"{}\"", contextString, filePath)); ErrorsFound = true; } @@ -2431,7 +2462,7 @@ namespace Curve { axis.push_back(value.at("value").get()); } } else { - ShowSevereError(state, format("{}: No values defined.", contextString)); + ShowSevereError(state, EnergyPlus::format("{}: No values defined.", contextString)); ErrorsFound = true; } @@ -2448,7 +2479,8 @@ namespace Curve { auto extrapIterator = indVarInstance.find("extrapolation_method"); if (extrapIterator != indVarInstance.end()) { if (extrapIterator->get() == "Unavailable") { - ShowSevereError(state, format("{}: Extrapolation method \"Unavailable\" is not yet available.", contextString)); + ShowSevereError(state, + EnergyPlus::format("{}: Extrapolation method \"Unavailable\" is not yet available.", contextString)); ErrorsFound = true; } else if (extrapIterator->get() == "Constant") { extrapMethod = Btwxt::ExtrapolationMethod::constant; @@ -2479,7 +2511,7 @@ namespace Curve { } else { // Independent variable does not exist - ShowSevereError(state, format("{}: No Table:IndependentVariable found.", contextString)); + ShowSevereError(state, EnergyPlus::format("{}: No Table:IndependentVariable found.", contextString)); ErrorsFound = true; } } @@ -2509,7 +2541,7 @@ namespace Curve { std::string indVarListName = Util::makeUPPER(fields.at("independent_variable_list_name").get()); - thisCurve->contextString = format("Table:Lookup \"{}\"", thisCurve->Name); + thisCurve->contextString = EnergyPlus::format("Table:Lookup \"{}\"", thisCurve->Name); std::pair callbackPair{&state, thisCurve->contextString}; state.dataCurveManager->btwxtManager.setLoggingContext(&callbackPair); @@ -2517,7 +2549,7 @@ namespace Curve { if (fields.count("output_unit_type") != 0u) { std::string unitType = fields.at("output_unit_type").get(); if (!IsCurveOutputTypeValid(unitType)) { - ShowSevereError(state, format("{}: Output Unit Type [{}] is invalid", thisCurve->contextString, unitType)); + ShowSevereError(state, EnergyPlus::format("{}: Output Unit Type [{}] is invalid", thisCurve->contextString, unitType)); } } @@ -2586,8 +2618,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, format("Table:Lookup named \"{}\": Normalization divisor entered as zero, which is invalid", thisCurve->Name)); + ShowSevereError(state, + EnergyPlus::format("Table:Lookup named \"{}\": Normalization divisor entered as zero, which is invalid", + thisCurve->Name)); ErrorsFound = true; continue; } @@ -2599,12 +2632,14 @@ namespace Curve { fs::path filePath(tmp); if (fields.count("external_file_column_number") == 0u) { - ShowSevereError(state, format("{}: No column number defined for external file \"{}\"", thisCurve->contextString, filePath)); + ShowSevereError( + state, EnergyPlus::format("{}: No column number defined for external file \"{}\"", thisCurve->contextString, filePath)); ErrorsFound = true; } if (fields.count("external_file_starting_row_number") == 0u) { - ShowSevereError(state, - format("{}: No starting row number defined for external file \"{}\"", thisCurve->contextString, filePath)); + ShowSevereError( + state, + EnergyPlus::format("{}: No starting row number defined for external file \"{}\"", thisCurve->contextString, filePath)); ErrorsFound = true; } @@ -2632,7 +2667,7 @@ namespace Curve { lookupValues.push_back(value.at("output_value").get() / normalizationDivisor); } } else { - ShowSevereError(state, format("{}: No values defined.", thisCurve->contextString)); + ShowSevereError(state, EnergyPlus::format("{}: No values defined.", thisCurve->contextString)); ErrorsFound = true; } @@ -2651,8 +2686,9 @@ namespace Curve { } } if (pointsSpecified && pointsUnspecified) { - ShowSevereError(state, - format("{}: Table is to be normalized using AutomaticWithDivisor, but not all independent variables define a " + 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)); ShowContinueError(state, " Make sure either:"); @@ -2689,7 +2725,7 @@ namespace Curve { gridIndex = gridMap.at(indVarListName); } else { // Independent variable list does not exist - ShowSevereError(state, format("Table:Lookup \"{}\" : No Table:IndependentVariableList found.", indVarListName)); + ShowSevereError(state, EnergyPlus::format("Table:Lookup \"{}\" : No Table:IndependentVariableList found.", indVarListName)); ErrorsFound = true; } return gridIndex; @@ -2775,12 +2811,14 @@ namespace Curve { std::size_t row = colAndRow.second; // 0 indexed auto &content = contents[col]; if (col >= numColumns) { - ShowFatalError(state, - format("File \"{}\" : Requested column ({}) exceeds the number of columns ({}).", filePath, col + 1, numColumns)); + ShowFatalError( + state, + EnergyPlus::format("File \"{}\" : Requested column ({}) exceeds the number of columns ({}).", filePath, col + 1, numColumns)); } if (row >= numRows) { - ShowFatalError(state, - format("File \"{}\" : Requested starting row ({}) exceeds the number of rows ({}).", filePath, row + 1, numRows)); + ShowFatalError( + state, + EnergyPlus::format("File \"{}\" : Requested starting row ({}) exceeds the number of rows ({}).", filePath, row + 1, numRows)); } std::vector array(numRows - row); std::transform(content.begin() + row, content.end(), array.begin(), [](std::string_view str) { @@ -2819,7 +2857,7 @@ namespace Curve { for (int dim = 1; dim <= thisCurve->numDims; ++dim) { std::string numStr = fmt::to_string(dim); SetupOutputVariable(state, - format("Performance Curve Input Variable {} Value", numStr), + EnergyPlus::format("Performance Curve Input Variable {} Value", numStr), Constant::Units::None, thisCurve->inputs[dim - 1], OutputProcessor::TimeStepType::System, @@ -3061,7 +3099,7 @@ namespace Curve { std::string validDimsString = fmt::to_string(validDims[0]); for (std::size_t i = 1; i < validDims.size(); i++) { - validDimsString += format(" or {}", validDims[i]); + validDimsString += EnergyPlus::format(" or {}", validDims[i]); } ShowSevereCurveDims(state, eoh, curveFieldText, thisCurve->Name, validDimsString, curveDim); @@ -3076,9 +3114,9 @@ namespace Curve { int dim) { ShowSevereError(state, fmt::format("{}: {}=\"{}\"", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("...Invalid curve for {}.", fieldName)); - ShowContinueError(state, format("...Input curve=\"{}\" has dimension {}.", curveName, dim)); - ShowContinueError(state, format("...Curve type must have dimension {}.", validDims)); + 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)); } std::string GetCurveName(EnergyPlusData &state, int const CurveIndex) // index of curve in curve array @@ -3335,9 +3373,10 @@ namespace Curve { thisCurve->outputLimits.min = CurveMin; thisCurve->outputLimits.minPresent = true; } else { - ShowSevereError( - state, - format("SetCurveOutputMinValue: CurveIndex=[{}] not in range of curves=[1:{}].", CurveIndex, state.dataCurveManager->curves.size())); + ShowSevereError(state, + EnergyPlus::format("SetCurveOutputMinValue: CurveIndex=[{}] not in range of curves=[1:{}].", + CurveIndex, + state.dataCurveManager->curves.size())); ErrorsFound = true; } } @@ -3365,9 +3404,9 @@ namespace Curve { thisCurve->outputLimits.maxPresent = true; } else { ShowSevereError(state, - format("SetCurveOutputMinMaxValues: CurveIndex=[{}] not in range of curves=[1:{}].", - CurveIndex, - state.dataCurveManager->curves.size())); + EnergyPlus::format("SetCurveOutputMinMaxValues: CurveIndex=[{}] not in range of curves=[1:{}].", + CurveIndex, + state.dataCurveManager->curves.size())); ErrorsFound = true; } } @@ -3472,8 +3511,8 @@ namespace Curve { PressureCurveType = DataBranchAirLoopPlant::PressureCurveType::Generic; PressureCurveIndex = TempCurveIndex; } else { - ShowSevereError(state, format("Plant Pressure Simulation: Found error for curve: {}", PressureCurveName)); - ShowContinueError(state, format("Curve type detected: {}", objectNames[static_cast(GenericCurveType)])); + ShowSevereError(state, EnergyPlus::format("Plant Pressure Simulation: Found error for curve: {}", PressureCurveName)); + ShowContinueError(state, EnergyPlus::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"); @@ -3588,7 +3627,8 @@ namespace Curve { } if (!state.dataCurveManager->FrictionFactorErrorHasOccurred) { ShowSevereError(state, "Plant Pressure System: Error in moody friction factor calculation"); - ShowContinueError(state, format("Current Conditions: Roughness Ratio={:.7R}; Reynolds Number={:.1R}", RoughnessRatio, ReynoldsNumber)); + ShowContinueError( + state, EnergyPlus::format("Current Conditions: Roughness Ratio={:.7R}; Reynolds Number={:.1R}", RoughnessRatio, ReynoldsNumber)); ShowContinueError(state, "These conditions resulted in an unhandled numeric issue."); ShowContinueError(state, "Please contact EnergyPlus support/development team to raise an alert about this issue"); ShowContinueError(state, "This issue will occur only one time. The friction factor has been reset to 0.04 for calculations"); @@ -3615,9 +3655,10 @@ namespace Curve { if (curveIndex > 0) { Real64 const CurveVal = CurveValue(state, curveIndex, Var1); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}=\"{}\" curve values", callingRoutineObj, objectName)); - ShowContinueError(state, format("... {} = {} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName, cFieldValue)); - ShowContinueError(state, format("... Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } @@ -3641,9 +3682,10 @@ namespace Curve { if (curveIndex > 0) { Real64 const CurveVal = CurveValue(state, curveIndex, Var1, Var2); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}=\"{}\" curve values", callingRoutineObj, objectName)); - ShowContinueError(state, format("... {} = {} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName, cFieldValue)); - ShowContinueError(state, format("... Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } diff --git a/src/EnergyPlus/DElightManagerF.cc b/src/EnergyPlus/DElightManagerF.cc index f9370c0fd9c..2ac0ba73b6f 100644 --- a/src/EnergyPlus/DElightManagerF.cc +++ b/src/EnergyPlus/DElightManagerF.cc @@ -242,7 +242,7 @@ namespace DElightManagerF { // Register Error if 0 DElight RefPts have been input for valid DElight object if (znDayl.TotalDaylRefPoints == 0) { - ShowSevereError(state, format("No Reference Points input for daylighting zone using DElight ={}", znDayl.Name)); + ShowSevereError(state, EnergyPlus::format("No Reference Points input for daylighting zone using DElight ={}", znDayl.Name)); ErrorsFound = true; } @@ -250,7 +250,8 @@ namespace DElightManagerF { if (znDayl.TotalDaylRefPoints > 100) { // Restrict to 100 Ref Pt maximum znDayl.TotalDaylRefPoints = 100; - ShowWarningError(state, format("Maximum of 100 Reference Points exceeded for daylighting zone using DElight ={}", znDayl.Name)); + ShowWarningError( + state, EnergyPlus::format("Maximum of 100 Reference Points exceeded for daylighting zone using DElight ={}", znDayl.Name)); ShowWarningError(state, " Only first 100 Reference Points included in DElight analysis"); } @@ -394,7 +395,7 @@ namespace DElightManagerF { if (wndo.Multiplier > 1.0) { ShowSevereError( state, - format( + EnergyPlus::format( "Multiplier > 1.0 for window {} not allowed since it is in a zone with DElight daylighting.", wndo.Name)); ErrorsFound = true; @@ -403,8 +404,9 @@ namespace DElightManagerF { // Error if window has a shading device (blind/shade/screen) since // DElight cannot perform dynamic shading device deployment if (wndo.HasShadeControl) { - ShowSevereError(state, - format("Shading Device on window {} dynamic control is not supported in a zone with " + ShowSevereError( + state, + EnergyPlus::format("Shading Device on window {} dynamic control is not supported in a zone with " "DElight daylighting.", wndo.Name)); ErrorsFound = true; @@ -557,8 +559,9 @@ namespace DElightManagerF { } // Register Error if there is no valid Doppelganger for current Complex Fenestration if (iDoppelganger == 0) { - ShowSevereError(state, - format("No Doppelganger Window Surface found for Complex Fenestration ={}", cfs.Name)); + ShowSevereError( + state, + EnergyPlus::format("No Doppelganger Window Surface found for Complex Fenestration ={}", cfs.Name)); ErrorsFound = true; } } // The current Opaque Bounding Surface hosts the current CFS object? @@ -609,34 +612,40 @@ namespace DElightManagerF { // Validate that Reference Point coordinates are within the host Zone if (RefPt_WCS_Coord.x < thisZone.MinimumX || RefPt_WCS_Coord.x > thisZone.MaximumX) { - ShowSevereError(state, - format("DElightInputGenerator:Reference point X Value outside Zone Min/Max X, Zone={}", zn.Name)); - ShowContinueError(state, - format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", - thisZone.MinimumX, - RefPt_WCS_Coord.x, - thisZone.MaximumX)); + ShowSevereError( + state, + EnergyPlus::format("DElightInputGenerator:Reference point X Value outside Zone Min/Max X, Zone={}", zn.Name)); + ShowContinueError( + state, + EnergyPlus::format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", + thisZone.MinimumX, + RefPt_WCS_Coord.x, + thisZone.MaximumX)); ErrorsFound = true; } if (RefPt_WCS_Coord.y < thisZone.MinimumY || RefPt_WCS_Coord.y > thisZone.MaximumY) { - ShowSevereError(state, - format("DElightInputGenerator:Reference point Y Value outside Zone Min/Max Y, Zone={}", zn.Name)); - ShowContinueError(state, - format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", - thisZone.MinimumY, - RefPt_WCS_Coord.y, - thisZone.MaximumY)); + ShowSevereError( + state, + EnergyPlus::format("DElightInputGenerator:Reference point Y Value outside Zone Min/Max Y, Zone={}", zn.Name)); + ShowContinueError( + state, + EnergyPlus::format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", + thisZone.MinimumY, + RefPt_WCS_Coord.y, + thisZone.MaximumY)); ErrorsFound = true; } if (RefPt_WCS_Coord.z < state.dataHeatBal->Zone(izone).MinimumZ || RefPt_WCS_Coord.z > thisZone.MaximumZ) { ShowSevereError( state, - format("DElightInputGenerator:Reference point Z Value outside Zone Min/Max Z, Zone={}", thisZone.Name)); - ShowContinueError(state, - format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", - thisZone.MinimumZ, - RefPt_WCS_Coord.z, - thisZone.MaximumZ)); + EnergyPlus::format("DElightInputGenerator:Reference point Z Value outside Zone Min/Max Z, Zone={}", + thisZone.Name)); + ShowContinueError( + state, + EnergyPlus::format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", + thisZone.MinimumZ, + RefPt_WCS_Coord.z, + thisZone.MaximumZ)); ErrorsFound = true; } @@ -755,24 +764,27 @@ namespace DElightManagerF { cfs.ComplexFeneType = state.dataIPShortCut->cAlphaArgs(2); cfs.surfName = state.dataIPShortCut->cAlphaArgs(3); if (Util::FindItemInList(cfs.surfName, state.dataSurface->Surface) == 0) { - ShowSevereError(state, - format("{}{}", + ShowSevereError( + state, + EnergyPlus::format("{}{}", cCurrentModuleObject, ": " + cfs.Name + ", invalid " + state.dataIPShortCut->cAlphaFieldNames(3) + "=\"" + cfs.surfName + "\".")); ErrorsFound = true; } cfs.wndwName = state.dataIPShortCut->cAlphaArgs(4); if (Util::FindItemInList(cfs.surfName, state.dataSurface->Surface) == 0) { - ShowSevereError(state, - format("{}{}", + ShowSevereError( + state, + EnergyPlus::format("{}{}", cCurrentModuleObject, ": " + cfs.Name + ", invalid " + state.dataIPShortCut->cAlphaFieldNames(4) + "=\"" + cfs.wndwName + "\".")); ErrorsFound = true; } cfs.feneRota = state.dataIPShortCut->rNumericArgs(1); if (cfs.feneRota < 0. || cfs.feneRota > 360.) { - ShowSevereError(state, - format("{}{}", + ShowSevereError( + state, + EnergyPlus::format("{}{}", cCurrentModuleObject, ": " + cfs.Name + ", invalid " + state.dataIPShortCut->cNumericFieldNames(1) + " outside of range 0 to 360.")); ErrorsFound = true; @@ -829,9 +841,10 @@ namespace DElightManagerF { OldAspectRatio = rNumerics(1); NewAspectRatio = rNumerics(2); if (cAlphas(1) != "XY") { - ShowWarningError( - state, - format("{}{}", CurrentModuleObject, ": invalid " + state.dataIPShortCut->cAlphaFieldNames(1) + "=" + cAlphas(1) + "...ignored.")); + ShowWarningError(state, + EnergyPlus::format("{}{}", + CurrentModuleObject, + ": invalid " + state.dataIPShortCut->cAlphaFieldNames(1) + "=" + cAlphas(1) + "...ignored.")); } doTransform = true; state.dataSurface->AspectTransform = true; diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 478065c62f6..edf7dd49132 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -163,25 +163,25 @@ void SimDXCoil(EnergyPlusData &state, if (CompIndex == 0) { DXCoilNum = Util::FindItemInList(CompName, state.dataDXCoils->DXCoil); if (DXCoilNum == 0) { - ShowFatalError(state, format("DX Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("DX Coil not found={}", CompName)); } CompIndex = DXCoilNum; } else { DXCoilNum = CompIndex; if (DXCoilNum > state.dataDXCoils->NumDXCoils || DXCoilNum < 1) { ShowFatalError(state, - format("SimDXCoil: Invalid CompIndex passed={}, Number of DX Coils={}, Coil name={}", - DXCoilNum, - state.dataDXCoils->NumDXCoils, - CompName)); + EnergyPlus::format("SimDXCoil: Invalid CompIndex passed={}, Number of DX Coils={}, Coil name={}", + DXCoilNum, + state.dataDXCoils->NumDXCoils, + CompName)); } if (state.dataDXCoils->CheckEquipName(DXCoilNum)) { if (!CompName.empty() && CompName != state.dataDXCoils->DXCoil(DXCoilNum).Name) { ShowFatalError(state, - format("SimDXCoil: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - DXCoilNum, - CompName, - state.dataDXCoils->DXCoil(DXCoilNum).Name)); + EnergyPlus::format("SimDXCoil: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + DXCoilNum, + CompName, + state.dataDXCoils->DXCoil(DXCoilNum).Name)); } state.dataDXCoils->CheckEquipName(DXCoilNum) = false; } @@ -234,8 +234,8 @@ void SimDXCoil(EnergyPlusData &state, CalcVRFHeatingCoil_FluidTCtrl(state, compressorOp, DXCoilNum, PartLoadRatio, fanOp, _, MaxCap); } break; default: { - ShowSevereError(state, format("Error detected in DX Coil={}", CompName)); - ShowContinueError(state, format("Invalid DX Coil Type={}", state.dataDXCoils->DXCoil(DXCoilNum).DXCoilType)); + ShowSevereError(state, EnergyPlus::format("Error detected in DX Coil={}", CompName)); + ShowContinueError(state, EnergyPlus::format("Invalid DX Coil Type={}", state.dataDXCoils->DXCoil(DXCoilNum).DXCoilType)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -290,25 +290,26 @@ void SimDXCoilMultiSpeed(EnergyPlusData &state, if (CompIndex == 0) { DXCoilNum = Util::FindItemInList(CompName, state.dataDXCoils->DXCoil); if (DXCoilNum == 0) { - ShowFatalError(state, format("DX Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("DX Coil not found={}", CompName)); } CompIndex = DXCoilNum; } else { DXCoilNum = CompIndex; if (DXCoilNum > state.dataDXCoils->NumDXCoils || DXCoilNum < 1) { ShowFatalError(state, - format("SimDXCoilMultiSpeed: Invalid CompIndex passed={}, Number of DX Coils={}, Coil name={}", - DXCoilNum, - state.dataDXCoils->NumDXCoils, - CompName)); + EnergyPlus::format("SimDXCoilMultiSpeed: Invalid CompIndex passed={}, Number of DX Coils={}, Coil name={}", + DXCoilNum, + state.dataDXCoils->NumDXCoils, + CompName)); } if (state.dataDXCoils->CheckEquipName(DXCoilNum)) { if (!CompName.empty() && CompName != state.dataDXCoils->DXCoil(DXCoilNum).Name) { - ShowFatalError(state, - format("SimDXCoilMultiSpeed: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - DXCoilNum, - CompName, - state.dataDXCoils->DXCoil(DXCoilNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimDXCoilMultiSpeed: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + DXCoilNum, + CompName, + state.dataDXCoils->DXCoil(DXCoilNum).Name)); } state.dataDXCoils->CheckEquipName(DXCoilNum) = false; } @@ -354,8 +355,8 @@ void SimDXCoilMultiSpeed(EnergyPlusData &state, } break; default: { - ShowSevereError(state, format("Error detected in DX Coil={}", CompName)); - ShowContinueError(state, format("Invalid DX Coil Type={}", state.dataDXCoils->DXCoil(DXCoilNum).DXCoilType)); + ShowSevereError(state, EnergyPlus::format("Error detected in DX Coil={}", CompName)); + ShowContinueError(state, EnergyPlus::format("Invalid DX Coil Type={}", state.dataDXCoils->DXCoil(DXCoilNum).DXCoilType)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -440,25 +441,25 @@ void SimDXCoilMultiMode(EnergyPlusData &state, if (CompIndex == 0) { DXCoilNum = Util::FindItemInList(CompName, state.dataDXCoils->DXCoil); if (DXCoilNum == 0) { - ShowFatalError(state, format("DX Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("DX Coil not found={}", CompName)); } CompIndex = DXCoilNum; } else { DXCoilNum = CompIndex; if (DXCoilNum > state.dataDXCoils->NumDXCoils || DXCoilNum < 1) { ShowFatalError(state, - format("SimDXCoilMultiMode: Invalid CompIndex passed={}, Number of DX Coils={}, Coil name={}", - DXCoilNum, - state.dataDXCoils->NumDXCoils, - CompName)); + EnergyPlus::format("SimDXCoilMultiMode: Invalid CompIndex passed={}, Number of DX Coils={}, Coil name={}", + DXCoilNum, + state.dataDXCoils->NumDXCoils, + CompName)); } if (state.dataDXCoils->CheckEquipName(DXCoilNum)) { if ((!CompName.empty()) && (CompName != state.dataDXCoils->DXCoil(DXCoilNum).Name)) { ShowFatalError(state, - format("SimDXCoilMultiMode: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - DXCoilNum, - CompName, - state.dataDXCoils->DXCoil(DXCoilNum).Name)); + EnergyPlus::format("SimDXCoilMultiMode: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + DXCoilNum, + CompName, + state.dataDXCoils->DXCoil(DXCoilNum).Name)); } state.dataDXCoils->CheckEquipName(DXCoilNum) = false; } @@ -501,8 +502,9 @@ void SimDXCoilMultiMode(EnergyPlusData &state, thisDXCoil.DehumidificationMode = DehumidMode; if ((int)DehumidMode > thisDXCoil.NumDehumidModes) { - ShowFatalError(state, - format("{} \"{}\" - Requested enhanced dehumidification mode not available.", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowFatalError( + state, + EnergyPlus::format("{} \"{}\" - Requested enhanced dehumidification mode not available.", thisDXCoil.DXCoilType, thisDXCoil.Name)); } // If a single-stage coil OR If part load is zero, @@ -681,8 +683,8 @@ void SimDXCoilMultiMode(EnergyPlusData &state, // Calculate basin heater power CalcBasinHeaterPowerForMultiModeDXCoil(state, DXCoilNum, DehumidMode); } else { - ShowSevereError(state, format("Error detected in DX Coil={}", CompName)); - ShowContinueError(state, format("Invalid DX Coil Type={}", thisDXCoil.DXCoilType)); + ShowSevereError(state, EnergyPlus::format("Error detected in DX Coil={}", CompName)); + ShowContinueError(state, EnergyPlus::format("Invalid DX Coil Type={}", thisDXCoil.DXCoilType)); ShowFatalError(state, "Preceding condition causes termination."); } @@ -940,8 +942,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RatedSHR(1) = Numbers(2); thisDXCoil.RatedCOP(1) = Numbers(3); if (thisDXCoil.RatedCOP(1) <= 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0, entered value=[{:.2T}].", cNumericFields(3), Numbers(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", cNumericFields(3), Numbers(3))); ErrorsFound = true; } @@ -974,11 +976,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -1006,11 +1008,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -1032,11 +1034,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(7))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); } ErrorsFound = true; } else { @@ -1064,11 +1066,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(8))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); } ErrorsFound = true; } else { @@ -1090,11 +1092,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(9))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); } ErrorsFound = true; } else { @@ -1125,19 +1127,19 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\" has out of range values.", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, - format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + 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)); 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, - format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + 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)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 1.0); } @@ -1158,7 +1160,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, format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowWarningError(state, EnergyPlus::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."); } @@ -1178,10 +1180,11 @@ void GetDXCoils(EnergyPlusData &state) ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(1))) { - ShowWarningError(state, format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, - format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", cAlphaFields(10), Alphas(10))); + 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))); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); } @@ -1193,42 +1196,42 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CondenserType(1) = DataHeatBalance::RefrigCondenserType::Evap; thisDXCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\":", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0 or > 1.0.", cNumericFields(11))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(12))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondAirFlow(1) = Numbers(13); if (thisDXCoil.EvapCondAirFlow(1) < 0.0 && thisDXCoil.EvapCondAirFlow(1) != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(12))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(13))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondPumpElecNomPower(1) = Numbers(14); if (thisDXCoil.EvapCondPumpElecNomPower(1) < 0.0 && thisDXCoil.EvapCondPumpElecNomPower(1) != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(13))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(14))); + 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))); ErrorsFound = true; } // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(15); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(14))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(15))); + 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))); ErrorsFound = true; } @@ -1243,7 +1246,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, format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(12), Alphas(12))); + ShowSevereError( + state, EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(12), Alphas(12))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -1290,9 +1294,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.0.", cNumericFields(16))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(17))); + 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))); ErrorsFound = true; } @@ -1302,9 +1306,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.BasinHeaterSetPointTemp = 2.0; } if (thisDXCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(17))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(18))); + 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))); } } @@ -1318,8 +1322,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(16), Alphas(16))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(16), Alphas(16))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -1335,8 +1339,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); } else { // Verify Curve Object, only legal type is Quadratic and Cubic ErrorsFound |= Curve::CheckCurveDims(state, @@ -1374,16 +1378,17 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilSensibleHeatGainRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); } } } // end of the Doe2 DX coil loop if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // Loop over the Multimode DX Coils and get & load the data @@ -1448,7 +1453,8 @@ 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, format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(5), Alphas(5))); + ShowSevereError(state, + EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(5), Alphas(5))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -1464,8 +1470,8 @@ void GetDXCoils(EnergyPlusData &state) // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(1); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.0, entered value=[{:.2T}].", cNumericFields(1), Numbers(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be >= 0.0, entered value=[{:.2T}].", cNumericFields(1), Numbers(1))); ErrorsFound = true; } @@ -1476,9 +1482,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...illegal {} = {}", cNumericFields(3), thisDXCoil.NumCapacityStages)); - ShowContinueError(state, format("...Valid range is 1 to {}", MaxCapacityStages)); + 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)); ErrorsFound = true; } @@ -1486,9 +1492,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...illegal {} = {}", cNumericFields(4), thisDXCoil.NumDehumidModes)); - ShowContinueError(state, format("...Valid range is 0 to {}", MaxDehumidModes)); + 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)); ErrorsFound = true; } @@ -1504,7 +1510,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowSevereError(state, EnergyPlus::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; @@ -1516,8 +1522,8 @@ void GetDXCoils(EnergyPlusData &state) if (Util::SameString(PerfObjectType, "CoilPerformance:DX:Cooling")) { thisDXCoil.CoilPerformanceType_Num(PerfModeNum) = HVAC::CoilPerfDX_CoolBypassEmpirical; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...illegal {}=\"{}\".", cAlphaFields(AlphaIndex), PerfObjectType)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(AlphaIndex), PerfObjectType)); ShowContinueError(state, "Must be \"CoilPerformance:DX:Cooling\"."); ErrorsFound = true; } @@ -1558,11 +1564,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, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields2(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(2))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields2(2), Alphas2(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(2), Alphas2(2))); } ErrorsFound = true; } else { @@ -1590,11 +1596,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, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields2(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(3))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields2(3), Alphas2(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(3), Alphas2(3))); } ErrorsFound = true; } else { @@ -1621,11 +1627,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, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields2(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(4))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields2(4), Alphas2(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(4), Alphas2(4))); } ErrorsFound = true; } else { @@ -1653,11 +1659,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, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields2(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(5))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields2(5), Alphas2(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(5), Alphas2(5))); } ErrorsFound = true; } else { @@ -1684,11 +1690,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, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields2(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(6))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields2(6), Alphas2(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(6), Alphas2(6))); } ErrorsFound = true; } else { @@ -1719,21 +1725,23 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFields2(6), Alphas2(6))); - ShowContinueError( - state, - format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::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)); 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, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFields2(6), Alphas2(6))); - ShowContinueError( - state, - format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::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)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.PLFFPLR(PerfModeNum), ErrorsFound, 1.0); } @@ -1747,7 +1755,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, format("{}{}=\"{}\":", RoutineName, PerfObjectType, PerfObjectName)); + ShowWarningError(state, EnergyPlus::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."); @@ -1769,8 +1777,8 @@ void GetDXCoils(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(PerfModeNum))) { - ShowWarningError(state, format("{}{}=\"{}\":", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("may not be valid {}=\"{}\".", cAlphaFields2(7), Alphas2(7))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::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 " @@ -1783,33 +1791,33 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CondenserType(PerfModeNum) = DataHeatBalance::RefrigCondenserType::Evap; thisDXCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...{}=\"{}\":", cAlphaFields2(8), Alphas2(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...{} cannot be < 0.0 or > 1.0.", cNumericFields2(10))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers2(10))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondAirFlow(PerfModeNum) = Numbers2(11); if (thisDXCoil.EvapCondAirFlow(PerfModeNum) < 0.0 && thisDXCoil.EvapCondAirFlow(PerfModeNum) != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields2(11))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers2(11))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondPumpElecNomPower(PerfModeNum) = Numbers2(12); if (thisDXCoil.EvapCondPumpElecNomPower(PerfModeNum) < 0.0 && thisDXCoil.EvapCondAirFlow(PerfModeNum) != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, format("...{} cannot be less than zero.", cNumericFields2(12))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers2(12))); + 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))); ErrorsFound = true; } @@ -1819,8 +1827,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields2(9), Alphas2(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(9), Alphas2(9))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -1836,8 +1844,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields2(10), Alphas2(10))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(10), Alphas2(10))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -1856,8 +1864,8 @@ void GetDXCoils(EnergyPlusData &state) } } else { // invalid performance object - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("... not found {}=\"{}\".", PerfObjectType, PerfObjectName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("... not found {}=\"{}\".", PerfObjectType, PerfObjectName)); ErrorsFound = true; } // end of valid performance object check AlphaIndex += 2; @@ -1866,9 +1874,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, format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...Capacity Stage {} not active. Therefore,{}", CapacityStageNum, cAlphaFields(AlphaIndex))); - ShowContinueError(state, format("... and {} fields will be ignored.", cAlphaFields(AlphaIndex + 1))); + 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))); } AlphaIndex += 2; } // End of unused capacity stages loop @@ -1914,9 +1923,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.", cNumericFields(6))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(6))); + 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))); ErrorsFound = true; } @@ -1926,9 +1935,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.BasinHeaterSetPointTemp = 2.0; } if (thisDXCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(7))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(7))); + 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))); } } @@ -1942,8 +1951,9 @@ void GetDXCoils(EnergyPlusData &state) } // end of the Multimode DX coil loop if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } //************* Read Heat Pump (DX Heating Coil) Input ********** @@ -2009,11 +2019,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -2051,11 +2061,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -2077,11 +2087,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(7))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); } ErrorsFound = true; } else { @@ -2119,11 +2129,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(8))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); } ErrorsFound = true; } else { @@ -2145,11 +2155,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(9))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); } ErrorsFound = true; } else { @@ -2180,19 +2190,19 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, - format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + 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)); 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, - format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + 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)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 1.0); } @@ -2205,7 +2215,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, format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(11), Alphas(11))); + ShowSevereError( + state, EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(11), Alphas(11))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -2222,12 +2233,12 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.DefrostEIRFT == 0) { if (lAlphaBlanks(10)) { - ShowSevereError(state, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(10))); - ShowContinueError(state, format("...field is required because {} is \"ReverseCycle\".", cAlphaFields(12))); + 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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(10), Alphas(10))); } ErrorsFound = true; } else { @@ -2261,8 +2272,8 @@ void GetDXCoils(EnergyPlusData &state) } if (thisDXCoil.DefrostStrategy == StandardRatings::DefrostStrat::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...illegal {}=\"{}\".", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(12), Alphas(12))); ShowContinueError(state, "...valid values for this field are ReverseCycle or Resistive."); ErrorsFound = true; } @@ -2274,8 +2285,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.DefrostControl = StandardRatings::HPdefrostControl::OnDemand; } if (thisDXCoil.DefrostControl == StandardRatings::HPdefrostControl::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...illegal {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(13), Alphas(13))); ShowContinueError(state, "...valid values for this field are Timed or OnDemand."); ErrorsFound = true; } @@ -2308,9 +2319,9 @@ void GetDXCoils(EnergyPlusData &state) // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(9); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(8))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(9))); + 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))); ErrorsFound = true; } @@ -2320,15 +2331,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, format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = 0.0 for defrost control = TIMED.", cNumericFields(11))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = 0.0 for defrost strategy = RESISTIVE.", cNumericFields(12))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cNumericFields(12))); } // Set Region number for calculating HSPF @@ -2355,10 +2366,11 @@ void GetDXCoils(EnergyPlusData &state) ObjectIsNotParent); // warn if not an outdoor node, but allow if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(1))) { - ShowWarningError(state, format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, - format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", cAlphaFields(14), Alphas(14))); + 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))); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); } @@ -2378,8 +2390,8 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilLatentHeatRemovalRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(15), Alphas(15))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(15), Alphas(15))); } } if (thisDXCoil.SecZonePtr > 0) { @@ -2401,16 +2413,16 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(16)) { thisDXCoil.SecCoilSHRFT = GetCurveIndex(state, Alphas(16)); if (thisDXCoil.SecCoilSHRFT == 0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(16), Alphas(16))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); } } } @@ -2418,8 +2430,9 @@ void GetDXCoils(EnergyPlusData &state) } // end of the DX heating coil loop if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } CurrentModuleObject = "Coil:Cooling:DX:TwoSpeed"; @@ -2503,11 +2516,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -2535,11 +2548,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -2561,11 +2574,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(7))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); } ErrorsFound = true; } else { @@ -2593,11 +2606,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(8))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); } ErrorsFound = true; } else { @@ -2619,11 +2632,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(9))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); } ErrorsFound = true; } else { @@ -2654,19 +2667,19 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, - format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + 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)); 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, - format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + 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)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 1.0); } @@ -2692,11 +2705,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(10))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(10))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(10), Alphas(10))); } ErrorsFound = true; } else { @@ -2724,11 +2737,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(11))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(11))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(11), Alphas(11))); } ErrorsFound = true; } else { @@ -2767,10 +2780,11 @@ void GetDXCoils(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(1))) { - ShowWarningError(state, format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, - format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", cAlphaFields(12), Alphas(12))); + 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))); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); } @@ -2782,57 +2796,57 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CondenserType(1) = DataHeatBalance::RefrigCondenserType::Evap; thisDXCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\":", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0 or > 1.0.", cNumericFields(15))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(15))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondAirFlow(1) = Numbers(16); if (thisDXCoil.EvapCondAirFlow(1) < 0.0 && thisDXCoil.EvapCondAirFlow(1) != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(16))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(16))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondPumpElecNomPower(1) = Numbers(17); if (thisDXCoil.EvapCondPumpElecNomPower(1) < 0.0 && thisDXCoil.EvapCondPumpElecNomPower(1) != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(17))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(17))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondEffect2 = Numbers(18); if (thisDXCoil.EvapCondEffect2 < 0.0 || thisDXCoil.EvapCondEffect2 > 1.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be cannot be < 0.0 or > 1.0.", cNumericFields(18))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(18))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondAirFlow2 = Numbers(19); if (thisDXCoil.EvapCondAirFlow2 < 0.0 && thisDXCoil.EvapCondAirFlow2 != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(19))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(19))); + 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))); ErrorsFound = true; } thisDXCoil.EvapCondPumpElecNomPower2 = Numbers(20); if (thisDXCoil.EvapCondPumpElecNomPower2 < 0.0 && thisDXCoil.EvapCondPumpElecNomPower2 != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(20))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(20))); + 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))); ErrorsFound = true; } @@ -2872,9 +2886,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.0.", cNumericFields(21))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(21))); + 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))); ErrorsFound = true; } @@ -2884,9 +2898,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.BasinHeaterSetPointTemp = 2.0; } if (thisDXCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(22))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(22))); + 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))); } } @@ -2901,8 +2915,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -2919,8 +2933,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(18), Alphas(18))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(18), Alphas(18))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -2936,8 +2950,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -2953,8 +2967,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(20), Alphas(20))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(20), Alphas(20))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -2982,15 +2996,16 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilSensibleHeatGainRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(21), Alphas(21))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(21), Alphas(21))); } } } if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::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 @@ -3033,24 +3048,26 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0, entered value=[{:.2T}].", cRatedHeatingCapFieldName, thisDXCoil.RatedTotCap2)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, thisDXCoil.RatedCOP(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0 and <= 1. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedSHR(1))); + 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))); ErrorsFound = true; } @@ -3059,8 +3076,9 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletDBTemp)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletDBTemp)); ErrorsFound = true; } @@ -3068,16 +3086,18 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWBTemp)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 25 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWaterTemp)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be > 25 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWaterTemp)); ErrorsFound = true; } @@ -3085,8 +3105,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedAirVolFlowRate(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedAirVolFlowRate(1))); ErrorsFound = true; } } @@ -3096,21 +3117,24 @@ void GetDXCoils(EnergyPlusData &state) // move to init if (thisDXCoil.RatedHPWHCondWaterFlow != Constant::AutoCalculate) { if (thisDXCoil.RatedHPWHCondWaterFlow <= 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0 entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedHPWHCondWaterFlow)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be > 0.0 entered value=[{:.3T}].", 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, format("{}{}=\"{}\", outside range", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - 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)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", outside range", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError( - state, format("...Entered Flow rate per watt = [{:.10T}].", (thisDXCoil.RatedHPWHCondWaterFlow / thisDXCoil.RatedTotCap2))); + 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))); } } @@ -3145,17 +3169,19 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.0 entered value=[{:.3T}].", cFieldName, thisDXCoil.HPWHCondPumpElecNomPower)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be >= 0.0 entered value=[{:.3T}].", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - format("...{} must be >= 0 and <= 1. entered value=[{:.3T}].", cFieldName, thisDXCoil.HPWHCondPumpElecNomPower)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + EnergyPlus::format("...{} must be >= 0 and <= 1. entered value=[{:.3T}].", cFieldName, thisDXCoil.HPWHCondPumpElecNomPower)); ErrorsFound = true; } @@ -3215,8 +3241,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, thisDXCoil.CrankcaseHeaterCapacity)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, thisDXCoil.CrankcaseHeaterCapacity)); ErrorsFound = true; } @@ -3224,8 +3251,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.MaxOATCrankcaseHeater)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.MaxOATCrankcaseHeater)); ErrorsFound = true; } @@ -3254,9 +3282,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); - ShowContinueError(state, format("...entered value=\"{}\".", fieldValue)); + 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)); ErrorsFound = true; } // set rated inlet air temperature for curve object verification @@ -3517,8 +3545,9 @@ void GetDXCoils(EnergyPlusData &state) //} // end of the DX water heater coil loop if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::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::cAllCoilTypes(HVAC::CoilDX_HeatPumpWaterHeaterWrapped); @@ -3558,24 +3587,25 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, thisDXCoil.RatedTotCap2)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, thisDXCoil.RatedCOP(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0 and <= 1. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedSHR(1))); + 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))); ErrorsFound = true; } @@ -3584,8 +3614,9 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletDBTemp)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletDBTemp)); ErrorsFound = true; } @@ -3593,16 +3624,18 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWBTemp)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 25 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWaterTemp)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be > 25 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWaterTemp)); ErrorsFound = true; } @@ -3610,8 +3643,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedAirVolFlowRate(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedAirVolFlowRate(1))); ErrorsFound = true; } } @@ -3681,8 +3715,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, thisDXCoil.CrankcaseHeaterCapacity)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, thisDXCoil.CrankcaseHeaterCapacity)); ErrorsFound = true; } @@ -3690,8 +3725,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.MaxOATCrankcaseHeater)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.MaxOATCrankcaseHeater)); ErrorsFound = true; } @@ -3702,7 +3738,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, format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cFieldName, whCapFTCurveName)); + ShowSevereError( + state, EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cFieldName, whCapFTCurveName)); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -3720,9 +3757,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); - ShowContinueError(state, format("...entered value=\"{}\".", fieldValue)); + 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)); ErrorsFound = true; } @@ -3928,8 +3965,9 @@ void GetDXCoils(EnergyPlusData &state) //} // end of the DX water heater wrapped coil loop if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // DX Multispeed cooling coil @@ -4009,9 +4047,11 @@ void GetDXCoils(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(1))) { - ShowWarningError(state, format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", cAlphaFields(5), Alphas(5))); + 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))); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); } @@ -4023,8 +4063,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CondenserType(1) = DataHeatBalance::RefrigCondenserType::Evap; thisDXCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\":", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{}=\"{}\":", cAlphaFields(6), Alphas(6))); ShowContinueError(state, "...must be AirCooled or EvaporativelyCooled."); ErrorsFound = true; } @@ -4066,9 +4106,9 @@ void GetDXCoils(EnergyPlusData &state) // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(2); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cNumericFields(2))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(2))); + 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))); ErrorsFound = true; } @@ -4080,8 +4120,8 @@ void GetDXCoils(EnergyPlusData &state) } else if (Util::SameString(Alphas(9), "No")) { thisDXCoil.PLRImpact = false; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(9), Alphas(9))); ShowContinueError(state, "The allowed choices are Yes or No."); ErrorsFound = true; } @@ -4091,8 +4131,8 @@ void GetDXCoils(EnergyPlusData &state) } else if (Util::SameString(Alphas(10), "No")) { thisDXCoil.LatentImpact = false; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(10), Alphas(10))); ShowContinueError(state, "The allowed choices are Yes or No."); ErrorsFound = true; } @@ -4100,8 +4140,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.0, entered value=[{:.3T}].", cNumericFields(4), Numbers(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be >= 0.0, entered value=[{:.3T}].", cNumericFields(4), Numbers(4))); ErrorsFound = true; } @@ -4111,16 +4151,17 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.BasinHeaterSetPointTemp = 2.0; } if (thisDXCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} is less than 2 {{C}}. Freezing could occur.", cNumericFields(5))); - ShowContinueError(state, format("...entered value=[{:.2T}].", Numbers(5))); + 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))); } } if (!lAlphaBlanks(11)) { thisDXCoil.CrankcaseHeaterCapacityCurveIndex = Curve::GetCurveIndex(state, Alphas(11)); if (thisDXCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve - ShowSevereError(state, format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(11), Alphas(11))); + ShowSevereError( + state, EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(11), Alphas(11))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -4145,8 +4186,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.NumOfSpeeds = Numbers(6); // Number of speeds if (thisDXCoil.NumOfSpeeds < 2) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 2. entered number is {:.0T}", cNumericFields(6), Numbers(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be >= 2. entered number is {:.0T}", cNumericFields(6), Numbers(6))); ErrorsFound = true; } @@ -4189,11 +4230,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(14 + (I - 1) * 6), Alphas(14 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4221,11 +4262,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4252,11 +4293,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(16 + (I - 1) * 6), Alphas(16 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4284,11 +4325,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(17 + (I - 1) * 6), Alphas(17 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4315,11 +4356,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(18 + (I - 1) * 6), Alphas(18 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4350,21 +4391,25 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - format("...{} = {} has out of range value.", cAlphaFields2(18 + (I - 1) * 6), Alphas2(18 + (I - 1) * 6))); - ShowContinueError(state, - format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, EnergyPlus::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))); + ShowContinueError( + state, + EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - format("...{} = {} has out of range value.", cAlphaFields2(18 + (I - 1) * 6), Alphas2(18 + (I - 1) * 6))); - ShowContinueError(state, - format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, EnergyPlus::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))); + ShowContinueError( + state, + EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.MSPLFFPLR(I), ErrorsFound, 1.0); } @@ -4374,34 +4419,38 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, format("...{} cannot be < 0.0, entered value=[{:.4T}].", cNumericFields(13 + (I - 1) * 14), thisDXCoil.MSTwet_Rated(I))); + 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))); ErrorsFound = true; } thisDXCoil.MSGamma_Rated(I) = Numbers(14 + (I - 1) * 14); if (thisDXCoil.MSGamma_Rated(I) < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, format("...{} cannot be < 0.0, entered value=[{:.4T}].", cNumericFields(14 + (I - 1) * 14), thisDXCoil.MSGamma_Rated(I))); + 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))); ErrorsFound = true; } thisDXCoil.MSMaxONOFFCyclesperHour(I) = Numbers(15 + (I - 1) * 14); if (thisDXCoil.Gamma_Rated(I) < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError(state, - format("...{} cannot be < 0.0, entered value=[{:.2T}].", - cNumericFields(15 + (I - 1) * 14), - thisDXCoil.MSMaxONOFFCyclesperHour(I))); + EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.2T}].", + 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError(state, - format("...{} cannot be < 0.0, entered value=[{:.2T}].", - cNumericFields(16 + (I - 1) * 14), - thisDXCoil.MSLatentCapacityTimeConstant(I))); + EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.2T}].", + cNumericFields(16 + (I - 1) * 14), + thisDXCoil.MSLatentCapacityTimeConstant(I))); ErrorsFound = true; } @@ -4423,11 +4472,13 @@ void GetDXCoils(EnergyPlusData &state) if (!ErrorsFound) { CurveVal = CurveValue(state, thisDXCoil.MSWasteHeat(I), RatedOutdoorAirTemp, RatedInletAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("{} = {}", cAlphaFields(19 + (I - 1) * 6), Alphas(19 + (I - 1) * 6))); - ShowContinueError( - state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cAlphaFields(19 + (I - 1) * 6))); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } @@ -4435,26 +4486,31 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, - format("...{} cannot be < 0.0 or > 1.0, entered value=[{:.3T}].", cNumericFields(18 + (I - 1) * 14), Numbers(18 + (I - 1) * 14))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } thisDXCoil.MSEvapCondAirFlow(I) = Numbers(19 + (I - 1) * 14); if (thisDXCoil.MSEvapCondAirFlow(I) < 0.0 && thisDXCoil.MSEvapCondAirFlow(I) != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, format("...{} cannot be < 0.0, entered value=[{:.3T}].", cNumericFields(19 + (I - 1) * 14), Numbers(19 + (I - 1) * 14))); + 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))); ErrorsFound = true; } thisDXCoil.MSEvapCondPumpElecNomPower(I) = Numbers(20 + (I - 1) * 14); if (thisDXCoil.MSEvapCondPumpElecNomPower(I) < 0.0 && thisDXCoil.MSEvapCondPumpElecNomPower(I) != AutoSize) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, format("...{} cannot be < 0.0, entered value=[{:.3T}].", cNumericFields(20 + (I - 1) * 14), Numbers(20 + (I - 1) * 14))); + 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))); ErrorsFound = true; } } @@ -4469,15 +4525,16 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilSensibleHeatGainRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(38), Alphas(38))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(38), Alphas(38))); } } } if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // DX multispeed heating coil @@ -4553,8 +4610,8 @@ void GetDXCoils(EnergyPlusData &state) // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(3); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0, entered value=[{:.2T}].", cNumericFields(3), Numbers(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.2T}].", cNumericFields(3), Numbers(3))); ErrorsFound = true; } @@ -4564,7 +4621,8 @@ 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, format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(5), Alphas(5))); + ShowSevereError(state, + EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(5), Alphas(5))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -4582,11 +4640,11 @@ void GetDXCoils(EnergyPlusData &state) if (Util::SameString(Alphas(7), "ReverseCycle")) { if (thisDXCoil.DefrostEIRFT == 0) { if (lAlphaBlanks(6)) { - ShowSevereError(state, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -4619,8 +4677,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.DefrostStrategy = StandardRatings::DefrostStrat::Resistive; } if (thisDXCoil.DefrostStrategy == StandardRatings::DefrostStrat::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...illegal {}=\"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(7), Alphas(7))); ShowContinueError(state, "...valid values for this field are ReverseCycle or Resistive."); ErrorsFound = true; } @@ -4632,8 +4690,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.DefrostControl = StandardRatings::HPdefrostControl::OnDemand; } if (thisDXCoil.DefrostControl == StandardRatings::HPdefrostControl::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...illegal {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(8), Alphas(8))); ShowContinueError(state, "...valid values for this field are Timed or OnDemand."); ErrorsFound = true; } @@ -4644,15 +4702,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, format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = 0.0 for defrost control = TIMED.", cNumericFields(5))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} = 0.0 for defrost strategy = RESISTIVE.", cNumericFields(7))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cNumericFields(7))); } if (Util::SameString(Alphas(9), "Yes")) { @@ -4660,8 +4718,8 @@ void GetDXCoils(EnergyPlusData &state) } else if (Util::SameString(Alphas(9), "No")) { thisDXCoil.PLRImpact = false; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(9), Alphas(9))); ShowContinueError(state, "The allowed choices are Yes or No."); ErrorsFound = true; } @@ -4672,8 +4730,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...{} must be >= 2. entered number is {:.0T}", cNumericFields(9), Numbers(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be >= 2. entered number is {:.0T}", cNumericFields(9), Numbers(9))); ErrorsFound = true; } @@ -4714,11 +4772,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, - format("{}, \"{}\" {} not found:{}", - CurrentModuleObject, - thisDXCoil.Name, - cAlphaFields(11 + (I - 1) * 6), - Alphas(11 + (I - 1) * 6))); + EnergyPlus::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 @@ -4755,11 +4813,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(12 + (I - 1) * 6), Alphas(12 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4786,11 +4844,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(13 + (I - 1) * 6), Alphas(13 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4828,11 +4886,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(14 + (I - 1) * 6), Alphas(14 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4859,11 +4917,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(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))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); + 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))); } ErrorsFound = true; } else { @@ -4894,21 +4952,25 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - format("...{} = {} has out of range value.", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); - ShowContinueError(state, - format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, EnergyPlus::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))); + ShowContinueError( + state, + EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - format("...{} = {} has out of range value.", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); - ShowContinueError(state, - format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, EnergyPlus::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))); + ShowContinueError( + state, + EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.MSPLFFPLR(I), ErrorsFound, 1.0); } @@ -4955,8 +5017,8 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilLatentHeatRemovalRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(35), Alphas(35))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(35), Alphas(35))); } } if (thisDXCoil.SecZonePtr > 0) { @@ -4968,16 +5030,18 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(36 + (I - 1) * 2), Alphas(36 + (I - 1) * 2))); + 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))); } } // 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(36 + (I - 1) * 2), Alphas(36 + (I - 1) * 2))); + 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))); } } } @@ -5061,11 +5125,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(4))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(4), Alphas(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(4), Alphas(4))); } ErrorsFound = true; } else { @@ -5122,8 +5186,9 @@ void GetDXCoils(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // Loop over the VRF Heating Coils and get & load the data @@ -5191,11 +5256,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFTemp = GetCurveIndex(state, Alphas(5)); if (thisDXCoil.CCapFTemp(1) == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -5226,11 +5291,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, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -5251,8 +5316,9 @@ void GetDXCoils(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::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 @@ -5323,11 +5389,11 @@ void GetDXCoils(EnergyPlusData &state) // Verify curve name and type if (indexSHCurve == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -5338,11 +5404,12 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.C3Te = state.dataCurveManager->curves(indexSHCurve)->coeff[2]; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - format("...illegal {} type for this object = {}", - cAlphaFields(5), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexSHCurve)->curveType)])); + 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)])); ShowContinueError(state, "... Curve type must be Quadratic."); ErrorsFound = true; } @@ -5365,8 +5432,9 @@ void GetDXCoils(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::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 @@ -5435,11 +5503,11 @@ void GetDXCoils(EnergyPlusData &state) // Verify curve name and type if (indexSCCurve == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -5450,11 +5518,12 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.C3Tc = state.dataCurveManager->curves(indexSCCurve)->coeff[2]; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - format("...illegal {} type for this object = {}", - cAlphaFields(5), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexSCCurve)->curveType)])); + 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)])); ShowContinueError(state, "... Curve type must be Quadratic."); ErrorsFound = true; } @@ -5463,8 +5532,9 @@ void GetDXCoils(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } for (DXCoilNum = 1; DXCoilNum <= state.dataDXCoils->NumDXCoils; ++DXCoilNum) { @@ -6159,14 +6229,14 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.FuelType != Constant::eFuel::Electricity) { std::string_view sFuelType = Constant::eFuelNames[static_cast(thisDXCoil.FuelType)]; SetupOutputVariable(state, - format("Cooling Coil {} Rate", sFuelType), + EnergyPlus::format("Cooling Coil {} Rate", sFuelType), Constant::Units::W, thisDXCoil.FuelUsed, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, - format("Cooling Coil {} Energy", sFuelType), + EnergyPlus::format("Cooling Coil {} Energy", sFuelType), Constant::Units::J, thisDXCoil.FuelConsumed, OutputProcessor::TimeStepType::System, @@ -6303,14 +6373,14 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.FuelType != Constant::eFuel::Electricity) { std::string_view sFuelType = Constant::eFuelNames[static_cast(thisDXCoil.FuelType)]; SetupOutputVariable(state, - format("Heating Coil {} Rate", sFuelType), + EnergyPlus::format("Heating Coil {} Rate", sFuelType), Constant::Units::W, thisDXCoil.FuelUsed, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, - format("Heating Coil {} Energy", sFuelType), + EnergyPlus::format("Heating Coil {} Energy", sFuelType), Constant::Units::J, thisDXCoil.FuelConsumed, OutputProcessor::TimeStepType::System, @@ -6324,14 +6394,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, - format("Heating Coil Defrost {} Rate", sFuelType), + EnergyPlus::format("Heating Coil Defrost {} Rate", sFuelType), Constant::Units::W, thisDXCoil.DefrostPower, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, - format("Heating Coil Defrost {} Energy", sFuelType), + EnergyPlus::format("Heating Coil Defrost {} Energy", sFuelType), Constant::Units::J, thisDXCoil.DefrostConsumption, OutputProcessor::TimeStepType::System, @@ -6797,16 +6867,17 @@ 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, - format("{} \"{}\": Rated air volume flow rate per watt of rated total water heating capacity is out of range", - thisDXCoil.DXCoilType, - thisDXCoil.Name)); + ShowWarningError( + state, + EnergyPlus::format("{} \"{}\": Rated air volume flow rate per watt of rated total water heating capacity is out of range", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); ShowContinueError(state, - 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])); + 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])); } HPInletAirHumRat = PsyWFnTdbTwbPb(state, thisDXCoil.RatedInletDBTemp, thisDXCoil.RatedInletWBTemp, DataEnvironment::StdPressureSeaLevel, RoutineName); @@ -6845,8 +6916,9 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur if (thisDXCoil.MSWasteHeat(SpeedNum) == 0) { ShowWarningError( state, - format("GetDXCoils:{}. The value of Waste Heat Function of Temperature Curve is assumed to be 1. Simulation continues. ", - thisDXCoil.Name)); + EnergyPlus::format( + "GetDXCoils:{}. The value of Waste Heat Function of Temperature Curve is assumed to be 1. Simulation continues. ", + thisDXCoil.Name)); break; } } @@ -6923,11 +6995,11 @@ 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, format("Sizing: {} {} has zero rated total capacity", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("Sizing: {} {} has zero rated total capacity", thisDXCoil.DXCoilType, thisDXCoil.Name)); ErrorsFound = true; } if (thisDXCoil.RatedAirVolFlowRate(Mode) <= 0.0) { - ShowSevereError(state, format("Sizing: {} {} has zero rated air flow rate", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("Sizing: {} {} has zero rated air flow rate", thisDXCoil.DXCoilType, thisDXCoil.Name)); ErrorsFound = true; } if (ErrorsFound) { @@ -6940,16 +7012,18 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur RatedVolFlowPerRatedTotCap = thisDXCoil.RatedAirVolFlowRate(Mode) / thisDXCoil.RatedTotCap(Mode); if (((HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] - RatedVolFlowPerRatedTotCap) > SmallDifferenceTest) || ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { - ShowWarningError(state, - format("Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range.", - thisDXCoil.DXCoilType, - thisDXCoil.Name)); - ShowContinueError(state, - 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, + EnergyPlus::format("Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range.", + thisDXCoil.DXCoilType, + 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])); } } @@ -7043,13 +7117,15 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur Mode = DehumidModeNum * 2 + CapacityStageNum; // Check for zero capacity or zero max flow rate if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { - ShowSevereError(state, format("Sizing: {} {} has zero rated total capacity", thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); + ShowSevereError(state, + EnergyPlus::format("Sizing: {} {} has zero rated total capacity", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); ErrorsFound = true; } if (thisDXCoil.RatedAirVolFlowRate(Mode) <= 0.0) { - ShowSevereError(state, format("Sizing: {} {} has zero rated air flow rate", thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); + ShowSevereError(state, + EnergyPlus::format("Sizing: {} {} has zero rated air flow rate", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); ErrorsFound = true; } if (ErrorsFound) { @@ -7061,16 +7137,18 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { ShowWarningError( state, - format("Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range.", - thisDXCoil.DXCoilType, - thisDXCoil.Name)); - ShowContinueError(state, - 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, format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); + EnergyPlus::format( + "Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range.", + thisDXCoil.DXCoilType, + 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))); } thisDXCoil.RatedAirMassFlowRate(Mode) = thisDXCoil.RatedAirVolFlowRate(Mode) * @@ -7093,11 +7171,11 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur Mode = 1; if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { - ShowSevereError(state, format("Sizing: {} {} has zero rated total capacity", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("Sizing: {} {} has zero rated total capacity", thisDXCoil.DXCoilType, thisDXCoil.Name)); ErrorsFound = true; } if (thisDXCoil.RatedAirVolFlowRate(Mode) <= 0.0) { - ShowSevereError(state, format("Sizing: {} {} has zero rated air flow rate", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("Sizing: {} {} has zero rated air flow rate", thisDXCoil.DXCoilType, thisDXCoil.Name)); ErrorsFound = true; } if (ErrorsFound) { @@ -7115,16 +7193,18 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur RatedVolFlowPerRatedTotCap = thisDXCoil.RatedAirVolFlowRate(Mode) / thisDXCoil.RatedTotCap(Mode); if (((HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] - RatedVolFlowPerRatedTotCap) > SmallDifferenceTest) || ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { - ShowWarningError(state, - format("Sizing: {} {}: Rated air volume flow rate per watt of rated total heating capacity is out of range.", - thisDXCoil.DXCoilType, - thisDXCoil.Name)); - ShowContinueError(state, - 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, + EnergyPlus::format("Sizing: {} {}: Rated air volume flow rate per watt of rated total heating capacity is out of range.", + thisDXCoil.DXCoilType, + 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])); } } @@ -7201,16 +7281,17 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur RatedVolFlowPerRatedTotCap = thisDXCoil.RatedAirVolFlowRate2 / thisDXCoil.RatedTotCap2; if (((HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] - RatedVolFlowPerRatedTotCap) > SmallDifferenceTest) || ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { - ShowWarningError(state, - 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)); + 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)); ShowContinueError(state, - 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])); + 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])); } thisDXCoil.RatedAirMassFlowRate2 = @@ -7237,13 +7318,15 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur for (Mode = 1; Mode <= thisDXCoil.NumOfSpeeds; ++Mode) { // Check for zero capacity or zero max flow rate if (thisDXCoil.MSRatedTotCap(Mode) <= 0.0) { - ShowSevereError(state, - format("Sizing: {} {} has zero rated total capacity at speed {}", thisDXCoil.DXCoilType, thisDXCoil.Name, Mode)); + ShowSevereError( + state, + EnergyPlus::format("Sizing: {} {} has zero rated total capacity at speed {}", thisDXCoil.DXCoilType, thisDXCoil.Name, Mode)); ErrorsFound = true; } if (thisDXCoil.MSRatedAirVolFlowRate(Mode) <= 0.0) { - ShowSevereError(state, - format("Sizing: {} {} has zero rated air flow rate at speed {}", thisDXCoil.DXCoilType, thisDXCoil.Name, Mode)); + ShowSevereError( + state, + EnergyPlus::format("Sizing: {} {} has zero rated air flow rate at speed {}", thisDXCoil.DXCoilType, thisDXCoil.Name, Mode)); ErrorsFound = true; } if (ErrorsFound) { @@ -7255,16 +7338,18 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { ShowWarningError( state, - format("Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range at speed {}", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - Mode)); - ShowContinueError(state, - 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])); + EnergyPlus::format( + "Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range at speed {}", + thisDXCoil.DXCoilType, + 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])); } thisDXCoil.MSRatedAirMassFlowRate(Mode) = thisDXCoil.MSRatedAirVolFlowRate(Mode) * @@ -7294,17 +7379,19 @@ 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, - 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, - 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, + 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])); } } } @@ -7798,12 +7885,15 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) SecCoilAirFlowUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(SecCoilAirFlowDes - SecCoilAirFlowUser) / SecCoilAirFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeDxCoil: Potential issue with equipment sizing for {} {}", thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, format("User-Specified Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowUser)); + ShowMessage(state, + EnergyPlus::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("User-Specified Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowUser)); ShowContinueError( - state, format("differs from Design Size Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowDes)); + state, + EnergyPlus::format("differs from Design Size Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -7929,42 +8019,49 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (thisDXCoil.EvapCondAirFlow2 > thisDXCoil.EvapCondAirFlow(Mode)) { ShowSevereError( state, - format("SizeDXCoil: {} {}, Evaporative Condenser low speed air flow must be less than or equal to high speed air flow.", - thisDXCoil.DXCoilType, - thisDXCoil.Name)); - ShowContinueError(state, format("Instead, {:.2R} > {:.2R}", thisDXCoil.EvapCondAirFlow2, thisDXCoil.EvapCondAirFlow(Mode))); + EnergyPlus::format( + "SizeDXCoil: {} {}, Evaporative Condenser low speed air flow must be less than or equal to high speed air flow.", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.EvapCondAirFlow2, thisDXCoil.EvapCondAirFlow(Mode))); ShowFatalError(state, "Preceding conditions cause termination."); } if (thisDXCoil.EvapCondPumpElecNomPower2 > thisDXCoil.EvapCondPumpElecNomPower(Mode)) { ShowSevereError( state, - format("SizeDXCoil: {} {}, Evaporative Condenser low speed pump power must be less than or equal to high speed pump power.", - thisDXCoil.DXCoilType, - thisDXCoil.Name)); - ShowContinueError( - state, format("Instead, {:.2R} > {:.2R}", thisDXCoil.EvapCondPumpElecNomPower2, thisDXCoil.EvapCondPumpElecNomPower(Mode))); + EnergyPlus::format( + "SizeDXCoil: {} {}, Evaporative Condenser low speed pump power must be less than or equal to high speed pump power.", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("Instead, {:.2R} > {:.2R}", + thisDXCoil.EvapCondPumpElecNomPower2, + thisDXCoil.EvapCondPumpElecNomPower(Mode))); ShowFatalError(state, "Preceding conditions cause termination."); } if (thisDXCoil.RatedTotCap2 > thisDXCoil.RatedTotCap(Mode)) { - ShowSevereError(state, - format("SizeDXCoil: {} {}, Rated Total Cooling Capacity, Low Speed must be less than or equal to Rated Total " + ShowSevereError( + state, + EnergyPlus::format("SizeDXCoil: {} {}, Rated Total Cooling Capacity, Low Speed must be less than or equal to Rated Total " "Cooling Capacity, High Speed.", thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, format("Instead, {:.2R} > {:.2R}", thisDXCoil.RatedTotCap2, thisDXCoil.RatedTotCap(Mode))); + ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.RatedTotCap2, thisDXCoil.RatedTotCap(Mode))); ShowFatalError(state, "Preceding conditions cause termination."); } if (thisDXCoil.RatedAirVolFlowRate2 > thisDXCoil.RatedAirVolFlowRate(Mode)) { - ShowFatalError(state, - format("SizeDXCoil: {} {}, Rated Air Volume Flow Rate, low speed must be less than or equal to Rated Air Volume " - "Flow Rate, high speed.", - thisDXCoil.DXCoilType, - thisDXCoil.Name)); - ShowContinueError(state, - format("Instead, {:.2R} > {:.2R}", 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.", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.RatedAirVolFlowRate2, thisDXCoil.RatedAirVolFlowRate(Mode))); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -8083,14 +8180,17 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) // Ensure flow rate at lower speed must be lower or equal to the flow rate at higher speed. Otherwise, a severe error is issued. for (Mode = 1; Mode <= thisDXCoil.NumOfSpeeds - 1; ++Mode) { if (thisDXCoil.MSRatedAirVolFlowRate(Mode) > thisDXCoil.MSRatedAirVolFlowRate(Mode + 1)) { - ShowWarningError(state, - format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - Mode, - Mode + 1)); - ShowContinueError( - state, format("Instead, {:.2R} > {:.2R}", 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.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + Mode, + Mode + 1)); + ShowContinueError(state, + EnergyPlus::format("Instead, {:.2R} > {:.2R}", + thisDXCoil.MSRatedAirVolFlowRate(Mode), + thisDXCoil.MSRatedAirVolFlowRate(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -8172,14 +8272,16 @@ 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, - format("SizeDXCoil: {} {}, Speed {} Rated Total Cooling Capacity must be less than or equal to Speed {} Rated " - "Total Cooling Capacity.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - Mode, - Mode + 1)); - ShowContinueError(state, format("Instead, {:.2R} > {:.2R}", 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.", + thisDXCoil.DXCoilType, + 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."); } } @@ -8242,7 +8344,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, thisDXCoil.DXCoilType, thisDXCoil.Name, - format("Design Size Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), + EnergyPlus::format("Design Size Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), MSEvapCondAirFlowDes); } else { if (thisDXCoil.MSEvapCondAirFlow(Mode) > 0.0 && MSEvapCondAirFlowDes > 0.0 && !HardSizeNoDesRun) { @@ -8250,19 +8352,22 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, thisDXCoil.DXCoilType, thisDXCoil.Name, - format("Design Size Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), + EnergyPlus::format("Design Size Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), MSEvapCondAirFlowDes, - format("User-Specified Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), + EnergyPlus::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, format("SizeDxCoil: Potential issue with equipment sizing for {} {}", thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, - format("User-Specified Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", MSEvapCondAirFlowUser)); + ShowMessage(state, + EnergyPlus::format( + "SizeDxCoil: Potential issue with equipment sizing for {} {}", thisDXCoil.DXCoilType, thisDXCoil.Name)); ShowContinueError( - state, format("differs from Design Size Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", MSEvapCondAirFlowDes)); + state, + EnergyPlus::format("User-Specified Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", MSEvapCondAirFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", + MSEvapCondAirFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8274,15 +8379,17 @@ 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, - format("SizeDXCoil: {} {}, Speed {} Evaporative Condenser Air Flow Rate must be less than or equal to Speed {} " - "Evaporative Condenser Air Flow Rate.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - Mode, - Mode + 1)); - ShowContinueError(state, - format("Instead, {:.2R} > {:.2R}", 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.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + Mode, + Mode + 1)); + ShowContinueError( + state, + EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.MSEvapCondAirFlow(Mode), thisDXCoil.MSEvapCondAirFlow(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -8307,29 +8414,32 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, thisDXCoil.DXCoilType, thisDXCoil.Name, - format("Design Size Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), + EnergyPlus::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, - thisDXCoil.DXCoilType, - thisDXCoil.Name, - format("Design Size Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), - MSEvapCondPumpElecNomPowerDes, - format("User-Specified Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), - MSEvapCondPumpElecNomPowerUser); + BaseSizer::reportSizerOutput( + state, + thisDXCoil.DXCoilType, + 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); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MSEvapCondPumpElecNomPowerDes - MSEvapCondPumpElecNomPowerUser) / MSEvapCondPumpElecNomPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, format("SizeDxCoil: Potential issue with equipment sizing for {} {}", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowMessage(state, + EnergyPlus::format( + "SizeDxCoil: Potential issue with equipment sizing for {} {}", thisDXCoil.DXCoilType, thisDXCoil.Name)); ShowContinueError(state, - format("User-Specified Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", - MSEvapCondPumpElecNomPowerUser)); - ShowContinueError(state, - format("differs from Design Size Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", - MSEvapCondPumpElecNomPowerDes)); + EnergyPlus::format("User-Specified Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", + MSEvapCondPumpElecNomPowerUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", + MSEvapCondPumpElecNomPowerDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8341,16 +8451,18 @@ 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, - format("SizeDXCoil: {} {}, Speed {} Rated Evaporative Condenser Pump Power Consumption must be less than or " - "equal to Speed {} Rated Evaporative Condenser Pump Power Consumption.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - Mode, - Mode + 1)); - ShowContinueError( + ShowWarningError( state, - format("Instead, {:.2R} > {:.2R}", thisDXCoil.MSEvapCondPumpElecNomPower(Mode), thisDXCoil.MSEvapCondPumpElecNomPower(Mode + 1))); + EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Rated Evaporative Condenser Pump Power Consumption must be less than or " + "equal to Speed {} Rated Evaporative Condenser Pump Power Consumption.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + Mode, + Mode + 1)); + ShowContinueError(state, + EnergyPlus::format("Instead, {:.2R} > {:.2R}", + thisDXCoil.MSEvapCondPumpElecNomPower(Mode), + thisDXCoil.MSEvapCondPumpElecNomPower(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -8421,14 +8533,17 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) // Ensure flow rate at lower speed must be lower or equal to the flow rate at higher speed. Otherwise, a severe error is issued. for (Mode = 1; Mode <= thisDXCoil.NumOfSpeeds - 1; ++Mode) { if (thisDXCoil.MSRatedAirVolFlowRate(Mode) > thisDXCoil.MSRatedAirVolFlowRate(Mode + 1)) { - ShowWarningError(state, - format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - Mode, - Mode + 1)); - ShowContinueError( - state, format("Instead, {:.2R} > {:.2R}", 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.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + Mode, + Mode + 1)); + ShowContinueError(state, + EnergyPlus::format("Instead, {:.2R} > {:.2R}", + thisDXCoil.MSRatedAirVolFlowRate(Mode), + thisDXCoil.MSRatedAirVolFlowRate(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -8446,7 +8561,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, thisDXCoil.DXCoilType, thisDXCoil.Name, - format("Design Size Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), + EnergyPlus::format("Design Size Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), SecCoilAirFlowDes); } else { if (thisDXCoil.MSSecCoilAirFlow(Mode) > 0.0 && SecCoilAirFlowDes > 0.0 && !HardSizeNoDesRun) { @@ -8454,18 +8569,21 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, thisDXCoil.DXCoilType, thisDXCoil.Name, - format("Design Size Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), + EnergyPlus::format("Design Size Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), SecCoilAirFlowDes, - format("User-Specified Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), + EnergyPlus::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, - format("SizeDxCoil: Potential issue with equipment sizing for {} {}", thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, format("User-Specified Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowUser)); + ShowMessage(state, + EnergyPlus::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("User-Specified Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowUser)); ShowContinueError( - state, format("differs from Design Size Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowDes)); + state, + EnergyPlus::format("differs from Design Size Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8558,14 +8676,16 @@ 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, - format("SizeDXCoil: {} {}, Speed {} Rated Total Heating Capacity must be less than or equal to Speed {} Rated " - "Total Heating Capacity.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - Mode, - Mode + 1)); - ShowContinueError(state, format("Instead, {:.2R} > {:.2R}", 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.", + thisDXCoil.DXCoilType, + 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."); } } @@ -8597,11 +8717,14 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) DefrostCapacityUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DefrostCapacityDes - DefrostCapacityUser) / DefrostCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowWarningMessage( - state, format("SizeDxCoil: Potential issue with equipment sizing for {} {}", thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, format("User-Specified Resistive Defrost Heater Capacity of {:.2R}[W]", DefrostCapacityUser)); + ShowWarningMessage(state, + EnergyPlus::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); ShowContinueError(state, - format("differs from Design Size Resistive Defrost Heater Capacity of {:.2R}[W]", DefrostCapacityDes)); + EnergyPlus::format("User-Specified Resistive Defrost Heater Capacity of {:.2R}[W]", DefrostCapacityUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Resistive Defrost Heater Capacity of {:.2R}[W]", DefrostCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8876,17 +8999,18 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCapFTemp < 0.0) { if (Coil.HCapFTempErrorIndex == 0) { - ShowWarningMessage(state, format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); ShowContinueError( - state, format(" HPWH Heating Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", HeatCapFTemp)); + state, + EnergyPlus::format(" HPWH Heating Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", HeatCapFTemp)); if (state.dataCurveManager->curves(Coil.HCapFTemp)->numDims == 2) { - ShowContinueError( - state, - format(" Negative value occurs using an inlet air temperature of {:.1T} and an inlet water temperature of {:.1T}.", - InletAirTemp, - InletWaterTemp)); + ShowContinueError(state, + EnergyPlus::format( + " Negative value occurs using an inlet air temperature of {:.1T} and an inlet water temperature of {:.1T}.", + InletAirTemp, + InletWaterTemp)); } else { - ShowContinueError(state, format(" Negative value occurs using an inlet air temperature of {:.1T}.", InletAirTemp)); + ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an inlet air temperature of {:.1T}.", InletAirTemp)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } @@ -8915,17 +9039,18 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCOPFTemp < 0.0) { if (Coil.HCOPFTempErrorIndex == 0) { - ShowWarningMessage(state, format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); - ShowContinueError(state, - format(" HPWH Heating COP Modifier curve (function of temperature) output is negative ({:.3T}).", HeatCOPFTemp)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); + ShowContinueError( + state, + EnergyPlus::format(" HPWH Heating COP Modifier curve (function of temperature) output is negative ({:.3T}).", HeatCOPFTemp)); if (state.dataCurveManager->curves(Coil.HCOPFTemp)->numDims == 2) { - ShowContinueError( - state, - format(" Negative value occurs using an inlet air temperature of {:.1T} and an inlet water temperature of {:.1T}.", - InletAirTemp, - InletWaterTemp)); + ShowContinueError(state, + EnergyPlus::format( + " Negative value occurs using an inlet air temperature of {:.1T} and an inlet water temperature of {:.1T}.", + InletAirTemp, + InletWaterTemp)); } else { - ShowContinueError(state, format(" Negative value occurs using an inlet air temperature of {:.1T}.", InletAirTemp)); + ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an inlet air temperature of {:.1T}.", InletAirTemp)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } @@ -8951,11 +9076,12 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCapFAirFlow < 0.0) { if (Coil.HCapFAirFlowErrorIndex == 0) { - ShowWarningMessage(state, format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); ShowContinueError( state, - format(" HPWH Heating Capacity Modifier curve (function of air flow fraction) output is negative ({:.3T}).", HeatCapFAirFlow)); - ShowContinueError(state, format(" Negative value occurs using an air flow fraction of {:.3T}.", AirFlowRateRatio)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -8977,10 +9103,11 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCOPFAirFlow < 0.0) { if (Coil.HCOPFAirFlowErrorIndex == 0) { - ShowWarningMessage(state, format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); - ShowContinueError( - state, format(" HPWH Heating COP Modifier curve (function of air flow fraction) output is negative ({:.3T}).", HeatCOPFAirFlow)); - ShowContinueError(state, format(" Negative value occurs using an air flow fraction of {:.3T}.", AirFlowRateRatio)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", Coil.DXCoilType, 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -9002,11 +9129,12 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCapFWaterFlow < 0.0) { if (Coil.HCapFWaterFlowErrorIndex == 0) { - ShowWarningMessage(state, format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); - ShowContinueError(state, - format(" HPWH Heating Capacity Modifier curve (function of water flow fraction) output is negative ({:.3T}).", - HeatCapFWaterFlow)); - ShowContinueError(state, format(" Negative value occurs using a water flow fraction of {:.3T}.", WaterFlowRateRatio)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", Coil.DXCoilType, 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -9028,11 +9156,12 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCOPFWaterFlow < 0.0) { if (Coil.HCOPFWaterFlowErrorIndex == 0) { - ShowWarningMessage(state, format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", Coil.DXCoilType, Coil.Name)); ShowContinueError( state, - format(" HPWH Heating COP Modifier curve (function of water flow fraction) output is negative ({:.3T}).", HeatCOPFWaterFlow)); - ShowContinueError(state, format(" Negative value occurs using a water flow fraction of {:.3T}.", WaterFlowRateRatio)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -9405,7 +9534,7 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.PrintLowAmbMessage) { // .AND. & if (state.dataDXCoils->CurrentEndTime > thisDXCoil.CurrentEndTimeLast && TimeStepSys >= thisDXCoil.TimeStepSysLast) { if (thisDXCoil.LowAmbErrIndex == 0) { - ShowWarningMessage(state, format("{}{}", RoutineName, thisDXCoil.LowAmbBuffer1)); + ShowWarningMessage(state, EnergyPlus::format("{}{}", RoutineName, thisDXCoil.LowAmbBuffer1)); ShowContinueError(state, thisDXCoil.LowAmbBuffer2); ShowContinueError(state, "... Operation at low ambient temperatures may require special performance curves."); } @@ -9436,12 +9565,12 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.PrintLowOutTempMessage) { if (state.dataDXCoils->CurrentEndTime > thisDXCoil.CurrentEndTimeLast && TimeStepSys >= thisDXCoil.TimeStepSysLast) { if (thisDXCoil.LowOutletTempIndex == 0) { - ShowWarningMessage(state, format("{}{}", RoutineName, thisDXCoil.LowOutTempBuffer1)); + ShowWarningMessage(state, EnergyPlus::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, - format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} C.", - thisDXCoil.FullLoadInletAirTempLast)); + EnergyPlus::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} 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."); @@ -9483,8 +9612,9 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // InletAirWetBulbC = PsyTwbFnTdbWPb(InletAirDryBulbTemp,InletAirHumRat,InletAirPressure) // AirVolumeFlowRate = AirMassFlow/ PsyRhoAirFnPbTdbW(InletAirPressure,InletAirDryBulbTemp, InletAirHumRat) if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { - ShowFatalError( - state, format("{}{}=\"{}\" - Rated total cooling capacity is zero or less.", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowFatalError(state, + EnergyPlus::format( + "{}{}=\"{}\" - Rated total cooling capacity is zero or less.", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); } if (thisDXCoil.DXCoilType_Num == HVAC::CoilDX_HeatPumpWaterHeaterPumped || thisDXCoil.DXCoilType_Num == HVAC::CoilDX_HeatPumpWaterHeaterWrapped) { @@ -9499,16 +9629,17 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.ErrIndex1 == 0) { ShowWarningMessage( state, - format("{}{}=\"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at {:.3R} m3/s/W.", - RoutineName, - thisDXCoil.DXCoilType, - thisDXCoil.Name, - VolFlowperRatedTotCap)); + EnergyPlus::format( + "{}{}=\"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at {:.3R} m3/s/W.", + RoutineName, + thisDXCoil.DXCoilType, + thisDXCoil.Name, + VolFlowperRatedTotCap)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}]", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}]", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components,"); ShowContinueError(state, "or variable air volume [VAV] system using incorrect coil type."); } @@ -9527,16 +9658,17 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.ErrIndex1 == 0) { ShowWarningMessage( state, - format("{}{}=\"{}\" - Air volume flow rate per watt of rated total water heating capacity is out of range at {:.2R} m3/s/W.", - RoutineName, - thisDXCoil.DXCoilType, - thisDXCoil.Name, - VolFlowperRatedTotCap)); + EnergyPlus::format( + "{}{}=\"{}\" - Air volume flow rate per watt of rated total water heating capacity is out of range at {:.2R} m3/s/W.", + RoutineName, + thisDXCoil.DXCoilType, + thisDXCoil.Name, + VolFlowperRatedTotCap)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}]", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}]", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); ShowContinueError(state, "Possible causes may be that the parent object is calling for an actual supply air flow rate that is much " "higher or lower than the DX coil rated supply air flow rate."); @@ -9571,11 +9703,11 @@ void CalcDoe2DXCoil(EnergyPlusData &state, thisDXCoil.PrintLowAmbMessage = true; thisDXCoil.LowTempLast = OutdoorDryBulb; if (thisDXCoil.LowAmbErrIndex == 0) { - thisDXCoil.LowAmbBuffer1 = - format("{} \"{}\" - Air-cooled condenser inlet dry-bulb temperature below 0 C. Outdoor dry-bulb temperature = {:.2R}", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - OutdoorDryBulb); + thisDXCoil.LowAmbBuffer1 = EnergyPlus::format( + "{} \"{}\" - Air-cooled condenser inlet dry-bulb temperature below 0 C. Outdoor dry-bulb temperature = {:.2R}", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + OutdoorDryBulb); thisDXCoil.LowAmbBuffer2 = " ... Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + CreateSysTimeIntervalString(state); } @@ -9585,11 +9717,11 @@ void CalcDoe2DXCoil(EnergyPlusData &state, thisDXCoil.PrintLowAmbMessage = true; thisDXCoil.LowTempLast = OutdoorWetBulb; if (thisDXCoil.LowAmbErrIndex == 0) { - thisDXCoil.LowAmbBuffer1 = - format("{} \"{}\" - Evap-cooled condenser inlet wet-bulb temperature below 10 C. Outdoor wet-bulb temperature = {:.2R}", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - OutdoorWetBulb); + thisDXCoil.LowAmbBuffer1 = EnergyPlus::format( + "{} \"{}\" - Evap-cooled condenser inlet wet-bulb temperature below 10 C. Outdoor wet-bulb temperature = {:.2R}", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + OutdoorWetBulb); thisDXCoil.LowAmbBuffer2 = " ... Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + CreateSysTimeIntervalString(state); } @@ -9616,22 +9748,25 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (TotCapTempModFac < 0.0) { if (thisDXCoil.CCapFTempErrorIndex == 0) { - ShowWarningMessage(state, format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, - format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", - TotCapTempModFac)); + ShowWarningMessage(state, EnergyPlus::format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowContinueError( + state, + EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", + TotCapTempModFac)); if (state.dataCurveManager->curves(thisDXCoil.CCapFTemp(Mode))->numDims == 2) { - ShowContinueError(state, - 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, + EnergyPlus::format(" Negative value occurs using a condenser inlet air temperature of {:.1T} and an inlet air " + "wet-bulb temperature of {:.1T}.", + CondInletTemp, + InletAirWetBulbC)); } else { - ShowContinueError(state, - format(" Negative value occurs using a condenser inlet air temperature of {:.1T}.", CondInletTemp)); + ShowContinueError( + state, + EnergyPlus::format(" Negative value occurs using a condenser inlet air temperature of {:.1T}.", CondInletTemp)); } if (Mode > 1) { - ShowContinueError(state, format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } @@ -9650,14 +9785,16 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (TotCapFlowModFac < 0.0) { if (thisDXCoil.CCapFFlowErrorIndex == 0) { - ShowWarningMessage(state, format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowContinueError( + state, + EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3T}).", + TotCapFlowModFac)); ShowContinueError(state, - format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3T}).", - TotCapFlowModFac)); - ShowContinueError(state, format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); + EnergyPlus::format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); if (Mode > 1) { - ShowContinueError(state, format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); } } ShowRecurringWarningErrorAtEnd( @@ -9728,15 +9865,17 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.ErrIndex2 == 0) { if (thisDXCoil.DXCoilType_Num == HVAC::CoilDX_HeatPumpWaterHeaterPumped || thisDXCoil.DXCoilType_Num == HVAC::CoilDX_HeatPumpWaterHeaterWrapped) { - ShowWarningMessage(state, format("{}{}=\"{}\", PLF curve value", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, format("The PLF curve value = {:.3T} for part-load ratio = {:.3T}", PLF, PartLoadRatio)); + ShowWarningMessage(state, + EnergyPlus::format("{}{}=\"{}\", PLF curve value", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("The PLF curve value = {:.3T} for part-load ratio = {:.3T}", PLF, PartLoadRatio)); ShowContinueErrorTimeStamp(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); - ShowContinueError(state, format("Check the IO reference manual for PLF curve guidance [{}].", thisDXCoil.DXCoilType)); + ShowContinueError(state, EnergyPlus::format("Check the IO reference manual for PLF curve guidance [{}].", thisDXCoil.DXCoilType)); } else { - ShowWarningMessage(state, format("{}{}=\"{}\", PLF curve value", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError(state, format("The PLF curve value = {:.3T} for part-load ratio = {:.3T}", PLF, PartLoadRatio)); + ShowWarningMessage(state, + EnergyPlus::format("{}{}=\"{}\", PLF curve value", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("The PLF curve value = {:.3T} for part-load ratio = {:.3T}", PLF, PartLoadRatio)); ShowContinueErrorTimeStamp(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); - ShowContinueError(state, format("Check the IO reference manual for PLF curve guidance [{}].", thisDXCoil.DXCoilType)); + ShowContinueError(state, EnergyPlus::format("Check the IO reference manual for PLF curve guidance [{}].", thisDXCoil.DXCoilType)); } } if (thisDXCoil.DXCoilType_Num == HVAC::CoilDX_HeatPumpWaterHeaterPumped || @@ -9756,16 +9895,20 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.ErrIndex3 == 0) { if (thisDXCoil.DXCoilType_Num == HVAC::CoilDX_HeatPumpWaterHeaterPumped || thisDXCoil.DXCoilType_Num == HVAC::CoilDX_HeatPumpWaterHeaterWrapped) { - ShowWarningMessage(state, format("{}{}=\"{}\", runtime fraction", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowWarningMessage(state, format("The runtime fraction exceeded 1.0. [{:.4R}].", thisDXCoil.CoolingCoilRuntimeFraction)); + ShowWarningMessage(state, + EnergyPlus::format("{}{}=\"{}\", runtime fraction", RoutineName, thisDXCoil.DXCoilType, 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, format("Check the IO reference manual for PLF curve guidance [{}].", thisDXCoil.DXCoilType)); + ShowContinueError(state, EnergyPlus::format("Check the IO reference manual for PLF curve guidance [{}].", thisDXCoil.DXCoilType)); ShowContinueErrorTimeStamp(state, ""); } else { - ShowWarningMessage(state, format("{}{}=\"{}\", runtime fraction", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowWarningMessage(state, format("The runtime fraction exceeded 1.0. [{:.4R}].", thisDXCoil.CoolingCoilRuntimeFraction)); + ShowWarningMessage(state, + EnergyPlus::format("{}{}=\"{}\", runtime fraction", RoutineName, thisDXCoil.DXCoilType, 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, format("Check the IO reference manual for PLF curve guidance [{}].", thisDXCoil.DXCoilType)); + ShowContinueError(state, EnergyPlus::format("Check the IO reference manual for PLF curve guidance [{}].", thisDXCoil.DXCoilType)); ShowContinueErrorTimeStamp(state, ""); } } @@ -9839,11 +9982,11 @@ void CalcDoe2DXCoil(EnergyPlusData &state, thisDXCoil.FullLoadOutAirTempLast = FullLoadOutAirTemp; if (thisDXCoil.LowOutletTempIndex == 0) { thisDXCoil.FullLoadInletAirTempLast = InletAirDryBulbTemp; - thisDXCoil.LowOutTempBuffer1 = format("{} \"{}\" - Full load outlet air dry-bulb temperature < 2C. This indicates the " - "possibility of coil frost/freeze. Outlet temperature = {:.2R} C.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - FullLoadOutAirTemp); + thisDXCoil.LowOutTempBuffer1 = EnergyPlus::format("{} \"{}\" - Full load outlet air dry-bulb temperature < 2C. This indicates the " + "possibility of coil frost/freeze. Outlet temperature = {:.2R} C.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + FullLoadOutAirTemp); thisDXCoil.LowOutTempBuffer2 = " ...Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + CreateSysTimeIntervalString(state); } @@ -9999,20 +10142,23 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (EIRTempModFac < 0.0) { if (thisDXCoil.EIRFTempErrorIndex == 0) { - ShowWarningMessage(state, format("{}{}=\"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError( - state, format(" Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", EIRTempModFac)); + ShowWarningMessage(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowContinueError(state, + EnergyPlus::format(" Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", + EIRTempModFac)); if (state.dataCurveManager->curves(thisDXCoil.EIRFTemp(Mode))->numDims == 2) { - ShowContinueError(state, - 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, + EnergyPlus::format(" Negative value occurs using a condenser inlet air temperature of {:.1T} and an inlet air " + "wet-bulb temperature of {:.1T}.", + CondInletTemp, + InletAirWetBulbC)); } else { - ShowContinueError(state, format(" Negative value occurs using a condenser inlet air temperature of {:.1T}.", CondInletTemp)); + ShowContinueError( + state, EnergyPlus::format(" Negative value occurs using a condenser inlet air temperature of {:.1T}.", CondInletTemp)); } if (Mode > 1) { - ShowContinueError(state, format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } @@ -10031,13 +10177,15 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (EIRFlowModFac < 0.0) { if (thisDXCoil.EIRFFlowErrorIndex == 0) { - ShowWarningMessage(state, format("{}{}=\"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); ShowContinueError( - state, format(" Energy Input Ratio Modifier curve (function of flow fraction) output is negative ({:.3T}).", EIRFlowModFac)); - ShowContinueError(state, format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); if (Mode > 1) { - ShowContinueError(state, format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); } } ShowRecurringWarningErrorAtEnd( @@ -10442,8 +10590,8 @@ 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, - format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} C.", - thisDXCoil.FullLoadInletAirTempLast)); + EnergyPlus::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} 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."); @@ -10484,7 +10632,8 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, VolFlowperRatedTotCap = AirVolumeFlowRate / thisDXCoil.RatedTotCap(Mode); if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { - ShowFatalError(state, format("{} \"{}\" - Rated total cooling capacity is zero or less.", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowFatalError(state, + EnergyPlus::format("{} \"{}\" - Rated total cooling capacity is zero or less.", thisDXCoil.DXCoilType, thisDXCoil.Name)); } if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag && @@ -10493,31 +10642,31 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, if (thisDXCoil.ErrIndex1 == 0) { ShowWarningMessage( state, - format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at {:.3R} m3/s/W.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - VolFlowperRatedTotCap)); + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at {:.3R} m3/s/W.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + VolFlowperRatedTotCap)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("...Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}]", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + EnergyPlus::format("...Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}]", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); ShowContinueError(state, "...Possible causes include inconsistent air flow rates in system components,"); ShowContinueError(state, "...or mixing manual inputs with autosize inputs. Also check the following values and calculations."); ShowContinueError(state, "...Volume Flow Rate per Rated Total Capacity = Volume Flow Rate / Rated Total Capacity"); ShowContinueError(state, "...Volume Flow Rate = Air Mass Flow Rate / Air Density"); ShowContinueError(state, "...Data used for calculations:"); - ShowContinueError(state, format("...Rated Total Capacity = {:.2R} W.", thisDXCoil.RatedTotCap(Mode))); + ShowContinueError(state, EnergyPlus::format("...Rated Total Capacity = {:.2R} W.", thisDXCoil.RatedTotCap(Mode))); ShowContinueError(state, "...Volume Flow Rate = Air Mass Flow Rate / Air Density"); - ShowContinueError(state, format("...Volume Flow Rate = {:.8R} m3/s.", AirVolumeFlowRate)); - ShowContinueError(state, format("...Air Mass Flow Rate = {:.8R} kg/s.", AirMassFlow)); - ShowContinueError( - state, - format("...Air Density = {:.8R} kg/m3.", PsyRhoAirFnPbTdbW(state, OutdoorPressure, InletAirDryBulbTemp, InletAirHumRat))); + ShowContinueError(state, EnergyPlus::format("...Volume Flow Rate = {:.8R} m3/s.", AirVolumeFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Air Mass Flow Rate = {:.8R} kg/s.", AirMassFlow)); + ShowContinueError(state, + EnergyPlus::format("...Air Density = {:.8R} kg/m3.", + PsyRhoAirFnPbTdbW(state, OutdoorPressure, InletAirDryBulbTemp, InletAirHumRat))); ShowContinueError(state, "...Data used for air density calculation:"); - ShowContinueError(state, format("...Outdoor Air Pressure = {:.3R} Pa.", OutdoorPressure)); - ShowContinueError(state, format("...Inlet Air Dry-Bulb Temp = {:.3R} C.", InletAirDryBulbTemp)); - ShowContinueError(state, format("...Inlet Air Humidity Ratio = {:.8R} kgWater/kgDryAir.", InletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Outdoor Air Pressure = {:.3R} Pa.", OutdoorPressure)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Dry-Bulb Temp = {:.3R} C.", InletAirDryBulbTemp)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Humidity Ratio = {:.8R} kgWater/kgDryAir.", InletAirHumRat)); } ShowRecurringWarningErrorAtEnd( state, @@ -10548,11 +10697,12 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, thisDXCoil.PrintLowAmbMessage = true; thisDXCoil.LowTempLast = OutdoorDryBulb; if (thisDXCoil.LowAmbErrIndex == 0) { - thisDXCoil.LowAmbBuffer1 = format("{} \"{}\" - Condenser inlet temperature below {:.2R} C. Condenser inlet temperature = {:.2R}", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - thisDXCoil.MinOATCompressor, - OutdoorDryBulb); + thisDXCoil.LowAmbBuffer1 = + EnergyPlus::format("{} \"{}\" - Condenser inlet temperature below {:.2R} C. Condenser inlet temperature = {:.2R}", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + thisDXCoil.MinOATCompressor, + OutdoorDryBulb); thisDXCoil.LowAmbBuffer2 = " ... Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + CreateSysTimeIntervalString(state); } @@ -10563,11 +10713,12 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, thisDXCoil.PrintHighAmbMessage = true; thisDXCoil.HighTempLast = OutdoorDryBulb; if (thisDXCoil.HighAmbErrIndex == 0) { - thisDXCoil.HighAmbBuffer1 = format("{} \"{}\" - Condenser inlet temperature above {:.2R} C. Condenser temperature = {:.2R}", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - thisDXCoil.MaxOATCompressor, - OutdoorDryBulb); + thisDXCoil.HighAmbBuffer1 = + EnergyPlus::format("{} \"{}\" - Condenser inlet temperature above {:.2R} C. Condenser temperature = {:.2R}", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + thisDXCoil.MaxOATCompressor, + OutdoorDryBulb); thisDXCoil.HighAmbBuffer2 = " ... Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + CreateSysTimeIntervalString(state); } @@ -10591,16 +10742,18 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (TotCapTempModFac < 0.0) { if (thisDXCoil.CCapFTempErrorIndex == 0) { - ShowWarningMessage(state, format("{} \"{}\":", thisDXCoil.DXCoilType, thisDXCoil.Name)); - ShowContinueError( - state, format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", TotCapTempModFac)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowContinueError(state, + EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", + TotCapTempModFac)); ShowContinueError( state, - format(" Negative value occurs using a condenser inlet temperature of {:.1T} and an inlet air wet-bulb temperature of {:.1T}.", - CondInletTemp, - InletAirWetBulbC)); + EnergyPlus::format( + " Negative value occurs using a condenser inlet temperature of {:.1T} and an inlet air wet-bulb temperature of {:.1T}.", + CondInletTemp, + InletAirWetBulbC)); if (Mode > 1) { - ShowContinueError(state, format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } @@ -10621,14 +10774,15 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (TotCapFlowModFac < 0.0) { if (thisDXCoil.CCapFFlowErrorIndex == 0) { - ShowWarningMessage(state, format("{} \"{}\":", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", thisDXCoil.DXCoilType, thisDXCoil.Name)); ShowContinueError( state, - format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3T}).", TotCapFlowModFac)); - ShowContinueError(state, format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); if (Mode > 1) { - ShowContinueError(state, format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); } } ShowRecurringWarningErrorAtEnd( @@ -10693,7 +10847,7 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, if (thisDXCoil.ErrIndex2 == 0) { ShowWarningMessage( state, - format( + EnergyPlus::format( "The PLF curve value for the DX cooling coil {} ={:.3R} for part-load ratio ={:.3R}", thisDXCoil.Name, PLF, PartLoadRatio)); ShowContinueErrorTimeStamp(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Cooling:DX:SingleSpeed]."); @@ -10708,9 +10862,9 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, if (thisDXCoil.CoolingCoilRuntimeFraction > 1.0 && std::abs(thisDXCoil.CoolingCoilRuntimeFraction - 1.0) > 0.001) { if (thisDXCoil.ErrIndex3 == 0) { ShowWarningMessage(state, - format("The runtime fraction for DX cooling coil {} exceeded 1.0. [{:.4R}].", - thisDXCoil.Name, - thisDXCoil.CoolingCoilRuntimeFraction)); + EnergyPlus::format("The runtime fraction for DX cooling coil {} exceeded 1.0. [{:.4R}].", + thisDXCoil.Name, + thisDXCoil.CoolingCoilRuntimeFraction)); ShowContinueError(state, "Runtime fraction reset to 1 and the simulation will continue."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Cooling:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -10763,11 +10917,11 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, thisDXCoil.FullLoadOutAirTempLast = FullLoadOutAirTemp; if (thisDXCoil.LowOutletTempIndex == 0) { thisDXCoil.FullLoadInletAirTempLast = InletAirDryBulbTemp; - thisDXCoil.LowOutTempBuffer1 = format("{} \"{}\" - Full load outlet air dry-bulb temperature < 2C. This indicates the " - "possibility of coil frost/freeze. Outlet temperature = {:.2R} C.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - FullLoadOutAirTemp); + thisDXCoil.LowOutTempBuffer1 = EnergyPlus::format("{} \"{}\" - Full load outlet air dry-bulb temperature < 2C. This indicates the " + "possibility of coil frost/freeze. Outlet temperature = {:.2R} C.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + FullLoadOutAirTemp); thisDXCoil.LowOutTempBuffer2 = " ...Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + CreateSysTimeIntervalString(state); } @@ -11074,15 +11228,15 @@ void CalcDXHeatingCoil(EnergyPlusData &state, if (thisDXCoil.ErrIndex1 == 0) { ShowWarningMessage( state, - format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at {:.3R} m3/s/W.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - VolFlowperRatedTotCap)); + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at {:.3R} m3/s/W.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + VolFlowperRatedTotCap)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}]", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}]", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components or"); ShowContinueError(state, "inconsistent supply air fan operation modes in coil and unitary system objects."); } @@ -11135,12 +11289,13 @@ void CalcDXHeatingCoil(EnergyPlusData &state, if (TotCapTempModFac < 0.0) { if (thisDXCoil.CAPFTErrIndex == 0) { - ShowWarningMessage(state, - format("The TotCapTempModFac curve value for DX heating coil {} ={:.2R}", thisDXCoil.Name, TotCapTempModFac)); + ShowWarningMessage( + state, EnergyPlus::format("The TotCapTempModFac curve value for DX heating coil {} ={:.2R}", thisDXCoil.Name, TotCapTempModFac)); ShowContinueError(state, "TotCapTempModFac curve value must be > 0. TotCapTempModFac curve value has been reset to 0.0 and " "simulation is continuing."); - ShowContinueError(state, format("Check the IO reference manual for TotCapTempModFac curve guidance [ {} ].", thisDXCoil.DXCoilType)); + ShowContinueError( + state, EnergyPlus::format("Check the IO reference manual for TotCapTempModFac curve guidance [ {} ].", thisDXCoil.DXCoilType)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -11182,10 +11337,11 @@ void CalcDXHeatingCoil(EnergyPlusData &state, HeatingCapacityMultiplier = 0.909 - 107.33 * OutdoorCoildw; InputPowerMultiplier = 0.90 - 36.45 * OutdoorCoildw; if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { - ShowWarningMessage(state, - 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, + 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)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -11199,10 +11355,11 @@ void CalcDXHeatingCoil(EnergyPlusData &state, HeatingCapacityMultiplier = 0.875 * (1.0 - FractionalDefrostTime); InputPowerMultiplier = 0.954 * (1.0 - FractionalDefrostTime); if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { - ShowWarningMessage(state, - 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, + 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)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -11276,10 +11433,12 @@ void CalcDXHeatingCoil(EnergyPlusData &state, if (EIRTempModFac < 0.0) { if (thisDXCoil.EIRFTErrIndex == 0) { - ShowWarningMessage(state, format("The EIRTempModFac curve value for DX heating coil {} ={:.2R}", thisDXCoil.Name, EIRTempModFac)); + ShowWarningMessage( + state, EnergyPlus::format("The EIRTempModFac curve value for DX heating coil {} ={:.2R}", thisDXCoil.Name, EIRTempModFac)); ShowContinueError( state, "EIRTempModFac curve value must be > 0. EIRTempModFac curve value has been reset to 0.0 and simulation is continuing."); - ShowContinueError(state, format("Check the IO reference manual for EIRTempModFac curve guidance [ {} ].", thisDXCoil.DXCoilType)); + ShowContinueError( + state, EnergyPlus::format("Check the IO reference manual for EIRTempModFac curve guidance [ {} ].", thisDXCoil.DXCoilType)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -11307,7 +11466,8 @@ void CalcDXHeatingCoil(EnergyPlusData &state, if (thisDXCoil.PLRErrIndex == 0) { ShowWarningMessage( state, - format("The PLF curve value for DX heating coil {} ={:.2R} for part-load ratio ={:.2R}", thisDXCoil.Name, PLF, PLRHeating)); + EnergyPlus::format( + "The PLF curve value for DX heating coil {} ={:.2R} for part-load ratio ={:.2R}", thisDXCoil.Name, PLF, PLRHeating)); ShowContinueError(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Heating:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -11320,9 +11480,9 @@ void CalcDXHeatingCoil(EnergyPlusData &state, if (thisDXCoil.HeatingCoilRuntimeFraction > 1.0 && std::abs(thisDXCoil.HeatingCoilRuntimeFraction - 1.0) > 0.001) { if (thisDXCoil.ErrIndex4 == 0) { ShowWarningMessage(state, - format("The runtime fraction for DX heating coil {} exceeded 1.0. [{:.4R}].", - thisDXCoil.Name, - thisDXCoil.HeatingCoilRuntimeFraction)); + EnergyPlus::format("The runtime fraction for DX heating coil {} exceeded 1.0. [{:.4R}].", + thisDXCoil.Name, + thisDXCoil.HeatingCoilRuntimeFraction)); 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:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -12079,20 +12239,20 @@ Real64 CalcCBF(EnergyPlusData &state, OutletAirTemp = PsyTdbFnHW(OutletAirEnthalpy, OutletAirHumRat); OutletAirDPTemp = PsyTdpFnWPb(state, OutletAirHumRat, DataEnvironment::StdPressureSeaLevel); if (OutletAirTemp < OutletAirDPTemp) { - ShowSevereError(state, format("For object = {}, name = \"{}\"", UnitType, UnitName)); + ShowSevereError(state, EnergyPlus::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, format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); - ShowContinueError(state, format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); - ShowContinueError(state, format("...Dew Point Temperature = {:.2R} C", OutletAirDPTemp)); - ShowContinueError(state, format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", InletAirHumRat)); - ShowContinueError(state, format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); - ShowContinueError(state, format("...Dew Point Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); - ShowContinueError(state, format("...Inlet Air Enthalpy = {:.2R} J/kg", InletAirEnthalpy)); - ShowContinueError(state, format("...Outlet Air Enthalpy = {:.2R} J/kg", OutletAirEnthalpy)); - ShowContinueError(state, format("...Total Cooling Capacity used in calculation = {:.2R} W", TotCap)); - ShowContinueError(state, format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", AirMassFlowRate)); - ShowContinueError(state, format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", AirVolFlowRate)); - ShowContinueError(state, format("...Sensible Heat Ratio = {:.2R}", SHR)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Dew Point Temperature = {:.2R} C", OutletAirDPTemp)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", InletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Dew Point Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Enthalpy = {:.2R} J/kg", InletAirEnthalpy)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Enthalpy = {:.2R} J/kg", OutletAirEnthalpy)); + ShowContinueError(state, EnergyPlus::format("...Total Cooling Capacity used in calculation = {:.2R} W", TotCap)); + ShowContinueError(state, EnergyPlus::format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", AirMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", AirVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Sensible Heat Ratio = {:.2R}", SHR)); ShowContinueError(state, "Check coil design sensible heat ratio, total gross rated capacity, and air flow inputs."); } @@ -12100,26 +12260,27 @@ 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, format("For object = {}, name = \"{}\"", UnitType, UnitName)); + ShowWarningError(state, EnergyPlus::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"); ShowContinueError(state, "capacity, increase the rated air volume flow rate, or reduce the rated sensible heat ratio for this coil."); ShowContinueError(state, "If autosizing, it is recommended that all three of these values be autosized."); ShowContinueError(state, "...Inputs used for calculating cooling coil bypass factor."); - ShowContinueError(state, format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); - ShowContinueError(state, format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); - ShowContinueError(state, format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", InletAirHumRat)); - ShowContinueError(state, format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); - ShowContinueError(state, format("...Total Cooling Capacity used in calculation = {:.2R} W", TotCap)); - ShowContinueError(state, format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", AirMassFlowRate)); - ShowContinueError(state, format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", AirVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", InletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Total Cooling Capacity used in calculation = {:.2R} W", TotCap)); + ShowContinueError(state, EnergyPlus::format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", AirMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", AirVolFlowRate)); if (TotCap > 0.0) { if (((HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] - AirVolFlowRate / TotCap) > SmallDifferenceTest) || ((AirVolFlowRate / TotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { - ShowContinueError(state, - format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", - AirVolFlowRate / TotCap)); + ShowContinueError( + state, + EnergyPlus::format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", + AirVolFlowRate / TotCap)); } } ShowContinueErrorTimeStamp(state, ""); @@ -12131,32 +12292,33 @@ Real64 CalcCBF(EnergyPlusData &state, HTinHumRatOut = PsyHFnTdbW(InletAirTemp, OutletAirHumRat); adjustedSHR = (HTinHumRatOut - OutletAirEnthalpy) / DeltaH; ShowContinueError(state, "CalcCBF: SHR adjusted to achieve valid outlet air properties and the simulation continues."); - ShowContinueError(state, format("CalcCBF: initial SHR = {:.5R}", SHR)); - ShowContinueError(state, format("CalcCBF: adjusted SHR = {:.5R}", adjustedSHR)); + ShowContinueError(state, EnergyPlus::format("CalcCBF: initial SHR = {:.5R}", SHR)); + ShowContinueError(state, EnergyPlus::format("CalcCBF: adjusted SHR = {:.5R}", adjustedSHR)); } } DeltaT = InletAirTemp - OutletAirTemp; if (DeltaT <= 0.0) { - ShowSevereError(state, format("For object = {}, name = \"{}\"", UnitType, UnitName)); + ShowSevereError(state, EnergyPlus::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"); ShowContinueError(state, "capacity, rated air volume flow rate, or rated sensible heat ratio for this coil."); ShowContinueError(state, "If autosizing, it is recommended that all three of these values be autosized."); ShowContinueError(state, "...Inputs used for calculating cooling coil bypass factor."); - ShowContinueError(state, format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); - ShowContinueError(state, format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); - ShowContinueError(state, format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", InletAirHumRat)); - ShowContinueError(state, format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); - ShowContinueError(state, format("...Total Cooling Capacity used in calculation = {:.2R} W", TotCap)); - ShowContinueError(state, format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", AirMassFlowRate)); - ShowContinueError(state, format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", AirVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", InletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Total Cooling Capacity used in calculation = {:.2R} W", TotCap)); + ShowContinueError(state, EnergyPlus::format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", AirMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", AirVolFlowRate)); if (TotCap > 0.0) { if (((HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] - AirVolFlowRate / TotCap) > SmallDifferenceTest) || ((AirVolFlowRate / TotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { - ShowContinueError(state, - format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", - AirVolFlowRate / TotCap)); + ShowContinueError( + state, + EnergyPlus::format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", + AirVolFlowRate / TotCap)); } } ShowContinueErrorTimeStamp(state, ""); @@ -12171,22 +12333,23 @@ 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, format("{} \"{}\"", UnitType, UnitName)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", UnitType, UnitName)); ShowContinueError(state, "...Invalid slope or outlet air condition when calculating cooling coil bypass factor."); - ShowContinueError(state, format("...Slope = {:.8R}", SlopeAtConds)); - ShowContinueError(state, format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); - ShowContinueError(state, format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); - ShowContinueError(state, format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", InletAirHumRat)); - ShowContinueError(state, format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); - ShowContinueError(state, format("...Total Cooling Capacity used in calculation = {:.2R} W", TotCap)); - ShowContinueError(state, format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", AirMassFlowRate)); - ShowContinueError(state, format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", AirVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Slope = {:.8R}", SlopeAtConds)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Inlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", InletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Outlet Air Humidity Ratio = {:.6R} kgWater/kgDryAir", OutletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Total Cooling Capacity used in calculation = {:.2R} W", TotCap)); + ShowContinueError(state, EnergyPlus::format("...Air Mass Flow Rate used in calculation = {:.6R} kg/s", AirMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Air Volume Flow Rate used in calculation = {:.6R} m3/s", AirVolFlowRate)); if (TotCap > 0.0) { if (((HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] - AirVolFlowRate / TotCap) > SmallDifferenceTest) || ((AirVolFlowRate / TotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { - ShowContinueError(state, - format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", - AirVolFlowRate / TotCap)); + ShowContinueError( + state, + EnergyPlus::format("...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = {:.7R} m3/s/W", + AirVolFlowRate / TotCap)); } } ShowContinueErrorTimeStamp(state, ""); @@ -12244,8 +12407,9 @@ Real64 CalcCBF(EnergyPlusData &state, ADPEnthalpy = PsyHFnTdbW(ADPTemp, ADPHumRat); CBF = min(1.0, (OutletAirEnthalpy - ADPEnthalpy) / (InletAirEnthalpy - ADPEnthalpy)); if (Iter > IterMax && PrintFlag) { - ShowSevereError(state, format("{} \"{}\" -- coil bypass factor calculation did not converge after max iterations.", UnitType, UnitName)); - ShowContinueError(state, format("The RatedSHR of [{:.3R}], entered by the user or autosized (see *.eio file),", SHR)); + ShowSevereError( + state, EnergyPlus::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"); ShowContinueError(state, "the saturation curve of the psychrometric chart. If the RatedSHR is too low, then this"); @@ -12258,7 +12422,7 @@ Real64 CalcCBF(EnergyPlusData &state, CBFErrors = true; // Didn't converge within MaxIter iterations } if (CBF < 0.0 && PrintFlag) { - ShowSevereError(state, format("{} \"{}\" -- negative coil bypass factor calculated.", UnitType, UnitName)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\" -- negative coil bypass factor calculated.", UnitType, UnitName)); ShowContinueErrorTimeStamp(state, ""); CBFErrors = true; // Negative CBF not valid } @@ -12266,7 +12430,7 @@ Real64 CalcCBF(EnergyPlusData &state, // Show fatal error for specific coil that caused a CBF error if (CBFErrors) { - ShowFatalError(state, format("{} \"{}\" Errors found in calculating coil bypass factors", UnitType, UnitName)); + ShowFatalError(state, EnergyPlus::format("{} \"{}\" Errors found in calculating coil bypass factors", UnitType, UnitName)); } return CBF; @@ -12334,18 +12498,19 @@ Real64 ValidateADP(EnergyPlusData &state, Real64 enthalpyTempinHumRatADP = PsyHFnTdbW(RatedInletAirTemp, humRatADP); Real64 shrADPMax = (enthalpyTempinHumRatADP - enthalpyMaxADP) / (InletAirEnthalpy - enthalpyMaxADP); if (shrADPMax > 1.0) { - ShowWarningError(state, format("ValidateADP: Sensible heat ratio (SHR) calculation error for {} \"{} ", UnitType, UnitName)); + ShowWarningError(state, EnergyPlus::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, format("...Total Cooling Capacity = {:.2R} W", TotCap)); - ShowContinueError(state, format("...Mass Flow Rate = {:.6R} kg/s", AirMassFlow)); - ShowContinueError(state, format("...Volumetric Flow Rate = {:.6R} m3/s", AirVolFlowRate)); - ShowContinueError(state, format("...Coil Inlet Temperature = {:.2R} C", RatedInletAirTemp)); - ShowContinueError(state, format("...Coil Inlet Humidity Ratio = {:.6R} kgWater/kgDryAir", RatedInletAirHumRat)); - ShowContinueError(state, format("...Coil Inlet Enthalpy = {:.6R} J/kg", InletAirEnthalpy)); - ShowContinueError(state, format("...Coil Apparatus Dew Point Temperature = {:.2R} C", tempADPMax)); - ShowContinueError(state, format("...Coil Apparatus Dew Point Humidity Ratio = {:.6R} kgWater/kgDryAir", humRatADP)); + ShowContinueError(state, EnergyPlus::format("...Total Cooling Capacity = {:.2R} W", TotCap)); + ShowContinueError(state, EnergyPlus::format("...Mass Flow Rate = {:.6R} kg/s", AirMassFlow)); + ShowContinueError(state, EnergyPlus::format("...Volumetric Flow Rate = {:.6R} m3/s", AirVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("...Coil Inlet Temperature = {:.2R} C", RatedInletAirTemp)); + ShowContinueError(state, EnergyPlus::format("...Coil Inlet Humidity Ratio = {:.6R} kgWater/kgDryAir", RatedInletAirHumRat)); + ShowContinueError(state, EnergyPlus::format("...Coil Inlet Enthalpy = {:.6R} J/kg", InletAirEnthalpy)); + ShowContinueError(state, EnergyPlus::format("...Coil Apparatus Dew Point Temperature = {:.2R} C", tempADPMax)); + ShowContinueError(state, EnergyPlus::format("...Coil Apparatus Dew Point Humidity Ratio = {:.6R} kgWater/kgDryAir", humRatADP)); ShowContinueError( - state, format("...Coil Enthalpy at Inlet Temperature and Apparatus Dew Point Humidity Ratio = {:.2R} C", enthalpyTempinHumRatADP)); + state, + EnergyPlus::format("...Coil Enthalpy at Inlet Temperature and Apparatus Dew Point Humidity Ratio = {:.2R} C", enthalpyTempinHumRatADP)); ShowContinueError(state, "The maximum design SHR is assumed to be 1.0."); } shrADPMax = min(1.0, shrADPMax); @@ -12851,36 +13016,40 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, AirMassFlowRatioLS = MSHPMassFlowRateLow / thisDXCoil.MSRatedAirMassFlowRate(SpeedNumLS); AirMassFlowRatioHS = MSHPMassFlowRateHigh / thisDXCoil.MSRatedAirMassFlowRate(SpeedNumHS); if ((AirMassFlow > 0.0) && (CycRatio > 0.0) && (MSHPMassFlowRateHigh == 0.0)) { - ShowSevereError( - state, - format("CalcMultiSpeedDXCoilCooling: {} \"{} Developer error - inconsistent airflow rates.", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowSevereError(state, + EnergyPlus::format("CalcMultiSpeedDXCoilCooling: {} \"{} Developer error - inconsistent airflow rates.", + thisDXCoil.DXCoilType, + 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 " "must also be > 0.0"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("AirMassFlow={:.3R},CycRatio={:.3R},SpeedNum={:.0R}, MSHPMassFlowRateLow={:.3R}, MSHPMassFlowRateHigh={:.3R}", - AirMassFlow, - double(SpeedNum), - CycRatio, - MSHPMassFlowRateLow, - MSHPMassFlowRateHigh)); + ShowContinueError( + state, + EnergyPlus::format("AirMassFlow={:.3R},CycRatio={:.3R},SpeedNum={:.0R}, MSHPMassFlowRateLow={:.3R}, MSHPMassFlowRateHigh={:.3R}", + AirMassFlow, + double(SpeedNum), + CycRatio, + MSHPMassFlowRateLow, + MSHPMassFlowRateHigh)); ShowFatalError(state, "Preceding condition(s) causes termination."); } else { ShowContinueError(state, "When AirMassFlow > 0.0 and CycRatio > 0.0, then MSHPMassFlowRateHigh must also be > 0.0"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("AirMassFlow={:.3R},CycRatio={:.3R}, MSHPMassFlowRateHigh={:.3R}", AirMassFlow, CycRatio, MSHPMassFlowRateHigh)); + ShowContinueError( + state, + EnergyPlus::format("AirMassFlow={:.3R},CycRatio={:.3R}, MSHPMassFlowRateHigh={:.3R}", AirMassFlow, CycRatio, MSHPMassFlowRateHigh)); ShowFatalError(state, "Preceding condition(s) causes termination."); } } else if (CycRatio > 1.0 || SpeedRatio > 1.0) { - ShowSevereError( - state, - format("CalcMultiSpeedDXCoilCooling: {} \"{} Developer error - inconsistent speed ratios.", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowSevereError(state, + EnergyPlus::format("CalcMultiSpeedDXCoilCooling: {} \"{} Developer error - inconsistent speed ratios.", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); ShowContinueError(state, "CycRatio and SpeedRatio must be between 0.0 and 1.0"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("CycRatio={:.1R}, SpeedRatio = {:.1R}", CycRatio, SpeedRatio)); + ShowContinueError(state, EnergyPlus::format("CycRatio={:.1R}, SpeedRatio = {:.1R}", CycRatio, SpeedRatio)); ShowFatalError(state, "Preceding condition(s) causes termination."); } @@ -12927,28 +13096,30 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNumLS) == 0) { ShowWarningMessage( state, - format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumLS)); + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumLS)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - VolFlowperRatedTotCap)); + ShowContinueError( + state, + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + VolFlowperRatedTotCap)); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components or"); ShowContinueError(state, "inconsistent supply air fan operation modes in coil and unitary system objects."); } - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " - "at speed {} error continues...", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumLS), - thisDXCoil.MSErrIndex(SpeedNumLS), - VolFlowperRatedTotCap, - VolFlowperRatedTotCap); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " + "at speed {} error continues...", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumLS), + thisDXCoil.MSErrIndex(SpeedNumLS), + VolFlowperRatedTotCap, + VolFlowperRatedTotCap); } // Check for valid air volume flow per rated total cooling capacity (200 - 500 cfm/ton) at high speed @@ -12962,28 +13133,30 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNumHS) == 0) { ShowWarningMessage( state, - format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumHS)); + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumHS)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - VolFlowperRatedTotCap)); + ShowContinueError( + state, + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + VolFlowperRatedTotCap)); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components or"); ShowContinueError(state, "inconsistent supply air fan operation modes in coil and unitary system objects."); } - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " - "at speed {} error continues...", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumHS), - thisDXCoil.MSErrIndex(SpeedNumHS), - VolFlowperRatedTotCap, - VolFlowperRatedTotCap); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " + "at speed {} error continues...", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumHS), + thisDXCoil.MSErrIndex(SpeedNumHS), + VolFlowperRatedTotCap, + VolFlowperRatedTotCap); } // Adjust high speed coil bypass factor for actual maximum air flow rate. @@ -13273,28 +13446,30 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNum) == 0) { ShowWarningMessage( state, - format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNum)); + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNum)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - VolFlowperRatedTotCap)); + ShowContinueError( + state, + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxCoolVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + VolFlowperRatedTotCap)); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components or"); ShowContinueError(state, "inconsistent supply air fan operation modes in coil and unitary system objects."); } - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " - "at speed {} error continues...", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumHS), - thisDXCoil.MSErrIndex(SpeedNumHS), - VolFlowperRatedTotCap, - VolFlowperRatedTotCap); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " + "at speed {} error continues...", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumHS), + thisDXCoil.MSErrIndex(SpeedNumHS), + VolFlowperRatedTotCap, + VolFlowperRatedTotCap); } if (thisDXCoil.CondenserType(SpeedNum) == DataHeatBalance::RefrigCondenserType::Evap) { @@ -13349,8 +13524,9 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, PLF = CurveValue(state, thisDXCoil.MSPLFFPLR(SpeedNum), CycRatio); if (fanOp == HVAC::FanOp::Cycling && CycRatio == 1.0 && PLF != 1.0) { if (thisDXCoil.PLFErrIndex == 0) { - ShowWarningMessage(state, - format("The PLF curve value for DX cooling coil {} ={:.2R} for part-load ratio = 1", thisDXCoil.Name, PLF)); + ShowWarningMessage( + state, + EnergyPlus::format("The PLF curve value for DX cooling coil {} ={:.2R} for part-load ratio = 1", thisDXCoil.Name, PLF)); ShowContinueError(state, "PLF curve value must be = 1.0 and has been reset to 1.0. Simulation is continuing."); ShowContinueErrorTimeStamp(state, ""); } @@ -13673,36 +13849,40 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, AirMassFlowRatioLS = MSHPMassFlowRateLow / thisDXCoil.MSRatedAirMassFlowRate(SpeedNumLS); AirMassFlowRatioHS = MSHPMassFlowRateHigh / thisDXCoil.MSRatedAirMassFlowRate(SpeedNumHS); if ((AirMassFlow > 0.0) && (CycRatio > 0.0) && (MSHPMassFlowRateHigh == 0.0)) { - ShowSevereError( - state, - format("CalcMultiSpeedDXCoilHeating: {} \"{} Developer error - inconsistent airflow rates.", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowSevereError(state, + EnergyPlus::format("CalcMultiSpeedDXCoilHeating: {} \"{} Developer error - inconsistent airflow rates.", + thisDXCoil.DXCoilType, + 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 " "must also be > 0.0"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("AirMassFlow={:.3R},CycRatio={:.3R},SpeedNum={:.0R}, MSHPMassFlowRateLow={:.3R}, MSHPMassFlowRateHigh={:.3R}", - AirMassFlow, - double(SpeedNum), - CycRatio, - MSHPMassFlowRateLow, - MSHPMassFlowRateHigh)); + ShowContinueError( + state, + EnergyPlus::format("AirMassFlow={:.3R},CycRatio={:.3R},SpeedNum={:.0R}, MSHPMassFlowRateLow={:.3R}, MSHPMassFlowRateHigh={:.3R}", + AirMassFlow, + double(SpeedNum), + CycRatio, + MSHPMassFlowRateLow, + MSHPMassFlowRateHigh)); ShowFatalError(state, "Preceding condition(s) causes termination."); } else { ShowContinueError(state, "When AirMassFlow > 0.0 and CycRatio > 0.0, then MSHPMassFlowRateHigh must also be > 0.0"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("AirMassFlow={:.3R},CycRatio={:.3R}, MSHPMassFlowRateHigh={:.3R}", AirMassFlow, CycRatio, MSHPMassFlowRateHigh)); + ShowContinueError( + state, + EnergyPlus::format("AirMassFlow={:.3R},CycRatio={:.3R}, MSHPMassFlowRateHigh={:.3R}", AirMassFlow, CycRatio, MSHPMassFlowRateHigh)); ShowFatalError(state, "Preceding condition(s) causes termination."); } } else if (CycRatio > 1.0 || SpeedRatio > 1.0) { - ShowSevereError( - state, - format("CalcMultiSpeedDXCoilHeating: {} \"{} Developer error - inconsistent speed ratios.", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowSevereError(state, + EnergyPlus::format("CalcMultiSpeedDXCoilHeating: {} \"{} Developer error - inconsistent speed ratios.", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); ShowContinueError(state, "CycRatio and SpeedRatio must be between 0.0 and 1.0"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("CycRatio={:.1R}, SpeedRatio = {:.1R}", CycRatio, SpeedRatio)); + ShowContinueError(state, EnergyPlus::format("CycRatio={:.1R}, SpeedRatio = {:.1R}", CycRatio, SpeedRatio)); ShowFatalError(state, "Preceding condition(s) causes termination."); } @@ -13778,28 +13958,30 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNumLS) == 0) { ShowWarningMessage( state, - format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed {}.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumLS)); + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed {}.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumLS)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - VolFlowperRatedTotCap)); + ShowContinueError( + state, + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + VolFlowperRatedTotCap)); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components or"); ShowContinueError(state, "inconsistent supply air fan operation modes in coil and unitary system objects."); } - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range " - "at speed {} error continues...", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumLS), - thisDXCoil.MSErrIndex(SpeedNumLS), - VolFlowperRatedTotCap, - VolFlowperRatedTotCap); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range " + "at speed {} error continues...", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumLS), + thisDXCoil.MSErrIndex(SpeedNumLS), + VolFlowperRatedTotCap, + VolFlowperRatedTotCap); } // Check for valid air volume flow per rated total cooling capacity (200 - 600 cfm/ton) at high speed @@ -13812,28 +13994,30 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNumHS) == 0) { ShowWarningMessage( state, - format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed {}.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumHS)); + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed {}.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumHS)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - VolFlowperRatedTotCap)); + ShowContinueError( + state, + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + VolFlowperRatedTotCap)); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components or"); ShowContinueError(state, "inconsistent supply air fan operation modes in coil and unitary system objects."); } - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range " - "at speed {} error continues...", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - SpeedNumHS), - thisDXCoil.MSErrIndex(SpeedNumHS), - VolFlowperRatedTotCap, - VolFlowperRatedTotCap); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range " + "at speed {} error continues...", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + SpeedNumHS), + thisDXCoil.MSErrIndex(SpeedNumHS), + VolFlowperRatedTotCap, + VolFlowperRatedTotCap); } // Get total capacity modifying factor (function of temperature) for off-rated conditions @@ -13910,9 +14094,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - 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)); + 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)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -13926,10 +14110,11 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, HeatingCapacityMultiplier = 0.875 * (1.0 - FractionalDefrostTime); InputPowerMultiplier = 0.954 * (1.0 - FractionalDefrostTime); if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { - ShowWarningMessage(state, - 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, + 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)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -13964,10 +14149,10 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.PLRErrIndex == 0) { ShowWarningMessage( state, - format("The PLF curve value at high speed for DX multispeed heating coil {} ={:.2R} for part-load ratio ={:.2R}", - thisDXCoil.Name, - PLF, - PLRHeating)); + EnergyPlus::format("The PLF curve value at high speed for DX multispeed heating coil {} ={:.2R} for part-load ratio ={:.2R}", + thisDXCoil.Name, + PLF, + PLRHeating)); ShowContinueError(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Heating:DX:MultiSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -13979,10 +14164,11 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, thisDXCoil.HeatingCoilRuntimeFraction = (PLRHeating / PLF); if (thisDXCoil.HeatingCoilRuntimeFraction > 1.0 && std::abs(thisDXCoil.HeatingCoilRuntimeFraction - 1.0) > 0.001) { if (thisDXCoil.ErrIndex4 == 0) { - ShowWarningMessage(state, - format("The runtime fraction at high speed for DX multispeed heating coil {} exceeded 1.0. [{:.4R}].", - thisDXCoil.Name, - thisDXCoil.HeatingCoilRuntimeFraction)); + ShowWarningMessage( + state, + EnergyPlus::format("The runtime fraction at high speed for DX multispeed heating coil {} exceeded 1.0. [{:.4R}].", + thisDXCoil.Name, + thisDXCoil.HeatingCoilRuntimeFraction)); 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:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -14090,16 +14276,18 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if ((VolFlowperRatedTotCap < HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) || (VolFlowperRatedTotCap > HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])) { if (thisDXCoil.ErrIndex1 == 0) { - ShowWarningMessage(state, - format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed 1.", - thisDXCoil.DXCoilType, - thisDXCoil.Name)); + ShowWarningMessage( + state, + EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed 1.", + thisDXCoil.DXCoilType, + thisDXCoil.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", - HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - VolFlowperRatedTotCap)); + ShowContinueError( + state, + EnergyPlus::format("Expected range for VolumeFlowPerRatedTotalCapacity=[{:.3R}--{:.3R}] Current value is {:.3R} m3/s/W", + HVAC::MinOperVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + VolFlowperRatedTotCap)); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components or"); ShowContinueError(state, "inconsistent supply air fan operation modes in coil and unitary system objects."); } @@ -14155,9 +14343,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - 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)); + 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)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -14171,10 +14359,11 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, HeatingCapacityMultiplier = 0.875 * (1.0 - FractionalDefrostTime); InputPowerMultiplier = 0.954 * (1.0 - FractionalDefrostTime); if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { - ShowWarningMessage(state, - 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, + 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)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -14231,8 +14420,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, PLF = CurveValue(state, thisDXCoil.MSPLFFPLR(1), PLRHeating); // Calculate part-load factor if (fanOp == HVAC::FanOp::Cycling && CycRatio == 1.0 && PLF != 1.0) { if (thisDXCoil.PLFErrIndex == 0) { - ShowWarningMessage(state, - format("The PLF curve value for DX heating coil {} ={:.2R} for part-load ratio = 1", thisDXCoil.Name, PLF)); + ShowWarningMessage( + state, + EnergyPlus::format("The PLF curve value for DX heating coil {} ={:.2R} for part-load ratio = 1", thisDXCoil.Name, PLF)); ShowContinueError(state, "PLF curve value must be = 1.0 and has been reset to 1.0. Simulation is continuing."); ShowContinueErrorTimeStamp(state, ""); } @@ -14245,7 +14435,8 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.PLRErrIndex == 0) { ShowWarningMessage( state, - format("The PLF curve value for DX heating coil {} ={:.2R} for part-load ratio ={:.2R}", thisDXCoil.Name, PLF, PLRHeating)); + EnergyPlus::format( + "The PLF curve value for DX heating coil {} ={:.2R} for part-load ratio ={:.2R}", thisDXCoil.Name, PLF, PLRHeating)); ShowContinueError(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Heating:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -14258,9 +14449,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.HeatingCoilRuntimeFraction > 1.0 && std::abs(thisDXCoil.HeatingCoilRuntimeFraction - 1.0) > 0.001) { if (thisDXCoil.ErrIndex4 == 0) { ShowWarningMessage(state, - format("The runtime fraction for DX heating coil {} exceeded 1.0. [{:.4R}].", - thisDXCoil.Name, - thisDXCoil.HeatingCoilRuntimeFraction)); + EnergyPlus::format("The runtime fraction for DX heating coil {} exceeded 1.0. [{:.4R}].", + thisDXCoil.Name, + thisDXCoil.HeatingCoilRuntimeFraction)); 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:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -14639,10 +14830,11 @@ void CalcTwoSpeedDXCoilStandardRating(EnergyPlusData &state, int const DXCoilNum } if (thisDXCoil.SupplyFanIndex == 0) { // didn't find VAV fan, do not rate this coil thisDXCoil.RateWithInternalStaticAndFanObject = false; - ShowWarningError(state, - format("CalcTwoSpeedDXCoilStandardRating: Did not find an appropriate fan associated with DX coil named = \"{}\". Standard " - "Ratings will not be calculated.", - thisDXCoil.Name)); + ShowWarningError( + state, + EnergyPlus::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; @@ -14897,19 +15089,21 @@ void CalcTwoSpeedDXCoilStandardRating(EnergyPlusData &state, int const DXCoilNum // Warn user if curve output goes negative if (TotCapFlowModFac < 0.0) { if (thisDXCoil.CCapFFlowErrorIndex == 0) { - ShowWarningMessage(state, format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); ShowContinueError( state, - format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3T}).", TotCapFlowModFac)); - ShowContinueError(state, format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{}{}\"{}\": Total Cooling Capacity Modifier curve (function of flow fraction) output is negative warning continues...", - RoutineName, - thisDXCoil.DXCoilType, - thisDXCoil.Name), + EnergyPlus::format( + "{}{}\"{}\": Total Cooling Capacity Modifier curve (function of flow fraction) output is negative warning continues...", + RoutineName, + thisDXCoil.DXCoilType, + thisDXCoil.Name), thisDXCoil.CCapFFlowErrorIndex, TotCapFlowModFac, TotCapFlowModFac); @@ -14921,23 +15115,26 @@ void CalcTwoSpeedDXCoilStandardRating(EnergyPlusData &state, int const DXCoilNum // Warn user if curve output goes negative if (TotCapTempModFac < 0.0) { if (thisDXCoil.CCapFTempErrorIndex == 0) { - ShowWarningMessage(state, format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); ShowContinueError( state, - format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", TotCapTempModFac)); - ShowContinueError(state, - 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))); + EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", + 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))); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{}{} \"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", - RoutineName, - thisDXCoil.DXCoilType, - thisDXCoil.Name), + EnergyPlus::format( + "{}{} \"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", + RoutineName, + thisDXCoil.DXCoilType, + thisDXCoil.Name), thisDXCoil.CCapFTempErrorIndex, TotCapTempModFac, TotCapTempModFac); @@ -14963,23 +15160,26 @@ void CalcTwoSpeedDXCoilStandardRating(EnergyPlusData &state, int const DXCoilNum // Warn user if curve output goes negative if (TotCapTempModFac < 0.0) { if (thisDXCoil.CCapFTempErrorIndex == 0) { - ShowWarningMessage(state, format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowWarningMessage(state, EnergyPlus::format("{}{} \"{}\":", RoutineName, thisDXCoil.DXCoilType, thisDXCoil.Name)); ShowContinueError( state, - format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", TotCapTempModFac)); - ShowContinueError(state, - 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))); + EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", + 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))); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{}{} \"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", - RoutineName, - thisDXCoil.DXCoilType, - thisDXCoil.Name), + EnergyPlus::format( + "{}{} \"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", + RoutineName, + thisDXCoil.DXCoilType, + thisDXCoil.Name), thisDXCoil.CCapFTempErrorIndex, TotCapTempModFac, TotCapTempModFac); @@ -15296,7 +15496,7 @@ void GetDXCoilIndex(EnergyPlusData &state, if (!ThisObjectType.empty()) { ShowSevereError(state, fmt::format("{}, GetDXCoilIndex: DX Coil not found={}", ThisObjectType, DXCoilName)); } else { - ShowSevereError(state, format("GetDXCoilIndex: DX Coil not found={}", DXCoilName)); + ShowSevereError(state, EnergyPlus::format("GetDXCoilIndex: DX Coil not found={}", DXCoilName)); } } ErrorsFound = true; @@ -15388,7 +15588,7 @@ Real64 GetCoilCapacity(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ShowContinueError(state, "... returning capacity as -1000."); ErrorsFound = true; CoilCapacity = -1000.0; @@ -15491,7 +15691,7 @@ int GetCoilTypeNum(EnergyPlusData &state, TypeNum = state.dataDXCoils->DXCoil(WhichCoil).DXCoilType_Num; } else { if (PrintMessage) { - ShowSevereError(state, format("GetCoilTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); } ErrorsFound = true; TypeNum = 0; @@ -15553,7 +15753,7 @@ int GetCoilInletNode(EnergyPlusData &state, if (WhichCoil != 0) { NodeNumber = state.dataDXCoils->DXCoil(WhichCoil).AirInNode; } else { - ShowSevereError(state, format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -15618,9 +15818,10 @@ int GetCoilOutletNode(EnergyPlusData &state, if (WhichCoil != 0) { NodeNumber = state.dataDXCoils->DXCoil(WhichCoil).AirOutNode; } else { - ShowSevereError( - state, - format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil outlet node number.", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil outlet node number.", + CoilType, + CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -15684,7 +15885,7 @@ int GetCoilCondenserInletNode(EnergyPlusData &state, if (WhichCoil != 0) { CondNode = state.dataDXCoils->DXCoil(WhichCoil).CondenserInletNodeNum(1); } else { - ShowSevereError(state, format("GetCoilCondenserInletNode: Invalid DX Coil, Type= \"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilCondenserInletNode: Invalid DX Coil, Type= \"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CondNode = 0; } @@ -15724,7 +15925,7 @@ Real64 GetDXCoilBypassedFlowFrac(EnergyPlusData &state, if (WhichCoil != 0) { BypassFraction = state.dataDXCoils->DXCoil(WhichCoil).BypassedFlowFrac(1); } else { - ShowSevereError(state, format("GetDXCoilBypassedFlowFrac: Invalid DX Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetDXCoilBypassedFlowFrac: Invalid DX Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; BypassFraction = 0.0; } @@ -15822,9 +16023,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, - format("Configuration error in {}\"{}\"", - BranchNodeConnections::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], - CompSetsParentName)); + EnergyPlus::format("Configuration error in {}\"{}\"", + BranchNodeConnections::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], + CompSetsParentName)); ShowContinueError(state, "DX heating coil not allowed in this configuration."); ShowFatalError(state, "Preceding condition(s) causes termination."); } @@ -15839,12 +16040,13 @@ 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, format("Coil:Cooling:DX:SingleSpeed = {}", thisDXCoolingCoil.Name)); - ShowContinueError(state, format("is different than that specified in Coil:Heating:DX:SingleSpeed = {}.", HeatingCoilName)); + ShowContinueError(state, EnergyPlus::format("Coil:Cooling:DX:SingleSpeed = {}", thisDXCoolingCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("is different than that specified in Coil:Heating:DX:SingleSpeed = {}.", HeatingCoilName)); ShowContinueError(state, - format("Both of these DX coils are part of {}={}.", - BranchNodeConnections::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], - CompSetsParentName)); + EnergyPlus::format("Both of these DX coils are part of {}={}.", + BranchNodeConnections::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], + CompSetsParentName)); ShowContinueError(state, "The value specified in the DX heating coil will be used and the simulation continues..."); } } @@ -15884,7 +16086,7 @@ int GetDXCoilNumberOfSpeeds(EnergyPlusData &state, if (WhichCoil != 0) { NumberOfSpeeds = state.dataDXCoils->DXCoil(WhichCoil).NumOfSpeeds; } else { - ShowSevereError(state, format("GetDXCoilNumberOfSpeeds: Invalid DX Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetDXCoilNumberOfSpeeds: Invalid DX Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NumberOfSpeeds = 0; } @@ -15934,8 +16136,9 @@ Sched::Schedule *GetDXCoilAvailSched(EnergyPlusData &state, return state.dataDXCoils->DXCoil(WhichCoil).availSched; } if (!present(CoilIndex)) { - ShowSevereError(state, - format("GetDXCoilAvailSch: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil availability schedule index.", + ShowSevereError( + state, + EnergyPlus::format("GetDXCoilAvailSch: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil availability schedule index.", CoilType, CoilName)); } @@ -15985,16 +16188,18 @@ Real64 GetDXCoilAirFlow(EnergyPlusData &state, AirFlow = state.dataDXCoils->DXCoil(WhichCoil).MSRatedAirVolFlowRate(1); } break; default: { - ShowSevereError( - state, - format("GetDXCoilAirFlow: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil air flow rate.", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::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, format("GetDXCoilAirFlow: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil air flow rate.", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format( + "GetDXCoilAirFlow: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil air flow rate.", CoilType, CoilName)); ErrorsFound = true; AirFlow = -1.0; } @@ -16106,9 +16311,9 @@ void SetDXCoolingCoilData( if (DXCoilNum <= 0 || DXCoilNum > state.dataDXCoils->NumDXCoils) { ShowSevereError(state, - format("SetDXCoolingCoilData: called with DX Cooling Coil Number out of range={} should be >0 and <{}", - DXCoilNum, - state.dataDXCoils->NumDXCoils)); + EnergyPlus::format("SetDXCoolingCoilData: called with DX Cooling Coil Number out of range={} should be >0 and <{}", + DXCoilNum, + state.dataDXCoils->NumDXCoils)); ErrorsFound = true; return; } @@ -16241,7 +16446,7 @@ void SetCoilSystemHeatingDXFlag(EnergyPlusData &state, if (WhichCoil != 0) { state.dataDXCoils->DXCoil(WhichCoil).FindCompanionUpStreamCoil = false; } else { - ShowSevereError(state, format("SetCoilSystemHeatingDXFlag: Could not find Coil, Type=\"{}\"Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("SetCoilSystemHeatingDXFlag: Could not find Coil, Type=\"{}\"Name=\"{}\"", CoilType, CoilName)); } } @@ -16269,7 +16474,7 @@ void SetCoilSystemCoolingData(EnergyPlusData &state, if (WhichCoil != 0) { state.dataDXCoils->DXCoil(WhichCoil).CoilSystemName = CoilSystemName; } else { - ShowSevereError(state, format("SetCoilSystemCoolingData: Could not find Coil \"Name=\"{}\"", CoilName)); + ShowSevereError(state, EnergyPlus::format("SetCoilSystemCoolingData: Could not find Coil \"Name=\"{}\"", CoilName)); } } @@ -16363,7 +16568,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, format("SetDXCoilTypeData: Could not find Coil \"Name=\"{}\"", CoilName)); + ShowSevereError(state, EnergyPlus::format("SetDXCoilTypeData: Could not find Coil \"Name=\"{}\"", CoilName)); } } @@ -16945,8 +17150,8 @@ 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, - format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} C.", - thisDXCoil.FullLoadInletAirTempLast)); + EnergyPlus::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} 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."); @@ -16971,7 +17176,8 @@ void CalcVRFCoolingCoil_FluidTCtrl(EnergyPlusData &state, (compressorOp == HVAC::CompressorOp::On)) { // for cycling fan, reset mass flow to full on rate if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { - ShowFatalError(state, format("{} \"{}\" - Rated total cooling capacity is zero or less.", thisDXCoil.DXCoilType, thisDXCoil.Name)); + ShowFatalError(state, + EnergyPlus::format("{} \"{}\" - Rated total cooling capacity is zero or less.", thisDXCoil.DXCoilType, thisDXCoil.Name)); } TotCap = min(MaxCoolCap, thisDXCoil.RatedTotCap(Mode)); @@ -17080,7 +17286,7 @@ void CalcVRFCoolingCoil_FluidTCtrl(EnergyPlusData &state, if (thisDXCoil.ErrIndex2 == 0) { ShowWarningMessage( state, - format( + EnergyPlus::format( "The PLF curve value for the DX cooling coil {} ={:.3R} for part-load ratio ={:.3R}", thisDXCoil.Name, PLF, PartLoadRatio)); ShowContinueErrorTimeStamp(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Cooling:DX:SingleSpeed]."); @@ -17095,9 +17301,9 @@ void CalcVRFCoolingCoil_FluidTCtrl(EnergyPlusData &state, if (thisDXCoil.CoolingCoilRuntimeFraction > 1.0 && std::abs(thisDXCoil.CoolingCoilRuntimeFraction - 1.0) > 0.001) { if (thisDXCoil.ErrIndex3 == 0) { ShowWarningMessage(state, - format("The runtime fraction for DX cooling coil {} exceeded 1.0. [{:.4R}].", - thisDXCoil.Name, - thisDXCoil.CoolingCoilRuntimeFraction)); + EnergyPlus::format("The runtime fraction for DX cooling coil {} exceeded 1.0. [{:.4R}].", + thisDXCoil.Name, + thisDXCoil.CoolingCoilRuntimeFraction)); ShowContinueError(state, "Runtime fraction reset to 1 and the simulation will continue."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Cooling:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -17136,11 +17342,11 @@ void CalcVRFCoolingCoil_FluidTCtrl(EnergyPlusData &state, thisDXCoil.FullLoadOutAirTempLast = OutletAirTemp; if (thisDXCoil.LowOutletTempIndex == 0) { thisDXCoil.FullLoadInletAirTempLast = InletAirDryBulbTemp; - thisDXCoil.LowOutTempBuffer1 = format("{} \"{}\" - Full load outlet air dry-bulb temperature < 2C. This indicates the " - "possibility of coil frost/freeze. Outlet temperature = {:.2R} C.", - thisDXCoil.DXCoilType, - thisDXCoil.Name, - OutletAirTemp); + thisDXCoil.LowOutTempBuffer1 = EnergyPlus::format("{} \"{}\" - Full load outlet air dry-bulb temperature < 2C. This indicates the " + "possibility of coil frost/freeze. Outlet temperature = {:.2R} C.", + thisDXCoil.DXCoilType, + thisDXCoil.Name, + OutletAirTemp); thisDXCoil.LowOutTempBuffer2 = " ...Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + " " + CreateSysTimeIntervalString(state); } @@ -17417,7 +17623,8 @@ void CalcVRFHeatingCoil_FluidTCtrl(EnergyPlusData &state, if (thisDXCoil.PLRErrIndex == 0) { ShowWarningMessage( state, - format("The PLF curve value for DX heating coil {} ={:.2R} for part-load ratio ={:.2R}", thisDXCoil.Name, PLF, PLRHeating)); + EnergyPlus::format( + "The PLF curve value for DX heating coil {} ={:.2R} for part-load ratio ={:.2R}", thisDXCoil.Name, PLF, PLRHeating)); ShowContinueError(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Heating:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -17430,9 +17637,9 @@ void CalcVRFHeatingCoil_FluidTCtrl(EnergyPlusData &state, if (thisDXCoil.HeatingCoilRuntimeFraction > 1.0 && std::abs(thisDXCoil.HeatingCoilRuntimeFraction - 1.0) > 0.001) { if (thisDXCoil.ErrIndex4 == 0) { ShowWarningMessage(state, - format("The runtime fraction for DX heating coil {} exceeded 1.0. [{:.4R}].", - thisDXCoil.Name, - thisDXCoil.HeatingCoilRuntimeFraction)); + EnergyPlus::format("The runtime fraction for DX heating coil {} exceeded 1.0. [{:.4R}].", + thisDXCoil.Name, + thisDXCoil.HeatingCoilRuntimeFraction)); 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:DX:SingleSpeed]."); ShowContinueErrorTimeStamp(state, ""); @@ -18049,7 +18256,7 @@ void SetDXCoilAirLoopNumber(EnergyPlusData &state, std::string const &CoilName, if (WhichCoil != 0) { state.dataDXCoils->DXCoil(WhichCoil).AirLoopNum = AirLoopNum; } else { - ShowSevereError(state, format("SetDXCoilAirLoopNumber: Could not find Coil \"Name=\"{}\"", CoilName)); + ShowSevereError(state, EnergyPlus::format("SetDXCoilAirLoopNumber: Could not find Coil \"Name=\"{}\"", CoilName)); } } // must match coil names for the coil type diff --git a/src/EnergyPlus/DXFEarClipping.cc b/src/EnergyPlus/DXFEarClipping.cc index 8f6ec06153d..1fbc12e937e 100644 --- a/src/EnergyPlus/DXFEarClipping.cc +++ b/src/EnergyPlus/DXFEarClipping.cc @@ -239,22 +239,22 @@ namespace DXFEarClipping { generate_ears(state, nsides, vertex, ears, nears, r_angles, nrangles, c_vertices, ncverts, removed, earverts, rangles); if (!any_gt(ears, 0)) { ShowWarningError(state, - format("DXFOut: Could not triangulate surface=\"{}\", type=\"{}\", check surface vertex order(entry)", - surfname, - DataSurfaces::cSurfaceClass(surfclass))); + EnergyPlus::format("DXFOut: Could not triangulate surface=\"{}\", type=\"{}\", check surface vertex order(entry)", + surfname, + DataSurfaces::cSurfaceClass(surfclass))); ++state.dataDXFEarClipping->errcount; if (state.dataDXFEarClipping->errcount == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual surfaces."); } if (state.dataGlobal->DisplayExtraWarnings) { - ShowMessage(state, format(" surface={} class={}", surfname, DataSurfaces::cSurfaceClass(surfclass))); + ShowMessage(state, EnergyPlus::format(" surface={} class={}", surfname, DataSurfaces::cSurfaceClass(surfclass))); for (int j = 1; j <= nsides; ++j) { - ShowMessage(state, format(" side={} ({:.1R},{:.1R},{:.1R})", j, polygon(j).x, polygon(j).y, polygon(j).z)); + ShowMessage(state, EnergyPlus::format(" side={} ({:.1R},{:.1R},{:.1R})", j, polygon(j).x, polygon(j).y, polygon(j).z)); } - ShowMessage(state, format(" number of triangles found={:12}", ncount)); + ShowMessage(state, EnergyPlus::format(" number of triangles found={:12}", ncount)); for (int j = 1; j <= nrangles; ++j) { - ShowMessage(state, format(" r angle={} vert={} deg={:.1R}", j, r_angles(j), rangles(j) * Constant::RadToDeg)); + ShowMessage(state, EnergyPlus::format(" r angle={} vert={} deg={:.1R}", j, r_angles(j), rangles(j) * Constant::RadToDeg)); } } break; // while loop diff --git a/src/EnergyPlus/DataEnvironment.cc b/src/EnergyPlus/DataEnvironment.cc index d5e7229fc8c..6c530cd44de 100644 --- a/src/EnergyPlus/DataEnvironment.cc +++ b/src/EnergyPlus/DataEnvironment.cc @@ -109,7 +109,7 @@ Real64 OutDryBulbTempAt(EnergyPlusData &state, Real64 const Z) // Height above g if (LocalOutDryBulbTemp < -100.0) { ShowSevereError(state, "OutDryBulbTempAt: outdoor drybulb temperature < -100 C"); - ShowContinueError(state, format("...check heights, this height=[{:.0R}].", Z)); + ShowContinueError(state, EnergyPlus::format("...check heights, this height=[{:.0R}].", Z)); ShowFatalError(state, "Program terminates due to preceding condition(s)."); } @@ -152,7 +152,7 @@ Real64 OutWetBulbTempAt(EnergyPlusData &state, Real64 const Z) // Height above g if (LocalOutWetBulbTemp < -100.0) { ShowSevereError(state, "OutWetBulbTempAt: outdoor wetbulb temperature < -100 C"); - ShowContinueError(state, format("...check heights, this height=[{:.0R}].", Z)); + ShowContinueError(state, EnergyPlus::format("...check heights, this height=[{:.0R}].", Z)); ShowFatalError(state, "Program terminates due to preceding condition(s)."); } @@ -237,11 +237,11 @@ void SetOutBulbTempAt_error(EnergyPlusData &state, std::string const &Settings, { // Using/Aliasing - ShowSevereError(state, format("SetOutBulbTempAt: {} Outdoor Temperatures < -100 C", Settings)); - ShowContinueError(state, format("...check {} Heights - Maximum {} Height=[{:.0R}].", Settings, Settings, max_height)); + ShowSevereError(state, EnergyPlus::format("SetOutBulbTempAt: {} Outdoor Temperatures < -100 C", Settings)); + ShowContinueError(state, EnergyPlus::format("...check {} Heights - Maximum {} Height=[{:.0R}].", Settings, Settings, max_height)); if (max_height >= 20000.0) { ShowContinueError(state, "...according to your maximum Z height, your building is somewhere in the Stratosphere."); - ShowContinueError(state, format("...look at {} Name= {}", Settings, SettingsName)); + ShowContinueError(state, EnergyPlus::format("...look at {} Name= {}", Settings, SettingsName)); } ShowFatalError(state, "Program terminates due to preceding condition(s)."); } diff --git a/src/EnergyPlus/DataHeatBalance.cc b/src/EnergyPlus/DataHeatBalance.cc index 80c62308df2..ee47698626c 100644 --- a/src/EnergyPlus/DataHeatBalance.cc +++ b/src/EnergyPlus/DataHeatBalance.cc @@ -205,84 +205,84 @@ void ZoneData::SetWindDirAt(Real64 const fac) void AirReportVars::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string const &name) { SetupOutputVariable(state, - format("{} Mean Air Temperature", prefix), + EnergyPlus::format("{} Mean Air Temperature", prefix), Constant::Units::C, this->MeanAirTemp, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Wetbulb Globe Temperature", prefix), + EnergyPlus::format("{} Wetbulb Globe Temperature", prefix), Constant::Units::C, this->WetbulbGlobeTemp, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Operative Temperature", prefix), + EnergyPlus::format("{} Operative Temperature", prefix), Constant::Units::C, this->OperativeTemp, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Mean Air Dewpoint Temperature", prefix), + EnergyPlus::format("{} Mean Air Dewpoint Temperature", prefix), Constant::Units::C, this->MeanAirDewPointTemp, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Mean Air Humidity Ratio", prefix), + EnergyPlus::format("{} Mean Air Humidity Ratio", prefix), Constant::Units::kgWater_kgDryAir, this->MeanAirHumRat, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Heat Balance Internal Convective Heat Gain Rate", prefix), + EnergyPlus::format("{} Air Heat Balance Internal Convective Heat Gain Rate", prefix), Constant::Units::W, this->SumIntGains, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Heat Balance Surface Convection Rate", prefix), + EnergyPlus::format("{} Air Heat Balance Surface Convection Rate", prefix), Constant::Units::W, this->SumHADTsurfs, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Heat Balance Interzone Air Transfer Rate", prefix), + EnergyPlus::format("{} Air Heat Balance Interzone Air Transfer Rate", prefix), Constant::Units::W, this->SumMCpDTzones, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Heat Balance Outdoor Air Transfer Rate", prefix), + EnergyPlus::format("{} Air Heat Balance Outdoor Air Transfer Rate", prefix), Constant::Units::W, this->SumMCpDtInfil, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Heat Balance System Air Transfer Rate", prefix), + EnergyPlus::format("{} Air Heat Balance System Air Transfer Rate", prefix), Constant::Units::W, this->SumMCpDTsystem, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Heat Balance System Convective Heat Gain Rate", prefix), + EnergyPlus::format("{} Air Heat Balance System Convective Heat Gain Rate", prefix), Constant::Units::W, this->SumNonAirSystem, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Heat Balance Air Energy Storage Rate", prefix), + EnergyPlus::format("{} Air Heat Balance Air Energy Storage Rate", prefix), Constant::Units::W, this->CzdTdt, OutputProcessor::TimeStepType::System, @@ -290,7 +290,7 @@ void AirReportVars::setUpOutputVars(EnergyPlusData &state, std::string_view pref name); if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, - format("{} Air Heat Balance Deviation Rate", prefix), + EnergyPlus::format("{} Air Heat Balance Deviation Rate", prefix), Constant::Units::W, this->imBalance, OutputProcessor::TimeStepType::System, @@ -442,16 +442,18 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, } if (WrongMaterialsMix) { // Illegal material for a window construction - ShowSevereError(state, - format("Error: Window construction={} has materials other than glass, gas, shade, screen, blind, complex shading, " + ShowSevereError( + state, + EnergyPlus::format("Error: Window construction={} has materials other than glass, gas, shade, screen, blind, complex shading, " "complex gap, or simple system.", thisConstruct.Name)); ErrorsFound = true; // Do not check number of layers for BSDF type of window since that can be handled } else if ((TotLayers > 8) && (!thisConstruct.WindowTypeBSDF) && (!thisConstruct.WindowTypeEQL)) { // Too many layers for a window construction - ShowSevereError(state, - format("CheckAndSetConstructionProperties: Window construction={} has too many layers (max of 8 allowed -- 4 glass + 3 " + ShowSevereError( + state, + EnergyPlus::format("CheckAndSetConstructionProperties: Window construction={} has too many layers (max of 8 allowed -- 4 glass + 3 " "gap + 1 shading device).", thisConstruct.Name)); ErrorsFound = true; @@ -462,8 +464,9 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, if ((matGroup == Material::Group::Shade) || (matGroup == Material::Group::Gas) || (matGroup == Material::Group::GasMixture) || (matGroup == Material::Group::Blind) || (matGroup == Material::Group::Screen) || (matGroup == Material::Group::ComplexShade) || (matGroup == Material::Group::ComplexWindowGap)) { - ShowSevereError(state, - format("CheckAndSetConstructionProperties: The single-layer window construction={} has a gas, complex gap, shade, " + ShowSevereError( + state, + EnergyPlus::format("CheckAndSetConstructionProperties: The single-layer window construction={} has a gas, complex gap, shade, " "complex shade, screen or blind material; it should be glass of simple glazing system.", thisConstruct.Name)); ErrorsFound = true; @@ -545,8 +548,8 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, assert(matGlass != nullptr); if (matGlass->SolarDiffusing && TotShadeLayers > 0) { ErrorsFound = true; - ShowSevereError(state, format("CheckAndSetConstructionProperties: Window construction={}", thisConstruct.Name)); - ShowContinueError(state, format("has diffusing glass={} and a shade, screen or blind layer.", matGlass->Name)); + ShowSevereError(state, EnergyPlus::format("CheckAndSetConstructionProperties: Window construction={}", thisConstruct.Name)); + ShowContinueError(state, EnergyPlus::format("has diffusing glass={} and a shade, screen or blind layer.", matGlass->Name)); break; } } @@ -569,8 +572,8 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, ++GlassLayNum; if (GlassLayNum < TotGlassLayers && matGlass->SolarDiffusing) { ErrorsFound = true; - ShowSevereError(state, format("CheckAndSetConstructionProperties: Window construction={}", thisConstruct.Name)); - ShowContinueError(state, format("has diffusing glass={} that is not the innermost glass layer.", matGlass->Name)); + 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)); } } } @@ -664,7 +667,8 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, assert(matBlind != nullptr); if ((matGapL->Thickness + matGapR->Thickness) < matBlind->SlatWidth) { ErrorsFound = true; - ShowSevereError(state, format("CheckAndSetConstructionProperties: For window construction {}", thisConstruct.Name)); + ShowSevereError( + state, EnergyPlus::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."); } @@ -686,12 +690,14 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, auto const *mat = s_mat->materials(MaterNum); if (mat->group == Material::Group::Glass) { ErrorsFound = true; - ShowSevereError(state, format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); + ShowSevereError( + state, EnergyPlus::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, format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); + ShowSevereError( + state, EnergyPlus::format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); ShowContinueError(state, "For simple window constructions, no other gas layers are allowed."); } } @@ -699,7 +705,7 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, } if (WrongWindowLayering) { - ShowSevereError(state, format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); + ShowSevereError(state, EnergyPlus::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,"); @@ -752,14 +758,15 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, thisConstruct.OutsideRoughness = matOutside->Roughness; if (matOutside->group == Material::Group::AirGap) { - ShowSevereError(state, format("CheckAndSetConstructionProperties: Outside Layer is Air for construction {}", thisConstruct.Name)); - ShowContinueError(state, format(" Error in material {}", matOutside->Name)); + ShowSevereError(state, EnergyPlus::format("CheckAndSetConstructionProperties: Outside Layer is Air for construction {}", thisConstruct.Name)); + ShowContinueError(state, EnergyPlus::format(" Error in material {}", matOutside->Name)); ErrorsFound = true; } if (InsideLayer > 0) { if (matInside->group == Material::Group::AirGap) { - ShowSevereError(state, format("CheckAndSetConstructionProperties: Inside Layer is Air for construction {}", thisConstruct.Name)); - ShowContinueError(state, format(" Error in material {}", matInside->Name)); + ShowSevereError(state, + EnergyPlus::format("CheckAndSetConstructionProperties: Inside Layer is Air for construction {}", thisConstruct.Name)); + ShowContinueError(state, EnergyPlus::format(" Error in material {}", matInside->Name)); ErrorsFound = true; } } @@ -769,9 +776,10 @@ 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, - format("CheckAndSetConstructionProperties: Interior Layer is EcoRoof for construction {}", thisConstruct.Name)); - ShowContinueError(state, format(" Error in material {}", s_mat->materials(thisConstruct.LayerPoint(Layer))->Name)); + 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)); ErrorsFound = true; } } @@ -780,9 +788,9 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, if (matOutside->group == Material::Group::IRTransparent) { thisConstruct.TypeIsIRT = true; if (thisConstruct.TotLayers != 1) { - ShowSevereError( - state, - format("CheckAndSetConstructionProperties: Infrared Transparent (IRT) Construction is limited to 1 layer {}", thisConstruct.Name)); + ShowSevereError(state, + EnergyPlus::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/DataOutputs.cc b/src/EnergyPlus/DataOutputs.cc index 15b64ce1ef3..8a97c08dec9 100644 --- a/src/EnergyPlus/DataOutputs.cc +++ b/src/EnergyPlus/DataOutputs.cc @@ -154,7 +154,8 @@ OutputReportingVariables::OutputReportingVariables(EnergyPlusData &state, std::s pattern = std::make_shared(KeyValue); case_insensitive_pattern = std::make_shared("(?i)" + KeyValue); if (!pattern->ok()) { - ShowSevereError(state, format("Regular expression \"{}\" for variable name \"{}\" in input file is incorrect", KeyValue, VariableName)); + ShowSevereError(state, + EnergyPlus::format("Regular expression \"{}\" for variable name \"{}\" in input file is incorrect", KeyValue, VariableName)); ShowContinueError(state, pattern->error()); ShowFatalError(state, "Error found in regular expression. Previous error(s) cause program termination."); } diff --git a/src/EnergyPlus/DataRuntimeLanguage.cc b/src/EnergyPlus/DataRuntimeLanguage.cc index 0daa89c5e92..d39420a48da 100644 --- a/src/EnergyPlus/DataRuntimeLanguage.cc +++ b/src/EnergyPlus/DataRuntimeLanguage.cc @@ -114,32 +114,32 @@ namespace DataRuntimeLanguage { errFlag = false; if (has(cFieldValue, ' ')) { - ShowSevereError(state, format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); - ShowContinueError(state, format("...{}; Names used as EMS variables cannot contain spaces", cFieldName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); + ShowContinueError(state, EnergyPlus::format("...{}; Names used as EMS variables cannot contain spaces", cFieldName)); errFlag = true; ErrorsFound = true; } if (has(cFieldValue, '-')) { - ShowSevereError(state, format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); - ShowContinueError(state, format("...{}; Names used as EMS variables cannot contain \"-\" characters.", cFieldName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); + ShowContinueError(state, EnergyPlus::format("...{}; Names used as EMS variables cannot contain \"-\" characters.", cFieldName)); errFlag = true; ErrorsFound = true; } if (has(cFieldValue, '+')) { - ShowSevereError(state, format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); - ShowContinueError(state, format("...{}; Names used as EMS variables cannot contain \"+\" characters.", cFieldName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); + ShowContinueError(state, EnergyPlus::format("...{}; Names used as EMS variables cannot contain \"+\" characters.", cFieldName)); errFlag = true; ErrorsFound = true; } if (has(cFieldValue, '.')) { - ShowSevereError(state, format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); - ShowContinueError(state, format("...{}; Names used as EMS variables cannot contain \".\" characters.", cFieldName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); + ShowContinueError(state, EnergyPlus::format("...{}; Names used as EMS variables cannot contain \".\" characters.", cFieldName)); errFlag = true; ErrorsFound = true; } if ((!cFieldValue.empty()) && (is_any_of(cFieldValue[0], InvalidStartCharacters))) { - ShowSevereError(state, format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); - ShowContinueError(state, format("...{}; Names used as EMS variables cannot start with numeric characters.", cFieldName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); + ShowContinueError(state, EnergyPlus::format("...{}; Names used as EMS variables cannot start with numeric characters.", cFieldName)); errFlag = true; ErrorsFound = true; } @@ -188,20 +188,20 @@ namespace DataRuntimeLanguage { errFlag = false; if (has(cFieldValue, ' ')) { - ShowSevereError(state, format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); - ShowContinueError(state, format("...{}; Names used for EMS {} cannot contain spaces", cFieldName, cSubType)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); + ShowContinueError(state, EnergyPlus::format("...{}; Names used for EMS {} cannot contain spaces", cFieldName, cSubType)); errFlag = true; ErrorsFound = true; } if (has(cFieldValue, '-')) { - ShowSevereError(state, format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); - ShowContinueError(state, format("...{}; Names used for EMS {} cannot contain \"-\" characters.", cFieldName, cSubType)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); + ShowContinueError(state, EnergyPlus::format("...{}; Names used for EMS {} cannot contain \"-\" characters.", cFieldName, cSubType)); errFlag = true; ErrorsFound = true; } if (has(cFieldValue, '+')) { - ShowSevereError(state, format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); - ShowContinueError(state, format("...{}; Names used for EMS {} cannot contain \"+\" characters.", cFieldName, cSubType)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Invalid variable name entered.", cModuleObject, cFieldValue)); + ShowContinueError(state, EnergyPlus::format("...{}; Names used for EMS {} cannot contain \"+\" characters.", cFieldName, cSubType)); errFlag = true; ErrorsFound = true; } diff --git a/src/EnergyPlus/DataSizing.cc b/src/EnergyPlus/DataSizing.cc index d7df680b895..74af8b3a15e 100644 --- a/src/EnergyPlus/DataSizing.cc +++ b/src/EnergyPlus/DataSizing.cc @@ -564,8 +564,9 @@ void GetCoilDesFlowT(EnergyPlusData &state, } } else { if ((sysSizInput.CoolCapControl == CapacityControl::VT) || (sysSizInput.CoolCapControl == CapacityControl::Bypass)) { - ShowWarningError(state, - format("GetCoilDesFlow: AirLoopHVAC = {} has no time of peak cooling load for sizing.", sysSizInput.AirPriLoopName)); + ShowWarningError( + state, + EnergyPlus::format("GetCoilDesFlow: AirLoopHVAC = {} has no time of peak cooling load for sizing.", sysSizInput.AirPriLoopName)); ShowContinueError(state, "Using Central Cooling Capacity Control Method=VAV instead of Bypass or VT."); sysSizInput.CoolCapControl = CapacityControl::VAV; } @@ -1068,9 +1069,9 @@ OARequirementsData::calcOAFlowRate(EnergyPlusData &state, if (this->OAFlowMethod == DataSizing::OAFlowCalcMethod::IAQProcedure && this->myEnvrnFlag) { if (!state.dataContaminantBalance->Contaminant.CO2Simulation) { ShowSevereError(state, - format("DesignSpecification:OutdoorAir=\"{}{}", - this->Name, - R"(" valid Outdoor Air Method =" IndoorAirQualityProcedure" requires CO2 simulation.)")); + EnergyPlus::format("DesignSpecification:OutdoorAir=\"{}{}", + this->Name, + R"(" valid Outdoor Air Method =" IndoorAirQualityProcedure" requires CO2 simulation.)")); ShowContinueError(state, "The choice must be Yes for the field Carbon Dioxide Concentration in ZoneAirContaminantBalance"); ShowFatalError(state, "CalcDesignSpecificationOutdoorAir: Errors found in input. Preceding condition(s) cause termination."); } @@ -1078,8 +1079,9 @@ OARequirementsData::calcOAFlowRate(EnergyPlusData &state, } if (this->OAFlowMethod == DataSizing::OAFlowCalcMethod::PCOccSch && this->myEnvrnFlag) { if (!state.dataContaminantBalance->Contaminant.CO2Simulation) { - ShowSevereError(state, - format("DesignSpecification:OutdoorAir=\"{}{}", + ShowSevereError( + state, + EnergyPlus::format("DesignSpecification:OutdoorAir=\"{}{}", this->Name, R"(" valid Outdoor Air Method =" ProportionalControlBasedOnDesignOccupancy" requires CO2 simulation.)")); ShowContinueError(state, "The choice must be Yes for the field Carbon Dioxide Concentration in ZoneAirContaminantBalance"); @@ -1089,8 +1091,9 @@ OARequirementsData::calcOAFlowRate(EnergyPlusData &state, } if (this->OAFlowMethod == DataSizing::OAFlowCalcMethod::PCDesOcc && this->myEnvrnFlag) { if (!state.dataContaminantBalance->Contaminant.CO2Simulation) { - ShowSevereError(state, - format("DesignSpecification:OutdoorAir=\"{}{}", + ShowSevereError( + state, + EnergyPlus::format("DesignSpecification:OutdoorAir=\"{}{}", this->Name, R"(" valid Outdoor Air Method =" ProportionalControlBasedOnOccupancySchedule" requires CO2 simulation.)")); ShowContinueError(state, "The choice must be Yes for the field Carbon Dioxide Concentration in ZoneAirContaminantBalance"); @@ -1231,14 +1234,16 @@ OARequirementsData::calcOAFlowRate(EnergyPlusData &state, ++this->CO2MaxMinLimitErrorCount; if (this->OAFlowMethod == DataSizing::OAFlowCalcMethod::PCOccSch) { if (this->CO2MaxMinLimitErrorCount < 2) { - ShowSevereError(state, - format("CalcDesignSpecificationOutdoorAir DesignSpecification:OutdoorAir = \"{}\".", this->Name)); + ShowSevereError( + state, + EnergyPlus::format("CalcDesignSpecificationOutdoorAir DesignSpecification:OutdoorAir = \"{}\".", this->Name)); ShowContinueError( state, - format("For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, maximum target " - "CO2 concentration ({:.2R}), is not greater than minimum target CO2 concentration ({:.2R}).", - ZoneMaxCO2, - ZoneMinCO2)); + EnergyPlus::format( + "For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, maximum target " + "CO2 concentration ({:.2R}), is not greater than minimum target CO2 concentration ({:.2R}).", + ZoneMaxCO2, + ZoneMinCO2)); ShowContinueError(state, "\"ProportionalControlBasedOnOccupancySchedule\" will not be modeled. " "Default \"Flow/Person+Flow/Area\" will be modeled. Simulation continues..."); @@ -1246,23 +1251,26 @@ OARequirementsData::calcOAFlowRate(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - format("DesignSpecification:OutdoorAir = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnOccupancySchedule, maximum target CO2 concentration is not greater than " - "minimum target CO2 concentration. Error continues...", - this->Name), + EnergyPlus::format( + "DesignSpecification:OutdoorAir = \"{}\", For System Outdoor Air Method = " + "ProportionalControlBasedOnOccupancySchedule, maximum target CO2 concentration is not greater than " + "minimum target CO2 concentration. Error continues...", + this->Name), this->CO2MaxMinLimitErrorIndex); } } if (this->OAFlowMethod == DataSizing::OAFlowCalcMethod::PCDesOcc) { if (this->CO2MaxMinLimitErrorCount < 2) { - ShowSevereError(state, - format("CalcDesignSpecificationOutdoorAir DesignSpecification:OutdoorAir = \"{}\".", this->Name)); + ShowSevereError( + state, + EnergyPlus::format("CalcDesignSpecificationOutdoorAir DesignSpecification:OutdoorAir = \"{}\".", this->Name)); ShowContinueError( state, - format("For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, maximum target " - "CO2 concentration ({:.2R}), is not greater than minimum target CO2 concentration ({:.2R}).", - ZoneMaxCO2, - ZoneMinCO2)); + EnergyPlus::format( + "For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, maximum target " + "CO2 concentration ({:.2R}), is not greater than minimum target CO2 concentration ({:.2R}).", + ZoneMaxCO2, + ZoneMinCO2)); ShowContinueError(state, "\"ProportionalControlBasedOnDesignOccupancy\" will not be modeled. " "Default \"Flow/Person+Flow/Area\" will be modeled. Simulation continues..."); @@ -1270,10 +1278,11 @@ OARequirementsData::calcOAFlowRate(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - format("DesignSpecification:OutdoorAir = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnDesignOccupancy, maximum target CO2 concentration is not greater than " - "minimum target CO2 concentration. Error continues...", - this->Name), + EnergyPlus::format( + "DesignSpecification:OutdoorAir = \"{}\", For System Outdoor Air Method = " + "ProportionalControlBasedOnDesignOccupancy, maximum target CO2 concentration is not greater than " + "minimum target CO2 concentration. Error continues...", + this->Name), this->CO2MaxMinLimitErrorIndex); } } @@ -1302,44 +1311,50 @@ OARequirementsData::calcOAFlowRate(EnergyPlusData &state, ++this->CO2GainErrorCount; if (this->OAFlowMethod == DataSizing::OAFlowCalcMethod::PCOccSch) { if (this->CO2GainErrorCount < 2) { - ShowSevereError(state, - format("CalcDesignSpecificationOutdoorAir DesignSpecification:OutdoorAir = \"{}\".", this->Name)); - ShowContinueError(state, - format("For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, CO2 " - "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", - thisZone.Name)); + ShowSevereError( + state, + EnergyPlus::format("CalcDesignSpecificationOutdoorAir DesignSpecification:OutdoorAir = \"{}\".", this->Name)); + ShowContinueError( + state, + EnergyPlus::format("For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, CO2 " + "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", + thisZone.Name)); ShowContinueError(state, "\"ProportionalControlBasedOnOccupancySchedule\" will not be modeled. " "Default \"Flow/Person+Flow/Area\" will be modeled. Simulation continues..."); ShowContinueErrorTimeStamp(state, ""); } else { - ShowRecurringWarningErrorAtEnd(state, - format("DesignSpecification:OutdoorAir = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnOccupancySchedule, CO2 generation from people " - "is not greater than zero. Error continues...", - this->Name), - this->CO2GainErrorIndex); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("DesignSpecification:OutdoorAir = \"{}\", For System Outdoor Air Method = " + "ProportionalControlBasedOnOccupancySchedule, CO2 generation from people " + "is not greater than zero. Error continues...", + this->Name), + this->CO2GainErrorIndex); } } if (this->OAFlowMethod == DataSizing::OAFlowCalcMethod::PCDesOcc) { if (this->CO2GainErrorCount < 2) { - ShowSevereError(state, - format("CalcDesignSpecificationOutdoorAir DesignSpecification:OutdoorAir = \"{}\".", this->Name)); - ShowContinueError(state, - format("For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, CO2 " - "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", - thisZone.Name)); + ShowSevereError( + state, + EnergyPlus::format("CalcDesignSpecificationOutdoorAir DesignSpecification:OutdoorAir = \"{}\".", this->Name)); + ShowContinueError( + state, + EnergyPlus::format("For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, CO2 " + "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", + thisZone.Name)); ShowContinueError(state, "\"ProportionalControlBasedOnDesignOccupancy\" will not be modeled. " "Default \"Flow/Person+Flow/Area\" will be modeled. Simulation continues..."); ShowContinueErrorTimeStamp(state, ""); } else { - ShowRecurringWarningErrorAtEnd(state, - format("DesignSpecification:OutdoorAir = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnDesignOccupancy, CO2 generation from people is " - "not greater than zero. Error continues...", - this->Name), - this->CO2GainErrorIndex); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("DesignSpecification:OutdoorAir = \"{}\", For System Outdoor Air Method = " + "ProportionalControlBasedOnDesignOccupancy, CO2 generation from people is " + "not greater than zero. Error continues...", + this->Name), + this->CO2GainErrorIndex); } } } @@ -1396,10 +1411,10 @@ Sched::Schedule *OARequirementsData::getZoneFlowFracSched(EnergyPlusData &state, if (schedPtr != thisDSOA.oaFlowFracSched) { notAllSame = true; ShowWarningError(state, - format("getZoneFlowFracSched: Outdoor Air Schedules are not the same for all spaces in " - "DesignSpecification:OutdoorAir:SpaceList={}.", - this->Name)); - ShowContinueError(state, format("Using the first space schedule={}", schedPtr->Name)); + EnergyPlus::format("getZoneFlowFracSched: Outdoor Air Schedules are not the same for all spaces in " + "DesignSpecification:OutdoorAir:SpaceList={}.", + this->Name)); + ShowContinueError(state, EnergyPlus::format("Using the first space schedule={}", schedPtr->Name)); break; } } @@ -1426,11 +1441,11 @@ Sched::Schedule *OARequirementsData::getZonePropCtlMinRateSched(EnergyPlusData & notAllSame = true; ShowWarningError( state, - format( + EnergyPlus::format( "getZoneFlowFracSched: Proportional Control Minimum Outdoor Air Flow Rate Schedules are not the same for all spaces in " "DesignSpecification:OutdoorAir:SpaceList={}.", this->Name)); - ShowContinueError(state, format("Using the first space schedule={}", schedPtr->Name)); + ShowContinueError(state, EnergyPlus::format("Using the first space schedule={}", schedPtr->Name)); break; } } diff --git a/src/EnergyPlus/DataSurfaceColors.cc b/src/EnergyPlus/DataSurfaceColors.cc index cd5b0408190..8bae1941a33 100644 --- a/src/EnergyPlus/DataSurfaceColors.cc +++ b/src/EnergyPlus/DataSurfaceColors.cc @@ -180,26 +180,26 @@ void SetUpSchemeColors(EnergyPlusData &state, std::string const &SchemeName, std if (lNumericBlanks(numargs)) { if (!lAlphaBlanks(numargs + 1)) { ShowWarningError(state, - format("SetUpSchemeColors: {}={}, {}={}, {} was blank. Default color retained.", - cAlphaFields(1), - SchemeName, - cAlphaFields(numargs + 1), - cAlphas(numargs + 1), - cNumericFields(numargs))); + EnergyPlus::format("SetUpSchemeColors: {}={}, {}={}, {} was blank. Default color retained.", + cAlphaFields(1), + SchemeName, + cAlphaFields(numargs + 1), + cAlphas(numargs + 1), + cNumericFields(numargs))); } continue; } if (!MatchAndSetColorTextString(state, cAlphas(numargs + 1), numptr, ColorType)) { ShowWarningError(state, - format("SetUpSchemeColors: {}={}, {}={}, is invalid. No color set.", - cAlphaFields(1), - SchemeName, - cAlphaFields(numargs + 1), - cAlphas(numargs + 1))); + EnergyPlus::format("SetUpSchemeColors: {}={}, {}={}, is invalid. No color set.", + cAlphaFields(1), + SchemeName, + cAlphaFields(numargs + 1), + cAlphas(numargs + 1))); } } } else { - ShowWarningError(state, format("SetUpSchemeColors: Name={} not on input file. Default colors will be used.", SchemeName)); + ShowWarningError(state, EnergyPlus::format("SetUpSchemeColors: Name={} not on input file. Default colors will be used.", SchemeName)); } } diff --git a/src/EnergyPlus/DataSurfaceLists.cc b/src/EnergyPlus/DataSurfaceLists.cc index 8cda995d764..d9f68cf4b9f 100644 --- a/src/EnergyPlus/DataSurfaceLists.cc +++ b/src/EnergyPlus/DataSurfaceLists.cc @@ -149,14 +149,16 @@ void GetSurfaceListsInputs(EnergyPlusData &state) NameConflict = Util::FindItemInList(SurfList(Item).Name, state.dataSurface->Surface); if (NameConflict > 0) { // A surface list has the same name as a surface--not allowed - ShowSevereError( - state, - format("{}{}", CurrentModuleObject1, " = " + SurfList(Item).Name + " has the same name as a surface; this is not allowed.")); + ShowSevereError(state, + EnergyPlus::format("{}{}", + CurrentModuleObject1, + " = " + SurfList(Item).Name + " has the same name as a surface; this is not allowed.")); ErrorsFound = true; } if (SurfList(Item).NumOfSurfaces < 1) { - ShowSevereError(state, format("{}{}", CurrentModuleObject1, " = " + SurfList(Item).Name + " does not have any surfaces listed.")); + ShowSevereError( + state, EnergyPlus::format("{}{}", CurrentModuleObject1, " = " + SurfList(Item).Name + " does not have any surfaces listed.")); ErrorsFound = true; } else { SurfList(Item).SurfName.allocate(SurfList(Item).NumOfSurfaces); @@ -183,7 +185,8 @@ void GetSurfaceListsInputs(EnergyPlusData &state) } if (SurfNum > 1) { if (ZoneForSurface != state.dataSurface->Surface(SurfList(Item).SurfPtr(SurfNum)).Zone && showSameZoneWarning) { - ShowWarningError(state, format("Not all surfaces in same zone for {} = {}", CurrentModuleObject1, SurfList(Item).Name)); + ShowWarningError( + state, EnergyPlus::format("Not all surfaces in same zone for {} = {}", CurrentModuleObject1, SurfList(Item).Name)); if (!state.dataGlobal->DisplayExtraWarnings) { ShowContinueError(state, "If this is intentionally a radiant system with surfaces in more than one thermal zone,"); ShowContinueError(state, @@ -196,13 +199,13 @@ void GetSurfaceListsInputs(EnergyPlusData &state) SurfList(Item).SurfFlowFrac(SurfNum) = Numbers(SurfNum); if (SurfList(Item).SurfFlowFrac(SurfNum) < SurfListMinFlowFrac) { ShowSevereError(state, - format("The Flow Fraction for Surface {} in Surface Group {} is too low", - SurfList(Item).SurfName(SurfNum), - SurfList(Item).Name)); + EnergyPlus::format("The Flow Fraction for Surface {} in Surface Group {} is too low", + SurfList(Item).SurfName(SurfNum), + SurfList(Item).Name)); ShowContinueError(state, - format("Flow fraction of {:.6R} is less than minimum criteria = {:.6R}", - SurfList(Item).SurfFlowFrac(SurfNum), - SurfListMinFlowFrac)); + EnergyPlus::format("Flow fraction of {:.6R} is less than minimum criteria = {:.6R}", + SurfList(Item).SurfFlowFrac(SurfNum), + SurfListMinFlowFrac)); ShowContinueError(state, "Zero or extremely low flow fractions are not allowed. Remove this surface from the surface group or " "combine small surfaces together."); @@ -212,7 +215,8 @@ void GetSurfaceListsInputs(EnergyPlusData &state) } if (std::abs(SumOfAllFractions - 1.0) > FlowFractionTolerance) { - ShowSevereError(state, format("{}{}", CurrentModuleObject1, " flow fractions do not add up to unity for " + SurfList(Item).Name)); + ShowSevereError( + state, EnergyPlus::format("{}{}", CurrentModuleObject1, " flow fractions do not add up to unity for " + SurfList(Item).Name)); ErrorsFound = true; } } @@ -225,7 +229,7 @@ void GetSurfaceListsInputs(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowSevereError(state, format("{}{}", CurrentModuleObject1, " errors found getting input. Program will terminate.")); + ShowSevereError(state, EnergyPlus::format("{}{}", CurrentModuleObject1, " errors found getting input. Program will terminate.")); } } @@ -258,13 +262,16 @@ void GetSurfaceListsInputs(EnergyPlusData &state) NameConflict = Util::FindItemInList(SlabList(Item).Name, state.dataSurface->Surface); if (NameConflict > 0) { // A surface list has the same name as a surface--not allowed - ShowSevereError( - state, format("{}{}", CurrentModuleObject2, " = " + SlabList(Item).Name + " has the same name as a slab; this is not allowed.")); + ShowSevereError(state, + EnergyPlus::format("{}{}", + CurrentModuleObject2, + " = " + SlabList(Item).Name + " has the same name as a slab; this is not allowed.")); ErrorsFound = true; } if (SlabList(Item).NumOfSurfaces < 1) { - ShowSevereError(state, format("{}{}", CurrentModuleObject2, " = " + SlabList(Item).Name + " does not have any slabs listed.")); + ShowSevereError(state, + EnergyPlus::format("{}{}", CurrentModuleObject2, " = " + SlabList(Item).Name + " does not have any slabs listed.")); ErrorsFound = true; } else { SlabList(Item).ZoneName.allocate(SlabList(Item).NumOfSurfaces); @@ -305,9 +312,11 @@ void GetSurfaceListsInputs(EnergyPlusData &state) NameConflict = Util::FindItemInList(SlabList(Item).SurfName(SurfNum), SurfList(SrfList).SurfName, SurfList(SrfList).NumOfSurfaces); if (NameConflict > 0) { // A slab list includes a surface on a surface list--not allowed - ShowSevereError(state, format("{}{}", CurrentModuleObject2, "=\"" + SlabList(Item).Name + "\", invalid surface specified.")); - ShowContinueError(state, format("Surface=\"{}\" is also on a Surface List.", SlabList(Item).SurfName(SurfNum))); - ShowContinueError(state, format("{}{}", CurrentModuleObject1, "=\"" + SurfList(SrfList).Name + "\" has this surface also.")); + ShowSevereError( + state, EnergyPlus::format("{}{}", CurrentModuleObject2, "=\"" + SlabList(Item).Name + "\", invalid surface specified.")); + ShowContinueError(state, EnergyPlus::format("Surface=\"{}\" is also on a Surface List.", SlabList(Item).SurfName(SurfNum))); + ShowContinueError( + state, EnergyPlus::format("{}{}", CurrentModuleObject1, "=\"" + SurfList(SrfList).Name + "\" has this surface also.")); ShowContinueError(state, "A surface cannot be on both lists. The models cannot operate correctly."); ErrorsFound = true; } @@ -332,7 +341,7 @@ void GetSurfaceListsInputs(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowSevereError(state, format("{}{}", CurrentModuleObject2, " errors found getting input. Program will terminate.")); + ShowSevereError(state, EnergyPlus::format("{}{}", CurrentModuleObject2, " errors found getting input. Program will terminate.")); } } diff --git a/src/EnergyPlus/DataSurfaces.cc b/src/EnergyPlus/DataSurfaces.cc index d1ba55f87e3..c3f5b7ded41 100644 --- a/src/EnergyPlus/DataSurfaces.cc +++ b/src/EnergyPlus/DataSurfaces.cc @@ -234,8 +234,8 @@ Real64 SurfaceData::getInsideAirTemperature(EnergyPlusData &state, const int t_S // check whether this zone is a controlled zone or not if (!state.dataHeatBal->Zone(Zone).IsControlled) { ShowFatalError(state, - format("Zones must be controlled for Ceiling-Diffuser Convection model. No system serves zone {}", - state.dataHeatBal->Zone(Zone).Name)); + EnergyPlus::format("Zones must be controlled for Ceiling-Diffuser Convection model. No system serves zone {}", + state.dataHeatBal->Zone(Zone).Name)); // return; } // determine supply air conditions @@ -506,7 +506,7 @@ Real64 SurfaceData::get_average_height(EnergyPlusData &state) const if (totalWidth == 0.0) { // This should never happen, but if it does, print a somewhat meaningful fatal error // (instead of allowing a divide by zero). - ShowFatalError(state, format("Calculated projected surface width is zero for surface=\"{}\"", Name)); + ShowFatalError(state, EnergyPlus::format("Calculated projected surface width is zero for surface=\"{}\"", Name)); } Real64 averageHeight = 0.0; @@ -769,10 +769,11 @@ void GetVariableAbsorptanceSurfaceList(EnergyPlusData &state) if (mat->absorpVarCtrlSignal != Material::VariableAbsCtrlSignal::Invalid) { // check for dynamic coating defined on interior surface if (thisSurface.ExtBoundCond != ExternalEnvironment) { - ShowWarningError(state, - format("MaterialProperty:VariableAbsorptance defined on an interior surface, {}. This VariableAbsorptance property " - "will be ignored here", - thisSurface.Name)); + ShowWarningError( + state, + EnergyPlus::format("MaterialProperty:VariableAbsorptance defined on an interior surface, {}. This VariableAbsorptance property " + "will be ignored here", + thisSurface.Name)); } else { state.dataSurface->AllVaryAbsOpaqSurfaceList.push_back(surfNum); } @@ -787,10 +788,11 @@ void GetVariableAbsorptanceSurfaceList(EnergyPlusData &state) continue; } if (mat->absorpVarCtrlSignal != Material::VariableAbsCtrlSignal::Invalid) { - ShowWarningError(state, - format("MaterialProperty:VariableAbsorptance defined on a inside-layer materials, {}. This VariableAbsorptance " - "property will be ignored here", - mat->Name)); + ShowWarningError( + state, + EnergyPlus::format("MaterialProperty:VariableAbsorptance defined on a inside-layer materials, {}. This VariableAbsorptance " + "property will be ignored here", + mat->Name)); } } } diff --git a/src/EnergyPlus/DataSystemVariables.cc b/src/EnergyPlus/DataSystemVariables.cc index dfd44f20432..f8946e2d29b 100644 --- a/src/EnergyPlus/DataSystemVariables.cc +++ b/src/EnergyPlus/DataSystemVariables.cc @@ -193,10 +193,10 @@ namespace DataSystemVariables { } // If we get here, we didn't find the file - ShowSevereError(state, format("{}\"{}\" not found.", contextString, originalInputFilePath)); + ShowSevereError(state, EnergyPlus::format("{}\"{}\" not found.", contextString, originalInputFilePath)); ShowContinueError(state, " Paths searched:"); for (auto &path : pathsChecked) { - ShowContinueError(state, format(" {}: \"{}\"", path.second, path.first)); + ShowContinueError(state, EnergyPlus::format(" {}: \"{}\"", path.second, path.first)); } return foundFilePath; diff --git a/src/EnergyPlus/DataZoneEnergyDemands.cc b/src/EnergyPlus/DataZoneEnergyDemands.cc index 1187e6680ba..6b2e6cd089e 100644 --- a/src/EnergyPlus/DataZoneEnergyDemands.cc +++ b/src/EnergyPlus/DataZoneEnergyDemands.cc @@ -105,7 +105,7 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, { if (attachMeters) { SetupOutputVariable(state, - format("{} Air System Sensible Heating Energy", prefix), + EnergyPlus::format("{} Air System Sensible Heating Energy", prefix), Constant::Units::J, this->airSysHeatEnergy, OutputProcessor::TimeStepType::System, @@ -119,7 +119,7 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, zoneMult, listMult); SetupOutputVariable(state, - format("{} Air System Sensible Cooling Energy", prefix), + EnergyPlus::format("{} Air System Sensible Cooling Energy", prefix), Constant::Units::J, this->airSysCoolEnergy, OutputProcessor::TimeStepType::System, @@ -134,14 +134,14 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, listMult); } else { SetupOutputVariable(state, - format("{} Air System Sensible Heating Energy", prefix), + EnergyPlus::format("{} Air System Sensible Heating Energy", prefix), Constant::Units::J, this->airSysHeatEnergy, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Sum, name); SetupOutputVariable(state, - format("{} Air System Sensible Cooling Energy", prefix), + EnergyPlus::format("{} Air System Sensible Cooling Energy", prefix), Constant::Units::J, this->airSysCoolEnergy, OutputProcessor::TimeStepType::System, @@ -149,14 +149,14 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, name); } SetupOutputVariable(state, - format("{} Air System Sensible Heating Rate", prefix), + EnergyPlus::format("{} Air System Sensible Heating Rate", prefix), Constant::Units::W, this->airSysHeatRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air System Sensible Cooling Rate", prefix), + EnergyPlus::format("{} Air System Sensible Cooling Rate", prefix), Constant::Units::W, this->airSysCoolRate, OutputProcessor::TimeStepType::System, @@ -166,21 +166,21 @@ void ZoneSystemSensibleDemand::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, - format("{} Predicted Sensible Load to Setpoint Heat Transfer Rate", prefix), + EnergyPlus::format("{} Predicted Sensible Load to Setpoint Heat Transfer Rate", prefix), Constant::Units::W, this->predictedRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Predicted Sensible Load to Heating Setpoint Heat Transfer Rate", prefix), + EnergyPlus::format("{} Predicted Sensible Load to Heating Setpoint Heat Transfer Rate", prefix), Constant::Units::W, this->predictedHSPRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Predicted Sensible Load to Cooling Setpoint Heat Transfer Rate", prefix), + EnergyPlus::format("{} Predicted Sensible Load to Cooling Setpoint Heat Transfer Rate", prefix), Constant::Units::W, this->predictedCSPRate, OutputProcessor::TimeStepType::System, @@ -188,21 +188,21 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, name); // Second, these report variable ARE multiplied by zone and group multipliers SetupOutputVariable(state, - format("{} System Predicted Sensible Load to Setpoint Heat Transfer Rate", prefix), + EnergyPlus::format("{} System Predicted Sensible Load to Setpoint Heat Transfer Rate", prefix), Constant::Units::W, this->TotalOutputRequired, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} System Predicted Sensible Load to Heating Setpoint Heat Transfer Rate", prefix), + EnergyPlus::format("{} System Predicted Sensible Load to Heating Setpoint Heat Transfer Rate", prefix), Constant::Units::W, this->OutputRequiredToHeatingSP, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} System Predicted Sensible Load to Cooling Setpoint Heat Transfer Rate", prefix), + EnergyPlus::format("{} System Predicted Sensible Load to Cooling Setpoint Heat Transfer Rate", prefix), Constant::Units::W, this->OutputRequiredToCoolingSP, OutputProcessor::TimeStepType::System, @@ -210,7 +210,7 @@ void ZoneSystemSensibleDemand::setUpOutputVars(EnergyPlusData &state, name); if (staged) { SetupOutputVariable(state, - format("{} Thermostat Staged Number", prefix), + EnergyPlus::format("{} Thermostat Staged Number", prefix), Constant::Units::None, this->StageNum, OutputProcessor::TimeStepType::System, @@ -229,28 +229,28 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, { if (state.dataHeatBal->DoLatentSizing) { SetupOutputVariable(state, - format("{} Air System Latent Heating Energy", prefix), + EnergyPlus::format("{} Air System Latent Heating Energy", prefix), Constant::Units::J, this->airSysHeatEnergy, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Sum, name); SetupOutputVariable(state, - format("{} Air System Latent Cooling Energy", prefix), + EnergyPlus::format("{} Air System Latent Cooling Energy", prefix), Constant::Units::J, this->airSysCoolEnergy, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Sum, name); SetupOutputVariable(state, - format("{} Air System Latent Heating Rate", prefix), + EnergyPlus::format("{} Air System Latent Heating Rate", prefix), Constant::Units::W, this->airSysHeatRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air System Latent Cooling Rate", prefix), + EnergyPlus::format("{} Air System Latent Cooling Rate", prefix), Constant::Units::W, this->airSysCoolRate, OutputProcessor::TimeStepType::System, @@ -258,14 +258,14 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, name); // temporarily hide these behind DoLatentSizing flag SetupOutputVariable(state, - format("{} Air System Sensible Heat Ratio", prefix), + EnergyPlus::format("{} Air System Sensible Heat Ratio", prefix), Constant::Units::None, this->airSysSensibleHeatRatio, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Vapor Pressure Difference", prefix), + EnergyPlus::format("{} Air Vapor Pressure Difference", prefix), Constant::Units::Pa, this->vaporPressureDifference, OutputProcessor::TimeStepType::System, @@ -276,21 +276,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, - format("{} Predicted Moisture Load Moisture Transfer Rate", prefix), + EnergyPlus::format("{} Predicted Moisture Load Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->predictedRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate", prefix), + EnergyPlus::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, - format("{} Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), + EnergyPlus::format("{} Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->predictedDehumSPRate, OutputProcessor::TimeStepType::System, @@ -298,21 +298,21 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, name); // Second, these report variable ARE multiplied by zone and group multipliers SetupOutputVariable(state, - format("{} System Predicted Moisture Load Moisture Transfer Rate", prefix), + EnergyPlus::format("{} System Predicted Moisture Load Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->TotalOutputRequired, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} System Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate", prefix), + EnergyPlus::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, - format("{} System Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), + EnergyPlus::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 c94ebb50ed0..d3326f1c5a3 100644 --- a/src/EnergyPlus/DataZoneEquipment.cc +++ b/src/EnergyPlus/DataZoneEquipment.cc @@ -280,21 +280,21 @@ void GetZoneEquipmentData(EnergyPlusData &state) if (state.dataZoneEquip->NumOfZoneEquipLists != numControlledZones) { ShowSevereError(state, - format("{}Number of Zone Equipment lists [{}] not equal Number of Controlled Zones [{}]", - RoutineName, - state.dataZoneEquip->NumOfZoneEquipLists, - numControlledZones)); + EnergyPlus::format("{}Number of Zone Equipment lists [{}] not equal Number of Controlled Zones [{}]", + RoutineName, + state.dataZoneEquip->NumOfZoneEquipLists, + numControlledZones)); ShowContinueError(state, "..Each Controlled Zone [ZoneHVAC:EquipmentConnections] must have a corresponding (unique) ZoneHVAC:EquipmentList"); ShowFatalError(state, "GetZoneEquipment: Incorrect number of zone equipment lists"); } if (numControlledZones > state.dataGlobal->NumOfZones) { ShowSevereError(state, - format("{}Number of Controlled Zone objects [{}] greater than Number of Zones [{}]", - RoutineName, - numControlledZones, - state.dataGlobal->NumOfZones)); - ShowFatalError(state, format("{}Too many ZoneHVAC:EquipmentConnections objects.", RoutineName)); + EnergyPlus::format("{}Number of Controlled Zone objects [{}] greater than Number of Zones [{}]", + RoutineName, + numControlledZones, + state.dataGlobal->NumOfZones)); + ShowFatalError(state, EnergyPlus::format("{}Too many ZoneHVAC:EquipmentConnections objects.", RoutineName)); } InitUniqueNodeCheck(state, "ZoneHVAC:EquipmentConnections"); @@ -323,18 +323,20 @@ void GetZoneEquipmentData(EnergyPlusData &state) std::string_view zsString = "Zone"; if (zoneNum == 0) { - ShowSevereError(state, format("{}{}: {}=\"{}\"", RoutineName, CurrentModuleObject, cAlphaFields(1), AlphArray(1))); - ShowContinueError(state, - format("..Requested Controlled {} not among {}s, remaining items for this object not processed.", zsString, zsString)); + ShowSevereError(state, EnergyPlus::format("{}{}: {}=\"{}\"", RoutineName, CurrentModuleObject, cAlphaFields(1), AlphArray(1))); + ShowContinueError( + state, + EnergyPlus::format("..Requested Controlled {} not among {}s, remaining items for this object not processed.", zsString, zsString)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } auto &thisZone = state.dataHeatBal->Zone(zoneNum); // Is this a duplicate for the same zone? if (thisZone.IsControlled) { - ShowSevereError(state, format("{}{}: {}=\"{}\"", RoutineName, CurrentModuleObject, cAlphaFields(1), AlphArray(1))); - ShowContinueError(state, - format("..Duplicate Controlled {} entered, only one {} per {} is allowed.", zsString, CurrentModuleObject, zsString)); + ShowSevereError(state, EnergyPlus::format("{}{}: {}=\"{}\"", RoutineName, CurrentModuleObject, cAlphaFields(1), AlphArray(1))); + ShowContinueError( + state, + EnergyPlus::format("..Duplicate Controlled {} entered, only one {} per {} is allowed.", zsString, CurrentModuleObject, zsString)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } @@ -359,9 +361,10 @@ void GetZoneEquipmentData(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSimulation) { ShowWarningError( state, - format("{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", - CurrentModuleObject, - CurrentModuleObject)); + EnergyPlus::format( + "{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", + CurrentModuleObject, + CurrentModuleObject)); break; } state.dataInputProcessing->inputProcessor->getObjectItem(state, @@ -381,27 +384,30 @@ void GetZoneEquipmentData(EnergyPlusData &state) std::string_view zsString = "Space"; if (spaceNum == 0) { - ShowSevereError(state, format("{}{}: {}=\"{}\"", RoutineName, CurrentModuleObject, cAlphaFields(1), AlphArray(1))); - ShowContinueError(state, - format("..Requested Controlled {} not among {}s, remaining items for this object not processed.", zsString, zsString)); + ShowSevereError(state, EnergyPlus::format("{}{}: {}=\"{}\"", RoutineName, CurrentModuleObject, cAlphaFields(1), AlphArray(1))); + ShowContinueError( + state, + EnergyPlus::format("..Requested Controlled {} not among {}s, remaining items for this object not processed.", zsString, zsString)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } auto &thisSpace = state.dataHeatBal->space(spaceNum); int zoneNum = thisSpace.zoneNum; if (!state.dataHeatBal->Zone(zoneNum).IsControlled) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisSpace.Name)); - ShowContinueError(state, - format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", - state.dataHeatBal->Zone(zoneNum).Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisSpace.Name)); + ShowContinueError( + state, + EnergyPlus::format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", + state.dataHeatBal->Zone(zoneNum).Name)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } // Is this a duplicate for the same space? if (thisSpace.IsControlled) { - ShowSevereError(state, format("{}{}: {}=\"{}\"", RoutineName, CurrentModuleObject, cAlphaFields(1), AlphArray(1))); - ShowContinueError(state, - format("..Duplicate Controlled {} entered, only one {} per {} is allowed.", zsString, CurrentModuleObject, zsString)); + ShowSevereError(state, EnergyPlus::format("{}{}: {}=\"{}\"", RoutineName, CurrentModuleObject, cAlphaFields(1), AlphArray(1))); + ShowContinueError( + state, + EnergyPlus::format("..Duplicate Controlled {} entered, only one {} per {} is allowed.", zsString, CurrentModuleObject, zsString)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } @@ -432,7 +438,8 @@ void GetZoneEquipmentData(EnergyPlusData &state) for (int spaceNum : thisZone.spaceIndexes) { ++spaceCount; if (state.dataHeatBal->space(spaceNum).SystemZoneNodeNumber == 0) { - std::string spaceNodeName = format("{}-Space {}", state.dataLoopNodes->NodeID(thisZone.SystemZoneNodeNumber), spaceCount); + std::string spaceNodeName = + EnergyPlus::format("{}-Space {}", state.dataLoopNodes->NodeID(thisZone.SystemZoneNodeNumber), spaceCount); int spaceNodeNum = GetOnlySingleNode(state, spaceNodeName, state.dataZoneEquip->GetZoneEquipmentDataErrorsFound, @@ -461,7 +468,7 @@ void GetZoneEquipmentData(EnergyPlusData &state) } } if (state.dataZoneEquip->GetZoneEquipmentDataErrorsFound) { - ShowWarningError(state, format("{}{}, duplicate items NOT CHECKED due to previous errors.", RoutineName, CurrentModuleObject)); + ShowWarningError(state, EnergyPlus::format("{}{}, duplicate items NOT CHECKED due to previous errors.", RoutineName, CurrentModuleObject)); overallEquipCount = 0; } if (overallEquipCount > 0) { @@ -483,14 +490,15 @@ void GetZoneEquipmentData(EnergyPlusData &state) continue; } // Duplicated -- not allowed - ShowSevereError(state, format("{}{}, duplicate items in ZoneHVAC:EquipmentList.", RoutineName, CurrentModuleObject)); - ShowContinueError(state, - format("Equipment: Type={}, Name={}", ZoneEquipListAcct(Loop1).ObjectType, ZoneEquipListAcct(Loop1).ObjectName)); - ShowContinueError(state, - format("Found on List=\"{}\".", state.dataZoneEquip->ZoneEquipList(ZoneEquipListAcct(Loop1).OnListNum).Name)); + ShowSevereError(state, EnergyPlus::format("{}{}, duplicate items in ZoneHVAC:EquipmentList.", RoutineName, CurrentModuleObject)); ShowContinueError( state, - format("Equipment Duplicated on List=\"{}\".", state.dataZoneEquip->ZoneEquipList(ZoneEquipListAcct(Loop2).OnListNum).Name)); + 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)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -517,9 +525,10 @@ void GetZoneEquipmentData(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSimulation) { ShowWarningError( state, - format("{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", - CurrentModuleObject, - CurrentModuleObject)); + EnergyPlus::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(); @@ -537,17 +546,18 @@ 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, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqSplitter.Name)); - ShowContinueError(state, format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqSplitter.Name)); + ShowContinueError(state, + EnergyPlus::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, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqSplitter.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqSplitter.Name)); ShowContinueError( state, - format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", - zoneName)); + EnergyPlus::format( + "..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } @@ -563,9 +573,10 @@ void GetZoneEquipmentData(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSimulation) { ShowWarningError( state, - format("{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", - CurrentModuleObject, - CurrentModuleObject)); + EnergyPlus::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(); @@ -583,17 +594,18 @@ 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, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqMixer.Name)); - ShowContinueError(state, format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqMixer.Name)); + ShowContinueError(state, + EnergyPlus::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, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqMixer.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqMixer.Name)); ShowContinueError( state, - format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", - zoneName)); + EnergyPlus::format( + "..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } @@ -609,9 +621,10 @@ void GetZoneEquipmentData(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSimulation) { ShowWarningError( state, - format("{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", - CurrentModuleObject, - CurrentModuleObject)); + EnergyPlus::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(); @@ -629,17 +642,18 @@ 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, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); - ShowContinueError(state, format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); + ShowContinueError(state, + EnergyPlus::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, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); ShowContinueError( state, - format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", - zoneName)); + EnergyPlus::format( + "..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } @@ -704,8 +718,9 @@ void GetZoneEquipmentData(EnergyPlusData &state) state.dataZoneEquip->SupplyAirPath(PathNum).ComponentTypeEnum(CompNum) = (AirLoopHVACZone)getEnumValue(AirLoopHVACTypeNamesUC, AlphArray(Counter)); } else { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, cAlphaFields(1), state.dataZoneEquip->SupplyAirPath(PathNum).Name)); - ShowContinueError(state, format("Unhandled component type =\"{}\".", AlphArray(Counter))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\"", RoutineName, cAlphaFields(1), state.dataZoneEquip->SupplyAirPath(PathNum).Name)); + ShowContinueError(state, EnergyPlus::format("Unhandled component type =\"{}\".", AlphArray(Counter))); ShowContinueError(state, R"(Must be "AirLoopHVAC:ZoneSplitter" or "AirLoopHVAC:SupplyPlenum")"); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -767,14 +782,15 @@ void GetZoneEquipmentData(EnergyPlusData &state) IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("In {} = {}", CurrentModuleObject, state.dataZoneEquip->ReturnAirPath(PathNum).Name)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{}\"", RoutineName, cAlphaFields(1), state.dataZoneEquip->ReturnAirPath(PathNum).Name)); - ShowContinueError(state, format("Unhandled component type =\"{}\".", AlphArray(Counter))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\"", RoutineName, cAlphaFields(1), state.dataZoneEquip->ReturnAirPath(PathNum).Name)); + ShowContinueError(state, EnergyPlus::format("Unhandled component type =\"{}\".", AlphArray(Counter))); ShowContinueError(state, R"(Must be "AirLoopHVAC:ZoneMixer" or "AirLoopHVAC:ReturnPlenum")"); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -792,7 +808,7 @@ void GetZoneEquipmentData(EnergyPlusData &state) lNumericBlanks.deallocate(); if (state.dataZoneEquip->GetZoneEquipmentDataErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting Zone Equipment input.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting Zone Equipment input.", RoutineName)); } } @@ -825,7 +841,7 @@ void processZoneEquipmentInput(EnergyPlusData &state, GlobalNames::IntraObjUniquenessCheck( state, AlphArray(2), zoneEqModuleObject, cAlphaFields(2), state.dataZoneEquip->UniqueZoneEquipListNames, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("..another Controlled Zone has been assigned that {}.", cAlphaFields(2))); + ShowContinueError(state, EnergyPlus::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. @@ -841,8 +857,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); // all zone air state variables are if (thisEquipConfig.ZoneNode == 0) { - ShowSevereError(state, format("{}{}: {}=\"{}\", invalid", RoutineName, zoneEqModuleObject, cAlphaFields(1), AlphArray(1))); - ShowContinueError(state, format("{} must be present.", cAlphaFields(5 + spaceFieldShift))); + ShowSevereError(state, EnergyPlus::format("{}{}: {}=\"{}\", invalid", RoutineName, zoneEqModuleObject, cAlphaFields(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("{} must be present.", cAlphaFields(5 + spaceFieldShift))); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { bool UniqueNodeError = false; @@ -873,8 +889,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, int ZoneEquipListNum = ip->getObjectItemNum(state, CurrentModuleObject, thisEquipConfig.EquipListName); if (ZoneEquipListNum <= 0) { - ShowSevereError(state, format("{}{} not found = {}", RoutineName, CurrentModuleObject, thisEquipConfig.EquipListName)); - ShowContinueError(state, format("In ZoneHVAC:EquipmentConnections object, for Zone = {}", thisEquipConfig.ZoneName)); + ShowSevereError(state, EnergyPlus::format("{}{} not found = {}", RoutineName, CurrentModuleObject, thisEquipConfig.EquipListName)); + ShowContinueError(state, EnergyPlus::format("In ZoneHVAC:EquipmentConnections object, for Zone = {}", thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { auto const &epListFields = ip->getJSONObjectItem(state, CurrentModuleObject, thisEquipConfig.EquipListName); @@ -889,8 +905,9 @@ void processZoneEquipmentInput(EnergyPlusData &state, thisZoneEquipList.LoadDistScheme = static_cast(getEnumValue(DataZoneEquipment::LoadDistNamesUC, Util::makeUPPER(loadDistName))); if (thisZoneEquipList.LoadDistScheme == DataZoneEquipment::LoadDist::Invalid) { - ShowSevereError(state, format("{}{} = \"{}, Invalid choice\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); - ShowContinueError(state, format("...load_distribution_scheme=\"{}\".", loadDistName)); + ShowSevereError(state, + EnergyPlus::format("{}{} = \"{}, Invalid choice\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowContinueError(state, EnergyPlus::format("...load_distribution_scheme=\"{}\".", loadDistName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -947,7 +964,7 @@ void processZoneEquipmentInput(EnergyPlusData &state, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("In {}={}", CurrentModuleObject, thisZoneEquipList.Name)); + ShowContinueError(state, EnergyPlus::format("In {}={}", CurrentModuleObject, thisZoneEquipList.Name)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -957,12 +974,13 @@ void processZoneEquipmentInput(EnergyPlusData &state, if ((thisZoneEquipList.CoolingPriority(ZoneEquipTypeNum) < 0) || (thisZoneEquipList.CoolingPriority(ZoneEquipTypeNum) > thisZoneEquipList.NumOfEquipTypes)) { - ShowSevereError(state, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowSevereError(state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); ShowContinueError( - state, format("invalid zone_equipment_cooling_sequence=[{}].", thisZoneEquipList.CoolingPriority(ZoneEquipTypeNum))); + state, + EnergyPlus::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, format("only {} in the list.", thisZoneEquipList.NumOfEquipTypes)); + ShowContinueError(state, EnergyPlus::format("only {} in the list.", thisZoneEquipList.NumOfEquipTypes)); } state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -971,12 +989,13 @@ 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, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowSevereError(state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); ShowContinueError( - state, format("invalid zone_equipment_heating_sequence=[{}].", thisZoneEquipList.HeatingPriority(ZoneEquipTypeNum))); + state, + EnergyPlus::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, format("only {} in the list.", thisZoneEquipList.NumOfEquipTypes)); + ShowContinueError(state, EnergyPlus::format("only {} in the list.", thisZoneEquipList.NumOfEquipTypes)); } state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1030,8 +1049,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, } if (thisZoneEquipList.EquipType(ZoneEquipTypeNum) == ZoneEquipType::Invalid) { - ShowSevereError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); - ShowContinueError(state, format("..Invalid Equipment Type = {}", thisZoneEquipList.EquipType(ZoneEquipTypeNum))); + ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowContinueError(state, EnergyPlus::format("..Invalid Equipment Type = {}", thisZoneEquipList.EquipType(ZoneEquipTypeNum))); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -1040,32 +1059,35 @@ 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, format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); - ShowContinueError(state, - format("...multiple assignments for Zone Equipment Cooling Sequence={}, must be 1-1 correspondence between " - "sequence assignments and number of equipment.", - ZoneEquipTypeNum)); + ShowSevereError(state, EnergyPlus::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)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else if (count_eq(thisZoneEquipList.CoolingPriority, ZoneEquipTypeNum) == 0) { - ShowWarningError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); - ShowContinueError(state, - format("...zero assigned to Zone Equipment Cooling Sequence={}, apparent gap in sequence assignments in " - "this equipment list.", - ZoneEquipTypeNum)); + 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)); } if (count_eq(thisZoneEquipList.HeatingPriority, ZoneEquipTypeNum) > 1) { - ShowSevereError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); ShowContinueError(state, - format("...multiple assignments for Zone Equipment Heating or No-Load Sequence={}, must be 1-1 " - "correspondence between sequence assignments and number of equipment.", - ZoneEquipTypeNum)); + 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)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else if (count_eq(thisZoneEquipList.HeatingPriority, ZoneEquipTypeNum) == 0) { - ShowWarningError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); - ShowContinueError(state, - format("...zero assigned to Zone Equipment Heating or No-Load Sequence={}, apparent gap in sequence " - "assignments in this equipment list.", - ZoneEquipTypeNum)); + 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)); } } } // End ZoneHVAC:EquipmentList @@ -1114,9 +1136,9 @@ void processZoneEquipmentInput(EnergyPlusData &state, } } } else { - ShowContinueError( - state, - format("Invalid Zone Air Inlet Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone = {}", thisEquipConfig.ZoneName)); + ShowContinueError(state, + EnergyPlus::format("Invalid Zone Air Inlet Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone = {}", + thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1149,9 +1171,9 @@ void processZoneEquipmentInput(EnergyPlusData &state, } } } else { - ShowContinueError( - state, - format("Invalid Zone Air Exhaust Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", thisEquipConfig.ZoneName)); + ShowContinueError(state, + EnergyPlus::format("Invalid Zone Air Exhaust Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", + thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1205,9 +1227,9 @@ void processZoneEquipmentInput(EnergyPlusData &state, } } } else { - ShowContinueError( - state, - format("Invalid Zone Return Air Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", thisEquipConfig.ZoneName)); + ShowContinueError(state, + EnergyPlus::format("Invalid Zone Return Air Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", + thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1236,8 +1258,9 @@ void processZoneEquipmentInput(EnergyPlusData &state, } else { ShowContinueError( state, - format("Invalid Zone Return Air Node 1 Flow Rate Basis Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", - thisEquipConfig.ZoneName)); + EnergyPlus::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; } } @@ -1256,8 +1279,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, format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); - ShowContinueError(state, format("..Invalid Equipment Type = {}", zeqTypeName)); + ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); + ShowContinueError(state, EnergyPlus::format("..Invalid Equipment Type = {}", zeqTypeName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1279,10 +1302,11 @@ void processZoneEquipSplitterInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); + ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); ShowContinueError( - state, format(".. Zone Equipment Object Type={} and Zone Equipment Name={} not found", zeqTypeName, thisZeqSplitter.zoneEquipName)); - ShowContinueError(state, format(".. in ZoneHVAC:EquipmentList={}", thisZoneEqList.Name)); + 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.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; return; } @@ -1305,8 +1329,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, format("{}{}={}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); - ShowContinueError(state, format("Space Name={} not found.", spaceName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); + ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", spaceName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -1326,8 +1350,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, format("{}{}={}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); - ShowContinueError(state, format("Space Name={} not found.", spaceName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); + ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", spaceName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { thisZeqSpace.fraction = ip->getRealFieldValue(extensibleInstance, extensionSchemaProps, "space_fraction"); @@ -1379,11 +1403,11 @@ void processZoneEquipMixerInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); ShowContinueError(state, - format("Zone Equipment Inlet Node Name={} is not an exhaust node for ZoneHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZeqMixer.outletNodeNum), - thisZoneEquipConfig.ZoneName)); + EnergyPlus::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; } @@ -1403,8 +1427,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, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); - ShowContinueError(state, format("Space Name={} not found.", spaceName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); + ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", spaceName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { thisZeqSpace.fraction = ip->getRealFieldValue(extensibleInstance, extensionSchemaProps, "space_fraction"); @@ -1427,11 +1451,11 @@ void processZoneEquipMixerInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); ShowContinueError(state, - format("Space Node Name={} is not an exhaust node for SpaceHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZeqSpace.spaceNodeNum), - thisSpaceEquipConfig.ZoneName)); + EnergyPlus::format("Space Node Name={} is not an exhaust node for SpaceHVAC:EquipmentConnections={}.", + state.dataLoopNodes->NodeID(thisZeqSpace.spaceNodeNum), + thisSpaceEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -1474,11 +1498,11 @@ void processZoneReturnMixerInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); ShowContinueError(state, - format("Zone Equipment Return Air Node Name={} is not a return air node for ZoneHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZretMixer.outletNodeNum), - thisZoneEquipConfig.ZoneName)); + EnergyPlus::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; } @@ -1495,8 +1519,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, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); - ShowContinueError(state, format("Space Name={} not found.", spaceName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); + ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", spaceName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { thisZeqSpace.spaceNodeNum = @@ -1519,11 +1543,12 @@ void processZoneReturnMixerInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); - ShowContinueError(state, - format("Space Return Air Node Name={} is not a return air node for SpaceHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZeqSpace.spaceNodeNum), - thisSpaceEquipConfig.ZoneName)); + 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)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -1678,12 +1703,13 @@ int GetReturnAirNodeForZone(EnergyPlusData &state, // If NodeName is blank, return first return node number, but warn if there are multiple return nodes for this zone ReturnAirNodeNumber = thisZoneEquip.ReturnNode(1); if (thisZoneEquip.NumReturnNodes > 1) { - ShowWarningError(state, - format("GetReturnAirNodeForZone: {}, request for zone return node is ambiguous.", calledFromDescription)); + ShowWarningError( + state, + EnergyPlus::format("GetReturnAirNodeForZone: {}, request for zone return node is ambiguous.", calledFromDescription)); ShowContinueError(state, - format("Zone={} has {} return nodes. First return node will be used.", - thisZoneEquip.ZoneName, - thisZoneEquip.NumReturnNodes)); + EnergyPlus::format("Zone={} has {} return nodes. First return node will be used.", + thisZoneEquip.ZoneName, + thisZoneEquip.NumReturnNodes)); } } else { for (int nodeCount = 1; nodeCount <= thisZoneEquip.NumReturnNodes; ++nodeCount) { @@ -1892,10 +1918,10 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSizing && (this->spaceSizingBasis == DataZoneEquipment::SpaceEquipSizingBasis::DesignCoolingLoad || (this->spaceSizingBasis == DataZoneEquipment::SpaceEquipSizingBasis::DesignHeatingLoad))) { ShowSevereError(state, - format("ZoneEquipmentSplitterMixer::size: {} is unknown for {}={}. Unable to autosize Space Fractions.", - DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis], - BranchNodeConnections::ConnectionObjectTypeNames[(int)this->spaceEquipType], - this->Name)); + EnergyPlus::format("ZoneEquipmentSplitterMixer::size: {} is unknown for {}={}. Unable to autosize Space Fractions.", + DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis], + BranchNodeConnections::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; @@ -1938,12 +1964,12 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state) if (spacesTotal < 0.00001) { ShowSevereError(state, - format("ZoneEquipmentSplitterMixer::size: Total {} is zero for {}={}. Unable to autosize Space Fractions.", - DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis], - BranchNodeConnections::ConnectionObjectTypeNames[(int)this->spaceEquipType], - this->Name)); + EnergyPlus::format("ZoneEquipmentSplitterMixer::size: Total {} is zero for {}={}. Unable to autosize Space Fractions.", + DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis], + BranchNodeConnections::ConnectionObjectTypeNames[(int)this->spaceEquipType], + this->Name)); Real64 spaceFrac = 1.0 / (int)this->spaces.size(); - ShowContinueError(state, format("Setting space fractions to 1/number of spaces = {}.", spaceFrac)); + ShowContinueError(state, EnergyPlus::format("Setting space fractions to 1/number of spaces = {}.", spaceFrac)); for (auto &thisSpace : this->spaces) { thisSpace.fraction = spaceFrac; } @@ -1980,7 +2006,7 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state) BaseSizer::reportSizerOutput(state, BranchNodeConnections::ConnectionObjectTypeNames[(int)this->spaceEquipType], this->Name, - format("Space {} Fraction", spaceCounter), + EnergyPlus::format("Space {} Fraction", spaceCounter), thisSpace.fraction); } } diff --git a/src/EnergyPlus/DaylightingDevices.cc b/src/EnergyPlus/DaylightingDevices.cc index 3429d0ffc5a..11105ad6958 100644 --- a/src/EnergyPlus/DaylightingDevices.cc +++ b/src/EnergyPlus/DaylightingDevices.cc @@ -473,70 +473,71 @@ namespace Dayltg { int SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, format("{} = {}: Dome {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); + ShowSevereError( + state, EnergyPlus::format("{} = {}: Dome {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { if (FindTDDPipe(state, SurfNum) > 0) { ShowSevereError(state, - format("{} = {}: Dome {} is referenced by more than one TDD.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: Dome {} is referenced by more than one TDD.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::TDD_Dome) { ShowSevereError(state, - format("{} = {}: Dome {} is not of surface type TubularDaylightDome.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: Dome {} is not of surface type TubularDaylightDome.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TotGlassLayers > 1) { ShowSevereError(state, - format("{} = {}: Dome {} construction ({}) must have only 1 glass layer.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2), - state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); + EnergyPlus::format("{} = {}: Dome {} construction ({}) must have only 1 glass layer.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2), + state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).HasShadeControl) { ShowSevereError(state, - format("{} = {}: Dome {} must not have a shading control.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: Dome {} must not have a shading control.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).FrameDivider > 0) { ShowSevereError( state, - format( + EnergyPlus::format( "{} = {}: Dome {} must not have a frame/divider.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).WindowTypeEQL) { ShowSevereError(state, - format("{} = {}: Dome {} Equivalent Layer Window is not supported.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: Dome {} Equivalent Layer Window is not supported.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } // Window multiplier is already handled in SurfaceGeometry.cc if (!state.dataSurface->Surface(SurfNum).ExtSolar) { ShowWarningError(state, - format("{} = {}: Dome {} is not exposed to exterior radiation.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: Dome {} is not exposed to exterior radiation.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); } state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome = SurfNum; @@ -547,48 +548,50 @@ namespace Dayltg { SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(3), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, - format("{} = {}: Diffuser {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); + ShowSevereError( + state, + EnergyPlus::format("{} = {}: Diffuser {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { if (FindTDDPipe(state, SurfNum) > 0) { ShowSevereError(state, - format("{} = {}: Diffuser {} is referenced by more than one TDD.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(3))); + EnergyPlus::format("{} = {}: Diffuser {} is referenced by more than one TDD.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).OriginalClass != SurfaceClass::TDD_Diffuser) { ShowSevereError(state, - format("{} = {}: Diffuser {} is not of surface type TubularDaylightDiffuser.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(3))); + EnergyPlus::format("{} = {}: Diffuser {} is not of surface type TubularDaylightDiffuser.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TotGlassLayers > 1) { ShowSevereError(state, - format("{} = {}: Diffuser {} construction ({}) must have only 1 glass layer.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(3), - state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); + EnergyPlus::format("{} = {}: Diffuser {} construction ({}) must have only 1 glass layer.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3), + state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TransDiff <= 1.0e-10) { ShowSevereError(state, - format("{} = {}: Diffuser {} construction ({}) invalid value.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(3), - state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); - ShowContinueError(state, - format("Diffuse solar transmittance of construction [{:.4R}] too small for calculations.", - state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TransDiff)); + EnergyPlus::format("{} = {}: Diffuser {} construction ({}) invalid value.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3), + state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).Name)); + ShowContinueError( + state, + EnergyPlus::format("Diffuse solar transmittance of construction [{:.4R}] too small for calculations.", + state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).TransDiff)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -600,48 +603,51 @@ namespace Dayltg { state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area) > 0.1) { // greater than 10% ShowSevereError(state, - format("{} = {}: Dome and diffuser areas are significantly different (>10%).", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("...Diffuser Area=[{:.4R}]; Dome Area=[{:.4R}].", - state.dataSurface->Surface(SurfNum).Area, - state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); + EnergyPlus::format("{} = {}: Dome and diffuser areas are significantly different (>10%).", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("...Diffuser Area=[{:.4R}]; Dome Area=[{:.4R}].", + state.dataSurface->Surface(SurfNum).Area, + state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { - ShowWarningError( - state, format("{} = {}: Dome and diffuser areas differ by > .1 m2.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("...Diffuser Area=[{:.4R}]; Dome Area=[{:.4R}].", - state.dataSurface->Surface(SurfNum).Area, - state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); + ShowWarningError(state, + EnergyPlus::format( + "{} = {}: Dome and diffuser areas differ by > .1 m2.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("...Diffuser Area=[{:.4R}]; Dome Area=[{:.4R}].", + state.dataSurface->Surface(SurfNum).Area, + state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); } } if (state.dataSurface->Surface(SurfNum).HasShadeControl) { ShowSevereError(state, - format("{} = {}: Diffuser {} must not have a shading control.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(3))); + EnergyPlus::format("{} = {}: Diffuser {} must not have a shading control.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).FrameDivider > 0) { ShowSevereError(state, - format("{} = {}: Diffuser {} must not have a frame/divider.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(3))); + EnergyPlus::format("{} = {}: Diffuser {} must not have a frame/divider.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).WindowTypeEQL) { ShowSevereError(state, - format("{} = {}: Diffuser {} Equivalent Layer Window is not supported.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: Diffuser {} Equivalent Layer Window is not supported.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -656,8 +662,9 @@ namespace Dayltg { Util::FindItemInList(ipsc->cAlphaArgs(4), state.dataConstruction->Construct); if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).Construction == 0) { - ShowSevereError( - state, format("{} = {}: Pipe construction {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); + ShowSevereError(state, + EnergyPlus::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; @@ -666,7 +673,8 @@ namespace Dayltg { if (ipsc->rNumericArgs(1) > 0) { state.dataDaylightingDevicesData->TDDPipe(PipeNum).Diameter = ipsc->rNumericArgs(1); } else { - ShowSevereError(state, format("{} = {}: Pipe diameter must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("{} = {}: Pipe diameter must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -677,28 +685,32 @@ 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, - format("{} = {}: Pipe and dome/diffuser areas are significantly different (>10%).", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("...Pipe Area=[{:.4R}]; Dome/Diffuser Area=[{:.4R}].", - PipeArea, - state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); + EnergyPlus::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}].", + PipeArea, + state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { - ShowWarningError( - state, format("{} = {}: Pipe and dome/diffuser areas differ by > .1 m2.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("...Pipe Area=[{:.4R}]; Dome/Diffuser Area=[{:.4R}].", - PipeArea, - state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); + ShowWarningError(state, + EnergyPlus::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}].", + PipeArea, + state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); } } if (ipsc->rNumericArgs(2) > 0) { state.dataDaylightingDevicesData->TDDPipe(PipeNum).TotLength = ipsc->rNumericArgs(2); } else { - ShowSevereError(state, format("{} = {}: Pipe length must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("{} = {}: Pipe length must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -706,9 +718,9 @@ namespace Dayltg { state.dataDaylightingDevicesData->TDDPipe(PipeNum).Reff = ipsc->rNumericArgs(3); } else { ShowSevereError(state, - format("{} = {}: Effective thermal resistance (R value) must be greater than zero.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + EnergyPlus::format("{} = {}: Effective thermal resistance (R value) must be greater than zero.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -717,12 +729,13 @@ namespace Dayltg { if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).NumOfTZones < 1) { ShowWarningError(state, - format("{} = {}: No transition zones specified. All pipe absorbed solar goes to exterior.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + EnergyPlus::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, - format("{} = {}: Maximum number of transition zones exceeded.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::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); @@ -739,18 +752,19 @@ namespace Dayltg { std::string const TZoneName = ipsc->cAlphaArgs(TZoneNum + 4); state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZone(TZoneNum) = Util::FindItemInList(TZoneName, state.dataHeatBal->Zone); if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZone(TZoneNum) == 0) { - ShowSevereError(state, - format("{} = {}: Transition zone {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), TZoneName)); + ShowSevereError( + state, + EnergyPlus::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, - format("{} = {}: Transition zone length for {} must be zero or greater.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - TZoneName)); + EnergyPlus::format("{} = {}: Transition zone length for {} must be zero or greater.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + TZoneName)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } } // TZoneNum @@ -819,56 +833,59 @@ namespace Dayltg { int SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, format("{} = {}: Window {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); + ShowSevereError( + state, EnergyPlus::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, - format("{} = {}: Window {} is not of surface type WINDOW.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::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, - format("{} = {}: Window {} is referenced by more than one shelf.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::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, - format("{} = {}: Window {} must not have a shading control.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::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, - format("{} = {}: Window {} must not have a frame/divider.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::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, format("{} = {}: Window {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); + state, + EnergyPlus::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, - format("{} = {}: Window {} Equivalent Layer Window is not supported.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: Window {} Equivalent Layer Window is not supported.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -881,25 +898,26 @@ namespace Dayltg { SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(3), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError( - state, format("{} = {}: Inside shelf {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); + ShowSevereError(state, + EnergyPlus::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, - format("{} = {}: Inside shelf {} must be its own Outside Boundary Condition Object.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format( + EnergyPlus::format( "{} = {}: Inside shelf {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -913,34 +931,35 @@ namespace Dayltg { SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(4), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError( - state, format("{} = {}: Outside shelf {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); + ShowSevereError(state, + EnergyPlus::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, - format("{} = {}: Outside shelf {} is not a Shading:Zone:Detailed object.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(4))); + EnergyPlus::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, - format("{} = {}: Outside shelf {} must not have a transmittance schedule.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(4))); + EnergyPlus::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, - format( + EnergyPlus::format( "{} = {}: Outside shelf {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -952,17 +971,17 @@ namespace Dayltg { if (ConstrNum == 0) { ShowSevereError(state, - format("{} = {}: Outside shelf construction {} not found.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} = {}: Outside shelf construction {} must not have WindowMaterial:Glazing.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(5))); + EnergyPlus::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; @@ -970,9 +989,9 @@ namespace Dayltg { } } else { ShowSevereError(state, - format("{} = {}: Outside shelf requires an outside shelf construction to be specified.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + EnergyPlus::format("{} = {}: Outside shelf requires an outside shelf construction to be specified.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -981,10 +1000,11 @@ namespace Dayltg { state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor = ipsc->rNumericArgs(1); if (ipsc->rNumericArgs(1) == 0.0) { - ShowWarningError(state, - format("{} = {}: View factor to outside shelf is zero. Shelf does not reflect on window.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + ShowWarningError( + state, + EnergyPlus::format("{} = {}: View factor to outside shelf is zero. Shelf does not reflect on window.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); } } else { state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor = @@ -1006,8 +1026,9 @@ namespace Dayltg { } if (state.dataDaylightingDevicesData->Shelf(ShelfNum).InSurf == 0 && state.dataDaylightingDevicesData->Shelf(ShelfNum).OutSurf == 0) { - ShowWarningError(state, - format("{} = {}: No inside shelf or outside shelf was specified.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowWarningError( + state, + EnergyPlus::format("{} = {}: No inside shelf or outside shelf was specified.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); } } // ShelfNum @@ -1466,9 +1487,9 @@ namespace Dayltg { if ((int)state.dataDaylightingDevicesData->TDDPipe.size() <= 0) { ShowFatalError(state, - 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)); + 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)); } for (PipeNum = 1; PipeNum <= (int)state.dataDaylightingDevicesData->TDDPipe.size(); ++PipeNum) { @@ -1587,8 +1608,8 @@ namespace Dayltg { L = state.dataSurface->Surface(state.dataDaylightingDevicesData->Shelf(ShelfNum).OutSurf).Width; } else { ShowFatalError(state, - format("DaylightingDevice:Shelf = {}: Width of window and outside shelf do not match.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + EnergyPlus::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 @@ -1605,12 +1626,13 @@ namespace Dayltg { if (NumMatch < 2) { ShowWarningError( state, - format("DaylightingDevice:Shelf = {}: Window and outside shelf must share two vertices. View factor calculation may be inaccurate.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + EnergyPlus::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, - format("DaylightingDevice:Shelf = {}: Window and outside shelf share too many vertices.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + EnergyPlus::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 @@ -1638,18 +1660,20 @@ namespace Dayltg { viewFactorToGround = 0.0; } if (viewFactorToShelf <= 0.0) { // No shelf impact for which to account - ShowWarningError(state, - format("DaylightingDevice:Shelf = {}: Window view factor to shelf was less than 0. This should not happen.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + ShowWarningError( + state, + EnergyPlus::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 viewFactorToGround = viewFactorToGround / (viewFactorToGround + viewFactorToSky); viewFactorToSky = 1.0 - viewFactorToGround; - ShowWarningError(state, - 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)); + 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)); 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."); } @@ -1659,9 +1683,10 @@ 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, - format("DaylightingDevice:Shelf = {}: Window view factor to shelf was greater than 1. This should not happen.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + ShowWarningError( + state, + EnergyPlus::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; @@ -1696,9 +1721,9 @@ namespace Dayltg { // Now correct the view factors based on the location of the shelf with respect to the window ShowWarningError( state, - format("DaylightingDevice:Shelf = {}: Window view factor to shelf [{:.2R}] results in a sum of view factors greater than 1.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name, - state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor)); + EnergyPlus::format("DaylightingDevice:Shelf = {}: Window view factor to shelf [{:.2R}] results in a sum of view factors greater than 1.", + state.dataDaylightingDevicesData->Shelf(ShelfNum).Name, + state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor)); if (zWinMin >= zShelfMax) { // Shelf is fully below window, reduce view to ground first based on view to shelf ShowContinueError( state, @@ -1795,10 +1820,11 @@ namespace Dayltg { viewFactorToGround = vfGroundAdjustMin + heightRatio * (vfGroundAdjustMax - vfGroundAdjustMin); viewFactorToSky = leftoverViewFactor - viewFactorToGround; } - ShowWarningError(state, - 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, + 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)); 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 b44e65a0005..4251f8302d7 100644 --- a/src/EnergyPlus/DaylightingManager.cc +++ b/src/EnergyPlus/DaylightingManager.cc @@ -192,11 +192,13 @@ void DayltgAveInteriorReflectance(EnergyPlusData &state, int const enclNum) // E // Error if window has multiplier > 1 since this causes incorrect illuminance calc if (IType == SurfaceClass::Window && surf.Multiplier > 1.0) { if (thisEnclosure.TotalEnclosureDaylRefPoints > 0) { - ShowSevereError(state, format("DayltgAveInteriorReflectance: Multiplier > 1.0 for window {} in Zone={}", surf.Name, surf.ZoneName)); + ShowSevereError( + state, EnergyPlus::format("DayltgAveInteriorReflectance: Multiplier > 1.0 for window {} in Zone={}", surf.Name, surf.ZoneName)); ShowContinueError(state, "...not allowed since it is in a zone or enclosure with daylighting."); ShowFatalError(state, "Program terminates due to preceding conditions."); } else { - ShowSevereError(state, format("DayltgAveInteriorReflectance: Multiplier > 1.0 for window {} in Zone={}", surf.Name, surf.ZoneName)); + ShowSevereError( + state, EnergyPlus::format("DayltgAveInteriorReflectance: Multiplier > 1.0 for window {} in Zone={}", surf.Name, surf.ZoneName)); ShowContinueError(state, "...an adjacent Zone has daylighting. Simulation cannot proceed."); ShowFatalError(state, "Program terminates due to preceding conditions."); } @@ -230,7 +232,8 @@ void DayltgAveInteriorReflectance(EnergyPlusData &state, int const enclNum) // E // Average inside surface reflectance of enclosure if (AInsTot <= 0.0) { - ShowSevereError(state, format("DayltgAveInteriorReflectance: Total opaque surface area is <=0.0 in solar enclosure={}", thisEnclosure.Name)); + ShowSevereError( + state, EnergyPlus::format("DayltgAveInteriorReflectance: Total opaque surface area is <=0.0 in solar enclosure={}", thisEnclosure.Name)); ShowFatalError(state, "Program terminates due to preceding conditions."); } dl->enclDaylight(enclNum).aveVisDiffReflect = ARHTOT / AInsTot; @@ -444,9 +447,9 @@ void CalcDayltgCoefficients(EnergyPlusData &state) if (thisEnclDaylight.NumOfDayltgExtWins == 0 && thisEnclDaylight.TotalExtWindows == 0) { for (int daylightCtrlNum : thisEnclDaylight.daylightControlIndexes) { if (dl->daylightControl(daylightCtrlNum).TotalDaylRefPoints > 0) { - ShowWarningError( - state, - format("Detailed daylighting will not be done for Daylighting:Controls={}", dl->daylightControl(daylightCtrlNum).Name)); + ShowWarningError(state, + EnergyPlus::format("Detailed daylighting will not be done for Daylighting:Controls={}", + dl->daylightControl(daylightCtrlNum).Name)); ShowContinueError(state, "because it has no associated exterior windows."); } } @@ -692,9 +695,9 @@ void CalcDayltgCoeffsRefMapPoints(EnergyPlusData &state) // Look up the TDD:DOME object int PipeNum = s_surf->SurfWinTDDPipeNum(IWin); if (PipeNum == 0) { - ShowSevereError( - state, - format("GetTDDInput: Surface={}, TDD:Dome object does not reference a valid Diffuser object.", s_surf->Surface(IWin).Name)); + ShowSevereError(state, + EnergyPlus::format("GetTDDInput: Surface={}, TDD:Dome object does not reference a valid Diffuser object.", + s_surf->Surface(IWin).Name)); ShowContinueError(state, "...needs DaylightingDevice:Tubular of same name as Surface."); ErrorsFound = true; } @@ -723,15 +726,15 @@ void CalcDayltgCoeffsRefMapPoints(EnergyPlusData &state) if ((int)dl->illumMaps.size() > 0) { for (int MapNum = 1; MapNum <= (int)dl->illumMaps.size(); ++MapNum) { int mapZoneNum = dl->illumMaps(MapNum).zoneIndex; - std::string name = format("Zone={}", state.dataHeatBal->Zone(mapZoneNum).Name); + std::string name = EnergyPlus::format("Zone={}", state.dataHeatBal->Zone(mapZoneNum).Name); int mapSpaceNum = dl->illumMaps(MapNum).spaceIndex; if (mapSpaceNum > 0) { - name = format("Space={}", state.dataHeatBal->space(mapSpaceNum).Name); + name = EnergyPlus::format("Space={}", state.dataHeatBal->space(mapSpaceNum).Name); } if (state.dataGlobal->WarmupFlag) { - DisplayString(state, format("Calculating Daylighting Coefficients (Map Points), {}", name)); + DisplayString(state, EnergyPlus::format("Calculating Daylighting Coefficients (Map Points), {}", name)); } else { - DisplayString(state, format("Updating Daylighting Coefficients (Map Points), {}", name)); + DisplayString(state, EnergyPlus::format("Updating Daylighting Coefficients (Map Points), {}", name)); } CalcDayltgCoeffsMapPoints(state, MapNum); } @@ -1630,43 +1633,48 @@ void FigureDayltgCoeffsAtPointsSetupForWindow(EnergyPlusData &state, if (D1a > 0.0 && D1b > 0.0 && D1b <= HW && D1a <= WW) { ShowSevereError( state, - format("CalcDaylightCoeffRefPoints: Daylighting calculation cannot be done for Daylighting:Controls={} because reference point " - "#{} is less than 0.15m (6\") from window plane {}", - dl->daylightControl(daylightCtrlNum).Name, - iRefPoint, - surf.Name)); - ShowContinueError(state, format("Distance=[{:.5R}]. This is too close; check position of reference point.", ALF)); + EnergyPlus::format( + "CalcDaylightCoeffRefPoints: Daylighting calculation cannot be done for Daylighting:Controls={} because reference point " + "#{} is less than 0.15m (6\") from window plane {}", + dl->daylightControl(daylightCtrlNum).Name, + iRefPoint, + surf.Name)); + ShowContinueError(state, EnergyPlus::format("Distance=[{:.5R}]. This is too close; check position of reference point.", ALF)); ShowFatalError(state, "Program terminates due to preceding condition."); } } else if (ALF < 0.1524 && extWinType == ExtWinType::AdjZone) { if (dl->RefErrIndex(iRefPoint, IWin) == 0) { // only show error message once - ShowWarningError(state, - format("CalcDaylightCoeffRefPoints: For Daylghting:Controls=\"{}\" External Window=\"{}\"in Zone=\"{}\" reference " - "point is less than 0.15m (6\") from window plane ", - dl->daylightControl(daylightCtrlNum).Name, - surf.Name, - state.dataHeatBal->Zone(surf.Zone).Name)); - ShowContinueError(state, - format("Distance=[{:.1R} m] to ref point=[{:.1R},{:.1R},{:.1R}], Inaccuracy in Daylighting Calcs may result.", - ALF, - RREF.x, - RREF.y, - RREF.z)); + ShowWarningError( + state, + EnergyPlus::format("CalcDaylightCoeffRefPoints: For Daylghting:Controls=\"{}\" External Window=\"{}\"in Zone=\"{}\" reference " + "point is less than 0.15m (6\") from window plane ", + dl->daylightControl(daylightCtrlNum).Name, + surf.Name, + state.dataHeatBal->Zone(surf.Zone).Name)); + ShowContinueError( + state, + EnergyPlus::format("Distance=[{:.1R} m] to ref point=[{:.1R},{:.1R},{:.1R}], Inaccuracy in Daylighting Calcs may result.", + ALF, + RREF.x, + RREF.y, + RREF.z)); dl->RefErrIndex(iRefPoint, IWin) = 1; } } } else if (CalledFrom == CalledFor::MapPoint) { if (ALF < 0.1524 && extWinType == ExtWinType::AdjZone) { if (dl->MapErrIndex(iRefPoint, IWin) == 0) { // only show error message once - ShowWarningError(state, - format("CalcDaylightCoeffMapPoints: For Zone=\"{}\" External Window=\"{}\"in Zone=\"{}\" map point is less than " - "0.15m (6\") from window plane ", - state.dataHeatBal->Zone(zoneNum).Name, - surf.Name, - state.dataHeatBal->Zone(surf.Zone).Name)); + ShowWarningError( + state, + EnergyPlus::format("CalcDaylightCoeffMapPoints: For Zone=\"{}\" External Window=\"{}\"in Zone=\"{}\" map point is less than " + "0.15m (6\") from window plane ", + state.dataHeatBal->Zone(zoneNum).Name, + surf.Name, + state.dataHeatBal->Zone(surf.Zone).Name)); ShowContinueError( state, - format("Distance=[{:.1R} m] map point=[{:.1R},{:.1R},{:.1R}], Inaccuracy in Map Calcs may result.", ALF, RREF.x, RREF.y, RREF.z)); + EnergyPlus::format( + "Distance=[{:.1R} m] map point=[{:.1R},{:.1R},{:.1R}], Inaccuracy in Map Calcs may result.", ALF, RREF.x, RREF.y, RREF.z)); dl->MapErrIndex(iRefPoint, IWin) = 1; } } @@ -3877,9 +3885,10 @@ void GetDaylightingParametersInput(EnergyPlusData &state) if (s_surf->WindowShadingControl(surf.activeWindowShadingControl).GlareControlIsActive) { // Error if GlareControlIsActive but window is not in a Daylighting:Detailed zone if (thisSurfEnclosure.TotalEnclosureDaylRefPoints == 0) { - ShowSevereError(state, format("Window={} has Window Shading Control with", surf.Name)); + ShowSevereError(state, EnergyPlus::format("Window={} has Window Shading Control with", surf.Name)); ShowContinueError(state, "GlareControlIsActive = Yes but it is not in a Daylighting zone or enclosure."); - ShowContinueError(state, format("Zone or enclosure indicated={}", state.dataViewFactor->EnclSolInfo(surf.SolarEnclIndex).Name)); + ShowContinueError(state, + EnergyPlus::format("Zone or enclosure indicated={}", state.dataViewFactor->EnclSolInfo(surf.SolarEnclIndex).Name)); ErrorsFound = true; } // Error if GlareControlIsActive and window is in a Daylighting:Detailed zone/enclosure with @@ -3890,10 +3899,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, format("Window={} has Window Shading Control with", surf.Name)); + ShowSevereError(state, EnergyPlus::format("Window={} has Window Shading Control with", surf.Name)); ShowContinueError(state, "GlareControlIsActive = Yes and is in a Daylighting zone or enclosure"); ShowContinueError(state, "that shares an interior window with another Daylighting zone or enclosure"); - ShowContinueError(state, format("Adjacent Zone or Enclosure indicated={}", adjSurfEnclosure.Name)); + ShowContinueError(state, EnergyPlus::format("Adjacent Zone or Enclosure indicated={}", adjSurfEnclosure.Name)); ErrorsFound = true; } } @@ -3908,9 +3917,9 @@ void GetDaylightingParametersInput(EnergyPlusData &state) // Error if window has shadingControlType = MeetDaylightingIlluminanceSetpoint & // but is not in a Daylighting:Detailed zone if (thisSurfEnclosure.TotalEnclosureDaylRefPoints == 0) { - ShowSevereError(state, format("Window={} has Window Shading Control with", surf.Name)); + ShowSevereError(state, EnergyPlus::format("Window={} has Window Shading Control with", surf.Name)); ShowContinueError(state, "MeetDaylightingIlluminanceSetpoint but it is not in a Daylighting zone or enclosure."); - ShowContinueError(state, format("Zone or enclosure indicated={}", thisSurfEnclosure.Name)); + ShowContinueError(state, EnergyPlus::format("Zone or enclosure indicated={}", thisSurfEnclosure.Name)); ErrorsFound = true; continue; } @@ -3922,10 +3931,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, format("Window={} has Window Shading Control with", surf.Name)); + ShowSevereError(state, EnergyPlus::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, format("Adjacent Zone or enclosure indicated={}", adjSurfEnclosure.Name)); + ShowContinueError(state, EnergyPlus::format("Adjacent Zone or enclosure indicated={}", adjSurfEnclosure.Name)); ErrorsFound = true; } } @@ -3949,14 +3958,14 @@ void GetDaylightingParametersInput(EnergyPlusData &state) for (int refPtNum = 1; refPtNum <= enclSol.TotalEnclosureDaylRefPoints; ++refPtNum) { auto &refPt = surfWin.refPts(refPtNum); SetupOutputVariable(state, - format("Daylighting Window Reference Point {} Illuminance", refPtNum), + EnergyPlus::format("Daylighting Window Reference Point {} Illuminance", refPtNum), Constant::Units::lux, refPt.illumFromWinRep, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, surf.Name); SetupOutputVariable(state, - format("Daylighting Window Reference Point {} View Luminance", refPtNum), + EnergyPlus::format("Daylighting Window Reference Point {} View Luminance", refPtNum), Constant::Units::cd_m2, refPt.lumWinRep, OutputProcessor::TimeStepType::Zone, @@ -3990,7 +3999,8 @@ 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 = format("{} to {}", surf.Name, state.dataDayltg->DaylRefPt(control.refPts(refPtNum).num).Name); + std::string varKey = + EnergyPlus::format("{} to {}", surf.Name, state.dataDayltg->DaylRefPt(control.refPts(refPtNum).num).Name); SetupOutputVariable(state, "Daylighting Window Reference Point Illuminance", Constant::Units::lux, @@ -4160,12 +4170,14 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) for (int spaceCounter = 2; spaceCounter <= state.dataHeatBal->Zone(zoneNum).numSpaces; ++spaceCounter) { int spaceNum = state.dataHeatBal->Zone(zoneNum).spaceIndexes(spaceCounter); if (enclNum != state.dataHeatBal->space(spaceNum).solarEnclosureNum) { - ShowSevereError(state, - format("{}=\"{}\" All spaces in the zone must be in the same enclosure for daylighting illuminance maps.", + 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, format("Zone=\"{}\" spans multiple enclosures. Use a Space Name instead.", state.dataHeatBal->Zone(zoneNum).Name)); + ShowContinueError(state, + EnergyPlus::format("Zone=\"{}\" spans multiple enclosures. Use a Space Name instead.", + state.dataHeatBal->Zone(zoneNum).Name)); ErrorsFound = true; break; } @@ -4174,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, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { illumMap.spaceIndex = spaceNum; @@ -4192,13 +4204,13 @@ 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, format("{}=\"{}\", invalid entry.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid entry.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("...{} {:.2R} must be <= {} {:.2R}.", - s_ipsc->cNumericFieldNames(2), - s_ipsc->rNumericArgs(2), - s_ipsc->cNumericFieldNames(3), - s_ipsc->rNumericArgs(3))); + EnergyPlus::format("...{} {:.2R} must be <= {} {:.2R}.", + s_ipsc->cNumericFieldNames(2), + s_ipsc->rNumericArgs(2), + s_ipsc->cNumericFieldNames(3), + s_ipsc->rNumericArgs(3))); ErrorsFound = true; } illumMap.Xnum = s_ipsc->rNumericArgs(4); @@ -4207,28 +4219,29 @@ 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, format("{}=\"{}\", invalid entry.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid entry.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("...{} {:.2R} must be <= {} {:.2R}.", - s_ipsc->cNumericFieldNames(5), - s_ipsc->rNumericArgs(5), - s_ipsc->cNumericFieldNames(6), - s_ipsc->rNumericArgs(6))); + EnergyPlus::format("...{} {:.2R} must be <= {} {:.2R}.", + s_ipsc->cNumericFieldNames(5), + s_ipsc->rNumericArgs(5), + s_ipsc->cNumericFieldNames(6), + s_ipsc->rNumericArgs(6))); ErrorsFound = true; } illumMap.Ynum = s_ipsc->rNumericArgs(7); illumMap.Yinc = (illumMap.Ynum != 1) ? ((illumMap.Ymax - illumMap.Ymin) / (illumMap.Ynum - 1)) : 0.0; if (illumMap.Xnum * illumMap.Ynum > MaxMapRefPoints) { - ShowSevereError(state, format("{}=\"{}\", too many map points specified.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", too many map points specified.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("...{}[{}] * {}[{}].= [{}] must be <= [{}].", - s_ipsc->cNumericFieldNames(4), - illumMap.Xnum, - s_ipsc->cNumericFieldNames(7), - illumMap.Ynum, - illumMap.Xnum * illumMap.Ynum, - MaxMapRefPoints)); + EnergyPlus::format("...{}[{}] * {}[{}].= [{}] must be <= [{}].", + s_ipsc->cNumericFieldNames(4), + illumMap.Xnum, + s_ipsc->cNumericFieldNames(7), + illumMap.Ynum, + illumMap.Xnum * illumMap.Ynum, + MaxMapRefPoints)); ErrorsFound = true; } } // MapNum @@ -4260,10 +4273,10 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } else { dl->MapColSep = DataStringGlobals::CharComma; // comma ShowWarningError(state, - format("{}: invalid {}=\"{}\", Commas will be used to separate fields.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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"; } } @@ -4299,11 +4312,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, format("Occurs in Zone={}", zone.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Zone={}", zone.Name)); ShowContinueError(state, - format("Maximum reference points allowed={}, entered amount ( when error first occurred )={}", - MaxMapRefPoints, - illumMap.TotalMapRefPoints)); + EnergyPlus::format("Maximum reference points allowed={}, entered amount ( when error first occurred )={}", + MaxMapRefPoints, + illumMap.TotalMapRefPoints)); ErrorsFound = true; break; } @@ -4384,46 +4397,49 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } if (refPt.absCoords.x < zone.MinimumX || refPt.absCoords.x > zone.MaximumX) { - ShowWarningError( - state, - format("GetInputIlluminanceMap: Reference Map point #[{}], X Value outside Zone Min/Max X, Zone={}", iRefPt, zone.Name)); + ShowWarningError(state, + EnergyPlus::format("GetInputIlluminanceMap: Reference Map point #[{}], X Value outside Zone Min/Max X, Zone={}", + iRefPt, + zone.Name)); ShowContinueError(state, - format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", - refPt.absCoords.x, - zone.MinimumX, - zone.MaximumX)); - ShowContinueError( - state, - format("...X Reference Distance Outside MinimumX= {:.4R} m.", - (refPt.absCoords.x < zone.MinimumX) ? (zone.MinimumX - refPt.absCoords.x) : (refPt.absCoords.x - zone.MaximumX))); + EnergyPlus::format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", + refPt.absCoords.x, + zone.MinimumX, + zone.MaximumX)); + ShowContinueError(state, + EnergyPlus::format("...X Reference Distance Outside MinimumX= {:.4R} m.", + (refPt.absCoords.x < zone.MinimumX) ? (zone.MinimumX - refPt.absCoords.x) + : (refPt.absCoords.x - zone.MaximumX))); } if (refPt.absCoords.y < zone.MinimumY || refPt.absCoords.y > zone.MaximumY) { - ShowWarningError( - state, - format("GetInputIlluminanceMap: Reference Map point #[{}], Y Value outside Zone Min/Max Y, Zone={}", iRefPt, zone.Name)); + ShowWarningError(state, + EnergyPlus::format("GetInputIlluminanceMap: Reference Map point #[{}], Y Value outside Zone Min/Max Y, Zone={}", + iRefPt, + zone.Name)); ShowContinueError(state, - format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", - refPt.absCoords.y, - zone.MinimumY, - zone.MaximumY)); - ShowContinueError( - state, - format("...Y Reference Distance Outside MinimumY= {:.4R} m.", - (refPt.absCoords.y < zone.MinimumY) ? (zone.MinimumY - refPt.absCoords.y) : (refPt.absCoords.y - zone.MaximumY))); + EnergyPlus::format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", + refPt.absCoords.y, + zone.MinimumY, + zone.MaximumY)); + ShowContinueError(state, + EnergyPlus::format("...Y Reference Distance Outside MinimumY= {:.4R} m.", + (refPt.absCoords.y < zone.MinimumY) ? (zone.MinimumY - refPt.absCoords.y) + : (refPt.absCoords.y - zone.MaximumY))); } if (refPt.absCoords.z < zone.MinimumZ || refPt.absCoords.z > zone.MaximumZ) { - ShowWarningError( - state, - format("GetInputIlluminanceMap: Reference Map point #[{}], Z Value outside Zone Min/Max Z, Zone={}", iRefPt, zone.Name)); + ShowWarningError(state, + EnergyPlus::format("GetInputIlluminanceMap: Reference Map point #[{}], Z Value outside Zone Min/Max Z, Zone={}", + iRefPt, + zone.Name)); ShowContinueError(state, - format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", - refPt.absCoords.z, - zone.MinimumZ, - zone.MaximumZ)); - ShowContinueError( - state, - format("...Z Reference Distance Outside MinimumZ= {:.4R} m.", - (refPt.absCoords.z < zone.MinimumZ) ? (zone.MinimumZ - refPt.absCoords.z) : (refPt.absCoords.z - zone.MaximumZ))); + EnergyPlus::format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", + refPt.absCoords.z, + zone.MinimumZ, + zone.MaximumZ)); + ShowContinueError(state, + EnergyPlus::format("...Z Reference Distance Outside MinimumZ= {:.4R} m.", + (refPt.absCoords.z < zone.MinimumZ) ? (zone.MinimumZ - refPt.absCoords.z) + : (refPt.absCoords.z - zone.MaximumZ))); } } // for (X) } // for (Y) @@ -4437,8 +4453,8 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) int enclNum = illumMap.enclIndex; if (!dl->enclDaylight(enclNum).hasSplitFluxDaylighting && !ZoneMsgDone(illumMap.zoneIndex)) { ShowSevereError(state, - format("Zone Name in Output:IlluminanceMap is not used for Daylighting:Controls={}", - state.dataHeatBal->Zone(illumMap.zoneIndex).Name)); + EnergyPlus::format("Zone Name in Output:IlluminanceMap is not used for Daylighting:Controls={}", + state.dataHeatBal->Zone(illumMap.zoneIndex).Name)); ErrorsFound = true; } } @@ -4535,10 +4551,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, - 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))); + 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))); ErrorsFound = true; break; } @@ -4547,11 +4563,11 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) // Check if this is a duplicate if (spaceHasDaylightingControl(zoneSpaceNum)) { ShowWarningError(state, - format("{}=\"{}\" Space=\"{}\" already has a {} object assigned to it.", - s_ipsc->cCurrentModuleObject, - daylightControl.Name, - state.dataHeatBal->space(zoneSpaceNum).Name, - s_ipsc->cCurrentModuleObject)); + EnergyPlus::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; @@ -4559,8 +4575,9 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) } else { int const spaceNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->space); if (spaceNum == 0) { - ShowSevereError(state, - format("{}: invalid {}=\"{}\".", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowSevereError( + state, + EnergyPlus::format("{}: invalid {}=\"{}\".", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); ErrorsFound = true; continue; } @@ -4570,11 +4587,11 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) // Check if this is a duplicate if (spaceHasDaylightingControl(spaceNum)) { ShowWarningError(state, - format("{}=\"{}\" Space=\"{}\" already has a {} object assigned to it.", - s_ipsc->cCurrentModuleObject, - daylightControl.Name, - state.dataHeatBal->space(spaceNum).Name, - s_ipsc->cCurrentModuleObject)); + EnergyPlus::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; @@ -4592,12 +4609,12 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) if (daylightControl.DaylightMethod == DaylightingMethod::Invalid) { daylightControl.DaylightMethod = DaylightingMethod::SplitFlux; ShowWarningError(state, - format("Invalid {} = {}, occurs in {}object for {}=\"{}", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3), - s_ipsc->cCurrentModuleObject, - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + 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))); ShowContinueError(state, "SplitFlux assumed, and the simulation continues."); } } @@ -4632,16 +4649,16 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) &RefPointData::Name); // Field: Glare Calculation Daylighting Reference Point Name if (daylightControl.glareRefPtNumber == 0) { ShowSevereError(state, - format("{}: invalid {}=\"{}\" for object named: {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(6), - s_ipsc->cAlphaArgs(6), - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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, format("No {} provided for object named: {}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("No {} provided for object named: {}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "No glare calculation performed, and the simulation continues."); } @@ -4658,13 +4675,14 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) dl->maxControlRefPoints = max(dl->maxControlRefPoints, curTotalDaylRefPts); if ((NumNumber - 7) / 2 != daylightControl.TotalDaylRefPoints) { ShowSevereError(state, - format("{}The number of extensible numeric fields and alpha fields is inconsistent for: {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - 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))); + 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))); ErrorsFound = true; } @@ -4681,11 +4699,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, - format("{}: invalid {}=\"{}\" for object named: {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(6 + refPtNum), - s_ipsc->cAlphaArgs(6 + refPtNum), - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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; } @@ -4696,28 +4714,28 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) if (daylightControl.DaylightMethod == DaylightingMethod::SplitFlux) { SetupOutputVariable(state, - format("Daylighting Reference Point {} Illuminance", refPtNum), + EnergyPlus::format("Daylighting Reference Point {} Illuminance", refPtNum), Constant::Units::lux, refPt.lums[iLum_Illum], OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, daylightControl.Name); SetupOutputVariable(state, - format("Daylighting Reference Point {} Daylight Illuminance Setpoint Exceeded Time", refPtNum), + EnergyPlus::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, - format("Daylighting Reference Point {} Glare Index", refPtNum), + EnergyPlus::format("Daylighting Reference Point {} Glare Index", refPtNum), Constant::Units::None, refPt.glareIndex, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, daylightControl.Name); SetupOutputVariable(state, - format("Daylighting Reference Point {} Glare Index Setpoint Exceeded Time", refPtNum), + EnergyPlus::format("Daylighting Reference Point {} Glare Index Setpoint Exceeded Time", refPtNum), Constant::Units::hr, refPt.timeExceedingGlareIndexSetPoint, OutputProcessor::TimeStepType::Zone, @@ -4728,7 +4746,8 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) // Register Error if 0 DElight RefPts have been input for valid DElight object if (countRefPts < 1) { - ShowSevereError(state, format("No Reference Points input for {} zone ={}", s_ipsc->cCurrentModuleObject, daylightControl.ZoneName)); + ShowSevereError(state, + EnergyPlus::format("No Reference Points input for {} zone ={}", s_ipsc->cCurrentModuleObject, daylightControl.ZoneName)); ErrorsFound = true; } @@ -4741,24 +4760,24 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) if ((1.0 - sumFracs) > FractionTolerance) { ShowWarningError(state, "GetDaylightingControls: Fraction of zone or space controlled by the Daylighting reference points is < 1.0."); ShowContinueError(state, - format("..discovered in {}=\"{}\", only {:.3R} of the zone or space is controlled.", - s_ipsc->cCurrentModuleObject, - daylightControl.Name, - sumFracs)); + EnergyPlus::format("..discovered in {}=\"{}\", only {:.3R} of the zone or space is controlled.", + s_ipsc->cCurrentModuleObject, + daylightControl.Name, + sumFracs)); } else if ((sumFracs - 1.0) > FractionTolerance) { ShowSevereError(state, "GetDaylightingControls: Fraction of zone or space controlled by the Daylighting reference points is > 1.0."); ShowContinueError(state, - format("..discovered in {}=\"{}\", trying to control {:.3R} of the zone or space.", - s_ipsc->cCurrentModuleObject, - daylightControl.Name, - sumFracs)); + EnergyPlus::format("..discovered in {}=\"{}\", trying to control {:.3R} of the zone or space.", + s_ipsc->cCurrentModuleObject, + daylightControl.Name, + sumFracs)); ErrorsFound = true; } if (daylightControl.LightControlType == LtgCtrlType::Stepped && daylightControl.LightControlSteps <= 0) { ShowWarningError(state, "GetDaylightingControls: For Stepped Control, the number of steps must be > 0"); - ShowContinueError(state, - format("..discovered in \"{}\" for Zone=\"{}\", will use 1", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(2))); + ShowContinueError( + state, EnergyPlus::format("..discovered in \"{}\" for Zone=\"{}\", will use 1", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(2))); daylightControl.LightControlSteps = 1; } SetupOutputVariable(state, @@ -4856,45 +4875,45 @@ void GeometryTransformForDaylighting(EnergyPlusData &state) if (refPt.absCoords.x < zone.MinimumX || refPt.absCoords.x > zone.MaximumX) { refPt.inBounds = false; - ShowWarningError(state, - format("GeometryTransformForDaylighting: Reference point X Value outside Zone Min/Max X, Zone={}", zone.Name)); + ShowWarningError( + state, EnergyPlus::format("GeometryTransformForDaylighting: Reference point X Value outside Zone Min/Max X, Zone={}", zone.Name)); ShowContinueError(state, - format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", - refPt.absCoords.x, - zone.MinimumX, - zone.MaximumX)); - ShowContinueError( - state, - format("...X Reference Distance Outside MinimumX= {:.4R} m.", - (refPt.absCoords.x < zone.MinimumX) ? (zone.MinimumX - refPt.absCoords.x) : (refPt.absCoords.x - zone.MaximumX))); + EnergyPlus::format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", + refPt.absCoords.x, + zone.MinimumX, + zone.MaximumX)); + ShowContinueError(state, + EnergyPlus::format("...X Reference Distance Outside MinimumX= {:.4R} m.", + (refPt.absCoords.x < zone.MinimumX) ? (zone.MinimumX - refPt.absCoords.x) + : (refPt.absCoords.x - zone.MaximumX))); } if (refPt.absCoords.y < zone.MinimumY || refPt.absCoords.y > zone.MaximumY) { refPt.inBounds = false; - ShowWarningError(state, - format("GeometryTransformForDaylighting: Reference point Y Value outside Zone Min/Max Y, Zone={}", zone.Name)); + ShowWarningError( + state, EnergyPlus::format("GeometryTransformForDaylighting: Reference point Y Value outside Zone Min/Max Y, Zone={}", zone.Name)); ShowContinueError(state, - format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", - refPt.absCoords.x, - zone.MinimumY, - zone.MaximumY)); - ShowContinueError( - state, - format("...Y Reference Distance Outside MinimumY= {:.4R} m.", - (refPt.absCoords.y < zone.MinimumY) ? (zone.MinimumY - refPt.absCoords.y) : (refPt.absCoords.y - zone.MaximumY))); + EnergyPlus::format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", + refPt.absCoords.x, + zone.MinimumY, + zone.MaximumY)); + ShowContinueError(state, + EnergyPlus::format("...Y Reference Distance Outside MinimumY= {:.4R} m.", + (refPt.absCoords.y < zone.MinimumY) ? (zone.MinimumY - refPt.absCoords.y) + : (refPt.absCoords.y - zone.MaximumY))); } if (refPt.absCoords.z < zone.MinimumZ || refPt.absCoords.z > zone.MaximumZ) { refPt.inBounds = false; - ShowWarningError(state, - format("GeometryTransformForDaylighting: Reference point Z Value outside Zone Min/Max Z, Zone={}", zone.Name)); + ShowWarningError( + state, EnergyPlus::format("GeometryTransformForDaylighting: Reference point Z Value outside Zone Min/Max Z, Zone={}", zone.Name)); ShowContinueError(state, - format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", - refPt.absCoords.z, - zone.MinimumZ, - zone.MaximumZ)); - ShowContinueError( - state, - format("...Z Reference Distance Outside MinimumZ= {:.4R} m.", - (refPt.absCoords.z < zone.MinimumZ) ? (zone.MinimumZ - refPt.absCoords.z) : (refPt.absCoords.z - zone.MaximumZ))); + EnergyPlus::format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", + refPt.absCoords.z, + zone.MinimumZ, + zone.MaximumZ)); + ShowContinueError(state, + EnergyPlus::format("...Z Reference Distance Outside MinimumZ= {:.4R} m.", + (refPt.absCoords.z < zone.MinimumZ) ? (zone.MinimumZ - refPt.absCoords.z) + : (refPt.absCoords.z - zone.MaximumZ))); } } // for (refPt) } // for (daylightCtrl) @@ -4936,11 +4955,11 @@ void GetInputDayliteRefPt(EnergyPlusData &state, bool &ErrorsFound) int spaceNum = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataHeatBal->space); if (spaceNum == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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; @@ -4987,14 +5006,15 @@ void CheckTDDsAndLightShelvesInDaylitZones(EnergyPlusData &state) if (SurfNum > 0) { int const pipeEnclNum = s_surf->Surface(SurfNum).SolarEnclIndex; if (state.dataViewFactor->EnclSolInfo(pipeEnclNum).TotalEnclosureDaylRefPoints == 0) { - ShowWarningError(state, - format("DaylightingDevice:Tubular = {}: is not connected to a Zone that has Daylighting, no visible transmittance " - "will be modeled through the daylighting device.", - pipe.Name)); + 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)); } } else { // SurfNum == 0 // should not come here (would have already been caught in TDD get input), but is an error - ShowSevereError(state, format("DaylightingDevice:Tubular = {}: Diffuser surface not found ", pipe.Name)); + ShowSevereError(state, EnergyPlus::format("DaylightingDevice:Tubular = {}: Diffuser surface not found ", pipe.Name)); ErrorsFound = true; } } // for (pipe) @@ -5002,7 +5022,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, format("DaylightingDevice:Shelf = {}: window not found ", shelf.Name)); + ShowSevereError(state, EnergyPlus::format("DaylightingDevice:Shelf = {}: window not found ", shelf.Name)); ErrorsFound = true; } } // for (shelf) @@ -5033,9 +5053,9 @@ void AssociateWindowShadingControlWithDaylighting(EnergyPlusData &state) } else { ShowWarningError(state, "AssociateWindowShadingControlWithDaylighting: Daylighting object name used in WindowShadingControl not found."); ShowContinueError(state, - format("..The WindowShadingControl object=\"{}\" and references an object named: \"{}\"", - winShadeControl.Name, - winShadeControl.DaylightingControlName)); + EnergyPlus::format("..The WindowShadingControl object=\"{}\" and references an object named: \"{}\"", + winShadeControl.Name, + winShadeControl.DaylightingControlName)); } } } // AssociateWindowShadingControlWithDaylighting() @@ -5093,7 +5113,9 @@ void GetLightWellData(EnergyPlusData &state, bool &ErrorsFound) // If errors fou int SurfNum = Util::FindItemInList(s_ipsc->cAlphaArgs(1), s_surf->Surface); if (SurfNum == 0) { ShowSevereError( - state, format("{}: invalid {}=\"{}\" not found.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + state, + EnergyPlus::format( + "{}: invalid {}=\"{}\" not found.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); ErrorsFound = true; continue; } @@ -5104,10 +5126,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, - format("{}: invalid {}=\"{}\" - not an exterior window.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1))); + EnergyPlus::format("{}: invalid {}=\"{}\" - not an exterior window.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; continue; } @@ -5121,9 +5143,11 @@ 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, format("{}: invalid {}=\"{}\" - Areas.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("has Area of Bottom of Well={:.1R} that is less than window area={:.1R}", surf.Area, AreaWell)); + ShowSevereError(state, + EnergyPlus::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)); } if (HeightWell >= 0.0 && PerimWell > 0.0 && AreaWell > 0.0) { @@ -9160,7 +9184,7 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) dl->SavedMnDy(MapNum) = state.dataEnvrn->CurMnDyHr.substr(0, 5); - illumMap.Name = format("{} at {:.2R}m", illumMap.Name, illumMap.Z); + illumMap.Name = EnergyPlus::format("{} at {:.2R}m", illumMap.Name, illumMap.Z); } if (dl->SavedMnDy(MapNum) != state.dataEnvrn->CurMnDyHr.substr(0, 5)) { dl->EnvrnPrint(MapNum) = true; @@ -9177,7 +9201,8 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) for (int R = 1; R <= thisDayltgCtrl.TotalDaylRefPoints; ++R) { ++rCount; auto const &refPt = thisDayltgCtrl.refPts(R); - illumMap.pointsHeader += format(" RefPt{}=({:.2R}:{:.2R}:{:.2R}),", rCount, refPt.absCoords.x, refPt.absCoords.y, refPt.absCoords.z); + illumMap.pointsHeader += + EnergyPlus::format(" RefPt{}=({:.2R}:{:.2R}:{:.2R}),", rCount, refPt.absCoords.x, refPt.absCoords.y, refPt.absCoords.z); } } @@ -9196,14 +9221,14 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) int linelen = 0; // Write X scale column header - std::string mapLine = format(" {} {:02}:00", dl->SavedMnDy(MapNum), state.dataGlobal->HourOfDay); + std::string mapLine = EnergyPlus::format(" {} {:02}:00", dl->SavedMnDy(MapNum), state.dataGlobal->HourOfDay); if (illumMap.HeaderXLineLengthNeeded) { linelen = int(len(mapLine)); } int RefPt = 1; for (int X = 1; X <= illumMap.Xnum; ++X) { const std::string AddXorYString = - format("{}({:.2R};{:.2R})=", dl->MapColSep, illumMap.refPts(RefPt).absCoords.x, illumMap.refPts(RefPt).absCoords.y); + EnergyPlus::format("{}({:.2R};{:.2R})=", dl->MapColSep, illumMap.refPts(RefPt).absCoords.x, illumMap.refPts(RefPt).absCoords.y); if (illumMap.HeaderXLineLengthNeeded) { linelen += int(len(AddXorYString)); } @@ -9214,11 +9239,13 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) if (illumMap.HeaderXLineLengthNeeded) { illumMap.HeaderXLineLength = linelen; if (static_cast(illumMap.HeaderXLineLength) > len(mapLine)) { - ShowWarningError(state, - format("ReportIllumMap: Map=\"{}\" -- the X Header overflows buffer -- will be truncated at {} characters.", - illumMap.Name, - int(len(mapLine)))); - ShowContinueError(state, format("...needed {} characters. Please contact EnergyPlus support.", illumMap.HeaderXLineLength)); + 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)); } illumMap.HeaderXLineLengthNeeded = false; } @@ -9228,7 +9255,7 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) // Write Y scale prefix and illuminance values RefPt = 1; for (int Y = 1; Y <= illumMap.Ynum; ++Y) { - mapLine = format("({:.2R};{:.2R})=", illumMap.refPts(RefPt).absCoords.x, illumMap.refPts(RefPt).absCoords.y); + mapLine = EnergyPlus::format("({:.2R};{:.2R})=", illumMap.refPts(RefPt).absCoords.x, illumMap.refPts(RefPt).absCoords.y); for (int R = RefPt; R <= RefPt + illumMap.Xnum - 1; ++R) { int IllumOut = nint(illumMap.refPts(R).lumsHr[iLum_Illum]); std::string String = fmt::to_string(IllumOut); @@ -9318,7 +9345,7 @@ void CloseReportIllumMaps(EnergyPlusData &state) const std::vector mapLines = illumMap.mapFile->getLines(); if (mapLines.empty()) { - ShowSevereError(state, format("CloseReportIllumMaps: IllumMap=\"{}\" is empty.", illumMap.Name)); + ShowSevereError(state, EnergyPlus::format("CloseReportIllumMaps: IllumMap=\"{}\" is empty.", illumMap.Name)); break; } for (const std::string &mapLine : mapLines) { @@ -9836,14 +9863,14 @@ void MapShadeDeploymentOrderToLoopNumber(EnergyPlusData &state, int const enclNu ++count; if (count > thisEnclDaylight.NumOfDayltgExtWins) { if (showOnce) { - ShowWarningError( - state, - format("MapShadeDeploymentOrderToLoopNumber: too many controlled shaded windows in enclosure {}", thisEnclSol.Name)); + ShowWarningError(state, + EnergyPlus::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, format(" - {}", s_surf->Surface(IWinShdOrd).Name)); + ShowContinueError(state, EnergyPlus::format(" - {}", s_surf->Surface(IWinShdOrd).Name)); } for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { int IWinLoop = thisEnclDaylight.DayltgExtWinSurfNums(loop); @@ -10058,7 +10085,8 @@ void CheckForGeometricTransform(EnergyPlusData &state, bool &doTransform, Real64 NewAspectRatio = rNumerics(2); std::string transformPlane = cAlphas(1); if (transformPlane != "XY") { - ShowWarningError(state, format("{}: invalid {}=\"{}...ignored.", CurrentModuleObject, s_ipsc->cAlphaFieldNames(1), cAlphas(1))); + ShowWarningError(state, + EnergyPlus::format("{}: invalid {}=\"{}...ignored.", CurrentModuleObject, s_ipsc->cAlphaFieldNames(1), cAlphas(1))); } doTransform = true; s_surf->AspectTransform = true; diff --git a/src/EnergyPlus/DemandManager.cc b/src/EnergyPlus/DemandManager.cc index 6747664ce4f..23b4d29d2ff 100644 --- a/src/EnergyPlus/DemandManager.cc +++ b/src/EnergyPlus/DemandManager.cc @@ -352,19 +352,19 @@ void GetDemandManagerListInput(EnergyPlusData &state) thisDemandMgrList.Meter = GetMeterIndex(state, s_ipsc->cAlphaArgs(2)); if (thisDemandMgrList.Meter == -1) { - ShowSevereError(state, format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, thisDemandMgrList.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, thisDemandMgrList.Name)); ErrorsFound = true; } else if ((state.dataOutputProcessor->meters[thisDemandMgrList.Meter]->resource == Constant::eResource::Electricity) || (state.dataOutputProcessor->meters[thisDemandMgrList.Meter]->resource == Constant::eResource::ElectricityNet)) { } else { ShowSevereError(state, - format("{} = \"{}\" invalid value {} = \"{}\".", - cCurrentModuleObject, - thisDemandMgrList.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{} = \"{}\" invalid value {} = \"{}\".", + cCurrentModuleObject, + thisDemandMgrList.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "Only Electricity and ElectricityNet meters are currently allowed."); ErrorsFound = true; } @@ -418,20 +418,20 @@ void GetDemandManagerListInput(EnergyPlusData &state) thisManager = Util::FindItemInList(s_ipsc->cAlphaArgs(MgrNum * 2 + 6), state.dataDemandManager->DemandMgr); if (thisManager == 0) { ShowSevereError(state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", - cCurrentModuleObject, - thisDemandMgrList.Name, - s_ipsc->cAlphaFieldNames(MgrNum * 2 + 6), - s_ipsc->cAlphaArgs(MgrNum * 2 + 6))); + EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\" not found.", + cCurrentModuleObject, + thisDemandMgrList.Name, + s_ipsc->cAlphaFieldNames(MgrNum * 2 + 6), + s_ipsc->cAlphaArgs(MgrNum * 2 + 6))); ErrorsFound = true; } } else { ShowSevereError(state, - format("{} = \"{}\" invalid value {} = \"{}\".", - cCurrentModuleObject, - thisDemandMgrList.Name, - s_ipsc->cAlphaFieldNames(MgrNum * 2 + 5), - s_ipsc->cAlphaArgs(MgrNum * 2 + 5))); + EnergyPlus::format("{} = \"{}\" invalid value {} = \"{}\".", + cCurrentModuleObject, + thisDemandMgrList.Name, + s_ipsc->cAlphaFieldNames(MgrNum * 2 + 5), + s_ipsc->cAlphaArgs(MgrNum * 2 + 5))); ErrorsFound = true; } @@ -498,7 +498,7 @@ void GetDemandManagerListInput(EnergyPlusData &state) thisDemandMgrList.Name); if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}.", cCurrentModuleObject)); } } // ListNum @@ -677,16 +677,17 @@ void GetDemandManagerInput(EnergyPlusData &state) } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - CurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(LoadNum + 4), - AlphArray(LoadNum + 4))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + CurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(LoadNum + 4), + AlphArray(LoadNum + 4))); ErrorsFound = true; } } // LoadNum } else { - ShowSevereError(state, format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Number of loads is calculated to be less than one. Demand manager must have at least one load assigned."); ErrorsFound = true; } @@ -763,11 +764,11 @@ void GetDemandManagerInput(EnergyPlusData &state) ++demandMgr.NumOfLoads; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - CurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(LoadNum + 4), - AlphArray(LoadNum + 4))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + CurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(LoadNum + 4), + AlphArray(LoadNum + 4))); ErrorsFound = true; } } @@ -794,7 +795,8 @@ void GetDemandManagerInput(EnergyPlusData &state) } } // LoadNum } else { - ShowSevereError(state, format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Number of loads is calculated to be less than one. Demand manager must have at least one load assigned."); ErrorsFound = true; } @@ -872,11 +874,11 @@ void GetDemandManagerInput(EnergyPlusData &state) ++demandMgr.NumOfLoads; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - CurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(LoadNum + 4), - AlphArray(LoadNum + 4))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + CurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(LoadNum + 4), + AlphArray(LoadNum + 4))); ErrorsFound = true; } } @@ -903,7 +905,8 @@ void GetDemandManagerInput(EnergyPlusData &state) } } // LoadNum } else { - ShowSevereError(state, format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Number of loads is calculated to be less than one. Demand manager must have at least one load assigned."); ErrorsFound = true; } @@ -961,11 +964,13 @@ void GetDemandManagerInput(EnergyPlusData &state) demandMgr.UpperLimit = NumArray(3); if (demandMgr.LowerLimit > demandMgr.UpperLimit) { - ShowSevereError(state, format("Invalid input for {} = {}", CurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid input for {} = {}", CurrentModuleObject, AlphArray(1))); ShowContinueError( state, - format("{} [{:.2R}] > {} [{:.2R}]", s_ipsc->cNumericFieldNames(2), NumArray(2), s_ipsc->cNumericFieldNames(3), NumArray(3))); - ShowContinueError(state, format("{} cannot be greater than {}", s_ipsc->cNumericFieldNames(2), s_ipsc->cNumericFieldNames(3))); + EnergyPlus::format( + "{} [{:.2R}] > {} [{:.2R}]", s_ipsc->cNumericFieldNames(2), NumArray(2), s_ipsc->cNumericFieldNames(3), NumArray(3))); + ShowContinueError(state, + EnergyPlus::format("{} cannot be greater than {}", s_ipsc->cNumericFieldNames(2), s_ipsc->cNumericFieldNames(3))); ErrorsFound = true; } @@ -991,11 +996,11 @@ void GetDemandManagerInput(EnergyPlusData &state) ++demandMgr.NumOfLoads; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - CurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(LoadNum + 4), - AlphArray(LoadNum + 4))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + CurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(LoadNum + 4), + AlphArray(LoadNum + 4))); ErrorsFound = true; } } @@ -1020,7 +1025,8 @@ void GetDemandManagerInput(EnergyPlusData &state) } } // LoadNum } else { - ShowSevereError(state, format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Number of loads is calculated to be less than one. Demand manager must have at least one load assigned."); ErrorsFound = true; } @@ -1095,11 +1101,11 @@ void GetDemandManagerInput(EnergyPlusData &state) ++demandMgr.NumOfLoads; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - CurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(LoadNum + AlphaShift), - AlphArray(LoadNum + AlphaShift))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + CurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(LoadNum + AlphaShift), + AlphArray(LoadNum + AlphaShift))); ErrorsFound = true; } } @@ -1113,7 +1119,8 @@ void GetDemandManagerInput(EnergyPlusData &state) } } } else { - ShowSevereError(state, format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid value for number of loads.", CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Number of loads is calculated to be less than one. Demand manager must have at least one load assigned."); ErrorsFound = true; } diff --git a/src/EnergyPlus/DesiccantDehumidifiers.cc b/src/EnergyPlus/DesiccantDehumidifiers.cc index c28a774770b..f3da35a89cd 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.cc +++ b/src/EnergyPlus/DesiccantDehumidifiers.cc @@ -151,24 +151,25 @@ namespace DesiccantDehumidifiers { if (CompIndex == 0) { DesicDehumNum = Util::FindItemInList(CompName, state.dataDesiccantDehumidifiers->DesicDehum); if (DesicDehumNum == 0) { - ShowFatalError(state, format("SimDesiccantDehumidifier: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimDesiccantDehumidifier: Unit not found={}", CompName)); } CompIndex = DesicDehumNum; } else { DesicDehumNum = CompIndex; if (DesicDehumNum > state.dataDesiccantDehumidifiers->NumDesicDehums || DesicDehumNum < 1) { ShowFatalError(state, - format("SimDesiccantDehumidifier: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - DesicDehumNum, - state.dataDesiccantDehumidifiers->NumDesicDehums, - CompName)); + EnergyPlus::format("SimDesiccantDehumidifier: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + DesicDehumNum, + state.dataDesiccantDehumidifiers->NumDesicDehums, + CompName)); } if (CompName != state.dataDesiccantDehumidifiers->DesicDehum(DesicDehumNum).Name) { - ShowFatalError(state, - format("SimDesiccantDehumidifier: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - DesicDehumNum, - CompName, - state.dataDesiccantDehumidifiers->DesicDehum(DesicDehumNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimDesiccantDehumidifier: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + DesicDehumNum, + CompName, + state.dataDesiccantDehumidifiers->DesicDehum(DesicDehumNum).Name)); } } @@ -185,8 +186,9 @@ namespace DesiccantDehumidifiers { CalcGenericDesiccantDehumidifier(state, DesicDehumNum, HumRatNeeded, FirstHVACIteration); } break; default: { - ShowFatalError(state, - format("Invalid type, Desiccant Dehumidifer={}", state.dataDesiccantDehumidifiers->DesicDehum(DesicDehumNum).DehumType)); + ShowFatalError( + state, + EnergyPlus::format("Invalid type, Desiccant Dehumidifer={}", state.dataDesiccantDehumidifiers->DesicDehum(DesicDehumNum).DehumType)); } break; } @@ -351,8 +353,8 @@ namespace DesiccantDehumidifiers { DataLoopNode::ObjectIsParent); if (Util::SameString(Alphas(7), "LEAVING HUMRAT:BYPASS")) { - ShowWarningError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, desicDehum.Name)); - ShowContinueError(state, format("Obsolete {} = {}", cAlphaFields(7), Alphas(7))); + ShowWarningError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Obsolete {} = {}", cAlphaFields(7), Alphas(7))); ShowContinueError(state, "setting to LeavingMaximumHumidityRatioSetpoint"); desicDehum.controlType = DesicDehumCtrlType::FixedHumratBypass; } @@ -363,8 +365,8 @@ namespace DesiccantDehumidifiers { desicDehum.controlType = DesicDehumCtrlType::NodeHumratBypass; } if (desicDehum.controlType == DesicDehumCtrlType::Invalid) { - ShowWarningError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, desicDehum.Name)); - ShowContinueError(state, format("Invalid {} = {}", cAlphaFields(7), Alphas(7))); + ShowWarningError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(7), Alphas(7))); ShowContinueError(state, "setting to LeavingMaximumHumidityRatioSetpoint"); desicDehum.controlType = DesicDehumCtrlType::FixedHumratBypass; } @@ -402,14 +404,15 @@ namespace DesiccantDehumidifiers { desicDehum.RegenCoilType_Num = HVAC::Coil_HeatingWater; ValidateComponent(state, RegenCoilType, RegenCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("{}{} illegal {} = {}", RoutineName, CurrentModuleObject, cAlphaFields(9), RegenCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowSevereError(state, + EnergyPlus::format("{}{} illegal {} = {}", RoutineName, CurrentModuleObject, cAlphaFields(9), RegenCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -417,7 +420,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -425,7 +428,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.MaxCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -434,7 +437,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); desicDehum.RegenCoilInletNode = RegenCoilAirInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -443,7 +446,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); desicDehum.RegenCoilOutletNode = RegenCoilAirOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } } @@ -451,15 +454,16 @@ namespace DesiccantDehumidifiers { desicDehum.RegenCoilType_Num = HVAC::Coil_HeatingSteam; ValidateComponent(state, Alphas(8), RegenCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from the regeneration heating coil object errFlag = false; desicDehum.RegenCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", RegenCoilName, errFlag); if (desicDehum.RegenCoilIndex == 0) { - ShowSevereError(state, format("{}{} illegal {} = {}", RoutineName, CurrentModuleObject, cAlphaFields(9), RegenCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowSevereError(state, + EnergyPlus::format("{}{} illegal {} = {}", RoutineName, CurrentModuleObject, cAlphaFields(9), RegenCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -467,7 +471,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.CoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -483,7 +487,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirInletNode = SteamCoils::GetCoilAirInletNode(state, desicDehum.RegenCoilIndex, RegenCoilName, errFlag); desicDehum.RegenCoilInletNode = RegenCoilAirInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -492,13 +496,13 @@ namespace DesiccantDehumidifiers { int RegenCoilAirOutletNode = SteamCoils::GetCoilAirOutletNode(state, desicDehum.RegenCoilIndex, RegenCoilName, errFlag); desicDehum.RegenCoilOutletNode = RegenCoilAirOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(8), desicDehum.RegenCoilType)); + ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(8), desicDehum.RegenCoilType)); ErrorsFound = true; } @@ -517,46 +521,46 @@ namespace DesiccantDehumidifiers { desicDehum.PerformanceModel_Num = PerformanceModel::UserCurves; desicDehum.ProcDryBulbCurvefTW = Curve::GetCurveIndex(state, Alphas(13)); if (desicDehum.ProcDryBulbCurvefTW == 0) { - ShowSevereError(state, format("{}Curve object={} not found.", RoutineName, Alphas(13))); + ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(13))); ErrorsFound2 = true; } desicDehum.ProcDryBulbCurvefV = Curve::GetCurveIndex(state, Alphas(14)); if (desicDehum.ProcDryBulbCurvefV == 0) { - ShowSevereError(state, format("{}Curve object={} not found.", RoutineName, Alphas(14))); + ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(14))); ErrorsFound2 = true; } desicDehum.ProcHumRatCurvefTW = Curve::GetCurveIndex(state, Alphas(15)); if (desicDehum.ProcHumRatCurvefTW == 0) { - ShowSevereError(state, format("{}Curve object={} not found.", RoutineName, Alphas(15))); + ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(15))); ErrorsFound2 = true; } desicDehum.ProcHumRatCurvefV = Curve::GetCurveIndex(state, Alphas(16)); if (desicDehum.ProcHumRatCurvefV == 0) { - ShowSevereError(state, format("{}Curve object={} not found.", RoutineName, Alphas(16))); + ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(16))); ErrorsFound2 = true; } desicDehum.RegenEnergyCurvefTW = Curve::GetCurveIndex(state, Alphas(17)); if (desicDehum.RegenEnergyCurvefTW == 0) { - ShowSevereError(state, format("{}Curve object={} not found.", RoutineName, Alphas(17))); + ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(17))); ErrorsFound2 = true; } desicDehum.RegenEnergyCurvefV = Curve::GetCurveIndex(state, Alphas(18)); if (desicDehum.RegenEnergyCurvefV == 0) { - ShowSevereError(state, format("{}Curve object={} not found.", RoutineName, Alphas(18))); + ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(18))); ErrorsFound2 = true; } desicDehum.RegenVelCurvefTW = Curve::GetCurveIndex(state, Alphas(19)); if (desicDehum.RegenVelCurvefTW == 0) { - ShowSevereError(state, format("{}Curve object={} not found.", RoutineName, Alphas(19))); + ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(19))); ErrorsFound2 = true; } desicDehum.RegenVelCurvefV = Curve::GetCurveIndex(state, Alphas(20)); if (desicDehum.RegenVelCurvefV == 0) { - ShowSevereError(state, format("{}Curve object={} not found.", RoutineName, Alphas(20))); + ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(20))); ErrorsFound2 = true; } if (ErrorsFound2) { - ShowSevereError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Errors found in getting performance curves."); ErrorsFound = true; } @@ -574,8 +578,8 @@ namespace DesiccantDehumidifiers { ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } } else { @@ -589,17 +593,19 @@ 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, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::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, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} > 4.064 m/s.; Value in input={:.3R}", cNumericFields(3), desicDehum.NomProcAirVel)); + ShowWarningError(state, EnergyPlus::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, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} < 2.032 m/s.; Value in input={:.3R}", cNumericFields(3), desicDehum.NomProcAirVel)); + ShowWarningError(state, EnergyPlus::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)."); } // Validate regen fan type, for default curves, can only variable volume @@ -613,8 +619,8 @@ namespace DesiccantDehumidifiers { ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); ShowContinueError(state, "For DEFAULT performance model, the regen fan type must be Fan:VariableVolume"); ErrorsFound = true; } @@ -665,7 +671,7 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = false; ValidateComponent(state, desicDehum.DehumType, desicDehum.Name, ErrorsFound2, desicDehum.DehumType + " = \"" + desicDehum.Name + "\""); if (ErrorsFound2) { - ShowSevereError(state, format("{} \"{}\" is not unique", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\" is not unique", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -681,8 +687,8 @@ namespace DesiccantDehumidifiers { desicDehum.HXName = Alphas(4); if (!Util::SameString(desicDehum.HXType, "HeatExchanger:Desiccant:BalancedFlow")) { - ShowWarningError(state, format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("Invalid {} = {}", cAlphaFields(3), desicDehum.HXType)); + ShowWarningError(state, EnergyPlus::format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(3), desicDehum.HXType)); ErrorsFoundGeneric = true; } else { desicDehum.HXTypeNum = BalancedHX; @@ -697,7 +703,7 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = false; desicDehum.HXProcInNode = HeatRecovery::GetSecondaryInletNode(state, desicDehum.HXName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -716,7 +722,7 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = false; desicDehum.HXProcOutNode = HeatRecovery::GetSecondaryOutletNode(state, desicDehum.HXName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -737,14 +743,14 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = false; desicDehum.HXRegenInNode = HeatRecovery::GetSupplyInletNode(state, desicDehum.HXName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } ErrorsFound2 = false; desicDehum.HXRegenOutNode = HeatRecovery::GetSupplyOutletNode(state, desicDehum.HXName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -759,8 +765,8 @@ namespace DesiccantDehumidifiers { DataLoopNode::ObjectIsNotParent); if (desicDehum.ControlNodeNum == 0) { - ShowSevereError(state, format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("{} must be specified.", cAlphaFields(5))); + ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("{} must be specified.", cAlphaFields(5))); ErrorsFoundGeneric = true; } @@ -781,8 +787,8 @@ namespace DesiccantDehumidifiers { ErrorsFoundGeneric = true; } } else { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(6), HVAC::fanTypeNamesUC[(int)desicDehum.regenFanType])); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(6), HVAC::fanTypeNamesUC[(int)desicDehum.regenFanType])); ErrorsFoundGeneric = true; } @@ -826,48 +832,50 @@ namespace DesiccantDehumidifiers { } if (desicDehum.RegenSetPointTemp <= 0.0) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("{} must be greater than 0.", cNumericFields(1))); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", cNumericFields(1))); ErrorsFoundGeneric = true; } ErrorsFound2 = false; desicDehum.RegenCoilInletNode = HeatingCoils::GetCoilInletNode(state, RegenCoilType, RegenCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } ErrorsFound2 = false; desicDehum.RegenCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, RegenCoilType, RegenCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } ErrorsFound2 = false; HeatingCoils::GetCoilIndex(state, RegenCoilName, desicDehum.RegenCoilIndex, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } ErrorsFound2 = false; RegenCoilControlNodeNum = HeatingCoils::GetCoilControlNodeNum(state, RegenCoilType, RegenCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } if (RegenCoilControlNodeNum > 0) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, - 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, format("...{} = {}", cAlphaFields(9), desicDehum.RegenCoilType)); - ShowContinueError(state, format("...{} = {}", cAlphaFields(10), desicDehum.RegenCoilName)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( - state, format("...heating coil temperature setpoint node = {}", state.dataLoopNodes->NodeID(RegenCoilControlNodeNum))); + 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), desicDehum.RegenCoilType)); + ShowContinueError(state, EnergyPlus::format("...{} = {}", cAlphaFields(10), desicDehum.RegenCoilName)); + ShowContinueError(state, + EnergyPlus::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 +883,7 @@ namespace DesiccantDehumidifiers { RegairHeatingCoilFlag = true; HeatingCoils::SetHeatingCoilData(state, desicDehum.RegenCoilIndex, ErrorsFound2, RegairHeatingCoilFlag, DesicDehumNum); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -883,20 +891,20 @@ namespace DesiccantDehumidifiers { desicDehum.RegenCoilType_Num = HVAC::Coil_HeatingWater; ValidateComponent(state, RegenCoilType, RegenCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(9), RegenCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(9), RegenCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } if (desicDehum.RegenSetPointTemp <= 0.0) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("{} must be greater than 0.", cNumericFields(1))); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", cNumericFields(1))); ErrorsFoundGeneric = true; } @@ -904,7 +912,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -912,7 +920,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.MaxCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -921,7 +929,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); desicDehum.RegenCoilInletNode = RegenCoilAirInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -930,14 +938,14 @@ namespace DesiccantDehumidifiers { int RegenCoilAirOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); desicDehum.RegenCoilOutletNode = RegenCoilAirOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } RegairHeatingCoilFlag = true; WaterCoils::SetWaterCoilData(state, desicDehum.RegenCoilIndex, ErrorsFound2, RegairHeatingCoilFlag, DesicDehumNum); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } } @@ -945,20 +953,20 @@ namespace DesiccantDehumidifiers { desicDehum.RegenCoilType_Num = HVAC::Coil_HeatingSteam; ValidateComponent(state, RegenCoilType, RegenCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from the regeneration heating coil object if (desicDehum.RegenSetPointTemp <= 0.0) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("{} must be greater than 0.", cNumericFields(1))); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::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, format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(9), RegenCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(9), RegenCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -966,7 +974,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.CoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -982,7 +990,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirInletNode = SteamCoils::GetCoilAirInletNode(state, desicDehum.RegenCoilIndex, RegenCoilName, errFlag); desicDehum.RegenCoilInletNode = RegenCoilAirInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -991,7 +999,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirOutletNode = SteamCoils::GetCoilAirOutletNode(state, desicDehum.RegenCoilIndex, RegenCoilName, errFlag); desicDehum.RegenCoilOutletNode = RegenCoilAirOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } } @@ -1000,19 +1008,21 @@ namespace DesiccantDehumidifiers { RegenCoilControlNodeNum = SteamCoils::GetSteamCoilControlNodeNum(state, RegenCoilType, RegenCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } if (RegenCoilControlNodeNum > 0) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, - 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, format("...{} = {}", cAlphaFields(9), desicDehum.RegenCoilType)); - ShowContinueError(state, format("...{} = {}", cAlphaFields(10), desicDehum.RegenCoilName)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( - state, format("...heating coil temperature setpoint node = {}", state.dataLoopNodes->NodeID(RegenCoilControlNodeNum))); + 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), desicDehum.RegenCoilType)); + ShowContinueError(state, EnergyPlus::format("...{} = {}", cAlphaFields(10), desicDehum.RegenCoilName)); + ShowContinueError(state, + EnergyPlus::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; } @@ -1020,13 +1030,13 @@ namespace DesiccantDehumidifiers { RegairHeatingCoilFlag = true; SteamCoils::SetSteamCoilData(state, desicDehum.RegenCoilIndex, ErrorsFound2, RegairHeatingCoilFlag, DesicDehumNum); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } } else { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(9), desicDehum.RegenCoilType)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(9), desicDehum.RegenCoilType)); ErrorsFoundGeneric = true; } } @@ -1087,32 +1097,37 @@ namespace DesiccantDehumidifiers { DataLoopNode::ObjectIsParent); if (!lAlphaBlanks(10)) { if (desicDehum.RegenFanOutNode != desicDehum.RegenCoilInletNode) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Regen fan outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanOutNode))); - ShowContinueError(state, - format("...Regen heater inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilInletNode))); + 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))); ErrorsFoundGeneric = true; } if (desicDehum.RegenCoilOutletNode != desicDehum.HXRegenInNode) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::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, - format("...Regen heater outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilOutletNode))); - ShowContinueError(state, format("...HX regen inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); + 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))); ErrorsFoundGeneric = true; } } else { if (desicDehum.RegenFanOutNode != desicDehum.HXRegenInNode) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Regen fan outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanOutNode))); - ShowContinueError(state, format("...Desiccant HX inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); + 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))); ErrorsFoundGeneric = true; } } @@ -1137,13 +1152,15 @@ namespace DesiccantDehumidifiers { NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsParent); if (desicDehum.RegenCoilOutletNode != desicDehum.HXRegenInNode) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::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, - format("...Regen heater outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilOutletNode))); - ShowContinueError(state, format("...HX regen inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); + 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))); ErrorsFoundGeneric = true; } } else { @@ -1158,12 +1175,14 @@ namespace DesiccantDehumidifiers { DataLoopNode::ObjectIsParent); } if (desicDehum.RegenFanInNode != desicDehum.HXRegenOutNode) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Regen fan inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanInNode))); - ShowContinueError(state, format("...HX regen outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenOutNode))); + 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))); ErrorsFoundGeneric = true; } } @@ -1194,8 +1213,8 @@ namespace DesiccantDehumidifiers { } } else { - ShowSevereError(state, format("{}={}", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); + ShowSevereError(state, EnergyPlus::format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); ErrorsFoundGeneric = true; } @@ -1207,13 +1226,13 @@ namespace DesiccantDehumidifiers { desicDehum.CompanionCoilCapacity = DXCoils::GetCoilCapacity(state, desicDehum.CoolingCoilType, desicDehum.CoolingCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } ErrorsFound2 = false; DXCoils::GetDXCoilIndex(state, desicDehum.CoolingCoilName, desicDehum.DXCoilIndex, ErrorsFound2, desicDehum.CoolingCoilType); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } } else if (desicDehum.coolingCoil_TypeNum == HVAC::Coil_CoolingAirToAirVariableSpeed) { ErrorsFound2 = false; @@ -1223,13 +1242,13 @@ namespace DesiccantDehumidifiers { desicDehum.CompanionCoilCapacity = VariableSpeedCoils::GetCoilCapacityVariableSpeed(state, desicDehum.CoolingCoilType, desicDehum.CoolingCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } ErrorsFound2 = false; desicDehum.DXCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, desicDehum.CoolingCoilType, desicDehum.CoolingCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } } @@ -1242,8 +1261,8 @@ namespace DesiccantDehumidifiers { } else if (Util::SameString(Alphas(13), "No")) { desicDehum.CoilUpstreamOfProcessSide = Selection::No; } else { - ShowWarningError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("Invalid choice for {} = {}", cAlphaFields(13), Alphas(13))); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid choice for {} = {}", cAlphaFields(13), Alphas(13))); ShowContinueError(state, "...resetting to the default value of No"); desicDehum.CoilUpstreamOfProcessSide = Selection::No; } @@ -1255,8 +1274,8 @@ namespace DesiccantDehumidifiers { } else if (lAlphaBlanks(14)) { desicDehum.Preheat = Selection::No; } else { - ShowWarningError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("Invalid choice for {} = {}", cAlphaFields(14), Alphas(14))); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid choice for {} = {}", cAlphaFields(14), Alphas(14))); ShowContinueError(state, "...resetting to the default value of NO"); desicDehum.Preheat = Selection::No; } @@ -1268,19 +1287,20 @@ namespace DesiccantDehumidifiers { DesuperHeaterIndex = HeatingCoils::GetHeatReclaimSourceIndex(state, desicDehum.CoolingCoilType, desicDehum.CoolingCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } if (DesuperHeaterIndex > 0) { - ShowWarningError(state, format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowWarningError(state, EnergyPlus::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, - format("A Coil:Heating:Desuperheater object was found using waste heat from the {} \"{}\" object.", - desicDehum.CoolingCoilType, - desicDehum.CoolingCoilName)); + ShowContinueError( + state, + EnergyPlus::format("A Coil:Heating:Desuperheater object was found using waste heat from the {} \"{}\" object.", + desicDehum.CoolingCoilType, + desicDehum.CoolingCoilName)); // ErrorsFoundGeneric = .TRUE. } } @@ -1306,24 +1326,28 @@ namespace DesiccantDehumidifiers { DataLoopNode::ObjectIsNotParent); OutAirNodeManager::CheckAndAddAirNodeNumber(state, desicDehum.CondenserInletNode, OANodeError); if (!OANodeError) { - ShowWarningError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, - format("The {} input is specified as Yes and a condenser air inlet node name was not specified for the " - "companion cooling coil.", - cAlphaFields(14))); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( - state, format("Adding condenser inlet air node for {} \"{}\"", desicDehum.CoolingCoilType, desicDehum.CoolingCoilName)); + 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)); ShowContinueError( - state, format("...condenser inlet air node name = {}", state.dataLoopNodes->NodeID(desicDehum.CondenserInletNode))); + state, + EnergyPlus::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, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError( - state, - format("The regeneration air inlet node must be specified as an outdoor air node when {} is specified as Yes.", - cAlphaFields(14))); + 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))); ErrorsFoundGeneric = true; } } @@ -1334,11 +1358,12 @@ namespace DesiccantDehumidifiers { } if (desicDehum.DXCoilIndex == 0 && desicDehum.Preheat == Selection::Yes) { - ShowWarningError(state, format("{}={}", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError( - state, format("A valid {} must be used when condenser waste heat is reclaimed for desiccant regeneration.", cAlphaFields(12))); - ShowContinueError(state, format("... {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); - ShowContinueError(state, format("... {} = {}", cAlphaFields(12), desicDehum.CoolingCoilName)); + 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)); ErrorsFoundGeneric = true; } @@ -1353,50 +1378,56 @@ namespace DesiccantDehumidifiers { CoilBypassedFlowFrac = 0.0; // bypass flow fraction not in VS coil model } if (ErrorsFound2) { - ShowContinueError(state, format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } if (CoilBypassedFlowFrac > 0.0) { - ShowWarningError(state, format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowWarningError(state, EnergyPlus::format("{}={}", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, - 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, - 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, format("... {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); - ShowContinueError(state, format("... {} = {}", cAlphaFields(12), desicDehum.CoolingCoilName)); + 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)); ErrorsFoundGeneric = true; } } else if (desicDehum.DXCoilIndex == 0 && desicDehum.CoilUpstreamOfProcessSide == Selection::Yes) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("A valid companion coil must be specified when {} is specified as Yes.", cAlphaFields(13))); + 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))); ErrorsFoundGeneric = true; } if (!desicDehum.RegenInletIsOutsideAirNode && desicDehum.Preheat == Selection::Yes) { - ShowWarningError(state, format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowWarningError(state, EnergyPlus::format("{}={}", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, - format("The desiccant dehumidifier regeneration air inlet must be specified as an outdoor air node when {} is specified as Yes.", - cAlphaFields(14))); + EnergyPlus::format( + "The desiccant dehumidifier regeneration air inlet must be specified as an outdoor air node when {} is specified as Yes.", + cAlphaFields(14))); ShowContinueError(state, - format("... desiccant dehumidifier regeneration air inlet node name = {}", - state.dataLoopNodes->NodeID(desicDehum.RegenAirInNode))); + EnergyPlus::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, format("For {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::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, - format("For companion cooling coil = {} \"{}\"", desicDehum.CoolingCoilType, desicDehum.CoolingCoilName)); + 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)); ShowContinueError( - state, format("The outlet node name in cooling coil = {}", state.dataLoopNodes->NodeID(desicDehum.CoolingCoilOutletNode))); - ShowContinueError(state, format("For desiccant heat exchanger = {} \"{}\"", desicDehum.HXType, desicDehum.HXName)); - ShowContinueError(state, format("The process air inlet node name = {}", state.dataLoopNodes->NodeID(desicDehum.ProcAirInNode))); + state, EnergyPlus::format("The process air inlet node name = {}", state.dataLoopNodes->NodeID(desicDehum.ProcAirInNode))); ShowFatalError(state, "...previous error causes program termination."); } } @@ -1425,15 +1456,17 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = true; } if (ErrorsFound2) { - ShowSevereError(state, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( - state, format("{} and {} must be defined if {} field is \"Yes\".", cNumericFields(2), cNumericFields(3), cAlphaFields(14))); + state, + EnergyPlus::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, format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("{} should be 0 if {} field is \"No\".", cNumericFields(2), cAlphaFields(14))); - ShowContinueError(state, format("...{} will not be used and is reset to 0.", cNumericFields(2))); + 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))); desicDehum.ExhaustFanMaxVolFlowRate = 0.0; } } @@ -1704,8 +1737,8 @@ namespace DesiccantDehumidifiers { if (state.dataLoopNodes->Node(ControlNode).HumRatMax == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, "Missing humidity ratio setpoint (HumRatMax) for "); - ShowContinueError(state, format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); - ShowContinueError(state, format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); + ShowContinueError(state, EnergyPlus::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); + ShowContinueError(state, EnergyPlus::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 { @@ -1713,8 +1746,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, format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); - ShowContinueError(state, format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); + ShowContinueError(state, EnergyPlus::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); + ShowContinueError(state, EnergyPlus::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."); } @@ -1800,8 +1833,8 @@ namespace DesiccantDehumidifiers { if (state.dataLoopNodes->Node(ControlNode).HumRatMax == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, "Missing maximum humidity ratio setpoint (MaxHumRat) for "); - ShowContinueError(state, format("{}: {}", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); + ShowContinueError(state, EnergyPlus::format("{}: {}", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::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 { @@ -1809,8 +1842,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, format("{}: {}", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); + ShowContinueError(state, EnergyPlus::format("{}: {}", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, EnergyPlus::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."); @@ -1901,8 +1934,8 @@ namespace DesiccantDehumidifiers { case DesicDehumCtrlType::FixedHumratBypass: { HumRatNeeded = desicDehum.HumRatSet; if (HumRatNeeded <= 0.0) { - ShowSevereError(state, format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); - ShowContinueError(state, format("Invalid Leaving Max Humidity Ratio Setpoint={:.8T}", HumRatNeeded)); + ShowSevereError(state, EnergyPlus::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid Leaving Max Humidity Ratio Setpoint={:.8T}", HumRatNeeded)); ShowFatalError(state, "must be > 0.0"); } } break; @@ -1910,7 +1943,7 @@ namespace DesiccantDehumidifiers { HumRatNeeded = state.dataLoopNodes->Node(desicDehum.ProcAirOutNode).HumRatMax; } break; default: { - ShowFatalError(state, format("Invalid control type in desiccant dehumidifier = {}", desicDehum.Name)); + ShowFatalError(state, EnergyPlus::format("Invalid control type in desiccant dehumidifier = {}", desicDehum.Name)); } break; } @@ -2131,7 +2164,8 @@ namespace DesiccantDehumidifiers { default: { - ShowFatalError(state, format("Invalid performance model in desiccant dehumidifier = {}", desicDehum.PerformanceModel_Num)); + ShowFatalError(state, + EnergyPlus::format("Invalid performance model in desiccant dehumidifier = {}", desicDehum.PerformanceModel_Num)); } break; } // Performance Model Part A @@ -2247,7 +2281,8 @@ namespace DesiccantDehumidifiers { } break; default: { - ShowFatalError(state, format("Invalid performance model in desiccant dehumidifier = {}", desicDehum.PerformanceModel_Num)); + ShowFatalError(state, + EnergyPlus::format("Invalid performance model in desiccant dehumidifier = {}", desicDehum.PerformanceModel_Num)); // Suppress uninitialized warnings ProcAirOutTemp = 0.0; @@ -2305,7 +2340,7 @@ namespace DesiccantDehumidifiers { ShowRecurringContinueErrorAtEnd(state, desicDehum.DehumType + '=' + desicDehum.Name, desicDehum.RegenFanErrorIndex2); ShowRecurringContinueErrorAtEnd( state, - format("Flow requested [m3/s] from {} = {}", HVAC::fanTypeNames[(int)desicDehum.regenFanType], desicDehum.RegenFanName), + EnergyPlus::format("Flow requested [m3/s] from {} = {}", HVAC::fanTypeNames[(int)desicDehum.regenFanType], desicDehum.RegenFanName), desicDehum.RegenFanErrorIndex3, (RegenAirMassFlowRate / state.dataEnvrn->StdRhoAir)); ShowRecurringContinueErrorAtEnd( @@ -2324,7 +2359,7 @@ namespace DesiccantDehumidifiers { desicDehum.RegenCapErrorIndex1); ShowRecurringContinueErrorAtEnd(state, desicDehum.DehumType + '=' + desicDehum.Name, desicDehum.RegenCapErrorIndex2); ShowRecurringContinueErrorAtEnd(state, - format("Load requested [W] from {} = {}", desicDehum.RegenCoilType, desicDehum.RegenCoilName), + EnergyPlus::format("Load requested [W] from {} = {}", desicDehum.RegenCoilType, desicDehum.RegenCoilName), desicDehum.RegenCapErrorIndex3, QRegen); ShowRecurringContinueErrorAtEnd(state, "Load request exceeded delivered by [W]", desicDehum.RegenCapErrorIndex4, (QRegen - QDelivered)); @@ -2799,15 +2834,16 @@ namespace DesiccantDehumidifiers { if (!state.dataGlobal->WarmupFlag && (VolFlowPerRatedTotQ < MinVolFlowPerRatedTotQ)) { ++desicDehum.ErrCount; if (desicDehum.ErrCount < 2) { - ShowWarningError(state, - 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, + 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)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Expected minimum for VolumeFlowperRatedTotalCondenserWasteHeat = [{:G}]", MinVolFlowPerRatedTotQ)); + ShowContinueError( + state, EnergyPlus::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 { @@ -2992,30 +3028,32 @@ namespace DesiccantDehumidifiers { General::SolveRoot(state, ErrTolerance, SolveMaxIter, SolFlag, HotWaterMdot, f, MinWaterFlow, MaxHotWaterFlow); if (SolFlag == -1) { if (desicDehum.HotWaterCoilMaxIterIndex == 0) { - ShowWarningMessage( - state, - format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowWarningMessage(state, + EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", + desicDehum.DehumType, + desicDehum.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("...Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError( + state, EnergyPlus::format("...Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}\"", - SolveMaxIter, - desicDehum.DehumType, - desicDehum.Name), + EnergyPlus::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, - format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - desicDehum.DehumType, - desicDehum.Name)); + ShowWarningMessage( + state, + EnergyPlus::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, format("...Given minimum water flow rate={:.3R} kg/s", MinWaterFlow)); - ShowContinueError(state, format("...Given maximum water flow rate={:.3R} kg/s", MaxHotWaterFlow)); + 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, "CalcNonDXHeatingCoils: Hot water coil control failed (flow limits) for " + @@ -3096,7 +3134,7 @@ namespace DesiccantDehumidifiers { if (WhichDesicDehum != 0) { return state.dataDesiccantDehumidifiers->DesicDehum(WhichDesicDehum).ProcAirInNode; } - ShowSevereError(state, format("GetProcAirInletNodeNum: Could not find Desciccant Dehumidifier = \"{}\"", DesicDehumName)); + ShowSevereError(state, EnergyPlus::format("GetProcAirInletNodeNum: Could not find Desciccant Dehumidifier = \"{}\"", DesicDehumName)); ErrorsFound = true; return 0; } @@ -3121,7 +3159,7 @@ namespace DesiccantDehumidifiers { if (WhichDesicDehum != 0) { return state.dataDesiccantDehumidifiers->DesicDehum(WhichDesicDehum).ProcAirOutNode; } - ShowSevereError(state, format("GetProcAirInletNodeNum: Could not find Desciccant Dehumidifier = \"{}\"", DesicDehumName)); + ShowSevereError(state, EnergyPlus::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 e45d5b8763b..74d48af412c 100644 --- a/src/EnergyPlus/DisplacementVentMgr.cc +++ b/src/EnergyPlus/DisplacementVentMgr.cc @@ -974,7 +974,7 @@ namespace RoomAir { state.dataRoomAir->TCMF(ZoneNum) = ZTAveraged; } else { if (HeightComfort >= 0.0 && HeightComfort < HeightFloorSubzoneAve) { - ShowWarningError(state, format("Displacement ventilation comfort height is in floor subzone in Zone: {}", zone.Name)); + ShowWarningError(state, EnergyPlus::format("Displacement ventilation comfort height is in floor subzone in Zone: {}", zone.Name)); state.dataRoomAir->TCMF(ZoneNum) = state.dataRoomAir->ZTFloor(ZoneNum); } else if (HeightComfort >= HeightFloorSubzoneAve && HeightComfort < HeightOccupiedSubzoneAve) { state.dataRoomAir->TCMF(ZoneNum) = (state.dataRoomAir->ZTFloor(ZoneNum) * (HeightOccupiedSubzoneAve - HeightComfort) + @@ -990,7 +990,8 @@ namespace RoomAir { } else if (HeightComfort >= HeightMixedSubzoneAve && HeightComfort <= CeilingHeight) { state.dataRoomAir->TCMF(ZoneNum) = state.dataRoomAir->ZTMX(ZoneNum); } else { - ShowFatalError(state, format("Displacement ventilation comfort height is above ceiling or below floor in Zone: {}", zone.Name)); + ShowFatalError(state, + EnergyPlus::format("Displacement ventilation comfort height is above ceiling or below floor in Zone: {}", zone.Name)); } } @@ -1000,7 +1001,7 @@ namespace RoomAir { state.dataHeatBalFanSys->TempTstatAir(ZoneNum) = ZTAveraged; } else { if (HeightThermostat >= 0.0 && HeightThermostat < HeightFloorSubzoneAve) { - ShowWarningError(state, format("Displacement thermostat is in floor subzone in Zone: {}", zone.Name)); + ShowWarningError(state, EnergyPlus::format("Displacement thermostat is in floor subzone in Zone: {}", zone.Name)); state.dataHeatBalFanSys->TempTstatAir(ZoneNum) = state.dataRoomAir->ZTFloor(ZoneNum); } else if (HeightThermostat >= HeightFloorSubzoneAve && HeightThermostat < HeightOccupiedSubzoneAve) { state.dataHeatBalFanSys->TempTstatAir(ZoneNum) = @@ -1017,7 +1018,8 @@ namespace RoomAir { } else if (HeightThermostat >= HeightMixedSubzoneAve && HeightThermostat <= CeilingHeight) { state.dataHeatBalFanSys->TempTstatAir(ZoneNum) = state.dataRoomAir->ZTMX(ZoneNum); } else { - ShowFatalError(state, format("Displacement ventilation thermostat height is above ceiling or below floor in Zone: {}", zone.Name)); + ShowFatalError( + state, EnergyPlus::format("Displacement ventilation thermostat height is above ceiling or below floor in Zone: {}", zone.Name)); } } diff --git a/src/EnergyPlus/DualDuct.cc b/src/EnergyPlus/DualDuct.cc index 0b934139e86..9626ada092f 100644 --- a/src/EnergyPlus/DualDuct.cc +++ b/src/EnergyPlus/DualDuct.cc @@ -131,25 +131,26 @@ namespace DualDuct { if (CompIndex == 0) { DDNum = Util::FindItemInList(CompName, state.dataDualDuct->dd_airterminal, &DualDuctAirTerminal::Name); if (DDNum == 0) { - ShowFatalError(state, format("SimulateDualDuct: Damper not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimulateDualDuct: Damper not found={}", CompName)); } CompIndex = DDNum; } else { DDNum = CompIndex; if (DDNum > state.dataDualDuct->NumDDAirTerminal || DDNum < 1) { ShowFatalError(state, - format("SimulateDualDuct: Invalid CompIndex passed={}, Number of Dampers={}, Damper name={}", - CompIndex, - state.dataDualDuct->NumDDAirTerminal, - CompName)); + EnergyPlus::format("SimulateDualDuct: Invalid CompIndex passed={}, Number of Dampers={}, Damper name={}", + CompIndex, + state.dataDualDuct->NumDDAirTerminal, + CompName)); } if (state.dataDualDuct->dd_airterminal(DDNum).CheckEquipName) { if (CompName != state.dataDualDuct->dd_airterminal(DDNum).Name) { - ShowFatalError(state, - format("SimulateDualDuct: Invalid CompIndex passed={}, Damper name={}, stored Damper Name for that index={}", - CompIndex, - CompName, - state.dataDualDuct->dd_airterminal(DDNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimulateDualDuct: Invalid CompIndex passed={}, Damper name={}, stored Damper Name for that index={}", + CompIndex, + CompName, + state.dataDualDuct->dd_airterminal(DDNum).Name)); } state.dataDualDuct->dd_airterminal(DDNum).CheckEquipName = false; } @@ -180,7 +181,7 @@ namespace DualDuct { // Update the current Damper to the outlet nodes thisDualDuct.UpdateDualDuct(state); } else { - ShowFatalError(state, format("SimulateDualDuct: Damper not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimulateDualDuct: Damper not found={}", CompName)); } } @@ -310,8 +311,9 @@ namespace DualDuct { auto &thisObjType = damperTypeStrings[static_cast(thisDD.DamperType)]; ShowSevereError( state, - format("{}No matching List:Zone:AirTerminal for AirTerminal:DualDuct = [{},{}].", RoutineName, thisObjType, thisDD.Name)); - ShowContinueError(state, format("...should have outlet node={}", state.dataLoopNodes->NodeID(thisDD.OutletNodeNum))); + EnergyPlus::format( + "{}No matching List:Zone:AirTerminal for AirTerminal:DualDuct = [{},{}].", RoutineName, thisObjType, thisDD.Name)); + ShowContinueError(state, EnergyPlus::format("...should have outlet node={}", state.dataLoopNodes->NodeID(thisDD.OutletNodeNum))); ErrorsFound = true; } else { @@ -326,8 +328,10 @@ namespace DualDuct { if (state.dataZoneEquip->ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); ShowContinueError( - state, format("{} already connects to another zone", state.dataLoopNodes->NodeID(thisDD.OutletNodeNum))); - ShowContinueError(state, format("Occurs for terminal unit {} = {}", CurrentModuleObject, thisDD.Name)); + state, + EnergyPlus::format("{} already connects to another zone", state.dataLoopNodes->NodeID(thisDD.OutletNodeNum))); + ShowContinueError(state, + EnergyPlus::format("Occurs for terminal unit {} = {}", CurrentModuleObject, thisDD.Name)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -449,8 +453,9 @@ namespace DualDuct { auto &thisObjType = damperTypeStrings[static_cast(thisDD.DamperType)]; ShowSevereError( state, - format("{}No matching List:Zone:AirTerminal for AirTerminal:DualDuct = [{},{}].", RoutineName, thisObjType, thisDD.Name)); - ShowContinueError(state, format("...should have outlet node={}", state.dataLoopNodes->NodeID(thisDD.OutletNodeNum))); + EnergyPlus::format( + "{}No matching List:Zone:AirTerminal for AirTerminal:DualDuct = [{},{}].", RoutineName, thisObjType, thisDD.Name)); + ShowContinueError(state, EnergyPlus::format("...should have outlet node={}", state.dataLoopNodes->NodeID(thisDD.OutletNodeNum))); ErrorsFound = true; } else { @@ -479,8 +484,8 @@ namespace DualDuct { if (!lAlphaBlanks(6)) { thisDD.OARequirementsPtr = Util::FindItemInList(AlphArray(6), state.dataSize->OARequirements); if (thisDD.OARequirementsPtr == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(6), AlphArray(6))); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_DDVariableVolume, thisDD.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(6), AlphArray(6))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_DDVariableVolume, thisDD.Name)); ErrorsFound = true; } else { thisDD.NoOAFlowInputFromUser = false; @@ -618,8 +623,9 @@ namespace DualDuct { auto &thisObjType = damperTypeStrings[static_cast(thisDD.DamperType)]; ShowSevereError( state, - format("{}No matching List:Zone:AirTerminal for AirTerminal:DualDuct = [{},{}].", RoutineName, thisObjType, thisDD.Name)); - ShowContinueError(state, format("...should have outlet node={}", state.dataLoopNodes->NodeID(thisDD.OutletNodeNum))); + EnergyPlus::format( + "{}No matching List:Zone:AirTerminal for AirTerminal:DualDuct = [{},{}].", RoutineName, thisObjType, thisDD.Name)); + ShowContinueError(state, EnergyPlus::format("...should have outlet node={}", state.dataLoopNodes->NodeID(thisDD.OutletNodeNum))); ErrorsFound = true; } else { @@ -651,8 +657,8 @@ namespace DualDuct { } thisDD.OARequirementsPtr = Util::FindItemInList(AlphArray(6), state.dataSize->OARequirements); if (thisDD.OARequirementsPtr == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(6), AlphArray(6))); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(6), AlphArray(6))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); ErrorsFound = true; } else { thisDD.NoOAFlowInputFromUser = false; @@ -672,11 +678,11 @@ namespace DualDuct { } else { if (thisDD.MaxAirVolFlowRate < thisDD.DesignOAFlowRate) { ShowSevereError(state, - format("The value {:.5R} in {}is lower than the outdoor air requirement.", - thisDD.MaxAirVolFlowRate, - cNumericFields(1))); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); - ShowContinueError(state, format("The design outdoor air requirement is {:.5R}", thisDD.DesignOAFlowRate)); + EnergyPlus::format("The value {:.5R} in {}is lower than the outdoor air requirement.", + thisDD.MaxAirVolFlowRate, + cNumericFields(1))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); + ShowContinueError(state, EnergyPlus::format("The design outdoor air requirement is {:.5R}", thisDD.DesignOAFlowRate)); ErrorsFound = true; } } @@ -688,13 +694,13 @@ namespace DualDuct { if ((DummyOAFlow == 0.0) && (lAlphaBlanks(7))) { // no worries // do nothing, okay since no per person requirement involved } else if ((DummyOAFlow > 0.0) && (lAlphaBlanks(7))) { // missing input - ShowSevereError(state, format("{} was blank.", cAlphaFields(7))); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); + ShowSevereError(state, EnergyPlus::format("{} was blank.", cAlphaFields(7))); + ShowContinueError(state, EnergyPlus::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, format("{} = {} not a valid key choice.", cAlphaFields(7), AlphArray(7))); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not a valid key choice.", cAlphaFields(7), AlphArray(7))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); ShowContinueError(state, R"(Valid choices are "CurrentOccupancy" or "DesignOccupancy")"); ErrorsFound = true; } @@ -727,7 +733,7 @@ namespace DualDuct { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -767,16 +773,18 @@ namespace DualDuct { continue; } ShowSevereError(state, - format("InitDualDuct: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - state.dataDefineEquipment->AirDistUnit(this->ADUNum).Name)); + EnergyPlus::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, format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDConstantVolume, this->Name)); + ShowContinueError(state, + EnergyPlus::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDConstantVolume, this->Name)); } else if (this->DamperType == DualDuctDamper::VariableVolume) { - ShowContinueError(state, format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDVariableVolume, this->Name)); + ShowContinueError(state, + EnergyPlus::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDVariableVolume, this->Name)); } else if (this->DamperType == DualDuctDamper::OutdoorAir) { - ShowContinueError(state, format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDVarVolOA, this->Name)); + ShowContinueError(state, EnergyPlus::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDVarVolOA, this->Name)); } else { - ShowContinueError(state, format("...Dual Duct Damper=[unknown/invalid,{}] will not be simulated.", this->Name)); + ShowContinueError(state, EnergyPlus::format("...Dual Duct Damper=[unknown/invalid,{}] will not be simulated.", this->Name)); } } } @@ -1709,7 +1717,8 @@ namespace DualDuct { if (this->NoOAFlowInputFromUser) { ShowSevereError( state, - format("CalcOAOnlyMassFlow: Problem in AirTerminal:DualDuct:VAV:OutdoorAir = {}, check outdoor air specification", this->Name)); + EnergyPlus::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 76f3ea86167..ad55b7f9e9e 100644 --- a/src/EnergyPlus/DuctLoss.cc +++ b/src/EnergyPlus/DuctLoss.cc @@ -242,11 +242,11 @@ namespace DuctLoss { thisDuctLoss.LinkageNum = Util::FindItemInList(LinkageName, state.afn->AirflowNetworkLinkageData); if (thisDuctLoss.LinkageNum == 0) { ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", - CurrentModuleObject, - thisDuctLoss.Name, - "Airflownetwork:Distribution:Linkage = ", - LinkageName)); + EnergyPlus::format("{}, \"{}\" {} not found: {}", + CurrentModuleObject, + thisDuctLoss.Name, + "Airflownetwork:Distribution:Linkage = ", + LinkageName)); errorsFound = true; } std::string EnvType = Util::makeUPPER(fields.at("environment_type").get()); @@ -255,8 +255,9 @@ namespace DuctLoss { } else if (Util::SameString(EnvType, "ZONE")) { thisDuctLoss.EnvType = EnvironmentType::Zone; } else { - ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", CurrentModuleObject, thisDuctLoss.Name, "Environment Type = ", EnvType)); + ShowSevereError( + state, + EnergyPlus::format("{}, \"{}\" {} not found: {}", CurrentModuleObject, thisDuctLoss.Name, "Environment Type = ", EnvType)); errorsFound = true; } if (thisDuctLoss.EnvType == EnvironmentType::Schedule) { @@ -306,11 +307,11 @@ namespace DuctLoss { thisDuctLoss.LinkageNum = Util::FindItemInList(LinkageName, state.afn->AirflowNetworkLinkageData); if (thisDuctLoss.LinkageNum == 0) { ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", - CurrentModuleObject, - thisDuctLoss.Name, - "Airflownetwork:Distribution:Linkage = ", - LinkageName)); + EnergyPlus::format("{}, \"{}\" {} not found: {}", + CurrentModuleObject, + thisDuctLoss.Name, + "Airflownetwork:Distribution:Linkage = ", + LinkageName)); errorsFound = true; } thisDuctLoss.LossType = DuctLossType::Leakage; @@ -342,11 +343,11 @@ namespace DuctLoss { thisDuctLoss.LinkageNum = Util::FindItemInList(LinkageName, state.afn->AirflowNetworkLinkageData); if (thisDuctLoss.LinkageNum == 0) { ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", - CurrentModuleObject, - thisDuctLoss.Name, - "Airflownetwork:Distribution:Linkage = ", - LinkageName)); + EnergyPlus::format("{}, \"{}\" {} not found: {}", + CurrentModuleObject, + thisDuctLoss.Name, + "Airflownetwork:Distribution:Linkage = ", + LinkageName)); errorsFound = true; } thisDuctLoss.LossType = DuctLossType::MakeupAir; @@ -731,7 +732,8 @@ namespace DuctLoss { if (thisDuctLoss.AirLoopNum == 0) { ShowSevereError( state, - format("{}, \"{}\" {} not found: {}", CurrentModuleObject, thisDuctLoss.Name, "AirLoopHVAC = ", thisDuctLoss.AirLoopName)); + EnergyPlus::format( + "{}, \"{}\" {} not found: {}", CurrentModuleObject, thisDuctLoss.Name, "AirLoopHVAC = ", thisDuctLoss.AirLoopName)); errorsFound = true; } } @@ -875,11 +877,11 @@ namespace DuctLoss { } } else { ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", - "Duct:Loss:MakeupAir", - thisDuctLoss.Name, - "Incorrect input, not Zone, OUTDOORAIR:NODELIST, and OUTDOORAIR:NODE = ", - state.afn->DisSysNodeData(AFNNodeNum1).Name)); + EnergyPlus::format("{}, \"{}\" {} not found: {}", + "Duct:Loss:MakeupAir", + thisDuctLoss.Name, + "Incorrect input, not Zone, OUTDOORAIR:NODELIST, and OUTDOORAIR:NODE = ", + state.afn->DisSysNodeData(AFNNodeNum1).Name)); errorsFound = true; } if (Util::SameString(state.afn->DisSysNodeData(AFNNodeNum2).EPlusType, "ZONE")) { @@ -893,11 +895,11 @@ namespace DuctLoss { } } else { ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", - "Duct:Loss:MakeupAir", - thisDuctLoss.Name, - "Incorrect input, not Zone, OUTDOORAIR:NODELIST, and OUTDOORAIR:NODE = ", - state.afn->DisSysNodeData(AFNNodeNum2).Name)); + EnergyPlus::format("{}, \"{}\" {} not found: {}", + "Duct:Loss:MakeupAir", + thisDuctLoss.Name, + "Incorrect input, not Zone, OUTDOORAIR:NODELIST, and OUTDOORAIR:NODE = ", + state.afn->DisSysNodeData(AFNNodeNum2).Name)); errorsFound = true; } } diff --git a/src/EnergyPlus/EMSManager.cc b/src/EnergyPlus/EMSManager.cc index 9ab307a9618..e229c665bf9 100644 --- a/src/EnergyPlus/EMSManager.cc +++ b/src/EnergyPlus/EMSManager.cc @@ -600,8 +600,8 @@ namespace EMSManager { int VariableNum = RuntimeLanguageProcessor::FindEMSVariable(state, cAlphaArgs(1), 0); if (VariableNum > 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(1), cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(1), cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Object name conflicts with a global variable name in EMS"); ErrorsFound = true; } else { @@ -620,8 +620,8 @@ namespace EMSManager { int VarIndex = GetMeterIndex(state, cAlphaArgs(3)); if (VarIndex > -1) { if (!lAlphaFieldBlanks(2)) { - ShowWarningError(state, format("Unused{}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("Unused{}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Meter Name found; Key Name will be ignored"); // why meters have no keys.. } else { thisSensor.VariableType = OutputProcessor::VariableType::Meter; @@ -732,8 +732,8 @@ namespace EMSManager { int VariableNum = RuntimeLanguageProcessor::FindEMSVariable(state, cAlphaArgs(1), 0); if (VariableNum > 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(1), cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(1), cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Object name conflicts with a global variable name in EMS"); ErrorsFound = true; } else { @@ -764,13 +764,13 @@ namespace EMSManager { int nHandle = state.dataRuntimeLang->EMSActuatorAvailable(found->second).handleCount; if (nHandle > 0) { - EnergyPlus::ShowWarningError(state, - format("Seems like you already tried to get a Handle on this Actuator {}times.", nHandle)); + EnergyPlus::ShowWarningError( + state, EnergyPlus::format("Seems like you already tried to get a Handle on this Actuator {}times.", nHandle)); EnergyPlus::ShowContinueError(state, - format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", - thisEMSactuator.ComponentTypeName, - thisEMSactuator.ControlTypeName, - thisEMSactuator.UniqueIDName)); + EnergyPlus::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", + thisEMSactuator.ComponentTypeName, + thisEMSactuator.ControlTypeName, + thisEMSactuator.UniqueIDName)); EnergyPlus::ShowContinueError(state, "You should take note that there is a risk of overwriting."); } ++state.dataRuntimeLang->EMSActuatorAvailable(found->second).handleCount; @@ -802,8 +802,8 @@ namespace EMSManager { state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name = cAlphaArgs(1); int VariableNum = RuntimeLanguageProcessor::FindEMSVariable(state, cAlphaArgs(1), 0); if (VariableNum > 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(1), cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(1), cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Object name conflicts with a global variable name in EMS"); ErrorsFound = true; } else { @@ -869,8 +869,8 @@ namespace EMSManager { for (int AlphaNum = 3; AlphaNum <= NumAlphas; ++AlphaNum) { // find program name in Stack structure if (lAlphaFieldBlanks(AlphaNum)) { // throw error - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(AlphaNum), cAlphaArgs(AlphaNum))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(AlphaNum), cAlphaArgs(AlphaNum))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Program names cannot be blank"); ErrorsFound = true; } @@ -881,8 +881,8 @@ namespace EMSManager { // check for duplicate and warn. for (int Loop = 1; Loop <= ManagerProgramNum; ++Loop) { if (state.dataRuntimeLang->EMSProgramCallManager(CallManagerNum).ErlProgramARR(Loop) == StackNum) { - ShowWarningError(state, format("Duplicate {}={}", cAlphaFieldNames(AlphaNum), cAlphaArgs(AlphaNum))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("Duplicate {}={}", cAlphaFieldNames(AlphaNum), cAlphaArgs(AlphaNum))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Erl program appears more than once, and the simulation continues."); } } @@ -892,8 +892,8 @@ namespace EMSManager { state.dataRuntimeLang->EMSProgramCallManager(CallManagerNum).ErlProgramARR(ManagerProgramNum) = StackNum; } else { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(AlphaNum), cAlphaArgs(AlphaNum))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(AlphaNum), cAlphaArgs(AlphaNum))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Program Name not found."); ErrorsFound = true; } @@ -903,7 +903,7 @@ namespace EMSManager { } else { // no program calling manager in input if (state.dataRuntimeLang->NumErlPrograms > 0) { cCurrentModuleObject = "EnergyManagementSystem:ProgramCallingManager"; - ShowWarningError(state, format("Energy Management System is missing input object {}", cCurrentModuleObject)); + ShowWarningError(state, EnergyPlus::format("Energy Management System is missing input object {}", cCurrentModuleObject)); ShowContinueError(state, "EnergyPlus Runtime Language programs need a calling manager to control when they get executed"); } } @@ -967,21 +967,24 @@ namespace EMSManager { VarIndex); if (VarType == OutputProcessor::VariableType::Invalid) { if (reportErrors) { - ShowSevereError( - state, - format("Invalid Output:Variable or Output:Meter Name ={}", state.dataRuntimeLang->Sensor(SensorNum).OutputVarName)); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); + 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, "Output:Variable Name not found"); ErrorsFound = true; } } else if (VarIndex == -1) { if (reportErrors) { ShowSevereError(state, - format("Invalid Output:Variable or Output:Meter Index Key Name ={}", - state.dataRuntimeLang->Sensor(SensorNum).UniqueKeyName)); - ShowContinueError(state, - format("For Output:Variable or Output:Meter = {}", state.dataRuntimeLang->Sensor(SensorNum).OutputVarName)); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); + 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)); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); ShowContinueError(state, "Unique Key Name not found."); ErrorsFound = true; } @@ -997,13 +1000,14 @@ namespace EMSManager { state.dataRuntimeLang->Sensor(SensorNum).CheckedOkay = false; if (reportErrors) { ShowSevereError(state, - format("Invalid Output:Variable or Output:Meter Index Key Name ={}", - state.dataRuntimeLang->Sensor(SensorNum).UniqueKeyName)); + 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)); ShowContinueError( state, - format("For Output:Variable or Output:Meter = {}", state.dataRuntimeLang->Sensor(SensorNum).OutputVarName)); - ShowContinueError(state, - format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); + EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); ShowContinueError(state, "Schedule Name not found."); ErrorsFound = true; } @@ -1045,12 +1049,12 @@ namespace EMSManager { std::make_tuple(actuatorUsed.ComponentTypeName, actuatorUsed.UniqueIDName, actuatorUsed.ControlTypeName)); if (found == s_lang->EMSActuatorAvailableMap.end()) { if (reportErrors) { - ShowSevereError(state, format("Actuator {} = {} not found.", cCurrentModuleObject, actuatorUsed.Name)); + ShowSevereError(state, EnergyPlus::format("Actuator {} = {} not found.", cCurrentModuleObject, actuatorUsed.Name)); ShowContinueError(state, - format("Combination of ObjectType = {}, ObjectName = {}, and ControlType = {} not available.", - actuatorUsed.ComponentTypeName, - actuatorUsed.UniqueIDName, - actuatorUsed.ControlTypeName)); + EnergyPlus::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 { @@ -1064,12 +1068,13 @@ namespace EMSManager { actuatorUsed.CheckedOkay = true; int nHandle = s_lang->EMSActuatorAvailable(found->second).handleCount; if (nHandle > 0) { - EnergyPlus::ShowWarningError(state, format("Seems like you already tried to get a Handle on this Actuator {}times.", nHandle)); + EnergyPlus::ShowWarningError( + state, EnergyPlus::format("Seems like you already tried to get a Handle on this Actuator {}times.", nHandle)); EnergyPlus::ShowContinueError(state, - format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", - actuatorUsed.ComponentTypeName, - actuatorUsed.ControlTypeName, - actuatorUsed.UniqueIDName)); + EnergyPlus::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; @@ -1081,8 +1086,9 @@ namespace EMSManager { if (state.dataSurface->Surface(actuatedSurfNum).IsAirBoundarySurf) { ShowWarningError( state, - format("GetEMSInput: EnergyManagementSystem:Actuator={} actuates an opening attached to an air boundary surface.", - actuatorUsed.Name)); + EnergyPlus::format( + "GetEMSInput: EnergyManagementSystem:Actuator={} actuates an opening attached to an air boundary surface.", + actuatorUsed.Name)); } } } @@ -1110,11 +1116,12 @@ namespace EMSManager { if (!FoundObjectType) { if (reportErrors) { - ShowSevereError( - state, - format("Invalid Internal Data Type ={}", state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).InternalDataTypeName)); + ShowSevereError(state, + EnergyPlus::format("Invalid Internal Data Type ={}", + state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).InternalDataTypeName)); ShowContinueError( - state, format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name)); + state, + EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name)); ShowContinueError(state, "Internal data type name not found"); ErrorsFound = true; } @@ -1122,11 +1129,12 @@ namespace EMSManager { if (!FoundObjectName) { if (reportErrors) { - ShowSevereError( - state, - format("Invalid Internal Data Index Key Name ={}", state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).UniqueIDName)); + ShowSevereError(state, + EnergyPlus::format("Invalid Internal Data Index Key Name ={}", + state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).UniqueIDName)); ShowContinueError( - state, format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name)); + state, + EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name)); ShowContinueError(state, "Internal data unique identifier not found"); ErrorsFound = true; } @@ -1498,8 +1506,10 @@ namespace EMSManager { } } if (!FoundControl) { - ShowWarningError( - state, format("Missing '{}' for node named named '{}'.", controlTypeNames[(int)ctrlVar], state.dataLoopNodes->NodeID(NodeNum))); + ShowWarningError(state, + EnergyPlus::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) { @@ -1701,8 +1711,9 @@ namespace EMSManager { } else { if (state.dataSurface->WindowShadingControl(state.dataSurface->Surface(loopSurfNum).activeWindowShadingControl).ShadingType != DataSurfaces::WinShadingType::SwitchableGlazing) { - ShowSevereError(state, - format("Missing shade or blind layer in window construction name = '{}', surface name = '{}'.", + 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)); ShowContinueError(state, @@ -1978,14 +1989,17 @@ namespace EMSManager { "checkForUnusedActuatorsAtEnd: Unused EMS Actuator detected, suggesting possible unintended programming error or " "spelling mistake."); ShowContinueError(state, - format("Check Erl programs related to EMS actuator variable name = {}", - state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).Name)); - ShowContinueError(state, - format("EMS Actuator type name = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).ComponentTypeName)); + EnergyPlus::format("Check Erl programs related to EMS actuator variable name = {}", + state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).Name)); ShowContinueError( - state, format("EMS Actuator unique component name = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).UniqueIDName)); + state, + EnergyPlus::format("EMS Actuator type name = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).ComponentTypeName)); ShowContinueError(state, - format("EMS Actuator control type = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).ControlTypeName)); + EnergyPlus::format("EMS Actuator unique component name = {}", + state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).UniqueIDName)); + ShowContinueError( + state, + EnergyPlus::format("EMS Actuator control type = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).ControlTypeName)); } } } @@ -2178,7 +2192,7 @@ void SetupEMSInternalVariable( if (FoundDuplicate) { ShowSevereError(state, "Duplicate internal variable was sent to SetupEMSInternalVariable."); - ShowContinueError(state, format("Internal variable type = {} ; name = {}", cDataTypeName, cUniqueIDName)); + ShowContinueError(state, EnergyPlus::format("Internal variable type = {} ; name = {}", cDataTypeName, cUniqueIDName)); ShowContinueError(state, "Called from SetupEMSInternalVariable."); } else { // add new internal data variable @@ -2227,7 +2241,7 @@ void SetupEMSInternalVariable( if (FoundDuplicate) { ShowSevereError(state, "Duplicate internal variable was sent to SetupEMSInternalVariable."); - ShowContinueError(state, format("Internal variable type = {} ; name = {}", cDataTypeName, cUniqueIDName)); + ShowContinueError(state, EnergyPlus::format("Internal variable type = {} ; name = {}", cDataTypeName, cUniqueIDName)); ShowContinueError(state, "called from SetupEMSInternalVariable"); } else { // add new internal data variable diff --git a/src/EnergyPlus/EarthTube.cc b/src/EnergyPlus/EarthTube.cc index 62c4bc2d28e..77413c8dfc4 100644 --- a/src/EnergyPlus/EarthTube.cc +++ b/src/EnergyPlus/EarthTube.cc @@ -190,8 +190,9 @@ void GetEarthTube(EnergyPlusData &state, bool &ErrorsFound) // If errors found i if (Util::SameString(thisEarthTubePars.nameParameters, state.dataEarthTube->EarthTubePars(otherParams).nameParameters)) { ShowSevereError( state, - format("{}: {} = {} is not a unique name.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Check the other {} names for a duplicate.", s_ipsc->cCurrentModuleObject)); + EnergyPlus::format( + "{}: {} = {} is not a unique name.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Check the other {} names for a duplicate.", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -228,7 +229,8 @@ void GetEarthTube(EnergyPlusData &state, bool &ErrorsFound) // If errors found i // First Alpha is Zone Name thisEarthTube.ZonePtr = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataHeatBal->Zone); if (thisEarthTube.ZonePtr == 0) { - ShowSevereError(state, format("{}: {} not found={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("{}: {} not found={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -247,26 +249,26 @@ void GetEarthTube(EnergyPlusData &state, bool &ErrorsFound) // If errors found i thisEarthTube.MinTemperature = s_ipsc->rNumericArgs(2); if ((thisEarthTube.MinTemperature < -EarthTubeTempLimit) || (thisEarthTube.MinTemperature > EarthTubeTempLimit)) { ShowSevereError(state, - format("{}: {}={} must have a minimum temperature between -{:.0R}C and {:.0R}C", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - EarthTubeTempLimit, - EarthTubeTempLimit)); - ShowContinueError(state, format("Entered value={:.0R}", thisEarthTube.MinTemperature)); + EnergyPlus::format("{}: {}={} must have a minimum temperature between -{:.0R}C and {:.0R}C", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + EarthTubeTempLimit, + EarthTubeTempLimit)); + ShowContinueError(state, EnergyPlus::format("Entered value={:.0R}", thisEarthTube.MinTemperature)); ErrorsFound = true; } thisEarthTube.MaxTemperature = s_ipsc->rNumericArgs(3); if ((thisEarthTube.MaxTemperature < -EarthTubeTempLimit) || (thisEarthTube.MaxTemperature > EarthTubeTempLimit)) { ShowSevereError(state, - format("{}: {}={} must have a maximum temperature between -{:.0R}C and {:.0R}C", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - EarthTubeTempLimit, - EarthTubeTempLimit)); - ShowContinueError(state, format("Entered value={:.0R}", thisEarthTube.MaxTemperature)); + EnergyPlus::format("{}: {}={} must have a maximum temperature between -{:.0R}C and {:.0R}C", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + EarthTubeTempLimit, + EarthTubeTempLimit)); + ShowContinueError(state, EnergyPlus::format("Entered value={:.0R}", thisEarthTube.MaxTemperature)); ErrorsFound = true; } @@ -286,48 +288,48 @@ void GetEarthTube(EnergyPlusData &state, bool &ErrorsFound) // If errors found i thisEarthTube.FanPressure = s_ipsc->rNumericArgs(5); if (thisEarthTube.FanPressure < 0.0) { ShowSevereError(state, - format("{}: {}={}, {} must be positive, entered value={:.2R}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(5), - thisEarthTube.FanPressure)); + EnergyPlus::format("{}: {}={}, {} must be positive, entered value={:.2R}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(5), + thisEarthTube.FanPressure)); ErrorsFound = true; } thisEarthTube.FanEfficiency = s_ipsc->rNumericArgs(6); if ((thisEarthTube.FanEfficiency <= 0.0) || (thisEarthTube.FanEfficiency > 1.0)) { ShowSevereError(state, - format("{}: {}={}, {} must be greater than zero and less than or equal to one, entered value={:.2R}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(6), - thisEarthTube.FanEfficiency)); + EnergyPlus::format("{}: {}={}, {} must be greater than zero and less than or equal to one, entered value={:.2R}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(6), + thisEarthTube.FanEfficiency)); ErrorsFound = true; } thisEarthTube.r1 = s_ipsc->rNumericArgs(7); if (thisEarthTube.r1 <= 0.0) { ShowSevereError(state, - format("{}: {}={}, {} must be positive, entered value={:.2R}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(7), - thisEarthTube.r1)); + EnergyPlus::format("{}: {}={}, {} must be positive, entered value={:.2R}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(7), + thisEarthTube.r1)); ErrorsFound = true; } thisEarthTube.r2 = s_ipsc->rNumericArgs(8); if (thisEarthTube.r2 <= 0.0) { ShowSevereError(state, - format("{}: {}={}, {} must be positive, entered value={:.2R}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(8), - thisEarthTube.r2)); + EnergyPlus::format("{}: {}={}, {} must be positive, entered value={:.2R}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(8), + thisEarthTube.r2)); ErrorsFound = true; } @@ -336,51 +338,51 @@ void GetEarthTube(EnergyPlusData &state, bool &ErrorsFound) // If errors found i thisEarthTube.PipeLength = s_ipsc->rNumericArgs(9); if (thisEarthTube.PipeLength <= 0.0) { ShowSevereError(state, - format("{}: {}={}, {} must be positive, entered value={:.2R}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(9), - thisEarthTube.PipeLength)); + EnergyPlus::format("{}: {}={}, {} must be positive, entered value={:.2R}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(9), + thisEarthTube.PipeLength)); ErrorsFound = true; } thisEarthTube.PipeThermCond = s_ipsc->rNumericArgs(10); if (thisEarthTube.PipeThermCond <= 0.0) { ShowSevereError(state, - format("{}: {}={}, {} must be positive, entered value={:.2R}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(10), - thisEarthTube.PipeThermCond)); + EnergyPlus::format("{}: {}={}, {} must be positive, entered value={:.2R}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(10), + thisEarthTube.PipeThermCond)); ErrorsFound = true; } thisEarthTube.z = s_ipsc->rNumericArgs(11); if (thisEarthTube.z <= 0.0) { ShowSevereError(state, - format("{}: {}={}, {} must be positive, entered value={:.2R}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(11), - thisEarthTube.z)); + EnergyPlus::format("{}: {}={}, {} must be positive, entered value={:.2R}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(11), + thisEarthTube.z)); ErrorsFound = true; } if (thisEarthTube.z <= (thisEarthTube.r1 + thisEarthTube.r2 + thisEarthTube.r3)) { // Note that code in initEarthTubeVertical assumes that this check remains in place--if this ever gets changed, // code in initEarthTubeVertical must be modified ShowSevereError(state, - format("{}: {}={}, {} must be greater than 3*{} + {} entered value={:.2R} ref sum={:.2R}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(11), - s_ipsc->cNumericFieldNames(7), - s_ipsc->cNumericFieldNames(8), - thisEarthTube.z, - thisEarthTube.r1 + thisEarthTube.r2 + thisEarthTube.r3)); + EnergyPlus::format("{}: {}={}, {} must be greater than 3*{} + {} entered value={:.2R} ref sum={:.2R}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(11), + s_ipsc->cNumericFieldNames(7), + s_ipsc->cNumericFieldNames(8), + thisEarthTube.z, + thisEarthTube.r1 + thisEarthTube.r2 + thisEarthTube.r3)); ErrorsFound = true; } @@ -572,7 +574,7 @@ void GetEarthTube(EnergyPlusData &state, bool &ErrorsFound) // If errors found i CheckEarthTubesInZones(state, s_ipsc->cAlphaArgs(1), s_ipsc->cCurrentModuleObject, ErrorsFound); if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors getting input. Program terminates.", s_ipsc->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}: Errors getting input. Program terminates.", s_ipsc->cCurrentModuleObject)); } } @@ -587,8 +589,8 @@ void CheckEarthTubesInZones(EnergyPlusData &state, for (int Loop = 1; Loop <= numEarthTubes - 1; ++Loop) { for (int Loop1 = Loop + 1; Loop1 <= numEarthTubes; ++Loop1) { if (state.dataEarthTube->EarthTubeSys(Loop).ZonePtr == state.dataEarthTube->EarthTubeSys(Loop1).ZonePtr) { - ShowSevereError(state, format("{} has more than one {} associated with it.", ZoneName, FieldName)); - ShowContinueError(state, format("Only one {} is allowed per zone. Check the definitions of {}", FieldName, FieldName)); + ShowSevereError(state, EnergyPlus::format("{} has more than one {} associated with it.", ZoneName, FieldName)); + ShowContinueError(state, EnergyPlus::format("Only one {} is allowed per zone. Check the definitions of {}", FieldName, FieldName)); ShowContinueError(state, "in your input file and make sure that there is only one defined for each zone."); ErrorsFound = true; } @@ -705,14 +707,14 @@ void initEarthTubeVertical(EnergyPlusData &state) auto &zone = state.dataHeatBal->Zone(thisEarthTube.ZonePtr); for (int nodeNum = 1; nodeNum <= thisEarthTube.totNodes; ++nodeNum) { SetupOutputVariable(state, - format("Earth Tube Node Temperature {}", nodeNum), + EnergyPlus::format("Earth Tube Node Temperature {}", nodeNum), Constant::Units::C, thisEarthTube.tCurrent[nodeNum - 1], OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, zone.Name); SetupOutputVariable(state, - format("Earth Tube Undisturbed Ground Temperature {}", nodeNum), + EnergyPlus::format("Earth Tube Undisturbed Ground Temperature {}", nodeNum), Constant::Units::C, thisEarthTube.tUndist[nodeNum - 1], OutputProcessor::TimeStepType::Zone, diff --git a/src/EnergyPlus/EcoRoofManager.cc b/src/EnergyPlus/EcoRoofManager.cc index 5ae6ec34970..518dcb53f6a 100644 --- a/src/EnergyPlus/EcoRoofManager.cc +++ b/src/EnergyPlus/EcoRoofManager.cc @@ -528,7 +528,7 @@ namespace EcoRoofManager { ShowSevereError(state, "initEcoRoofFirstTime: EcoRoof simulation but HeatBalanceAlgorithm is not ConductionTransferFunction(CTF). EcoRoof model " "currently works only with CTF heat balance solution algorithm."); - ShowContinueError(state, format("Occurs for surface named {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, EnergyPlus::format("Occurs for surface named {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, "Check input syntax for HeatBalanceAlgorithm, SurfaceProperty:HeatTransferAlgorithm,"); ShowContinueError(state, "SurfaceProperty:HeatTransferAlgorithm:MultipleSurface, and SurfaceProperty:HeatTransferAlgorithm:SurfaceList "); ShowContinueError(state, "to verify that the solution method is set to CTF for the surface that is an EcoRoof."); @@ -826,19 +826,21 @@ namespace EcoRoofManager { if (ceil(60 * index1 / state.dataGlobal->MinutesInTimeStep) <= 60) { ShowContinueError( state, - format("...Entered Timesteps per hour=[{}], Change to some value greater than or equal to [{}] for assured stability.", - state.dataGlobal->TimeStepsInHour, - 60 * index1 / state.dataGlobal->MinutesInTimeStep)); + EnergyPlus::format( + "...Entered Timesteps per hour=[{}], Change to some value greater than or equal to [{}] for assured stability.", + state.dataGlobal->TimeStepsInHour, + 60 * index1 / state.dataGlobal->MinutesInTimeStep)); ShowContinueError(state, "...Note that EnergyPlus has a maximum of 60 timesteps per hour"); ShowContinueError(state, "...The program will continue, but if the simulation fails due to too low/high temperatures, instability " "here could be the reason."); } else { - ShowContinueError(state, - format("...Entered Timesteps per hour=[{}], however the required frequency for stability [{}] is over the " - "EnergyPlus maximum of 60.", - state.dataGlobal->TimeStepsInHour, - 60 * index1 / state.dataGlobal->MinutesInTimeStep)); + ShowContinueError( + state, + EnergyPlus::format("...Entered Timesteps per hour=[{}], however the required frequency for stability [{}] is over the " + "EnergyPlus maximum of 60.", + state.dataGlobal->TimeStepsInHour, + 60 * index1 / state.dataGlobal->MinutesInTimeStep)); ShowContinueError(state, "...Consider using the simple moisture diffusion calculation method for this application"); ShowContinueError(state, "...The program will continue, but if the simulation fails due to too low/high temperatures, instability " @@ -986,9 +988,10 @@ namespace EcoRoofManager { state.dataEcoRoofMgr->RelativeSoilSaturationTop = (Moisture - MoistureResidual) / (MoistureMax - MoistureResidual); if (state.dataEcoRoofMgr->RelativeSoilSaturationTop < 0.0001) { if (state.dataEcoRoofMgr->ErrIndex == 0) { - ShowWarningMessage(state, - format("EcoRoof: UpdateSoilProps: Relative Soil Saturation Top Moisture <= 0.0001, Value=[{:.5R}].", - state.dataEcoRoofMgr->RelativeSoilSaturationTop)); + ShowWarningMessage( + state, + EnergyPlus::format("EcoRoof: UpdateSoilProps: Relative Soil Saturation Top Moisture <= 0.0001, Value=[{:.5R}].", + state.dataEcoRoofMgr->RelativeSoilSaturationTop)); ShowContinueError(state, "Value is set to 0.0001 and simulation continues."); ShowContinueError(state, "You may wish to increase the number of timesteps to attempt to alleviate the problem."); } diff --git a/src/EnergyPlus/EconomicLifeCycleCost.cc b/src/EnergyPlus/EconomicLifeCycleCost.cc index b7880d2435b..3247a1e18b3 100644 --- a/src/EnergyPlus/EconomicLifeCycleCost.cc +++ b/src/EnergyPlus/EconomicLifeCycleCost.cc @@ -194,9 +194,9 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) for (jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(AlphaArray(jFld), "LifeCycleCost:")) { ShowWarningError(state, - format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + EnergyPlus::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 @@ -215,7 +215,7 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) elcc->discountConvention = DiscConv::EndOfYear; ShowWarningError( state, - format( + EnergyPlus::format( "{}: Invalid {}=\"{}\". EndOfYear will be used.", CurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(2), AlphaArray(2))); } // A3, \field Inflation Approach @@ -227,58 +227,61 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) if (elcc->inflationApproach == InflAppr::Invalid) { elcc->inflationApproach = InflAppr::ConstantDollar; ShowWarningError(state, - format("{}: Invalid {}=\"{}\". ConstantDollar will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaArray(3))); + EnergyPlus::format("{}: Invalid {}=\"{}\". ConstantDollar will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3), + AlphaArray(3))); } // N1, \field Real Discount Rate // \type real elcc->realDiscountRate = NumArray(1); if ((elcc->inflationApproach == InflAppr::ConstantDollar) && state.dataIPShortCut->lNumericFieldBlanks(1)) { ShowWarningError(state, - format("{}: Invalid for field {} to be blank when ConstantDollar analysis is be used.", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(1))); + EnergyPlus::format("{}: Invalid for field {} to be blank when ConstantDollar analysis is be used.", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(1))); } if ((elcc->realDiscountRate > 0.30) || (elcc->realDiscountRate < -0.30)) { ShowWarningError( state, - format("{}: Invalid value in field {}. This value is the decimal value not a percentage so most values are between 0.02 and 0.15. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(1))); + EnergyPlus::format( + "{}: Invalid value in field {}. This value is the decimal value not a percentage so most values are between 0.02 and 0.15. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(1))); } // N2, \field Nominal Discount Rate // \type real elcc->nominalDiscountRate = NumArray(2); if ((elcc->inflationApproach == InflAppr::CurrentDollar) && state.dataIPShortCut->lNumericFieldBlanks(2)) { ShowWarningError(state, - format("{}: Invalid for field {} to be blank when CurrentDollar analysis is be used.", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(2))); + EnergyPlus::format("{}: Invalid for field {} to be blank when CurrentDollar analysis is be used.", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(2))); } if ((elcc->nominalDiscountRate > 0.30) || (elcc->nominalDiscountRate < -0.30)) { ShowWarningError( state, - format("{}: Invalid value in field {}. This value is the decimal value not a percentage so most values are between 0.02 and 0.15. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(2))); + EnergyPlus::format( + "{}: Invalid value in field {}. This value is the decimal value not a percentage so most values are between 0.02 and 0.15. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(2))); } // N3, \field Inflation // \type real elcc->inflation = NumArray(3); if ((elcc->inflationApproach == InflAppr::ConstantDollar) && (!state.dataIPShortCut->lNumericFieldBlanks(3))) { ShowWarningError(state, - format("{}: Invalid for field {} contain a value when ConstantDollar analysis is be used.", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3))); + EnergyPlus::format("{}: Invalid for field {} contain a value when ConstantDollar analysis is be used.", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(3))); } if ((elcc->inflation > 0.30) || (elcc->inflation < -0.30)) { ShowWarningError( state, - format("{}: Invalid value in field {}. This value is the decimal value not a percentage so most values are between 0.02 and 0.15. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3))); + EnergyPlus::format( + "{}: Invalid value in field {}. This value is the decimal value not a percentage so most values are between 0.02 and 0.15. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(3))); } // A4, \field Base Date Month // \type choice @@ -299,10 +302,10 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) if (elcc->baseDateMonth == -1) { elcc->baseDateMonth = 0; ShowWarningError(state, - format("{}: Invalid month entered in field {}. Using January instead of \"{}\"", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(4), - AlphaArray(4))); + EnergyPlus::format("{}: Invalid month entered in field {}. Using January instead of \"{}\"", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(4), + AlphaArray(4))); } // N4, \field Base Date Year // \type integer @@ -311,15 +314,15 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) elcc->baseDateYear = int(NumArray(4)); if (elcc->baseDateYear > 2100) { ShowWarningError(state, - format("{}: Invalid value in field {}. Value greater than 2100 yet it is representing a year. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(4))); + EnergyPlus::format("{}: Invalid value in field {}. Value greater than 2100 yet it is representing a year. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(4))); } if (elcc->baseDateYear < 1900) { ShowWarningError(state, - format("{}: Invalid value in field {}. Value less than 1900 yet it is representing a year. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(4))); + EnergyPlus::format("{}: Invalid value in field {}. Value less than 1900 yet it is representing a year. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(4))); } // A5, \field Service Date Month // \type choice @@ -340,10 +343,10 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) if (elcc->serviceDateMonth == -1) { elcc->serviceDateMonth = 0; ShowWarningError(state, - format("{}: Invalid month entered in field {}. Using January instead of \"{}\"", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(5), - AlphaArray(5))); + EnergyPlus::format("{}: Invalid month entered in field {}. Using January instead of \"{}\"", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(5), + AlphaArray(5))); } // N5, \field Service Date Year // \type integer @@ -352,15 +355,15 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) elcc->serviceDateYear = int(NumArray(5)); if (elcc->serviceDateYear > 2100) { ShowWarningError(state, - format("{}: Invalid value in field {}. Value greater than 2100 yet it is representing a year. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5))); + EnergyPlus::format("{}: Invalid value in field {}. Value greater than 2100 yet it is representing a year. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(5))); } if (elcc->serviceDateYear < 1900) { ShowWarningError(state, - format("{}: Invalid value in field {}. Value less than 1900 yet it is representing a year. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5))); + EnergyPlus::format("{}: Invalid value in field {}. Value less than 1900 yet it is representing a year. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(5))); } // N6, \field Length of Study Period in Years // \type integer @@ -368,16 +371,17 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) // \maximum 100 elcc->lengthStudyYears = int(NumArray(6)); if (elcc->lengthStudyYears > 100) { - ShowWarningError(state, - format("{}: Invalid value in field {}. A value greater than 100 is not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(6))); + ShowWarningError( + state, + EnergyPlus::format("{}: Invalid value in field {}. A value greater than 100 is not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(6))); } if (elcc->lengthStudyYears < 1) { ShowWarningError(state, - format("{}: Invalid value in field {}. A value less than 1 is not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(6))); + EnergyPlus::format("{}: Invalid value in field {}. A value less than 1 is not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(6))); } elcc->lengthStudyTotalMonths = elcc->lengthStudyYears * 12; // N7, \field Tax rate @@ -386,9 +390,9 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) elcc->taxRate = NumArray(7); if (elcc->taxRate < 0.0 && (!state.dataIPShortCut->lNumericFieldBlanks(7))) { ShowWarningError(state, - format("{}: Invalid value in field {}. A value less than 0 is not reasonable for a tax rate. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(10))); + EnergyPlus::format("{}: Invalid value in field {}. A value less than 0 is not reasonable for a tax rate. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(10))); } // A6; \field Depreciation Method // \type choice @@ -408,23 +412,25 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) if (elcc->depreciationMethod == DeprMethod::Invalid) { elcc->depreciationMethod = DeprMethod::None; if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowWarningError( - state, - format("{}: The input field {}is blank. \"None\" will be used.", CurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(6))); + ShowWarningError(state, + EnergyPlus::format("{}: The input field {}is blank. \"None\" will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(6))); } else { ShowWarningError(state, - format("{}: Invalid {}=\"{}{}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(6), - AlphaArray(6), - R"(". "None" will be used.)")); + EnergyPlus::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, format("{}: Only one instance of this object is allowed. No life-cycle cost reports will be generated.", CurrentModuleObject)); + ShowWarningError(state, + EnergyPlus::format("{}: Only one instance of this object is allowed. No life-cycle cost reports will be generated.", + CurrentModuleObject)); elcc->LCCparamPresent = false; } } @@ -478,9 +484,9 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) for (jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(AlphaArray(jFld), "LifeCycleCost:")) { ShowWarningError(state, - format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + EnergyPlus::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 @@ -508,10 +514,10 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (isNotRecurringCost) { elcc->RecurringCosts[iInObj].category = CostCategory::Maintenance; ShowWarningError(state, - format("{}: Invalid {}=\"{}\". The category of Maintenance will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaArray(2))); + EnergyPlus::format("{}: Invalid {}=\"{}\". The category of Maintenance will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaArray(2))); } // N1, \field Cost // \type real @@ -525,10 +531,10 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (elcc->RecurringCosts[iInObj].startOfCosts == StartCosts::Invalid) { elcc->RecurringCosts[iInObj].startOfCosts = StartCosts::ServicePeriod; ShowWarningError(state, - format("{}: Invalid {}=\"{}\". The start of the service period will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaArray(3))); + EnergyPlus::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 @@ -536,18 +542,20 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) // \maximum 100 elcc->RecurringCosts[iInObj].yearsFromStart = int(NumArray(2)); if (elcc->RecurringCosts[iInObj].yearsFromStart > 100) { - ShowWarningError(state, - 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))); + 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))); } if (elcc->RecurringCosts[iInObj].yearsFromStart < 0) { - ShowWarningError(state, - 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))); + 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))); } // N3, \field Months from Start // \type integer @@ -555,18 +563,20 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) // \maximum 1200 elcc->RecurringCosts[iInObj].monthsFromStart = int(NumArray(3)); if (elcc->RecurringCosts[iInObj].monthsFromStart > 1200) { - ShowWarningError(state, - 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))); + 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))); } if (elcc->RecurringCosts[iInObj].monthsFromStart < 0) { - ShowWarningError(state, - 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))); + 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))); } // N4, \field Repeat Period Years // \type integer @@ -574,18 +584,20 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) // \maximum 100 elcc->RecurringCosts[iInObj].repeatPeriodYears = int(NumArray(4)); if (elcc->RecurringCosts[iInObj].repeatPeriodYears > 100) { - ShowWarningError(state, - 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))); + 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))); } if (elcc->RecurringCosts[iInObj].repeatPeriodYears < 1) { - ShowWarningError(state, - 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))); + 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))); } // N5, \field Repeat Period Months // \type integer @@ -593,42 +605,46 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) // \maximum 1200 elcc->RecurringCosts[iInObj].repeatPeriodMonths = int(NumArray(5)); if (elcc->RecurringCosts[iInObj].repeatPeriodMonths > 1200) { - ShowWarningError(state, - 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))); + 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))); } if (elcc->RecurringCosts[iInObj].repeatPeriodMonths < 0) { - ShowWarningError(state, - 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))); + 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))); } if ((elcc->RecurringCosts[iInObj].repeatPeriodMonths == 0) && (elcc->RecurringCosts[iInObj].repeatPeriodYears == 0)) { ShowWarningError(state, - 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))); + 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))); } // N6; \field Annual escalation rate // \type real elcc->RecurringCosts[iInObj].annualEscalationRate = int(NumArray(6)); if (elcc->RecurringCosts[iInObj].annualEscalationRate > 0.30) { - ShowWarningError(state, - 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))); + 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))); } if (elcc->RecurringCosts[iInObj].annualEscalationRate < -0.30) { - ShowWarningError(state, - 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))); + 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))); } // express the years and months fields in total months elcc->RecurringCosts[iInObj].totalMonthsFromStart = @@ -693,9 +709,9 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) for (jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(AlphaArray(jFld), "LifeCycleCost:")) { ShowWarningError(state, - format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + EnergyPlus::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 @@ -716,10 +732,10 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) if (isNotNonRecurringCost) { elcc->NonrecurringCost[iInObj].category = CostCategory::Construction; ShowWarningError(state, - format("{}: Invalid {}=\"{}\". The category of Construction will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaArray(2))); + EnergyPlus::format("{}: Invalid {}=\"{}\". The category of Construction will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaArray(2))); } // N1, \field Cost // \type real @@ -733,10 +749,10 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) if (elcc->NonrecurringCost[iInObj].startOfCosts == StartCosts::Invalid) { elcc->NonrecurringCost[iInObj].startOfCosts = StartCosts::ServicePeriod; ShowWarningError(state, - format("{}: Invalid {}=\"{}\". The start of the service period will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaArray(3))); + EnergyPlus::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 @@ -744,18 +760,20 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) // \maximum 100 elcc->NonrecurringCost[iInObj].yearsFromStart = int(NumArray(2)); if (elcc->NonrecurringCost[iInObj].yearsFromStart > 100) { - ShowWarningError(state, - 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))); + 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))); } if (elcc->NonrecurringCost[iInObj].yearsFromStart < 0) { - ShowWarningError(state, - 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))); + 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))); } // N3; \field Months from Start // \type integer @@ -763,18 +781,20 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) // \maximum 11 elcc->NonrecurringCost[iInObj].monthsFromStart = int(NumArray(3)); if (elcc->NonrecurringCost[iInObj].monthsFromStart > 1200) { - ShowWarningError(state, - 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))); + 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))); } if (elcc->NonrecurringCost[iInObj].monthsFromStart < 0) { - ShowWarningError(state, - 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))); + 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))); } // express the years and months fields in total months elcc->NonrecurringCost[iInObj].totalMonthsFromStart = @@ -833,10 +853,11 @@ 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, - format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + ShowWarningError( + state, + EnergyPlus::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 @@ -861,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, format("In {} contains more alpha fields than expected.", CurrentModuleObject)); + ShowWarningError(state, EnergyPlus::format("In {} contains more alpha fields than expected.", CurrentModuleObject)); } // N1, \field Escalation Start Year // \type integer @@ -870,15 +891,15 @@ void GetInputLifeCycleCostUsePriceEscalation(EnergyPlusData &state) elcc->UsePriceEscalation(iInObj).escalationStartYear = int(NumArray(1)); if (elcc->UsePriceEscalation(iInObj).escalationStartYear > 2100) { ShowWarningError(state, - format("{}: Invalid value in field {}. Value greater than 2100 yet it is representing a year. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(1))); + EnergyPlus::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, - format("{}: Invalid value in field {}. Value less than 1900 yet it is representing a year. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(1))); + EnergyPlus::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 @@ -899,10 +920,10 @@ void GetInputLifeCycleCostUsePriceEscalation(EnergyPlusData &state) if (elcc->UsePriceEscalation(iInObj).escalationStartMonth == -1) { elcc->UsePriceEscalation(iInObj).escalationStartMonth = 0; ShowWarningError(state, - format("{}: Invalid month entered in field {}. Using January instead of \"{}\"", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaArray(3))); + EnergyPlus::format("{}: Invalid month entered in field {}. Using January instead of \"{}\"", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3), + AlphaArray(3))); } // N2, \field Year 1 Escalation // \type real @@ -984,10 +1005,11 @@ 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, - format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + ShowWarningError( + state, + EnergyPlus::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 @@ -1012,7 +1034,7 @@ void GetInputLifeCycleCostUseAdjustment(EnergyPlusData &state) // \key OtherFuel2 elcc->UseAdjustment(iInObj).resource = static_cast(getEnumValue(Constant::eResourceNamesUC, AlphaArray(2))); if (NumAlphas > 2) { - ShowWarningError(state, format("In {} contains more alpha fields than expected.", CurrentModuleObject)); + ShowWarningError(state, EnergyPlus::format("In {} contains more alpha fields than expected.", CurrentModuleObject)); } // N1, \field Year 1 Multiplier // \type real @@ -1171,9 +1193,10 @@ 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, - 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, + EnergyPlus::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 @@ -1202,8 +1225,9 @@ void ExpressAsCashFlows(EnergyPlusData &state) } else { ShowWarningError( state, - 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)); + 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)); } } // Put resource costs into cashflows @@ -1336,8 +1360,8 @@ void ExpressAsCashFlows(EnergyPlusData &state) Constant::eResource curResource = elcc->UsePriceEscalation(nUsePriceEsc).resource; if (!resourceCostNotZero[static_cast(curResource)] && state.dataGlobal->DoWeathSim) { ShowWarningError(state, - format("The resource referenced by LifeCycleCost:UsePriceEscalation= \"{}\" has no energy cost. ", - elcc->UsePriceEscalation(nUsePriceEsc).name)); + EnergyPlus::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."); } } @@ -1723,8 +1747,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) } else { tableBody(1, 6) = "-- N/A --"; } - tableBody(1, 7) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear); - tableBody(1, 8) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->serviceDateMonth)], elcc->serviceDateYear); + 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, 9) = fmt::to_string(elcc->lengthStudyYears); tableBody(1, 10) = OutputReportTabular::RealToStr(currentStyle.formatReals, elcc->taxRate, 4); tableBody(1, 11) = DeprMethodNames[static_cast(elcc->depreciationMethod)]; @@ -1767,9 +1791,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) = format("{} {}", - Util::MonthNamesCC[static_cast(elcc->UsePriceEscalation(jObj).escalationStartMonth)], - elcc->UsePriceEscalation(jObj).escalationStartYear); + tableBody(jObj, 2) = EnergyPlus::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) { @@ -1810,7 +1834,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) rowHead(1) = ""; for (int iYear = 1; iYear <= numYears; ++iYear) { rowHead(iYear + 1) = - format("{} {}", Util::MonthNamesCC[static_cast(elcc->serviceDateMonth)], elcc->serviceDateYear + iYear - 1); + EnergyPlus::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; @@ -1852,7 +1876,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) tableBody = ""; rowHead(1) = ""; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear + 1) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear + 1) = + EnergyPlus::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; @@ -1903,7 +1928,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) tableBody.allocate(numColumns, elcc->lengthStudyYears); tableBody = ""; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = + EnergyPlus::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; @@ -1957,7 +1983,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) tableBody.allocate(numColumns, elcc->lengthStudyYears); tableBody = ""; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = + EnergyPlus::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; @@ -2023,7 +2050,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) } columnHead(4) = Total; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = + EnergyPlus::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) = @@ -2073,7 +2101,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) columnHead(10) = Total; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = + EnergyPlus::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); @@ -2122,7 +2151,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) columnHead(10) = Total; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = + EnergyPlus::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); @@ -2397,7 +2427,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) totalPV = 0.0; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = + EnergyPlus::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 @@ -2448,7 +2479,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) totalPV = 0.0; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = + EnergyPlus::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 ae6a36eed66..850707e5160 100644 --- a/src/EnergyPlus/EconomicTariff.cc +++ b/src/EnergyPlus/EconomicTariff.cc @@ -318,7 +318,7 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i for (int jFld = 1; jFld <= NumAlphas; ++jFld) { // args are always turned to upper case but this is okay... if (hasi(s_ipsc->cAlphaArgs(jFld), "UtilityCost:")) { - ShowWarningError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -342,10 +342,11 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i GetVariableKeyCountandType(state, tariff.reportMeter, KeyCount, TypeVar, AvgSumVar, StepTypeVar, UnitsVar); // if no meters found for that name if (KeyCount == 0) { - ShowWarningError(state, format("{}{}=\"{}\" missing meter", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\" missing meter", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, - format("Meter referenced is not present due to a lack of equipment that uses that energy source/meter:\"{}\".", tariff.reportMeter)); + EnergyPlus::format("Meter referenced is not present due to a lack of equipment that uses that energy source/meter:\"{}\".", + tariff.reportMeter)); tariff.reportMeterIndx = -1; } else { NamesOfKeys.allocate(KeyCount); @@ -353,7 +354,7 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i GetVariableKeys(state, tariff.reportMeter, TypeVar, NamesOfKeys, IndexesForKeyVar); // although this retrieves all keys for a variable, we only need one so the first one is chosen if (KeyCount > 1) { - ShowWarningError(state, format("{}{}=\"{}\" multiple keys", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\" multiple keys", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... Multiple keys for variable select. First key will be used."); } // assign the index @@ -489,10 +490,11 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i case EconConv::THERM: { tariff.energyConv = 9.4781712e-9; tariff.demandConv = 0.00003412; - ShowWarningCustom( - state, - eoh, - format("{}=\"{}\", Therm is an unusual choice for an electric resource.", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowWarningCustom(state, + eoh, + EnergyPlus::format("{}=\"{}\", Therm is an unusual choice for an electric resource.", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } break; // Otherwise, default to kWh @@ -650,10 +652,10 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i case 15: { tariff.demandWindow = DemandWindow::Hour; tariff.demWinTime = 1.00; - ShowWarningError(state, format("{}{}=\"{}\" invalid data", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\" invalid data", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("Demand window of QuarterHour is not consistent with number of timesteps per hour [{}].", - state.dataGlobal->TimeStepsInHour)); + EnergyPlus::format("Demand window of QuarterHour is not consistent with number of timesteps per hour [{}].", + state.dataGlobal->TimeStepsInHour)); ShowContinueError(state, "Demand window will be set to FullHour, and the simulation continues."); } break; case 2: @@ -662,10 +664,10 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i case 30: { tariff.demandWindow = DemandWindow::Half; tariff.demWinTime = 0.50; - ShowWarningError(state, format("{}{}=\"{}\" invalid data", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\" invalid data", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("Demand window of QuarterHour is not consistent with number of timesteps per hour [{}].", - state.dataGlobal->TimeStepsInHour)); + EnergyPlus::format("Demand window of QuarterHour is not consistent with number of timesteps per hour [{}].", + state.dataGlobal->TimeStepsInHour)); ShowContinueError(state, "Demand window will be set to HalfHour, and the simulation continues."); } break; case 4: @@ -689,10 +691,10 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i case 15: { tariff.demandWindow = DemandWindow::Hour; tariff.demWinTime = 1.00; - ShowWarningError(state, format("{}{}=\"{}\" invalid data", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\" invalid data", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("Demand window of HalfHour is not consistent with number of timesteps per hour [{}].", - state.dataGlobal->TimeStepsInHour)); + EnergyPlus::format("Demand window of HalfHour is not consistent with number of timesteps per hour [{}].", + state.dataGlobal->TimeStepsInHour)); ShowContinueError(state, "Demand window will be set to FullHour, and the simulation continues."); } break; case 2: @@ -780,23 +782,27 @@ void GetInputEconomicsTariff(EnergyPlusData &state, bool &ErrorsFound) // true i // check if meter is consistent with buy or sell option if (tariff.buyOrSell == BuySell::SellToUtility) { if (!Util::SameString(tariff.reportMeter, "ELECTRICITYSURPLUSSOLD:FACILITY")) { - ShowWarningError(state, format("{}{}=\"{}\" atypical meter", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("The meter chosen \"{}\" is not typically used with the sellToUtility option.", tariff.reportMeter)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\" atypical meter", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError( + state, EnergyPlus::format("The meter chosen \"{}\" is not typically used with the sellToUtility option.", tariff.reportMeter)); ShowContinueError(state, "Usually the ElectricitySurplusSold:Facility meter is selected when the sellToUtility option is used."); } } else if (tariff.buyOrSell == BuySell::NetMetering) { if (!Util::SameString(tariff.reportMeter, "ELECTRICITYNET:FACILITY")) { - ShowWarningError(state, format("{}{}=\"{}\" atypical meter", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("The meter chosen \"{}\" is not typically used with the netMetering option.", tariff.reportMeter)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\" atypical meter", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError( + state, EnergyPlus::format("The meter chosen \"{}\" is not typically used with the netMetering option.", tariff.reportMeter)); ShowContinueError(state, "Usually the ElectricityNet:Facility meter is selected when the netMetering option is used."); } } else if (tariff.buyOrSell == BuySell::BuyFromUtility) { if (hasi(tariff.reportMeter, "Elec")) { // test if electric meter if (!(Util::SameString(tariff.reportMeter, "Electricity:Facility") || Util::SameString(tariff.reportMeter, "ElectricityPurchased:Facility"))) { - ShowWarningError(state, format("{}{}=\"{}\" atypical meter", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("The meter chosen \"{}\" is not typically used with the buyFromUtility option.", tariff.reportMeter)); + ShowWarningError(state, + EnergyPlus::format("{}{}=\"{}\" atypical meter", RoutineName, CurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("The meter chosen \"{}\" is not typically used with the buyFromUtility option.", tariff.reportMeter)); ShowContinueError(state, "Usually the Electricity:Facility meter or the ElectricityPurchased:Facility is selected when the " "buyFromUtility option is used."); @@ -875,7 +881,7 @@ void GetInputEconomicsQualify(EnergyPlusData &state, bool &ErrorsFound) // true // check to make sure none of the values are another economic object for (jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(s_ipsc->cAlphaArgs(jFld), "UtilityCost:")) { - ShowWarningError(state, format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -960,7 +966,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, format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -983,8 +989,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, format("{}{}=\"{}\" invalid data", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); + 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))); ShowContinueError(state, " a Season other than Annual is used but no Season Schedule Name is specified in the UtilityCost:Tariff."); } @@ -1044,7 +1051,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, format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -1067,8 +1074,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, format("{}{}=\"{}\" invalid data", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); + 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))); ShowContinueError(state, " a Season other than Annual is used but no Season Schedule Name is specified in the UtilityCost:Tariff."); } @@ -1166,7 +1174,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, format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -1242,7 +1250,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, format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -1315,7 +1323,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, format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -1337,15 +1345,16 @@ void GetInputEconomicsComputation(EnergyPlusData &state, bool &ErrorsFound) // t computation.firstStep = 0; computation.lastStep = -1; computation.isUserDef = false; - ShowSevereError(state, format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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, format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("... not found {}=\"{}\".", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + 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))); ErrorsFound = true; } } @@ -1396,13 +1405,14 @@ void GetInputEconomicsCurrencyType(EnergyPlusData &state, bool &ErrorsFound) // } } if (state.dataCostEstimateManager->selectedMonetaryUnit == 0) { - ShowSevereError(state, format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("... invalid {}.", s_ipsc->cAlphaFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("... invalid {}.", s_ipsc->cAlphaFieldNames(1))); ErrorsFound = true; } } else if (NumCurrencyType > 1) { - ShowWarningError(state, - format("{}{} Only one instance of this object is allowed. USD will be used.", RoutineName, s_ipsc->cCurrentModuleObject)); + ShowWarningError( + state, + EnergyPlus::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 } } @@ -1450,8 +1460,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, format("In UtilityCost:Computation line: {}", lineOfCompute)); - ShowContinueError(state, format(" Do not recognize: {} Will skip.", word)); + ShowWarningError(state, EnergyPlus::format("In UtilityCost:Computation line: {}", lineOfCompute)); + ShowContinueError(state, EnergyPlus::format(" Do not recognize: {} Will skip.", word)); } else { incrementSteps(state); s_econ->steps(s_econ->numSteps).type = StepType::Var; @@ -1904,8 +1914,8 @@ int FindTariffIndex( if (found > 0) { FindTariffIndex = found; } else { - ShowSevereError(state, format("{}=\"{}\" invalid tariff referenced", nameOfCurObj, nameOfReferingObj)); - ShowContinueError(state, format("not found UtilityCost:Tariff=\"{}\".", nameOfTariff)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid tariff referenced", nameOfCurObj, nameOfReferingObj)); + ShowContinueError(state, EnergyPlus::format("not found UtilityCost:Tariff=\"{}\".", nameOfTariff)); ErrorsFound = true; FindTariffIndex = 0; } @@ -1932,10 +1942,13 @@ void warnIfNativeVarname( auto &s_econ = state.dataEconTariff; ErrorsFound = true; if (curTariffIndex >= 1 && curTariffIndex <= s_econ->numTariff) { - ShowSevereError(state, format("UtilityCost:Tariff=\"{}\" invalid referenced name", s_econ->tariff(curTariffIndex).tariffName)); - ShowContinueError(state, format("{}=\"{}\" You cannot name an object using the same name as a native variable.", curobjName, objName)); + 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)); } else { - ShowSevereError(state, format("{}=\"{}\" You cannot name an object using the same name as a native variable.", curobjName, objName)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" You cannot name an object using the same name as a native variable.", curobjName, objName)); } } } @@ -2096,8 +2109,8 @@ std::string RemoveSpaces(EnergyPlusData &state, std::string_view const StringIn) } } if (foundSpaces) { - ShowWarningError(state, format("UtilityCost: Spaces were removed from the variable=\"{}\".", StringIn)); - ShowContinueError(state, format("...Resultant variable=\"{}\".", StringOut)); + ShowWarningError(state, EnergyPlus::format("UtilityCost: Spaces were removed from the variable=\"{}\".", StringIn)); + ShowContinueError(state, EnergyPlus::format("...Resultant variable=\"{}\".", StringOut)); } return StringOut; } @@ -2315,7 +2328,7 @@ void CreateDefaultComputation(EnergyPlusData &state) } // make sure no computation is already user defined if (computation.firstStep != 0) { - ShowWarningError(state, format("In UtilityCost:Tariff: Overwriting user defined tariff {}", tariff.tariffName)); + ShowWarningError(state, EnergyPlus::format("In UtilityCost:Tariff: Overwriting user defined tariff {}", tariff.tariffName)); } // initialize the computation computation.computeName = "Autogenerated - " + tariff.tariffName; @@ -2396,8 +2409,8 @@ void CreateDefaultComputation(EnergyPlusData &state) ++loopCount; } if (loopCount > 100000) { - ShowWarningError(state, - format("UtilityCost:Tariff: Loop count exceeded when counting dependencies in tariff: {}", tariff.tariffName)); + ShowWarningError( + state, EnergyPlus::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; @@ -2407,16 +2420,18 @@ void CreateDefaultComputation(EnergyPlusData &state) } } if (remainingVarFlag) { - ShowWarningError(state, - format("CreateDefaultComputation: In UtilityCost:Computation: Circular or invalid dependencies found in tariff: {}", - tariff.tariffName)); + ShowWarningError( + state, + EnergyPlus::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, format(" {}", s_econ->econVar(iVar).name)); + ShowContinueError(state, EnergyPlus::format(" {}", s_econ->econVar(iVar).name)); for (int kOperand = s_econ->econVar(iVar).firstOperand; kOperand <= s_econ->econVar(iVar).lastOperand; ++kOperand) { - ShowContinueError(state, format(" -> {}", s_econ->econVar(s_econ->operands(kOperand).varNum).name)); + ShowContinueError(state, + EnergyPlus::format(" -> {}", s_econ->econVar(s_econ->operands(kOperand).varNum).name)); } } } @@ -2427,10 +2442,11 @@ void CreateDefaultComputation(EnergyPlusData &state) if (computation.firstStep >= computation.lastStep) { computation.firstStep = 0; computation.lastStep = -1; - ShowWarningError(state, - format("CreateDefaultComputation: In UtilityCost:Computation: No lines in the auto-generated computation can be " - "interpreted in tariff: {}", - tariff.tariffName)); + ShowWarningError( + state, + EnergyPlus::format("CreateDefaultComputation: In UtilityCost:Computation: No lines in the auto-generated computation can be " + "interpreted in tariff: {}", + tariff.tariffName)); } } } @@ -2581,7 +2597,7 @@ void GatherForEconomics(EnergyPlusData &state) tariff.gatherDemand(curMonth)[(int)curPeriod] = curDemand; } } else { - ShowWarningError(state, format("UtilityCost:Tariff: While gathering for: {}", tariff.tariffName)); + ShowWarningError(state, EnergyPlus::format("UtilityCost:Tariff: While gathering for: {}", tariff.tariffName)); ShowContinueError(state, "Invalid schedule values - outside of range"); } // Real Time Pricing @@ -3096,8 +3112,8 @@ void pushStack(EnergyPlusData &state, Array1A const monthlyArray, int co evaluateQualify(state, variablePointer); break; case ObjType::Invalid: - ShowWarningError(state, format("UtilityCost variable not defined: {}", econVar(variablePointer).name)); - ShowContinueError(state, format(" In tariff: {}", tariff(econVar(variablePointer).tariffIndx).tariffName)); + ShowWarningError(state, EnergyPlus::format("UtilityCost variable not defined: {}", econVar(variablePointer).name)); + ShowContinueError(state, EnergyPlus::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; @@ -3111,9 +3127,9 @@ void pushStack(EnergyPlusData &state, Array1A const monthlyArray, int co break; default: ShowWarningError(state, - format("UtilityCost Debugging issue. Invalid kind of variable used (pushStack). {} in tariff: {}", - econVar(variablePointer).kindOfObj, - tariff(econVar(variablePointer).tariffIndx).tariffName)); + EnergyPlus::format("UtilityCost Debugging issue. Invalid kind of variable used (pushStack). {} in tariff: {}", + econVar(variablePointer).kindOfObj, + tariff(econVar(variablePointer).tariffIndx).tariffName)); } // if the serviceCharges are being evaluated add in the monthly charges if (econVar(variablePointer).kindOfObj == ObjType::Category && econVar(variablePointer).specific == (int)Cat::ServiceCharges) { @@ -3150,9 +3166,9 @@ void popStack(EnergyPlusData &state, Array1A monthlyArray, int &variable variablePointer = stack(s_econ->topOfStack).varPt; monthlyArray = stack(s_econ->topOfStack).values; } else { - ShowWarningError( - state, - format("UtilityCost:Tariff: stack underflow in calculation of utility bills. On variable: {}", s_econ->econVar(variablePointer).name)); + ShowWarningError(state, + EnergyPlus::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; @@ -3179,13 +3195,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, format(" Between: {}", s_econ->econVar(usingVariable).name)); - ShowContinueError(state, format(" And: {}", s_econ->econVar(chargeSimple.namePt).name)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", s_econ->econVar(usingVariable).name)); + ShowContinueError(state, EnergyPlus::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, format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, format(" And: {}", s_econ->tariff(chargeSimple.tariffIndx).tariffName)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(chargeSimple.tariffIndx).tariffName)); } // data from the Charge:Simple sourceVals = s_econ->econVar(chargeSimple.sourcePt).values; @@ -3239,13 +3255,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, format(" Between: {}", s_econ->econVar(usingVariable).name)); - ShowContinueError(state, format(" And: {}", s_econ->econVar(chargeBlock.namePt).name)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", s_econ->econVar(usingVariable).name)); + ShowContinueError(state, EnergyPlus::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, format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, format(" And: {}", s_econ->tariff(chargeBlock.tariffIndx).tariffName)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(chargeBlock.tariffIndx).tariffName)); } // data from the chargeBlock sourceVals = s_econ->econVar(chargeBlock.sourcePt).values; @@ -3315,9 +3331,9 @@ void evaluateChargeBlock(EnergyPlusData &state, int const usingVariable) } } if (!flagAllZero) { - ShowWarningError( - state, - format("UtilityCost:Tariff Not all energy or demand was assigned in the block charge: {}", s_econ->econVar(usingVariable).name)); + ShowWarningError(state, + EnergyPlus::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 @@ -3352,13 +3368,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, format(" Between: {}", s_econ->econVar(usingVariable).name)); - ShowContinueError(state, format(" And: {}", s_econ->econVar(ratchet.namePt).name)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", s_econ->econVar(usingVariable).name)); + ShowContinueError(state, EnergyPlus::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, format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, format(" And: {}", s_econ->tariff(ratchet.tariffIndx).tariffName)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(ratchet.tariffIndx).tariffName)); } // data from the Ratchet baselineVals = s_econ->econVar(ratchet.baselinePt).values; @@ -3469,13 +3485,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, format(" Between: {}", econVar.name)); - ShowContinueError(state, format(" And: {}", s_econ->econVar(qualify.namePt).name)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", econVar.name)); + ShowContinueError(state, EnergyPlus::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, format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, format(" And: {}", s_econ->tariff(qualify.tariffIndx).tariffName)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(qualify.tariffIndx).tariffName)); } // data from the Qualify sourceVals = s_econ->econVar(qualify.sourcePt).values; @@ -3599,8 +3615,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, format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, format(" And: {}", s_econ->tariff(tariff.cats[(int)Cat::ServiceCharges]).tariffName)); + ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, EnergyPlus::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; @@ -3979,24 +3995,28 @@ void LEEDtariffReporting(EnergyPlusData &state) OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEtsVirt, "Other", otherTotalCost / otherTotalEne, 3); } // units - OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEtsEneUnt, "Electricity", format("{}", convEnergyStrings[(int)elecUnits])); - OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEtsEneUnt, "Natural Gas", format("{}", convEnergyStrings[(int)gasUnits])); - OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEtsEneUnt, "Other", format("{}", convEnergyStrings[(int)othrUnits])); - OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEtsDemUnt, "Electricity", format("{}", convDemandStrings[(int)elecUnits])); + 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])); + OutputReportPredefined::PreDefTableEntry( + state, s_orp->pdchLeedEtsEneUnt, "Other", EnergyPlus::format("{}", convEnergyStrings[(int)othrUnits])); + OutputReportPredefined::PreDefTableEntry( + state, s_orp->pdchLeedEtsDemUnt, "Electricity", EnergyPlus::format("{}", convDemandStrings[(int)elecUnits])); OutputReportPredefined::PreDefTableEntry( state, s_orp->pdchLeedEtsDemUnt, "Natural Gas", - format("{}{}", - convDemandStrings[(int)gasUnits], - (gasDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)gasDemWindowUnits])); + EnergyPlus::format("{}{}", + convDemandStrings[(int)gasUnits], + (gasDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)gasDemWindowUnits])); OutputReportPredefined::PreDefTableEntry( state, s_orp->pdchLeedEtsDemUnt, "Other", - format("{}{}", - convDemandStrings[(int)othrUnits], - (othrDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)othrDemWindowUnits])); + EnergyPlus::format("{}{}", + convDemandStrings[(int)othrUnits], + (othrDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)othrDemWindowUnits])); // total cost OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEcsTotal, "Electricity", elecTotalCost, 2); @@ -4006,42 +4026,44 @@ 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", format("{}", convEnergyStrings[(int)distCoolUnits])); + state, s_orp->pdchLeedEtsEneUnt, "District Cooling", EnergyPlus::format("{}", convEnergyStrings[(int)distCoolUnits])); OutputReportPredefined::PreDefTableEntry( state, s_orp->pdchLeedEtsDemUnt, "District Cooling", - format("{}{}", - convDemandStrings[(int)distCoolUnits], - (distCoolDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distCoolDemWindowUnits])); + EnergyPlus::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", format("{}", convEnergyStrings[(int)distHeatWaterUnits])); - OutputReportPredefined::PreDefTableEntry( - state, - s_orp->pdchLeedEtsDemUnt, - "District Heating Water", - format("{}{}", - convDemandStrings[(int)distHeatWaterUnits], - (distHeatWaterDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distHeatWaterDemWindowUnits])); + 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])); 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", format("{}", convEnergyStrings[(int)distHeatSteamUnits])); - OutputReportPredefined::PreDefTableEntry( - state, - s_orp->pdchLeedEtsDemUnt, - "District Heating Steam", - format("{}{}", - convDemandStrings[(int)distHeatSteamUnits], - (distHeatSteamDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distHeatSteamDemWindowUnits])); + 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])); OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEcsTotal, "District Heating Steam", distHeatSteamTotalCost, 2); } // save the total costs for later to compute process fraction @@ -4458,7 +4480,7 @@ void WriteTabularTariffReports(EnergyPlusData &state) } else if (step.type == StepType::Var) { outString = econVar(step.varNum).name + ' ' + outString; } else if (step.type == StepType::Op) { - outString = format("{} {}", opNamesUC[(int)step.op], outString); + outString = EnergyPlus::format("{} {}", opNamesUC[(int)step.op], outString); } } } @@ -4482,12 +4504,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, format(" In UtilityCost:Tariff named {}", tariff.tariffName)); + ShowContinueError(state, EnergyPlus::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, format(" In UtilityCost:Tariff named {}", tariff.tariffName)); + ShowContinueError(state, EnergyPlus::format(" In UtilityCost:Tariff named {}", tariff.tariffName)); } } } diff --git a/src/EnergyPlus/ElectricBaseboardRadiator.cc b/src/EnergyPlus/ElectricBaseboardRadiator.cc index e0e56ec3d30..f92cc6af329 100644 --- a/src/EnergyPlus/ElectricBaseboardRadiator.cc +++ b/src/EnergyPlus/ElectricBaseboardRadiator.cc @@ -131,18 +131,19 @@ namespace ElectricBaseboardRadiator { BaseboardNum = CompIndex; if (BaseboardNum > NumElecBaseboards || BaseboardNum < 1) { ShowFatalError(state, - format("SimElectricBaseboard: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - BaseboardNum, - NumElecBaseboards, - EquipName)); + EnergyPlus::format("SimElectricBaseboard: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + BaseboardNum, + NumElecBaseboards, + EquipName)); } if (state.dataElectBaseboardRad->ElecBaseboard(BaseboardNum).CheckEquipName) { if (EquipName != state.dataElectBaseboardRad->ElecBaseboard(BaseboardNum).EquipName) { - ShowFatalError(state, - format("SimElectricBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - BaseboardNum, - EquipName, - state.dataElectBaseboardRad->ElecBaseboard(BaseboardNum).EquipName)); + ShowFatalError( + state, + EnergyPlus::format("SimElectricBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + BaseboardNum, + EquipName, + state.dataElectBaseboardRad->ElecBaseboard(BaseboardNum).EquipName)); } state.dataElectBaseboardRad->ElecBaseboard(BaseboardNum).CheckEquipName = false; } @@ -244,15 +245,15 @@ namespace ElectricBaseboardRadiator { if (!s_ipsc->lNumericFieldBlanks(iHeatDesignCapacityNumericNum)) { elecBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum); if (elecBaseboard.ScaledHeatingCapacity < 0.0 && elecBaseboard.ScaledHeatingCapacity != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum), - s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum), + s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); ShowContinueError(state, "Input for " + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum) + " = " + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum)); ShowContinueError(state, "Blank field not allowed for " + s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum)); @@ -263,23 +264,23 @@ namespace ElectricBaseboardRadiator { if (!s_ipsc->lNumericFieldBlanks(iHeatCapacityPerFloorAreaNumericNum)) { elecBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum); if (elecBaseboard.ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); ShowContinueError(state, "Input for " + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum) + " = " + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), - s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), + s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (elecBaseboard.ScaledHeatingCapacity == DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); ShowContinueError(state, "Input for " + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum) + " = " + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum)); ShowContinueError(state, "Illegal " + s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum) + " = Autosize"); ErrorsFound = true; } } else { - ShowSevereError(state, format(s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); + ShowSevereError(state, EnergyPlus::format(s_ipsc->cCurrentModuleObject, elecBaseboard.EquipName)); ShowContinueError(state, "Input for " + s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum) + " = " + s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum)); ShowContinueError(state, "Blank field not allowed for " + s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum)); @@ -292,9 +293,9 @@ namespace ElectricBaseboardRadiator { if (elecBaseboard.ScaledHeatingCapacity < 0.0) { ShowSevereError(state, s_ipsc->cCurrentModuleObject + " = " + elecBaseboard.EquipName); ShowContinueError(state, - format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { @@ -316,14 +317,14 @@ namespace ElectricBaseboardRadiator { ShowWarningError(state, std::string{RoutineName} + s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", " + s_ipsc->cNumericFieldNames(5) + " was lower than the allowable minimum."); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinFraction)); + ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinFraction)); elecBaseboard.FracRadiant = MinFraction; } if (elecBaseboard.FracRadiant > MaxFraction) { ShowWarningError(state, std::string{RoutineName} + s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", " + s_ipsc->cNumericFieldNames(5) + " was higher than the allowable maximum."); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxFraction)); + ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxFraction)); elecBaseboard.FracRadiant = MaxFraction; } @@ -343,14 +344,14 @@ namespace ElectricBaseboardRadiator { ShowWarningError(state, std::string{RoutineName} + s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", " + s_ipsc->cNumericFieldNames(6) + " was lower than the allowable minimum."); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinFraction)); + ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinFraction)); elecBaseboard.FracDistribPerson = MinFraction; } if (elecBaseboard.FracDistribPerson > MaxFraction) { ShowWarningError(state, std::string{RoutineName} + s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", " + s_ipsc->cNumericFieldNames(6) + " was higher than the allowable maximum."); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxFraction)); + ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxFraction)); elecBaseboard.FracDistribPerson = MaxFraction; } @@ -360,7 +361,7 @@ namespace ElectricBaseboardRadiator { ShowSevereError(state, std::string{RoutineName} + s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", the number of surface/radiant fraction groups entered was less than the allowable minimum."); - ShowContinueError(state, format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); + ShowContinueError(state, EnergyPlus::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); ErrorsFound = true; elecBaseboard.TotSurfToDistrib = 0; // error } @@ -389,14 +390,14 @@ namespace ElectricBaseboardRadiator { ShowWarningError(state, std::string{RoutineName} + s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", " + s_ipsc->cNumericFieldNames(SurfNum + 6) + "was greater than the allowable maximum."); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxFraction)); + ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxFraction)); elecBaseboard.TotSurfToDistrib = MaxFraction; } if (elecBaseboard.FracDistribToSurf(SurfNum) < MinFraction) { ShowWarningError(state, std::string{RoutineName} + s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", " + s_ipsc->cNumericFieldNames(SurfNum + 6) + "was less than the allowable minimum."); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MinFraction)); + ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MinFraction)); elecBaseboard.TotSurfToDistrib = MinFraction; } if (elecBaseboard.SurfacePtr(SurfNum) != 0) { @@ -594,7 +595,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 = - format("{} [W]", state.dataElectBaseboardRad->ElecBaseboardNumericFields(BaseboardNum).FieldNames(FieldNum)); + EnergyPlus::format("{} [W]", state.dataElectBaseboardRad->ElecBaseboardNumericFields(BaseboardNum).FieldNames(FieldNum)); // capacity sizing methods (e.g., HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity) int CapSizingMethod = elecBaseboard.HeatingCapMethod; zoneEqSizing.SizingMethod(SizingMethod) = CapSizingMethod; @@ -918,10 +919,10 @@ namespace ElectricBaseboardRadiator { if (ThisSurfIntensity > DataHeatBalFanSys::MaxRadHeatFlux) { ShowSevereError(state, "DistributeBBElecRadGains: excessive thermal radiation heat flux intensity detected"); ShowContinueError(state, "Surface = " + state.dataSurface->Surface(SurfNum).Name); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); + ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); ShowContinueError(state, "Occurs in " + state.dataElectBaseboardRad->cCMO_BBRadiator_Electric + " = " + elecBaseboard.EquipName); - ShowContinueError(state, format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); + ShowContinueError(state, EnergyPlus::format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); ShowContinueError( state, "Assign a larger surface area or more surfaces in " + state.dataElectBaseboardRad->cCMO_BBRadiator_Electric); ShowFatalError(state, "DistributeBBElecRadGains: excessive thermal radiation heat flux intensity detected"); @@ -929,7 +930,7 @@ namespace ElectricBaseboardRadiator { } else { ShowSevereError(state, "DistributeBBElecRadGains: surface not large enough to receive thermal radiation heat flux"); ShowContinueError(state, "Surface = " + state.dataSurface->Surface(SurfNum).Name); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); + ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); ShowContinueError(state, "Occurs in " + state.dataElectBaseboardRad->cCMO_BBRadiator_Electric + " = " + elecBaseboard.EquipName); ShowContinueError( diff --git a/src/EnergyPlus/ElectricPowerServiceManager.cc b/src/EnergyPlus/ElectricPowerServiceManager.cc index 8a9e23dff48..ffe42af15e8 100644 --- a/src/EnergyPlus/ElectricPowerServiceManager.cc +++ b/src/EnergyPlus/ElectricPowerServiceManager.cc @@ -294,8 +294,9 @@ void ElectricPowerServiceManager::getPowerManagerInput(EnergyPlusData &state) facilityPowerInTransformerPresent_ = true; } else { // should only have one transformer in input that is PowerInFromGrid - ShowWarningError(state, format("{}{}=\"{}\", invalid entry.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowWarningError( + state, EnergyPlus::format("{}{}=\"{}\", invalid entry.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); ShowContinueError(state, "Only one transformer with Usage PowerInFromGrid can be used, first one in input file will be used and the " "simulation continues..."); @@ -600,8 +601,9 @@ void ElectricPowerServiceManager::checkLoadCenters(EnergyPlusData &state) for (std::size_t i = 0; i < storageNames.size(); ++i) { for (std::size_t j = 0; j < storageNames.size(); ++j) { if (storageNames[i] == storageNames[j] && i != j) { - ShowSevereError(state, - format("ElectricPowerServiceManager::checkLoadCenters, the electrical storage device named = {} is used in more than " + ShowSevereError( + state, + EnergyPlus::format("ElectricPowerServiceManager::checkLoadCenters, the electrical storage device named = {} is used in more than " "one ElectricLoadCenter:Distribution input object.", storageNames[i])); ShowContinueError(state, "Electric Load Centers cannot share the same storage device."); @@ -617,8 +619,9 @@ void ElectricPowerServiceManager::checkLoadCenters(EnergyPlusData &state) for (std::size_t i = 0; i < genListNames.size(); ++i) { for (std::size_t j = 0; j < genListNames.size(); ++j) { if (genListNames[i] == genListNames[j] && i != j) { - ShowSevereError(state, - format("ElectricPowerServiceManager::checkLoadCenters, the generator list named = {} is used in more than one " + ShowSevereError( + state, + EnergyPlus::format("ElectricPowerServiceManager::checkLoadCenters, the generator list named = {} is used in more than one " "ElectricLoadCenter:Distribution input object.", genListNames[i])); ShowContinueError(state, "Electric Load Centers cannot share the same generator list (ElectricLoadCenter:Generators)."); @@ -634,8 +637,9 @@ void ElectricPowerServiceManager::checkLoadCenters(EnergyPlusData &state) for (std::size_t i = 0; i < inverterNames.size(); ++i) { for (std::size_t j = 0; j < inverterNames.size(); ++j) { if (inverterNames[i] == inverterNames[j] && i != j) { - ShowSevereError(state, - format("ElectricPowerServiceManager::checkLoadCenters, the inverter device named = {} is used in more than one " + ShowSevereError( + state, + EnergyPlus::format("ElectricPowerServiceManager::checkLoadCenters, the inverter device named = {} is used in more than one " "ElectricLoadCenter:Distribution input object.", inverterNames[i])); ShowContinueError(state, "Electric Load Centers cannot share the same inverter device."); @@ -651,8 +655,9 @@ void ElectricPowerServiceManager::checkLoadCenters(EnergyPlusData &state) for (std::size_t i = 0; i < converterNames.size(); ++i) { for (std::size_t j = 0; j < converterNames.size(); ++j) { if (converterNames[i] == converterNames[j] && i != j) { - ShowSevereError(state, - format("ElectricPowerServiceManager::checkLoadCenters, the converter device named = {} is used in more than one " + ShowSevereError( + state, + EnergyPlus::format("ElectricPowerServiceManager::checkLoadCenters, the converter device named = {} is used in more than one " "ElectricLoadCenter:Distribution input object.", converterNames[i])); ShowContinueError(state, "Electric Load Centers cannot share the same converter device."); @@ -668,8 +673,9 @@ void ElectricPowerServiceManager::checkLoadCenters(EnergyPlusData &state) for (std::size_t i = 0; i < transformerNames.size(); ++i) { for (std::size_t j = 0; j < transformerNames.size(); ++j) { if (transformerNames[i] == transformerNames[j] && i != j) { - ShowSevereError(state, - format("ElectricPowerServiceManager::checkLoadCenters, the transformer device named = {} is used in more than one " + ShowSevereError( + state, + EnergyPlus::format("ElectricPowerServiceManager::checkLoadCenters, the transformer device named = {} is used in more than one " "ElectricLoadCenter:Distribution input object.", transformerNames[i])); ShowContinueError(state, "Electric Load Centers cannot share the same transformer device."); @@ -938,11 +944,12 @@ ElectPowerLoadCenter::ElectPowerLoadCenter(EnergyPlusData &state, int const obje // check to make sure the user didn't input zeros for thermalToElectricControlRatio for (auto const &g : elecGenCntrlObj) { if (g->nominalThermElectRatio <= 0.0) { - ShowWarningError(state, - format("Generator operation needs to be based on following thermal loads and needs values for Rated Thermal to " - "Electrical Power Ratio in {} named {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + ShowWarningError( + state, + EnergyPlus::format("Generator operation needs to be based on following thermal loads and needs values for Rated Thermal to " + "Electrical Power Ratio in {} named {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); } } } @@ -959,12 +966,12 @@ ElectPowerLoadCenter::ElectPowerLoadCenter(EnergyPlusData &state, int const obje for (const auto &generatorController : elecGenCntrlObj) { if (generatorController->generatorType != GeneratorType::PVWatts) { errorsFound = true; - ShowSevereError(state, format("{}ElectricLoadCenter:Distribution=\"{}\",", routineName, name_)); + ShowSevereError(state, EnergyPlus::format("{}ElectricLoadCenter:Distribution=\"{}\",", routineName, name_)); ShowContinueError(state, "ElectricLoadCenter:Inverter:PVWatts can only be used with Generator:PVWatts"); ShowContinueError(state, - format("\"{}\" is of type {}", - generatorController->name, - generatorTypeNames[static_cast(generatorController->generatorType)])); + EnergyPlus::format("\"{}\" is of type {}", + generatorController->name, + generatorTypeNames[static_cast(generatorController->generatorType)])); } else { totalDCCapacity += generatorController->pvwattsGenerator->getDCSystemCapacity(); @@ -1008,13 +1015,14 @@ ElectPowerLoadCenter::ElectPowerLoadCenter(EnergyPlusData &state, int const obje } else { ShowWarningError( state, - format("Transformer named {} associated with the load center named {} should have {} set to LoadCenterPowerConditioning.", - transformerName_, - name_, - s_ipsc->cAlphaFieldNames(3))); + EnergyPlus::format( + "Transformer named {} associated with the load center named {} should have {} set to LoadCenterPowerConditioning.", + transformerName_, + name_, + s_ipsc->cAlphaFieldNames(3))); } } else { - ShowSevereError(state, format("Transformer named {}, was not found for the load center named {}", transformerName_, name_)); + ShowSevereError(state, EnergyPlus::format("Transformer named {}, was not found for the load center named {}", transformerName_, name_)); errorsFound = true; } } @@ -1081,7 +1089,7 @@ ElectPowerLoadCenter::ElectPowerLoadCenter(EnergyPlusData &state, int const obje } if (errorsFound) { - ShowFatalError(state, format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); } } @@ -1840,9 +1848,10 @@ void ElectPowerLoadCenter::setupLoadCenterMeterIndices(EnergyPlusData &state) if ((demandMeterPtr_ == 0) && (genOperationScheme_ == GeneratorOpScheme::TrackMeter)) { // throw error ShowFatalError( state, - format("ElectPowerLoadCenter::setupLoadCenterMeterIndices Did not find Meter named: {} in ElectricLoadCenter:Distribution named {}", - demandMeterName_, - name_)); + EnergyPlus::format( + "ElectPowerLoadCenter::setupLoadCenterMeterIndices Did not find Meter named: {} in ElectricLoadCenter:Distribution named {}", + demandMeterName_, + name_)); } if (storageScheme_ == StorageOpScheme::MeterDemandStoreExcessOnSite) { @@ -1850,9 +1859,10 @@ void ElectPowerLoadCenter::setupLoadCenterMeterIndices(EnergyPlusData &state) if (trackStorageOpMeterIndex_ == 0) { // ShowFatalError( state, - format("ElectPowerLoadCenter::setupLoadCenterMeterIndices Did not find Meter named: {} in ElectricLoadCenter:Distribution named {}", - trackSorageOpMeterName_, - name_)); + EnergyPlus::format( + "ElectPowerLoadCenter::setupLoadCenterMeterIndices Did not find Meter named: {} in ElectricLoadCenter:Distribution named {}", + trackSorageOpMeterName_, + name_)); } } } @@ -2103,7 +2113,7 @@ GeneratorController::GeneratorController(EnergyPlusData &state, int ObjNum = state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Generator:PVWatts", Util::makeUPPER(objectName)); assert(ObjNum >= 0); if (ObjNum == 0) { - ShowFatalError(state, format("Cannot find Generator:PVWatts {}", objectName)); + ShowFatalError(state, EnergyPlus::format("Cannot find Generator:PVWatts {}", objectName)); } pvwattsGenerator = PVWatts::PVWattsGenerator::createFromIdfObj(state, ObjNum); pvwattsGenerator->setupOutputVariables(state); @@ -2129,8 +2139,8 @@ GeneratorController::GeneratorController(EnergyPlusData &state, } default: { auto &s_ipsc = state.dataIPShortCut; - ShowSevereError(state, format("{}{} invalid entry.", routineName, s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("Invalid {} associated with generator = {}", objectType, objectName)); + ShowSevereError(state, EnergyPlus::format("{}{} invalid entry.", routineName, s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("Invalid {} associated with generator = {}", objectType, objectName)); break; } } @@ -2321,17 +2331,19 @@ void GeneratorController::simGeneratorGetPowerOutput(EnergyPlusData &state, // check if generator production has gone wrong and is negative, reset to zero and warn if (electricPowerOutput < 0.0) { if (errCountNegElectProd_ == 0) { - ShowWarningMessage( - state, - format("{} named {} is producing negative electric power, check generator inputs.", generatorTypeNames[(int)generatorType], name)); - ShowContinueError(state, format("Electric power production rate ={:.4R}", electricPowerOutput)); + ShowWarningMessage(state, + EnergyPlus::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, - format("{} named {} is producing negative electric power ", generatorTypeNames[(int)generatorType], name), - errCountNegElectProd_, - electricPowerOutput, - electricPowerOutput); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} named {} is producing negative electric power ", generatorTypeNames[(int)generatorType], name), + errCountNegElectProd_, + electricPowerOutput, + electricPowerOutput); electricPowerOutput = 0.0; } } @@ -2612,12 +2624,12 @@ DCtoACInverter::DCtoACInverter(EnergyPlusData &state, std::string const &objectN } // end switch modelType } } else { - ShowSevereError(state, format("{} did not find inverter name = {}", routineName, objectName)); + ShowSevereError(state, EnergyPlus::format("{} did not find inverter name = {}", routineName, objectName)); errorsFound = true; } if (errorsFound) { - ShowFatalError(state, format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); } } @@ -3007,12 +3019,12 @@ ACtoDCConverter::ACtoDCConverter(EnergyPlusData &state, std::string const &objec state, zoneNum_, name_, DataHeatBalance::IntGainType::ElectricLoadCenterConverter, &qdotConvZone_, nullptr, &qdotRadZone_); } } else { - ShowSevereError(state, format("{} did not find power converter name = {}", routineName, objectName)); + ShowSevereError(state, EnergyPlus::format("{} did not find power converter name = {}", routineName, objectName)); errorsFound = true; } if (errorsFound) { - ShowFatalError(state, format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); } } @@ -3299,16 +3311,16 @@ ElectricStorage::ElectricStorage( // main constructor if (liIon_Vfull_ < liIon_Vexp_ || liIon_Vexp_ < liIon_Vnom_) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", invalid entry.", routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("{} must be greater than {},", - state.dataIPShortCut->cNumericFieldNames(10), - state.dataIPShortCut->cNumericFieldNames(11))); - ShowContinueError(state, format("which must be greater than {}.", state.dataIPShortCut->cNumericFieldNames(12))); + 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))); for (int i = 10; i <= 12; ++i) { - ShowContinueError(state, - format("{} = {:.3R}", state.dataIPShortCut->cNumericFieldNames(i), state.dataIPShortCut->rNumericArgs(i))); + ShowContinueError( + state, EnergyPlus::format("{} = {:.3R}", state.dataIPShortCut->cNumericFieldNames(i), state.dataIPShortCut->rNumericArgs(i))); } errorsFound = true; } @@ -3321,15 +3333,15 @@ ElectricStorage::ElectricStorage( // main constructor if (liIon_Qexp_ >= liIon_Qnom_) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", invalid entry.", routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("{} must be greater than {}.", - state.dataIPShortCut->cNumericFieldNames(16), - state.dataIPShortCut->cNumericFieldNames(15))); + EnergyPlus::format("{} must be greater than {}.", + state.dataIPShortCut->cNumericFieldNames(16), + state.dataIPShortCut->cNumericFieldNames(15))); for (int i = 15; i <= 16; ++i) { - ShowContinueError(state, - format("{} = {:.3R}", state.dataIPShortCut->cNumericFieldNames(i), state.dataIPShortCut->rNumericArgs(i))); + ShowContinueError( + state, EnergyPlus::format("{} = {:.3R}", state.dataIPShortCut->cNumericFieldNames(i), state.dataIPShortCut->rNumericArgs(i))); } errorsFound = true; } @@ -3550,11 +3562,11 @@ ElectricStorage::ElectricStorage( // main constructor } // switch storage model type } } else { // storage not found - ShowSevereError(state, format("{} did not find storage name = {}", routineName, objectName)); + ShowSevereError(state, EnergyPlus::format("{} did not find storage name = {}", routineName, objectName)); errorsFound = true; } if (errorsFound) { - ShowFatalError(state, format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); } } @@ -3566,8 +3578,9 @@ Real64 checkUserEfficiencyInput(EnergyPlusData &state, Real64 userInputValue, bo // Fix for Defect #8867. Do not allow either efficiency to be zero as it will lead to a divide by zero (NaN). if (isCharging) { if (userInputValue < minChargeEfficiency) { - ShowSevereError(state, - format("ElectricStorage charge efficiency was too low. This occurred for electric storage unit named {}", deviceName)); + ShowSevereError( + state, + EnergyPlus::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; @@ -3576,8 +3589,9 @@ Real64 checkUserEfficiencyInput(EnergyPlusData &state, Real64 userInputValue, bo } // discharging if (userInputValue < minDischargeEfficiency) { - ShowSevereError(state, - format("ElectricStorage discharge efficiency was too low. This occurred for electric storage unit named {}", deviceName)); + ShowSevereError( + state, + EnergyPlus::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; @@ -3606,7 +3620,7 @@ void checkChargeDischargeVoltageCurves( } } if (gotErrs) { - ShowWarningMessage(state, format("Kinetic Battery Model: {} has a charging/discharging voltage curve conflict.", nameBatt)); + ShowWarningMessage(state, EnergyPlus::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."); @@ -3618,7 +3632,7 @@ void checkChargeDischargeVoltageCurves( Real64 dischargeVoltage = E0c + dischargeCurve->value(state, xfd); // E0c+Ad*xfd+Cd*xfd/(Dd-xfd) ShowContinueError( state, - format( + EnergyPlus::format( "Charged fraction = {:.1R}, Charging voltage = {:.3R} V, Discharging voltage = {:.3R} V", xfc, chargeVoltage, dischargeVoltage)); } } @@ -4018,10 +4032,11 @@ 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, - format("ElectricLoadCenter:Storage:Battery named=\"{}\". Battery discharge current could not be estimated due to " - "iteration limit reached. ", - name_)); + ShowFatalError( + state, + EnergyPlus::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. } @@ -4313,15 +4328,16 @@ bool ElectricStorage::determineCurrentForBatteryDischarge(EnergyPlusData &state, // Issue #5301 need more diagnostics for this case ShowWarningError( state, "ElectricStorage::determineCurrentForBatteryDischarge, iteration limit exceeded, failed to solve for discharge current."); - ShowContinueError(state, format("Last timestep charge available, q0 = {:.5R}", q0)); - ShowContinueError(state, format("New Current, Inew = {:.5R} [Amps]", Inew)); - ShowContinueError(state, format("Power discharge per module cell, Pw = {:.5R} ", Pw)); - ShowContinueError( - state, format("Charge Conversion Rate, [1/h] change rate from bound charge energy to available charge, parameter k = {:.5R}", k)); - ShowContinueError(state, format("parameter c = {:.5R}", c)); - ShowContinueError(state, format("parameter qmax = {:.5R}", qmax)); - ShowContinueError(state, format("Fully charged open circuit voltage, parameter E0c = {:.5R}", E0c)); - ShowContinueError(state, format("parameter InternalR = {:.5R}", InternalR)); + ShowContinueError(state, EnergyPlus::format("Last timestep charge available, q0 = {:.5R}", q0)); + ShowContinueError(state, EnergyPlus::format("New Current, Inew = {:.5R} [Amps]", Inew)); + ShowContinueError(state, EnergyPlus::format("Power discharge per module cell, Pw = {:.5R} ", Pw)); + ShowContinueError(state, + EnergyPlus::format( + "Charge Conversion Rate, [1/h] change rate from bound charge energy to available charge, parameter k = {:.5R}", k)); + ShowContinueError(state, EnergyPlus::format("parameter c = {:.5R}", c)); + ShowContinueError(state, EnergyPlus::format("parameter qmax = {:.5R}", qmax)); + ShowContinueError(state, EnergyPlus::format("Fully charged open circuit voltage, parameter E0c = {:.5R}", E0c)); + ShowContinueError(state, EnergyPlus::format("parameter InternalR = {:.5R}", InternalR)); if (qmaxf == 0.0) { ShowContinueError(state, "qmaxf was zero, would have divided by zero."); } @@ -4540,9 +4556,9 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons if (ratedCapacity_ == 0) { if (performanceInputMode_ == TransformerPerformanceInput::LossesMethod) { - ShowWarningError(state, format("{}{}=\"{}\".", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Specified {} = {}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); - ShowContinueError(state, format("Specified {} = {:.1R}", s_ipsc->cNumericFieldNames(2), ratedCapacity_)); + 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))); + 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."); } @@ -4558,8 +4574,9 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons if (s_ipsc->lNumericFieldBlanks(11)) { maxPUL_ = ratedPUL_; } else if (maxPUL_ <= 0 || maxPUL_ > 1) { - ShowSevereError(state, format("{}{}=\"{}\", invalid entry.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}=[{:.3R}].", s_ipsc->cNumericFieldNames(11), s_ipsc->rNumericArgs(11))); + ShowSevereError(state, + EnergyPlus::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; } @@ -4580,7 +4597,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, format("{}ElectricLoadCenter:Transformer=\"{}\":", routineName, name_)); + ShowWarningError(state, EnergyPlus::format("{}ElectricLoadCenter:Transformer=\"{}\":", routineName, name_)); ShowContinueError(state, "ISOLATED Transformer: No meter wired to a transformer used to input power from grid"); } @@ -4721,12 +4738,12 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons } } else { - ShowSevereError(state, format("{} did not find transformer name = {}", routineName, objectName)); + ShowSevereError(state, EnergyPlus::format("{} did not find transformer name = {}", routineName, objectName)); errorsFound = true; } if (errorsFound) { - ShowFatalError(state, format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); } } @@ -4833,7 +4850,7 @@ void ElectricTransformer::manageTransformers(EnergyPlusData &state, Real64 const if ((pastElecLoad / ratedCapacity_) > 1.0) { if (overloadErrorIndex_ == 0) { ShowSevereError(state, "Transformer Overloaded"); - ShowContinueError(state, format("Entered in ElectricLoadCenter:Transformer ={}", name_)); + ShowContinueError(state, EnergyPlus::format("Entered in ElectricLoadCenter:Transformer ={}", name_)); } ShowRecurringSevereErrorAtEnd(state, "Transformer Overloaded: Entered in ElectricLoadCenter:Transformer =" + name_, overloadErrorIndex_); } @@ -4942,7 +4959,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, format("Non-electricity meter used for {}", name_)); + ShowFatalError(state, EnergyPlus::format("Non-electricity meter used for {}", name_)); } } } diff --git a/src/EnergyPlus/EvaporativeCoolers.cc b/src/EnergyPlus/EvaporativeCoolers.cc index 07620baad50..6aa7d690705 100644 --- a/src/EnergyPlus/EvaporativeCoolers.cc +++ b/src/EnergyPlus/EvaporativeCoolers.cc @@ -145,25 +145,25 @@ void SimEvapCooler(EnergyPlusData &state, std::string_view CompName, int &CompIn if (CompIndex == 0) { EvapCoolNum = Util::FindItemInList(CompName, EvapCond, &EvapConditions::Name); if (EvapCoolNum == 0) { - ShowFatalError(state, format("SimEvapCooler: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimEvapCooler: Unit not found={}", CompName)); } CompIndex = EvapCoolNum; } else { EvapCoolNum = CompIndex; if (EvapCoolNum > state.dataEvapCoolers->NumEvapCool || EvapCoolNum < 1) { ShowFatalError(state, - format("SimEvapCooler: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - EvapCoolNum, - state.dataEvapCoolers->NumEvapCool, - CompName)); + EnergyPlus::format("SimEvapCooler: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + EvapCoolNum, + state.dataEvapCoolers->NumEvapCool, + CompName)); } if (state.dataEvapCoolers->CheckEquipName(EvapCoolNum)) { if (CompName != EvapCond(EvapCoolNum).Name) { ShowFatalError(state, - format("SimEvapCooler: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - EvapCoolNum, - CompName, - EvapCond(EvapCoolNum).Name)); + EnergyPlus::format("SimEvapCooler: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + EvapCoolNum, + CompName, + EvapCond(EvapCoolNum).Name)); } state.dataEvapCoolers->CheckEquipName(EvapCoolNum) = false; } @@ -467,8 +467,9 @@ void GetEvapInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisEvapCooler.SecondaryInletNode)) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); // TODO rename point ShowContinueError(state, "Node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; @@ -589,8 +590,9 @@ void GetEvapInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisEvapCooler.SecondaryInletNode)) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); // TODO rename point ShowContinueError(state, "Node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; @@ -1040,7 +1042,7 @@ void InitEvapCooler(EnergyPlusData &state, int const EvapCoolNum) if (ControlNode > 0) { if (state.dataLoopNodes->Node(ControlNode).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, format("Missing temperature setpoint for Evap Cooler unit {}", evapCond.Name)); + ShowSevereError(state, EnergyPlus::format("Missing temperature setpoint for Evap Cooler unit {}", evapCond.Name)); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the unit control node."); } else { bool localSetPointCheck = false; @@ -1048,7 +1050,7 @@ void InitEvapCooler(EnergyPlusData &state, int const EvapCoolNum) state.dataLoopNodes->NodeSetpointCheck(ControlNode).needsSetpointChecking = false; // Let it slide apparently if (localSetPointCheck) { - ShowSevereError(state, format("Missing temperature setpoint for Evap Cooler unit {}", evapCond.Name)); + ShowSevereError(state, EnergyPlus::format("Missing temperature setpoint for Evap Cooler unit {}", evapCond.Name)); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the unit control node."); ShowContinueError(state, " or use an EMS actuator to establish a setpoint at the unit control node."); } @@ -1296,10 +1298,12 @@ void SizeEvapCooler(EnergyPlusData &state, int const EvapCoolNum) if ((std::abs(IndirectVolFlowRateDes - IndirectVolFlowRateUser) / IndirectVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeEvaporativeCooler:Indirect:ResearchSpecial: Potential issue with equipment sizing for {}", - thisEvapCond.Name)); - ShowContinueError(state, format("User-Specified Secondary Fan Flow Rate of {:.5R} [m3/s]", IndirectVolFlowRateUser)); - ShowContinueError(state, format("differs from Design Size Secondary Fan Flow Rate of {:.5R} [m3/s]", IndirectVolFlowRateDes)); + EnergyPlus::format("SizeEvaporativeCooler:Indirect:ResearchSpecial: Potential issue with equipment sizing for {}", + thisEvapCond.Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Secondary Fan Flow Rate of {:.5R} [m3/s]", IndirectVolFlowRateUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Secondary Fan Flow Rate of {:.5R} [m3/s]", IndirectVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1458,11 +1462,11 @@ void SizeEvapCooler(EnergyPlusData &state, int const EvapCoolNum) PadAreaUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(PadAreaDes - PadAreaUser) / PadAreaUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeEvaporativeCooler:Direct:CelDekPad: Potential issue with equipment sizing for {}", thisEvapCond.Name)); - ShowContinueError(state, format("User-Specified Celdek Pad Area of{:.2R} [m2]", PadAreaUser)); - ShowContinueError(state, format("differs from Design Size Celdek Pad Area of {:.2R} [m2]", PadAreaDes)); + ShowMessage(state, + EnergyPlus::format("SizeEvaporativeCooler:Direct:CelDekPad: Potential issue with equipment sizing for {}", + thisEvapCond.Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Celdek Pad Area of{:.2R} [m2]", PadAreaUser)); + ShowContinueError(state, EnergyPlus::format("differs from Design Size Celdek Pad Area of {:.2R} [m2]", PadAreaDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1499,10 +1503,11 @@ void SizeEvapCooler(EnergyPlusData &state, int const EvapCoolNum) PadDepthUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(PadDepthDes - PadDepthUser) / PadDepthUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, format("SizeEvaporativeCooler:Direct:CelDekPad: Potential issue with equipment sizing for {}", thisEvapCond.Name)); - ShowContinueError(state, format("User-Specified Celdek Pad Depth of {:.2R} [m]", PadDepthUser)); - ShowContinueError(state, format("differs from Design Size Celdek Pad Depth of {:.2R} [m]", PadDepthDes)); + ShowMessage(state, + EnergyPlus::format("SizeEvaporativeCooler:Direct:CelDekPad: Potential issue with equipment sizing for {}", + thisEvapCond.Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Celdek Pad Depth of {:.2R} [m]", PadDepthUser)); + ShowContinueError(state, EnergyPlus::format("differs from Design Size Celdek Pad Depth of {:.2R} [m]", PadDepthDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1597,11 +1602,11 @@ void SizeEvapCooler(EnergyPlusData &state, int const EvapCoolNum) PadAreaUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(PadAreaDes - PadAreaUser) / PadAreaUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeEvaporativeCooler:Indirect:CelDekPad: Potential issue with equipment sizing for {}", thisEvapCond.Name)); - ShowContinueError(state, format("User-Specified Celdek Pad Area {:.2R} [m2]", PadAreaUser)); - ShowContinueError(state, format("differs from Design Size Celdek Pad Area of {:.2R} [m2]", PadAreaDes)); + ShowMessage(state, + EnergyPlus::format("SizeEvaporativeCooler:Indirect:CelDekPad: Potential issue with equipment sizing for {}", + thisEvapCond.Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Celdek Pad Area {:.2R} [m2]", PadAreaUser)); + ShowContinueError(state, EnergyPlus::format("differs from Design Size Celdek Pad Area of {:.2R} [m2]", PadAreaDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1633,11 +1638,11 @@ void SizeEvapCooler(EnergyPlusData &state, int const EvapCoolNum) PadDepthUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(PadDepthDes - PadDepthUser) / PadDepthUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeEvaporativeCooler:Indirect:CelDekPad: Potential issue with equipment sizing for {}", thisEvapCond.Name)); - ShowContinueError(state, format("User-Specified Celdek Pad Depth of {:.2R} [m]", PadDepthUser)); - ShowContinueError(state, format("differs from Design Size Celdek Pad Depth of {:.2R} [m]", PadDepthDes)); + ShowMessage(state, + EnergyPlus::format("SizeEvaporativeCooler:Indirect:CelDekPad: Potential issue with equipment sizing for {}", + thisEvapCond.Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Celdek Pad Depth of {:.2R} [m]", PadDepthUser)); + ShowContinueError(state, EnergyPlus::format("differs from Design Size Celdek Pad Depth of {:.2R} [m]", PadDepthDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1715,10 +1720,10 @@ void CalcDirectEvapCooler(EnergyPlusData &state, int EvapCoolNum, Real64 const P SatEff = 1.0; } if (SatEff < 0.0) { // we have a serious problem. Pad Area and/or depth not suitable for system air flow rates - ShowSevereError(state, format("EVAPCOOLER:DIRECT:CELDEKPAD: {} has a problem", thisEvapCond.Name)); + ShowSevereError(state, EnergyPlus::format("EVAPCOOLER:DIRECT:CELDEKPAD: {} has a problem", thisEvapCond.Name)); ShowContinueError(state, "Check size of Pad Area and/or Pad Depth in input"); - ShowContinueError(state, format("Cooler Effectiveness calculated as: {:.2R}", SatEff)); - ShowContinueError(state, format("Air velocity (m/s) through pads calculated as: {:.2R}", AirVel)); + ShowContinueError(state, EnergyPlus::format("Cooler Effectiveness calculated as: {:.2R}", SatEff)); + ShowContinueError(state, EnergyPlus::format("Air velocity (m/s) through pads calculated as: {:.2R}", AirVel)); ShowFatalError(state, "Program Terminates due to previous error condition"); } thisEvapCond.SatEff = SatEff; @@ -2451,12 +2456,14 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, if (SolFla == -1) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationLimit == 0) { - ShowSevereError(state, - format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + ShowSevereError( + state, + EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " "Evaporative Cooler Research Special = {}", thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); + ShowContinueError(state, + EnergyPlus::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd( @@ -2467,14 +2474,15 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationFailed == 0) { - ShowSevereError(state, - format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + ShowSevereError( + state, + EnergyPlus::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, format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); - ShowContinueError(state, format("...Given maximum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMax)); + ShowContinueError(state, EnergyPlus::format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); + ShowContinueError(state, EnergyPlus::format("...Given maximum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMax)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd(state, @@ -2517,12 +2525,14 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, if (SolFla == -1) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationLimit == 0) { - ShowSevereError(state, - format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + ShowSevereError( + state, + EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " "Evaporative Cooler Research Special = {}", thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); + ShowContinueError(state, + EnergyPlus::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd( @@ -2533,14 +2543,15 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationFailed == 0) { - ShowSevereError(state, - format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + ShowSevereError( + state, + EnergyPlus::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, format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); - ShowContinueError(state, format("...Given maximum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMax)); + ShowContinueError(state, EnergyPlus::format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); + ShowContinueError(state, EnergyPlus::format("...Given maximum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMax)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd(state, @@ -2575,12 +2586,14 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, if (SolFla == -1) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationLimit == 0) { - ShowSevereError(state, - format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + ShowSevereError( + state, + EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " "Evaporative Cooler Research Special = {}", thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); + ShowContinueError(state, + EnergyPlus::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd( @@ -2591,14 +2604,15 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationFailed == 0) { - ShowSevereError(state, - format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + ShowSevereError( + state, + EnergyPlus::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, format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); - ShowContinueError(state, format("...Given maximum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMax)); + ShowContinueError(state, EnergyPlus::format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); + ShowContinueError(state, EnergyPlus::format("...Given maximum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMax)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd(state, @@ -2652,12 +2666,14 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, if (SolFla == -1) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationLimit == 0) { - ShowSevereError(state, - format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + ShowSevereError( + state, + EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " "Evaporative Cooler Research Special = {}", thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); + ShowContinueError(state, + EnergyPlus::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd( @@ -2668,14 +2684,15 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationFailed == 0) { - ShowSevereError(state, - format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + ShowSevereError( + state, + EnergyPlus::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, format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); - ShowContinueError(state, format("...Given maximum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMax)); + ShowContinueError(state, EnergyPlus::format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); + ShowContinueError(state, EnergyPlus::format("...Given maximum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMax)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd(state, @@ -3345,19 +3362,21 @@ void SimZoneEvaporativeCoolerUnit(EnergyPlusData &state, } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > state.dataEvapCoolers->NumZoneEvapUnits) { - ShowFatalError(state, - format("SimZoneEvaporativeCoolerUnit: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", - CompNum, - state.dataEvapCoolers->NumZoneEvapUnits, - CompName)); + ShowFatalError( + state, + EnergyPlus::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, - format("SimZoneEvaporativeCoolerUnit: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", - CompNum, - 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)); } state.dataEvapCoolers->CheckZoneEvapUnitName(CompNum) = false; } @@ -3531,8 +3550,8 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) "ZONETEMPERATUREDEADBANDONOFFCYCLING", "ZONECOOLINGLOADONOFFCYCLING", "ZONECOOLINGLOADVARIABLESPEEDFAN"}; thisZoneEvapUnit.ControlSchemeType = static_cast(getEnumValue(controlTypeNamesUC, Alphas(10))); if (thisZoneEvapUnit.ControlSchemeType == ControlType::Invalid) { - ShowSevereError(state, format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, format("invalid choice found {}=\"{}\".", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, EnergyPlus::format("invalid choice found {}=\"{}\".", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } @@ -3543,16 +3562,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, format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, format("invalid choice found {}=\"{}\".", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, EnergyPlus::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, format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, format("invalid, not found {}=\"{}\".", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, EnergyPlus::format("invalid, not found {}=\"{}\".", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } @@ -3561,8 +3580,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, format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, format("invalid choice found {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, EnergyPlus::format("invalid choice found {}=\"{}\".", cAlphaFields(13), Alphas(13))); ErrorsFound = true; } @@ -3570,13 +3589,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, format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, format("invalid, not found {}=\"{}\".", cAlphaFields(14), Alphas(14))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, EnergyPlus::format("invalid, not found {}=\"{}\".", cAlphaFields(14), Alphas(14))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, format("missing input for {}", cAlphaFields(14))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, EnergyPlus::format("missing input for {}", cAlphaFields(14))); ErrorsFound = true; } } @@ -3585,8 +3604,8 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) if (!lAlphaBlanks(15)) { thisZoneEvapUnit.HVACSizingIndex = Util::FindItemInList(Alphas(15), state.dataSize->ZoneHVACSizing); if (thisZoneEvapUnit.HVACSizingIndex == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisZoneEvapUnit.Name)); ErrorsFound = true; } } @@ -3628,12 +3647,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, format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowSevereError(state, EnergyPlus::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, format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowSevereError(state, EnergyPlus::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; @@ -3653,7 +3672,7 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input.", RoutineName)); ShowContinueError(state, "... Preceding condition causes termination."); } @@ -3775,8 +3794,9 @@ void InitZoneEvaporativeCoolerUnit(EnergyPlusData &state, if (DataZoneEquipment::CheckZoneEquipmentList(state, "ZoneHVAC:EvaporativeCoolerUnit", state.dataEvapCoolers->ZoneEvapUnit(Loop).Name)) { state.dataEvapCoolers->ZoneEvapUnit(Loop).ZoneNodeNum = state.dataZoneEquip->ZoneEquipConfig(ZoneNum).ZoneNode; } else { - ShowSevereError(state, - format("InitZoneEvaporativeCoolerUnit: ZoneHVAC:EvaporativeCoolerUnit = {}, is not on any ZoneHVAC:EquipmentList. " + ShowSevereError( + state, + EnergyPlus::format("InitZoneEvaporativeCoolerUnit: ZoneHVAC:EvaporativeCoolerUnit = {}, is not on any ZoneHVAC:EquipmentList. " "It will not be simulated.", state.dataEvapCoolers->ZoneEvapUnit(Loop).Name)); } @@ -3792,10 +3812,11 @@ void InitZoneEvaporativeCoolerUnit(EnergyPlusData &state, if (zoneEvapUnit.ActualFanVolFlowRate != DataSizing::AutoSize) { if (zoneEvapUnit.ActualFanVolFlowRate < zoneEvapUnit.DesignAirVolumeFlowRate) { - ShowSevereError(state, format("InitZoneEvaporativeCoolerUnit: ZoneHVAC:EvaporativeCoolerUnit = {}", zoneEvapUnit.Name)); + ShowSevereError(state, EnergyPlus::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, format("...fan volumetric flow rate = {:.5T} m3/s.", zoneEvapUnit.ActualFanVolFlowRate)); - ShowContinueError(state, format("...evap cooler unit volumetric flow rate = {:.5T} m3/s.", zoneEvapUnit.DesignAirVolumeFlowRate)); + 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)); 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 @@ -4246,23 +4267,26 @@ 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, format("Iteration limit exceeded calculating evap unit part load ratio, for unit={}", zoneEvapUnit.Name)); + ShowWarningError( + state, EnergyPlus::format("Iteration limit exceeded calculating evap unit part load ratio, for unit={}", zoneEvapUnit.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Unit part load ratio returned={:.2R}", PartLoadRatio)); + ShowContinueError(state, EnergyPlus::format("Unit part load ratio returned={:.2R}", PartLoadRatio)); ShowContinueError(state, "Check input for Fan Placement."); } ShowRecurringWarningErrorAtEnd( state, - format("Zone Evaporative Cooler unit part load ratio control failed (iteration limit [{}]) for ZoneHVAC:EvaporativeCoolerUnit =\"{}", - MaxIte, - zoneEvapUnit.Name), + EnergyPlus::format( + "Zone Evaporative Cooler unit part load ratio control failed (iteration limit [{}]) for ZoneHVAC:EvaporativeCoolerUnit =\"{}", + MaxIte, + zoneEvapUnit.Name), zoneEvapUnit.UnitLoadControlMaxIterErrorIndex); } else if (SolFla == -2) { if (zoneEvapUnit.UnitLoadControlLimitsErrorIndex == 0) { - ShowWarningError(state, - format("Zone Evaporative Cooler unit calculation failed: unit part load ratio limits exceeded, for unit = {}", - zoneEvapUnit.Name)); + ShowWarningError( + state, + EnergyPlus::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) { @@ -4373,24 +4397,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, format("Iteration limit exceeded calculating variable speed evap unit fan speed ratio, for unit={}", zoneEvapUnit.Name)); + ShowWarningError(state, + EnergyPlus::format("Iteration limit exceeded calculating variable speed evap unit fan speed ratio, for unit={}", + zoneEvapUnit.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Fan speed ratio returned={:.2R}", FanSpeedRatio)); + ShowContinueError(state, EnergyPlus::format("Fan speed ratio returned={:.2R}", FanSpeedRatio)); ShowContinueError(state, "Check input for Fan Placement."); } ShowRecurringWarningErrorAtEnd( state, - format("Zone Evaporative Cooler unit control failed (iteration limit [{}]) for ZoneHVAC:EvaporativeCoolerUnit =\"{}", - MaxIte, - zoneEvapUnit.Name), + EnergyPlus::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, - format("Variable speed evaporative cooler unit calculation failed: fan speed ratio limits exceeded, for unit = {}", - zoneEvapUnit.Name)); + ShowWarningError( + state, + EnergyPlus::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) { @@ -4460,7 +4486,7 @@ int GetInletNodeNum(EnergyPlusData &state, std::string const &EvapCondName, bool if (WhichEvapCond != 0) { return state.dataEvapCoolers->EvapCond(WhichEvapCond).InletNode; } - ShowSevereError(state, format("GetInletNodeNum: Could not find EvaporativeCooler = \"{}\"", EvapCondName)); + ShowSevereError(state, EnergyPlus::format("GetInletNodeNum: Could not find EvaporativeCooler = \"{}\"", EvapCondName)); ErrorsFound = true; return 0; } @@ -4484,7 +4510,7 @@ int GetOutletNodeNum(EnergyPlusData &state, std::string const &EvapCondName, boo if (WhichEvapCond != 0) { return state.dataEvapCoolers->EvapCond(WhichEvapCond).OutletNode; } - ShowSevereError(state, format("GetOutletNodeNum: Could not find EvaporativeCooler = \"{}\"", EvapCondName)); + ShowSevereError(state, EnergyPlus::format("GetOutletNodeNum: Could not find EvaporativeCooler = \"{}\"", EvapCondName)); ErrorsFound = true; return 0; } diff --git a/src/EnergyPlus/EvaporativeFluidCoolers.cc b/src/EnergyPlus/EvaporativeFluidCoolers.cc index d201e20d9dd..8e2e0ec2a70 100644 --- a/src/EnergyPlus/EvaporativeFluidCoolers.cc +++ b/src/EnergyPlus/EvaporativeFluidCoolers.cc @@ -119,7 +119,8 @@ namespace EvaporativeFluidCoolers { return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("LocalEvapFluidCoolerFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalEvapFluidCoolerFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -250,9 +251,10 @@ namespace EvaporativeFluidCoolers { thisEFC.DesignEnteringAirWetBulbTemp = NumArray(11); if (state.dataIPShortCut->lAlphaFieldBlanks(4) || AlphArray(4).empty()) { - ShowSevereError( - state, - format("{}, \"{}\" Performance input method is not specified. ", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name)); + ShowSevereError(state, + EnergyPlus::format("{}, \"{}\" Performance input method is not specified. ", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); ErrorsFound = true; } else { thisEFC.PerformanceInputMethod = AlphArray(4); @@ -273,8 +275,9 @@ namespace EvaporativeFluidCoolers { NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisEFC.OutdoorAirInletNodeNum)) { - ShowSevereError(state, - format("{}, \"{}\" Outdoor Air Inlet DataLoopNode::Node Name not valid Outdoor Air DataLoopNode::Node= {}", + ShowSevereError( + state, + EnergyPlus::format("{}, \"{}\" Outdoor Air Inlet DataLoopNode::Node Name not valid Outdoor Air DataLoopNode::Node= {}", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name, AlphArray(5))); @@ -290,10 +293,11 @@ namespace EvaporativeFluidCoolers { thisEFC.capacityControl = static_cast(getEnumValue(controlNamesUC, Util::makeUPPER(AlphArray(6)))); if (thisEFC.capacityControl == CapacityControl::Invalid) { thisEFC.capacityControl = CapacityControl::FanCycling; - ShowWarningError(state, - format("{}, \"{}\" The Capacity Control is not specified correctly. The default Fan Cycling is used.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + ShowWarningError( + state, + EnergyPlus::format("{}, \"{}\" The Capacity Control is not specified correctly. The default Fan Cycling is used.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); } } @@ -307,8 +311,8 @@ namespace EvaporativeFluidCoolers { } else { thisEFC.EvapLossMode = static_cast(getEnumValue(evapLossNamesUC, Util::makeUPPER(AlphArray(7)))); if (thisEFC.EvapLossMode == EvapLoss::Invalid) { - ShowSevereError(state, format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(7), AlphArray(7))); - ShowContinueError(state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(7), AlphArray(7))); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -342,8 +346,8 @@ namespace EvaporativeFluidCoolers { } else { thisEFC.BlowdownMode = static_cast(getEnumValue(blowDownNamesUC, Util::makeUPPER(AlphArray(8)))); if (thisEFC.BlowdownMode == Blowdown::Invalid) { - ShowSevereError(state, format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(8), AlphArray(8))); - ShowContinueError(state, format("Entered in {} ={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(8), AlphArray(8))); + ShowContinueError(state, EnergyPlus::format("Entered in {} ={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -371,8 +375,9 @@ namespace EvaporativeFluidCoolers { // Check various inputs to ensure that all the required variables are specified. if (thisEFC.DesignSprayWaterFlowRate <= 0.0) { - ShowSevereError(state, - format("{} \"{}\". Evaporative fluid cooler input requires a design spray water flow rate greater than zero for all " + 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)); @@ -380,22 +385,22 @@ namespace EvaporativeFluidCoolers { } if (thisEFC.HighSpeedAirFlowRate <= 0.0 && thisEFC.HighSpeedAirFlowRate != DataSizing::AutoSize) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(1), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(1), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.HighSpeedFanPower <= 0.0 && thisEFC.HighSpeedFanPower != DataSizing::AutoSize) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } @@ -403,107 +408,109 @@ namespace EvaporativeFluidCoolers { thisEFC.PerformanceInputMethod_Num = PIM::UFactor; if (thisEFC.HighSpeedEvapFluidCoolerUA <= 0.0 && thisEFC.HighSpeedEvapFluidCoolerUA != DataSizing::AutoSize) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(6), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(6), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.DesignWaterFlowRate <= 0.0 && thisEFC.DesignWaterFlowRate != DataSizing::AutoSize) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(7), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(7), + 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, - 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))); + 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))); 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, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(7), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(7), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.HighSpeedUserSpecifiedDesignCapacity <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(8), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(8), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.DesignEnteringAirTemp <= 0.0) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.DesignEnteringAirWetBulbTemp <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be >0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(11), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be >0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(11), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.DesignEnteringWaterTemp != DataSizing::AutoSize) { if (thisEFC.DesignEnteringWaterTemp <= thisEFC.DesignEnteringAirWetBulbTemp) { ShowSevereError(state, - format("{} = \"{}\", {} must be greater than {}.", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(9), - state.dataIPShortCut->cNumericFieldNames(11))); + EnergyPlus::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, - format("{} = \"{}\", {} must be greater than {}.", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(10), - state.dataIPShortCut->cNumericFieldNames(11))); + EnergyPlus::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, - format("{} = \"{}\". Evaporative fluid cooler Performance Input Method must be " + ShowSevereError( + state, + EnergyPlus::format("{} = \"{}\". Evaporative fluid cooler Performance Input Method must be " "\"UFactorTimesAreaAndDesignWaterFlowRate\" or \"StandardDesignCapacity\" or \"UserSpecifiedDesignCapacity\".", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name)); - ShowContinueError(state, format("Evaporative fluid cooler Performance Input Method currently specified as: {}", AlphArray(4))); + ShowContinueError(state, + EnergyPlus::format("Evaporative fluid cooler Performance Input Method currently specified as: {}", AlphArray(4))); ErrorsFound = true; } @@ -607,9 +614,10 @@ namespace EvaporativeFluidCoolers { thisEFC.DesignEnteringAirWetBulbTemp = NumArray(21); if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { - ShowSevereError( - state, - format("{}, \"{}\" Performance input method is not specified. ", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name)); + ShowSevereError(state, + EnergyPlus::format("{}, \"{}\" Performance input method is not specified. ", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); ErrorsFound = true; } else { thisEFC.PerformanceInputMethod = AlphArray(4); @@ -630,8 +638,9 @@ namespace EvaporativeFluidCoolers { NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisEFC.OutdoorAirInletNodeNum)) { - ShowSevereError(state, - format("{}, \"{}\" Outdoor Air Inlet DataLoopNode::Node Name not valid Outdoor Air DataLoopNode::Node= {}", + ShowSevereError( + state, + EnergyPlus::format("{}, \"{}\" Outdoor Air Inlet DataLoopNode::Node Name not valid Outdoor Air DataLoopNode::Node= {}", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name, AlphArray(5))); @@ -650,8 +659,8 @@ namespace EvaporativeFluidCoolers { } else { thisEFC.EvapLossMode = static_cast(getEnumValue(evapLossNamesUC, Util::makeUPPER(AlphArray(6)))); if (thisEFC.EvapLossMode == EvapLoss::Invalid) { - ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); - ShowContinueError(state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -684,8 +693,8 @@ namespace EvaporativeFluidCoolers { } else { thisEFC.BlowdownMode = static_cast(getEnumValue(blowDownNamesUC, Util::makeUPPER(AlphArray(7)))); if (thisEFC.BlowdownMode == Blowdown::Invalid) { - ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(7), AlphArray(7))); - ShowContinueError(state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(7), AlphArray(7))); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -713,24 +722,27 @@ namespace EvaporativeFluidCoolers { // Check various inputs to ensure that all the required variables are specified. if (thisEFC.DesignSprayWaterFlowRate <= 0.0) { - ShowSevereError(state, - format("{} \"{}\". Evaporative fluid cooler input requires a design spray water flow rate greater than zero for all " + 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)); ErrorsFound = true; } if (thisEFC.HighSpeedAirFlowRate <= 0.0 && thisEFC.HighSpeedAirFlowRate != DataSizing::AutoSize) { - ShowSevereError(state, - format("{}= \"{}\". Evaporative fluid cooler input requires design air flow rate at high fan speed to be greater " + 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)); ErrorsFound = true; } if (thisEFC.LowSpeedAirFlowRate <= 0.0 && thisEFC.LowSpeedAirFlowRate != DataSizing::AutoSize) { - ShowSevereError(state, - format("{}= \"{}\". Evaporative fluid cooler input requires design air flow rate at low fan speed to be greater than " + 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)); @@ -741,7 +753,7 @@ namespace EvaporativeFluidCoolers { if (thisEFC.HighSpeedAirFlowRate <= thisEFC.LowSpeedAirFlowRate && thisEFC.HighSpeedAirFlowRate != DataSizing::AutoSize) { ShowSevereError( state, - format( + EnergyPlus::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)); @@ -749,27 +761,28 @@ namespace EvaporativeFluidCoolers { } if (thisEFC.HighSpeedFanPower <= 0.0 && thisEFC.HighSpeedFanPower != DataSizing::AutoSize) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.LowSpeedFanPower <= 0.0 && thisEFC.LowSpeedFanPower != DataSizing::AutoSize) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.HighSpeedFanPower <= thisEFC.LowSpeedFanPower && thisEFC.HighSpeedFanPower != DataSizing::AutoSize) { - ShowSevereError(state, - format("{} = \"{}\". Evaporative fluid cooler low speed fan power must be less than the high speed fan power .", + 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)); ErrorsFound = true; @@ -779,28 +792,29 @@ namespace EvaporativeFluidCoolers { thisEFC.PerformanceInputMethod_Num = PIM::UFactor; if (thisEFC.HighSpeedEvapFluidCoolerUA <= 0.0 && thisEFC.HighSpeedEvapFluidCoolerUA != DataSizing::AutoSize) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.LowSpeedEvapFluidCoolerUA <= 0.0 && thisEFC.LowSpeedEvapFluidCoolerUA != DataSizing::AutoSize) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.HighSpeedEvapFluidCoolerUA <= thisEFC.LowSpeedEvapFluidCoolerUA && thisEFC.HighSpeedEvapFluidCoolerUA != DataSizing::AutoSize) { - ShowSevereError(state, - format("{} = \"{}\". Evaporative fluid cooler U-factor Times Area Value at Low Fan Speed must be less than the " + 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)); @@ -808,64 +822,64 @@ namespace EvaporativeFluidCoolers { } if (thisEFC.DesignWaterFlowRate <= 0.0 && thisEFC.DesignWaterFlowRate != DataSizing::AutoSize) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } } else if (Util::SameString(AlphArray(4), "STANDARDDESIGNCAPACITY")) { thisEFC.PerformanceInputMethod_Num = PIM::StandardDesignCapacity; if (thisEFC.HighSpeedStandardDesignCapacity <= 0.0) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.LowSpeedStandardDesignCapacity <= 0.0) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.LowSpeedStandardDesignCapacity >= thisEFC.HighSpeedStandardDesignCapacity) { - ShowSevereError( - state, - format("{} = \"{}\". Low-Speed Standard Design Capacity must be less than the High-Speed Standard Design Capacity.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + ShowSevereError(state, + EnergyPlus::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, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.HighSpeedUserSpecifiedDesignCapacity <= 0.0) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.LowSpeedUserSpecifiedDesignCapacity == Constant::AutoCalculate) { @@ -873,24 +887,26 @@ namespace EvaporativeFluidCoolers { } if (thisEFC.LowSpeedUserSpecifiedDesignCapacity <= 0.0) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.HighSpeedEvapFluidCoolerUA != 0.0) { if (thisEFC.HighSpeedEvapFluidCoolerUA > 0.0) { - ShowSevereError(state, - format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method and evaporative fluid cooler UA at " + 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)); } else { - ShowSevereError(state, - format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method has been specified and evaporative " + 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)); @@ -902,14 +918,16 @@ namespace EvaporativeFluidCoolers { } if (thisEFC.LowSpeedEvapFluidCoolerUA != 0.0) { if (thisEFC.LowSpeedEvapFluidCoolerUA > 0.0) { - ShowSevereError(state, - format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method and evaporative fluid cooler UA at " + 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)); } else { - ShowSevereError(state, - format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method has been specified and evaporative " + 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)); @@ -922,7 +940,7 @@ namespace EvaporativeFluidCoolers { if (thisEFC.LowSpeedUserSpecifiedDesignCapacity >= thisEFC.HighSpeedUserSpecifiedDesignCapacity) { ShowSevereError( state, - format( + EnergyPlus::format( "{} = \"{}\". Low-Speed User Specified Design Capacity must be less than the High-Speed User Specified Design Capacity.", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name)); @@ -931,53 +949,55 @@ namespace EvaporativeFluidCoolers { if (thisEFC.DesignEnteringAirTemp <= 0.0) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.DesignEnteringAirWetBulbTemp <= 0.0) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (thisEFC.DesignEnteringWaterTemp != DataSizing::AutoSize) { if (thisEFC.DesignEnteringWaterTemp <= thisEFC.DesignEnteringAirWetBulbTemp) { ShowSevereError(state, - format("{} = \"{}\", {} must be greater than {}.", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(19), - state.dataIPShortCut->cNumericFieldNames(15))); + EnergyPlus::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, - format("{} = \"{}\", {} must be greater than {}.", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(20), - state.dataIPShortCut->cNumericFieldNames(15))); + EnergyPlus::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, - format("{} = \"{}\". Evaporative fluid cooler Performance Input Method must be " + ShowSevereError( + state, + EnergyPlus::format("{} = \"{}\". Evaporative fluid cooler Performance Input Method must be " "\"UFactorTimesAreaAndDesignWaterFlowRate\" or \"StandardDesignCapacity\" or \"UserSpecifiedDesignCapacity\".", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name)); - ShowContinueError(state, format("Evaporative fluid cooler Performance Input Method currently specified as: {}", AlphArray(4))); + ShowContinueError(state, + EnergyPlus::format("Evaporative fluid cooler Performance Input Method currently specified as: {}", AlphArray(4))); ErrorsFound = true; } @@ -1223,7 +1243,8 @@ namespace EvaporativeFluidCoolers { MaxLoad = this->HighSpeedStandardDesignCapacity * this->HeatRejectCapNomCapSizingRatio; OptLoad = this->HighSpeedStandardDesignCapacity; } else { - ShowFatalError(state, format("SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = {}", EvapFluidCoolerType)); + ShowFatalError(state, + EnergyPlus::format("SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = {}", EvapFluidCoolerType)); } } @@ -1256,7 +1277,8 @@ namespace EvaporativeFluidCoolers { } else if (this->Type == DataPlant::PlantEquipmentType::EvapFluidCooler_TwoSpd) { this->CalcTwoSpeedEvapFluidCooler(state); } else { - ShowFatalError(state, format("SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = {}", EvapFluidCoolerType)); + ShowFatalError(state, + EnergyPlus::format("SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = {}", EvapFluidCoolerType)); } this->CalculateWaterUsage(state); @@ -1374,13 +1396,16 @@ namespace EvaporativeFluidCoolers { if (this->DesignEnteringWaterTemp <= this->DesignEnteringAirWetBulbTemp) { ShowSevereError( - state, format("Error when autosizing the Design Entering Water Temperature for Evaporative Fluid Cooler = {}.", this->Name)); + state, + EnergyPlus::format("Error when autosizing the Design Entering Water Temperature for Evaporative Fluid Cooler = {}.", + this->Name)); ShowContinueError( state, - format("Design Entering Water Temperature ({:.2R} C) must be greater than design entering air wet-bulb temperature " - "({:.2R} C).", - this->DesignEnteringWaterTemp, - this->DesignEnteringAirWetBulbTemp)); + EnergyPlus::format( + "Design Entering Water Temperature ({:.2R} C) must be greater than design entering air wet-bulb temperature " + "({:.2R} C).", + this->DesignEnteringWaterTemp, + this->DesignEnteringAirWetBulbTemp)); ShowContinueError( state, "Check the Sizing:Plant object and the Design Entering Air Wet-bulb Temp input field for the Evaporative Fluid Cooler."); @@ -1392,7 +1417,7 @@ namespace EvaporativeFluidCoolers { state, this->EvapFluidCoolerType, this->Name, "Design Entering Water Temperature [C]", this->DesignEnteringWaterTemp); } } else if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -1410,12 +1435,13 @@ namespace EvaporativeFluidCoolers { DesignEnteringAirWetBulb = this->DesignEnteringAirWetBulbTemp; } if (this->DesignExitWaterTemp <= DesignEnteringAirWetBulb) { - ShowSevereError(state, format("Error when autosizing the UA value for Evaporative Fluid Cooler = {}.", this->Name)); - ShowContinueError(state, - format("Design Loop Exit Temperature ({:.2R} C) must be greater than design entering air wet-bulb temperature " - "({:.2R} C) when autosizing the Evaporative Fluid Cooler UA.", - this->DesignExitWaterTemp, - DesignEnteringAirWetBulb)); + ShowSevereError(state, EnergyPlus::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 " + "({:.2R} C) when autosizing the Evaporative Fluid Cooler UA.", + this->DesignExitWaterTemp, + DesignEnteringAirWetBulb)); ShowContinueError( state, "It is recommended that the Design Loop Exit Temperature = Design Entering Air Wet-bulb Temp plus the Evaporative " @@ -1451,7 +1477,7 @@ namespace EvaporativeFluidCoolers { } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::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."); } } @@ -1549,7 +1575,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, format(" Occurs in evaporative fluid cooler object= {}", this->Name)); + ShowFatalError(state, EnergyPlus::format(" Occurs in evaporative fluid cooler object= {}", this->Name)); } } } @@ -1618,14 +1644,16 @@ 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, format("Error when autosizing the UA value for Evaporative Fluid Cooler = {}.", this->Name)); - ShowContinueError(state, - format("Design Loop Exit Temperature ({:.2R} C) must be greater than 25.6 C when autosizing the " - "Evaporative Fluid Cooler UA.", - this->DesignExitWaterTemp)); + ShowSevereError(state, + EnergyPlus::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, - format("The Design Loop Exit Temperature specified in Sizing:Plant object = {}", - state.dataSize->PlantSizData(PltSizCondNum).PlantLoopName)); + EnergyPlus::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)."); @@ -1657,12 +1685,14 @@ 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, format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); - ShowContinueError(state, format("The final UA value = {:.2R}W/C, and the simulation continues...", UA)); + ShowContinueError(state, + EnergyPlus::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, format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError( + state, EnergyPlus::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 " @@ -1678,29 +1708,40 @@ namespace EvaporativeFluidCoolers { "based on the autosized values shown below or to adjust design evaporative fluid cooler air inlet wet-bulb temperature."); ShowContinueError(state, "Plant:Sizing object inputs also influence these results (e.g. DeltaT and ExitTemp)."); ShowContinueError(state, "Inputs to the evaporative fluid cooler object:"); - ShowContinueError(state, - format("Design Evaporative Fluid Cooler Load [W] = {:.2R}", DesEvapFluidCoolerLoad)); ShowContinueError( - state, format("Design Evaporative Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); - ShowContinueError(state, format("Design Evaporative Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", par2)); + state, + EnergyPlus::format("Design Evaporative Fluid Cooler Load [W] = {:.2R}", DesEvapFluidCoolerLoad)); ShowContinueError( - state, format("Design Evaporative Fluid Cooler Air Inlet Wet-bulb Temp [C] = {:.2R}", this->inletConds.AirWetBulb)); + state, + EnergyPlus::format("Design Evaporative Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); + ShowContinueError(state, EnergyPlus::format("Design Evaporative Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", par2)); + ShowContinueError(state, + EnergyPlus::format("Design Evaporative Fluid Cooler Air Inlet Wet-bulb Temp [C] = {:.2R}", + this->inletConds.AirWetBulb)); ShowContinueError( - state, format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); + state, + EnergyPlus::format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); ShowContinueError(state, "Inputs to the plant sizing object:"); ShowContinueError( - state, format("Design Exit Water Temp [C] = {:.2R}", this->DesignExitWaterTemp)); + state, + EnergyPlus::format("Design Exit Water Temp [C] = {:.2R}", this->DesignExitWaterTemp)); ShowContinueError(state, - format("Loop Design Temperature Difference [C] = {:.2R}", - state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); - ShowContinueError( - state, format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); - ShowContinueError( - state, format("Calculated water outlet temperature at low UA [C](UA = {:.2R} W/C) = {:.2R}", UA0, OutWaterTempAtUA0)); + EnergyPlus::format("Loop Design Temperature Difference [C] = {:.2R}", + state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); ShowContinueError( - state, format("Calculated water outlet temperature at high UA [C](UA = {:.2R} W/C) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError(state, - format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + state, + EnergyPlus::format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); + ShowContinueError(state, + EnergyPlus::format("Calculated water outlet temperature at low UA [C](UA = {:.2R} W/C) = {:.2R}", + UA0, + OutWaterTempAtUA0)); + 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)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->HighSpeedEvapFluidCoolerUA = UA; @@ -1746,7 +1787,7 @@ namespace EvaporativeFluidCoolers { } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); ShowFatalError(state, "Autosizing of evaporative fluid cooler UA requires a loop Sizing:Plant object."); } } @@ -1779,12 +1820,15 @@ 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, format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); - ShowContinueError(state, format("The final UA value = {:.2R}W/C, and the simulation continues...", UA)); + ShowContinueError(state, + EnergyPlus::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, format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, + EnergyPlus::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, format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + ShowFatalError( + state, EnergyPlus::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); } this->HighSpeedEvapFluidCoolerUA = UA; } else { @@ -1850,12 +1894,14 @@ 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, format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); - ShowContinueError(state, format("The final UA value = {:.2R}W/C, and the simulation continues...", UA)); + ShowContinueError(state, + EnergyPlus::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, format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, + EnergyPlus::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, @@ -1871,30 +1917,38 @@ namespace EvaporativeFluidCoolers { "based on the autosized values shown below or to adjust design evaporative fluid cooler air inlet wet-bulb temperature."); ShowContinueError(state, "Plant:Sizing object inputs also influence these results (e.g. DeltaT and ExitTemp)."); ShowContinueError(state, "Inputs to the evaporative fluid cooler object:"); - ShowContinueError(state, - format("Design Evaporative Fluid Cooler Load [W] = {:.2R}", DesEvapFluidCoolerLoad)); - ShowContinueError(state, - format("Design Evaporative Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); - ShowContinueError(state, format("Design Evaporative Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", par2)); - ShowContinueError(state, - format("Design Evaporative Fluid Cooler Air Inlet Wet-bulb Temp [C] = {:.2R}", this->inletConds.AirWetBulb)); - ShowContinueError(state, - format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); + ShowContinueError( + state, EnergyPlus::format("Design Evaporative Fluid Cooler Load [W] = {:.2R}", DesEvapFluidCoolerLoad)); + ShowContinueError( + state, + EnergyPlus::format("Design Evaporative Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); + ShowContinueError(state, EnergyPlus::format("Design Evaporative Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", par2)); + ShowContinueError( + state, + EnergyPlus::format("Design Evaporative Fluid Cooler Air Inlet Wet-bulb Temp [C] = {:.2R}", this->inletConds.AirWetBulb)); + ShowContinueError( + state, + EnergyPlus::format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); ShowContinueError(state, "Inputs to the plant sizing object:"); - ShowContinueError(state, - format("Design Exit Water Temp [C] = {:.2R}", this->DesignExitWaterTemp)); + ShowContinueError( + state, + EnergyPlus::format("Design Exit Water Temp [C] = {:.2R}", this->DesignExitWaterTemp)); if (PltSizCondNum > 0) { ShowContinueError(state, - format("Loop Design Temperature Difference [C] = {:.2R}", - state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); + EnergyPlus::format("Loop Design Temperature Difference [C] = {:.2R}", + state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); } - ShowContinueError(state, - format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); - ShowContinueError(state, - format("Calculated water outlet temperature at low UA [C](UA = {:.2R} W/C) = {:.2R}", UA0, OutWaterTempAtUA0)); ShowContinueError( - state, format("Calculated water outlet temperature at high UA [C](UA = {:.2R} W/C) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError(state, format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + state, + EnergyPlus::format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); + ShowContinueError( + state, + EnergyPlus::format("Calculated water outlet temperature at low UA [C](UA = {:.2R} W/C) = {:.2R}", UA0, OutWaterTempAtUA0)); + 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)); } this->HighSpeedEvapFluidCoolerUA = UA; } else { @@ -2002,12 +2056,15 @@ 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, format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); - ShowContinueError(state, format("The final UA value = {:.2R}W/C, and the simulation continues...", UA)); + ShowContinueError(state, + EnergyPlus::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, format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, + EnergyPlus::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, format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + ShowFatalError( + state, EnergyPlus::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); } this->LowSpeedEvapFluidCoolerUA = UA; } else { @@ -2056,11 +2113,13 @@ 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, format("Autosizing of EvaporativeFluidCooler UA failed for EvaporativeFluidCooler {}", this->Name)); + ShowFatalError(state, + EnergyPlus::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, format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, + EnergyPlus::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, @@ -2071,16 +2130,24 @@ namespace EvaporativeFluidCoolers { ShowContinueError(state, "temperatures calculated at high and low UA values. If the Design Exit Water Temperature is "); ShowContinueError(state, "out of this range, the solution will not converge and UA will not be calculated. "); ShowContinueError(state, "Inputs to the Evaporative Fluid Cooler model are:"); - ShowContinueError(state, format("Design Evaporative Fluid Cooler Load = {:.2R}", DesEvapFluidCoolerLoad)); - ShowContinueError(state, format("Design Evaporative Fluid Cooler Water Volume Flow Rate = {:.2R}", par1)); - ShowContinueError(state, format("Design Evaporative Fluid Cooler Air Volume Flow Rate = {:.2R}", par2)); - ShowContinueError(state, format("Design Evaporative Fluid Cooler Air Inlet Wet-bulb Temp = {:.2R}", this->inletConds.AirWetBulb)); - ShowContinueError(state, format("Design Evaporative Fluid Cooler Water Inlet Temp = {:.2R}", this->inletConds.WaterTemp)); - ShowContinueError(state, format("Design Exit Water Temp = {:.2R}", this->DesignExitWaterTemp)); - ShowContinueError(state, format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); - ShowContinueError(state, format("Calculated water outlet temperature at low UA({:.2R}) = {:.2R}", UA0, OutWaterTempAtUA0)); - ShowContinueError(state, format("Calculated water outlet temperature at high UA({:.2R}) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError(state, format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + ShowContinueError(state, + EnergyPlus::format("Design Evaporative Fluid Cooler Load = {:.2R}", DesEvapFluidCoolerLoad)); + ShowContinueError(state, EnergyPlus::format("Design Evaporative Fluid Cooler Water Volume Flow Rate = {:.2R}", par1)); + ShowContinueError(state, EnergyPlus::format("Design Evaporative Fluid Cooler Air Volume Flow Rate = {:.2R}", par2)); + ShowContinueError( + state, EnergyPlus::format("Design Evaporative Fluid Cooler Air Inlet Wet-bulb Temp = {:.2R}", this->inletConds.AirWetBulb)); + ShowContinueError( + state, EnergyPlus::format("Design Evaporative Fluid Cooler Water Inlet Temp = {:.2R}", this->inletConds.WaterTemp)); + ShowContinueError( + state, EnergyPlus::format("Design Exit Water Temp = {:.2R}", this->DesignExitWaterTemp)); + ShowContinueError( + state, EnergyPlus::format("Design Evaporative Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->inletConds.WaterTemp)); + ShowContinueError(state, + 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)); } this->LowSpeedEvapFluidCoolerUA = UA; } else { @@ -2334,8 +2401,10 @@ namespace EvaporativeFluidCoolers { bypassFraction = BypassFraction2; } if (NumIteration > MaxIteration) { - ShowWarningError( - state, format("Evaporative fluid cooler fluid bypass iteration exceeds maximum limit of {} for {}", MaxItChar, this->Name)); + ShowWarningError(state, + EnergyPlus::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 @@ -2717,11 +2786,13 @@ namespace EvaporativeFluidCoolers { this->DesWaterMassFlowRate * this->EvapFluidCoolerMassFlowRateMultiplier) { ++this->HighMassFlowErrorCount; if (this->HighMassFlowErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); + ShowWarningError(state, EnergyPlus::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, - format(" Condenser Loop Mass Flow Rate = {:.6T}", state.dataLoopNodes->Node(this->WaterOutletNode).MassFlowRate)); - ShowContinueError(state, format(" Evaporative Fluid Cooler Design Mass Flow Rate = {:.6T}", this->DesWaterMassFlowRate)); + EnergyPlus::format(" Evaporative Fluid Cooler Design Mass Flow Rate = {:.6T}", this->DesWaterMassFlowRate)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -2740,12 +2811,13 @@ namespace EvaporativeFluidCoolers { if (TempDifference > TempAllowance && this->WaterMassFlowRate > 0.0) { ++this->OutletWaterTempErrorCount; if (this->OutletWaterTempErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); - ShowContinueError(state, - 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)); + ShowWarningError(state, EnergyPlus::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)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -2762,10 +2834,10 @@ namespace EvaporativeFluidCoolers { if (this->WaterMassFlowRate > 0.0 && this->WaterMassFlowRate <= DataBranchAirLoopPlant::MassFlowTolerance) { ++this->SmallWaterMassFlowErrorCount; if (this->SmallWaterMassFlowErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); ShowContinueError(state, "Evaporative fluid cooler water mass flow rate near zero."); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); } else { ShowRecurringWarningErrorAtEnd(state, this->EvapFluidCoolerType + " \"" + this->Name + @@ -2822,15 +2894,16 @@ namespace EvaporativeFluidCoolers { if (Util::SameString(this->PerformanceInputMethod, "STANDARDDESIGNCAPACITY")) { this->PerformanceInputMethod_Num = PIM::StandardDesignCapacity; if (FluidName != "WATER") { - ShowSevereError(state, - format("{} = \"{}{}", + ShowSevereError( + state, + EnergyPlus::format("{} = \"{}{}", state.dataIPShortCut->cCurrentModuleObject, this->Name, R"(". StandardDesignCapacity performance input method is only valid for fluid type = "Water".)")); ShowContinueError(state, - format("Currently, Fluid Type = {} in CondenserLoop = {}", - FluidName, - state.dataPlnt->PlantLoop(state.dataSize->CurLoopNum).Name)); + EnergyPlus::format("Currently, Fluid Type = {} in CondenserLoop = {}", + FluidName, + state.dataPlnt->PlantLoop(state.dataSize->CurLoopNum).Name)); ErrorsFound = true; } } @@ -2851,14 +2924,16 @@ namespace EvaporativeFluidCoolers { if (this->HighSpeedAirFlowRate <= this->LowSpeedAirFlowRate) { ShowSevereError( state, - format("EvaporativeFluidCooler:TwoSpeed \"{}\". Low speed air flow rate must be less than the high speed air flow rate.", - this->Name)); + EnergyPlus::format( + "EvaporativeFluidCooler:TwoSpeed \"{}\". Low speed air flow rate must be less than the high speed air flow rate.", + this->Name)); ErrorsFound = true; } if ((this->HighSpeedEvapFluidCoolerUA > 0.0) && (this->LowSpeedEvapFluidCoolerUA > 0.0) && (this->HighSpeedEvapFluidCoolerUA <= this->LowSpeedEvapFluidCoolerUA)) { - ShowSevereError(state, - format("EvaporativeFluidCooler:TwoSpeed \"{}\". Evaporative fluid cooler UA at low fan speed must be less " + 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)); ErrorsFound = true; diff --git a/src/EnergyPlus/ExhaustAirSystemManager.cc b/src/EnergyPlus/ExhaustAirSystemManager.cc index 51171bc0db6..b4fc9111e9f 100644 --- a/src/EnergyPlus/ExhaustAirSystemManager.cc +++ b/src/EnergyPlus/ExhaustAirSystemManager.cc @@ -143,15 +143,15 @@ namespace ExhaustAirSystemManager { bool IsNotOK = false; // Flag to verify name ValidateComponent(state, "AirLoopHVAC:ZoneMixer", zoneMixerName, IsNotOK, "AirLoopHVAC:ExhaustSystem"); if (IsNotOK) { - ShowSevereError(state, format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); - ShowContinueError(state, format("ZoneMixer Name ={} mismatch or not found.", zoneMixerName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); + ShowContinueError(state, EnergyPlus::format("ZoneMixer Name ={} mismatch or not found.", zoneMixerName)); ErrorsFound = true; } else { // normal conditions } } else { - ShowSevereError(state, format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); - ShowContinueError(state, format("Zone Mixer Name ={} not found.", zoneMixerName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); + ShowContinueError(state, EnergyPlus::format("Zone Mixer Name ={} not found.", zoneMixerName)); ErrorsFound = true; } thisExhSys.ZoneMixerName = zoneMixerName; @@ -160,8 +160,9 @@ namespace ExhaustAirSystemManager { thisExhSys.centralFanType = static_cast( getEnumValue(HVAC::fanTypeNamesUC, Util::makeUPPER(ip->getAlphaFieldValue(objectFields, objectSchemaProps, "fan_object_type")))); if (thisExhSys.centralFanType != HVAC::FanType::SystemModel && thisExhSys.centralFanType != HVAC::FanType::ComponentModel) { - ShowSevereError(state, format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); - ShowContinueError(state, format("Fan Type ={} is not supported.", HVAC::fanTypeNames[(int)thisExhSys.centralFanType])); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); + ShowContinueError(state, + EnergyPlus::format("Fan Type ={} is not supported.", HVAC::fanTypeNames[(int)thisExhSys.centralFanType])); ShowContinueError(state, "It needs to be either a Fan:SystemModel or a Fan:ComponentModel type."); ErrorsFound = true; } @@ -255,7 +256,7 @@ namespace ExhaustAirSystemManager { MixerComponent::SimAirMixer(state, thisExhSys.ZoneMixerName, thisExhSys.ZoneMixerIndex); } else { // Give a warning that the current model does not work with AirflowNetwork for now - ShowSevereError(state, format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); ShowContinueError(state, "AirloopHVAC:ExhaustSystem currently does not work with AirflowNetwork."); ErrorsFound = true; } @@ -340,7 +341,7 @@ namespace ExhaustAirSystemManager { // calculate a ratio Real64 flowRatio = mixerFlow_Posterior / mixerFlow_Prior; if (flowRatio > 1.0) { - ShowWarningError(state, format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); + ShowWarningError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhSys.Name)); ShowContinueError(state, "Requested flow rate is lower than the exhasut fan flow rate."); ShowContinueError(state, "Will scale up the requested flow rate to meet fan flow rate."); } @@ -486,9 +487,10 @@ namespace ExhaustAirSystemManager { for (size_t i = 1; i <= thisExhCtrl.SuppNodeNums.size(); ++i) { CheckForSupplyNode(state, exhCtrlNum, nodeNotFound); if (nodeNotFound) { - ShowSevereError(state, format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhCtrl.Name)); - ShowContinueError(state, - format("Node or NodeList Name ={}. Must all be supply nodes.", thisExhCtrl.SupplyNodeOrNodelistName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisExhCtrl.Name)); + ShowContinueError( + state, + EnergyPlus::format("Node or NodeList Name ={}. Must all be supply nodes.", thisExhCtrl.SupplyNodeOrNodelistName)); ErrorsFound = true; } } @@ -586,7 +588,8 @@ namespace ExhaustAirSystemManager { FlowFrac = thisExhCtrl.exhaustFlowFractionSched->getCurrentVal(); if (FlowFrac < 0.0) { ShowWarningError( - state, format("Exhaust Flow Fraction Schedule value is negative for Zone Exhaust Control Named: {};", thisExhCtrl.Name)); + state, + EnergyPlus::format("Exhaust Flow Fraction Schedule value is negative for Zone Exhaust Control Named: {};", thisExhCtrl.Name)); ShowContinueError(state, "Reset value to zero and continue the simulation."); FlowFrac = 0.0; } @@ -598,7 +601,8 @@ namespace ExhaustAirSystemManager { if (MinFlowFrac < 0.0) { ShowWarningError( state, - format("Minimum Exhaust Flow Fraction Schedule value is negative for Zone Exhaust Control Named: {};", thisExhCtrl.Name)); + EnergyPlus::format("Minimum Exhaust Flow Fraction Schedule value is negative for Zone Exhaust Control Named: {};", + thisExhCtrl.Name)); ShowContinueError(state, "Reset value to zero and continue the simulation."); MinFlowFrac = 0.0; } @@ -765,12 +769,13 @@ namespace ExhaustAirSystemManager { } } if (ZoneNodeNotFound) { - ShowSevereError(state, format("{}{}={}", RoutineName, CurrentModuleObject, thisExhCtrl.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, CurrentModuleObject, thisExhCtrl.Name)); ShowContinueError( state, - format("Supply or supply list = \"{}\" contains at least one node that is not a zone inlet node for Zone Name = \"{}\"", - thisExhCtrl.SupplyNodeOrNodelistName, - thisExhCtrl.ZoneName)); + EnergyPlus::format( + "Supply or supply list = \"{}\" contains at least one node that is not a zone inlet node for Zone Name = \"{}\"", + thisExhCtrl.SupplyNodeOrNodelistName, + thisExhCtrl.ZoneName)); ShowContinueError(state, "..Nodes in the supply node or nodelist must be a zone inlet node."); ErrorsFound = true; } diff --git a/src/EnergyPlus/ExteriorEnergyUse.cc b/src/EnergyPlus/ExteriorEnergyUse.cc index 644c22a3dcb..02f2cc1ca20 100644 --- a/src/EnergyPlus/ExteriorEnergyUse.cc +++ b/src/EnergyPlus/ExteriorEnergyUse.cc @@ -161,7 +161,8 @@ namespace ExteriorEnergyUse { ShowSevereCustom( state, eoh, - format("{} = {} minimum is [{:.1R}]. Values must be >= 0.0.", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3), SchMin)); + EnergyPlus::format( + "{} = {} minimum is [{:.1R}]. Values must be >= 0.0.", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3), SchMin)); ErrorsFound = true; } @@ -288,7 +289,7 @@ namespace ExteriorEnergyUse { OutputProcessor::StoreType::Average, exteriorEquip.Name); SetupOutputVariable(state, - format("Exterior Equipment {} Energy", Constant::eFuelNames[(int)exteriorEquip.FuelType]), + EnergyPlus::format("Exterior Equipment {} Energy", Constant::eFuelNames[(int)exteriorEquip.FuelType]), Constant::Units::J, exteriorEquip.CurrentUse, OutputProcessor::TimeStepType::Zone, @@ -307,7 +308,7 @@ namespace ExteriorEnergyUse { OutputProcessor::StoreType::Average, exteriorEquip.Name); SetupOutputVariable(state, - format("Exterior Equipment {} Volume", Constant::eFuelNames[(int)exteriorEquip.FuelType]), + EnergyPlus::format("Exterior Equipment {} Volume", Constant::eFuelNames[(int)exteriorEquip.FuelType]), Constant::Units::m3, exteriorEquip.CurrentUse, OutputProcessor::TimeStepType::Zone, @@ -329,7 +330,8 @@ namespace ExteriorEnergyUse { ShowSevereCustom( state, eoh, - format("{} = {} minimum is [{:.1R}]. Values must be >= 0.0.", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3), SchMin)); + EnergyPlus::format( + "{} = {} minimum is [{:.1R}]. Values must be >= 0.0.", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3), SchMin)); ErrorsFound = true; } exteriorEquip.DesignLevel = s_ipsc->rNumericArgs(1); @@ -377,7 +379,8 @@ namespace ExteriorEnergyUse { ShowSevereCustom( state, eoh, - format("{} = {} minimum is [{:.1R}]. Values must be >= 0.0.", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3), SchMin)); + EnergyPlus::format( + "{} = {} minimum is [{:.1R}]. Values must be >= 0.0.", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3), SchMin)); ErrorsFound = true; } @@ -422,7 +425,7 @@ namespace ExteriorEnergyUse { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Program terminates.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Program terminates.", routineName)); } } // GetExteriorEnergyUseInput() diff --git a/src/EnergyPlus/ExternalInterface.cc b/src/EnergyPlus/ExternalInterface.cc index 8c00d9f1a12..32d8864aa96 100644 --- a/src/EnergyPlus/ExternalInterface.cc +++ b/src/EnergyPlus/ExternalInterface.cc @@ -126,7 +126,7 @@ void ExternalInterfaceExchangeVariables(EnergyPlusData &state) char *errorMessagePtr(errorMessage.data()); const int retValErrMsg = checkOperatingSystem(errorMessagePtr); if (retValErrMsg != 0) { - ShowSevereError(state, format("ExternalInterface/ExternalInterfaceExchangeVariables:{}", errorMessagePtr)); + ShowSevereError(state, EnergyPlus::format("ExternalInterface/ExternalInterfaceExchangeVariables:{}", errorMessagePtr)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -400,12 +400,13 @@ void InitExternalInterface(EnergyPlusData &state) if (FileSystem::fileExists(state.dataExternalInterface->socCfgFilPath)) { state.dataExternalInterface->socketFD = establishclientsocket(FileSystem::toString(state.dataExternalInterface->socCfgFilPath).c_str()); if (state.dataExternalInterface->socketFD < 0) { - ShowSevereError(state, - format("ExternalInterface: Could not open socket. File descriptor = {}.", state.dataExternalInterface->socketFD)); + ShowSevereError( + state, + EnergyPlus::format("ExternalInterface: Could not open socket. File descriptor = {}.", state.dataExternalInterface->socketFD)); state.dataExternalInterface->ErrorsFound = true; } } else { - ShowSevereError(state, format("ExternalInterface: Did not find file \"{}\".", state.dataExternalInterface->socCfgFilPath)); + ShowSevereError(state, EnergyPlus::format("ExternalInterface: Did not find file \"{}\".", state.dataExternalInterface->socCfgFilPath)); 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; @@ -481,7 +482,7 @@ void InitExternalInterface(EnergyPlusData &state) } else { - ShowSevereError(state, format("ExternalInterface: Did not find file \"{}\".", simCfgFilNam)); + ShowSevereError(state, EnergyPlus::format("ExternalInterface: Did not find file \"{}\".", simCfgFilNam)); 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; @@ -490,9 +491,9 @@ void InitExternalInterface(EnergyPlusData &state) if (state.dataExternalInterface->nOutVal + state.dataExternalInterface->nInpVar > maxVar) { ShowSevereError(state, "ExternalInterface: Too many variables to be exchanged."); - ShowContinueError(state, format("Attempted to exchange {} outputs", state.dataExternalInterface->nOutVal)); - ShowContinueError(state, format("plus {} inputs.", state.dataExternalInterface->nOutVal)); - ShowContinueError(state, format("Maximum allowed is sum is {}.", maxVar)); + ShowContinueError(state, EnergyPlus::format("Attempted to exchange {} outputs", state.dataExternalInterface->nOutVal)); + ShowContinueError(state, EnergyPlus::format("plus {} inputs.", state.dataExternalInterface->nOutVal)); + ShowContinueError(state, EnergyPlus::format("Maximum allowed is sum is {}.", maxVar)); ShowContinueError(state, "To fix, increase maxVar in ExternalInterface.cc"); state.dataExternalInterface->ErrorsFound = true; } @@ -515,8 +516,8 @@ void InitExternalInterface(EnergyPlusData &state) } StopExternalInterfaceIfError(state); - DisplayString(state, format("Number of outputs in ExternalInterface = {}", state.dataExternalInterface->nOutVal)); - DisplayString(state, format("Number of inputs in ExternalInterface = {}", state.dataExternalInterface->nInpVar)); + DisplayString(state, EnergyPlus::format("Number of outputs in ExternalInterface = {}", state.dataExternalInterface->nOutVal)); + DisplayString(state, EnergyPlus::format("Number of inputs in ExternalInterface = {}", state.dataExternalInterface->nInpVar)); state.dataExternalInterface->InitExternalInterfacefirstCall = false; @@ -542,9 +543,9 @@ void InitExternalInterface(EnergyPlusData &state) } if (state.dataExternalInterface->varInd(i) <= 0) { ShowSevereError(state, - format("ExternalInterface: Error, xml file \"{}\" declares variable \"{}\",", - simCfgFilNam, - state.dataExternalInterface->inpVarNames(i))); + EnergyPlus::format("ExternalInterface: Error, xml file \"{}\" declares variable \"{}\",", + simCfgFilNam, + state.dataExternalInterface->inpVarNames(i))); ShowContinueError(state, "but variable was not found in idf file."); state.dataExternalInterface->ErrorsFound = true; } @@ -556,9 +557,9 @@ void InitExternalInterface(EnergyPlusData &state) state.dataExternalInterface->useEMS = true; if (!RuntimeLanguageProcessor::isExternalInterfaceErlVariable(state, state.dataExternalInterface->varInd(i))) { ShowSevereError(state, - format("ExternalInterface: Error, xml file \"{}\" declares variable \"{}\",", - simCfgFilNam, - state.dataExternalInterface->inpVarNames(i))); + EnergyPlus::format("ExternalInterface: Error, xml file \"{}\" declares variable \"{}\",", + simCfgFilNam, + state.dataExternalInterface->inpVarNames(i))); ShowContinueError(state, "But this variable is an ordinary Erl variable, not an ExternalInterface variable."); ShowContinueError(state, "You must specify a variable of type \"ExternalInterface:Variable\"."); state.dataExternalInterface->ErrorsFound = true; @@ -567,9 +568,9 @@ void InitExternalInterface(EnergyPlusData &state) state.dataExternalInterface->useEMS = true; if (!RuntimeLanguageProcessor::isExternalInterfaceErlVariable(state, state.dataExternalInterface->varInd(i))) { ShowSevereError(state, - format("ExternalInterface: Error, xml file \"{}\" declares variable \"{}\",", - simCfgFilNam, - state.dataExternalInterface->inpVarNames(i))); + EnergyPlus::format("ExternalInterface: Error, xml file \"{}\" declares variable \"{}\",", + simCfgFilNam, + state.dataExternalInterface->inpVarNames(i))); ShowContinueError(state, "But this variable is an ordinary Erl actuator, not an ExternalInterface actuator."); ShowContinueError(state, "You must specify a variable of type \"ExternalInterface:Actuator\"."); state.dataExternalInterface->ErrorsFound = true; @@ -637,8 +638,8 @@ void GetSetVariablesAndDoStepFMUImport(EnergyPlusData &state) if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/GetSetVariablesAndDoStepFMUImport: Error when trying to get outputs"); - ShowContinueError(state, format("in instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("Error Code = \"{}\"", fmuInst.fmistatus)); + ShowContinueError(state, EnergyPlus::format("in instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -665,8 +666,8 @@ void GetSetVariablesAndDoStepFMUImport(EnergyPlusData &state) if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/GetSetVariablesAndDoStepFMUImport: Error when trying to get outputs"); - ShowContinueError(state, format("in instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("Error Code = \"{}\"", fmuInst.fmistatus)); + ShowContinueError(state, EnergyPlus::format("in instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -693,8 +694,8 @@ void GetSetVariablesAndDoStepFMUImport(EnergyPlusData &state) if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/GetSetVariablesAndDoStepFMUImport: Error when trying to get outputs"); - ShowContinueError(state, format("in instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("Error Code = \"{}\"", fmuInst.fmistatus)); + ShowContinueError(state, EnergyPlus::format("in instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -753,8 +754,8 @@ void GetSetVariablesAndDoStepFMUImport(EnergyPlusData &state) if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/GetSetVariablesAndDoStepFMUImport: Error when trying to set inputs"); - ShowContinueError(state, format("in instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("Error Code = \"{}\"", fmuInst.fmistatus)); + ShowContinueError(state, EnergyPlus::format("in instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -765,9 +766,9 @@ void GetSetVariablesAndDoStepFMUImport(EnergyPlusData &state) &fmuInst.fmicomponent, &state.dataExternalInterface->tComm, &state.dataExternalInterface->hStep, &localfmitrue, &fmuInst.Index); if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/GetSetVariablesAndDoStepFMUImport: Error when trying to"); - ShowContinueError(state, format("do the coSimulation with instance \"{}\"", fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\"", fmu.Name)); - ShowContinueError(state, format("Error Code = \"{}\"", fmuInst.fmistatus)); + ShowContinueError(state, EnergyPlus::format("do the coSimulation with instance \"{}\"", fmuInst.Name)); + ShowContinueError(state, EnergyPlus::format("of FMU \"{}\"", fmu.Name)); + ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -803,7 +804,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, format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -820,8 +821,8 @@ 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, format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("Error Code = \"{}\"", fmuInst.fmistatus)); + ShowContinueError(state, EnergyPlus::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -850,8 +851,8 @@ 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, format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("Error Code = \"{}\"", fmuInst.fmistatus)); + ShowContinueError(state, EnergyPlus::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -880,7 +881,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, format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -989,10 +990,10 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) } ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport:"); ShowContinueError(state, "duplicate file names (but not same file) entered."); - ShowContinueError(state, format("...entered file name=\"{}\"", state.dataExternalInterface->FMU(j).Name)); - ShowContinueError(state, format("... full file name=\"{}\"", fullFileName(j))); - ShowContinueError(state, format("...entered file name=\"{}\"", state.dataExternalInterface->FMU(k).Name)); - ShowContinueError(state, format("... full file name=\"{}\"", fullFileName(k))); + 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, "...name collision but not same file name."); state.dataExternalInterface->ErrorsFound = true; } @@ -1052,14 +1053,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, format("ExternalInterface/InitExternalInterfaceFMUImport: The FMU \"{}\" does", fmu.Name)); + ShowSevereError(state, EnergyPlus::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, format("InitExternalInterfaceFMUImport: The FMU \"{}\"", fmu.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -1095,7 +1096,7 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) if (retVal != 0) { ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to"); - ShowContinueError(state, format("unpack the FMU \"{}\".", fmu.Name)); + ShowContinueError(state, EnergyPlus::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); @@ -1117,7 +1118,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, format("of instance \"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::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); @@ -1145,7 +1146,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, format("\"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::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); @@ -1172,17 +1173,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, format("\"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("\"{}\".", fmuInst.fmiVersionNumber)); + ShowContinueError(state, EnergyPlus::format("\"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::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, format("number of instance \"{}\"", fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\".", fmu.Name)); - ShowContinueError(state, format("The version number found (\"{}\")", fmuInst.fmiVersionNumber.substr(0, 3))); + 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, "differs from version 1.0 which is currently supported."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1261,8 +1262,9 @@ 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, format("\"{}\" of instance \"{}\" of FMU", fmuInst.fmuInputVariable(k).Name, fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\". Please check the name of input variable", fmu.Name)); + 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, "in the input file and in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1271,8 +1273,9 @@ 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, format("\"{}\" of instance \"{}\" of FMU", fmuInst.fmuInputVariable(k).Name, fmuInst.Name)); - ShowContinueError(state, format("\"{}\". This variable is not an FMU input variable.", fmu.Name)); + 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, "Please check the causality of the variable in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1298,7 +1301,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) } if (NumFMUInputVariables > 0 && fmuInst.NumInputVariablesInIDF == 0) { - ShowWarningError(state, format("InitExternalInterfaceFMUImport: The instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowWarningError(state, + EnergyPlus::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."); } @@ -1312,21 +1316,23 @@ 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, - format("InitExternalInterfaceFMUImport: The number of input variables defined in input file ({})", - fmuInst.NumInputVariablesInIDF)); - ShowContinueError(state, - format("of instance \"{}\" of FMU \"{}\" is less than the number of input variables", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("in the modelDescription file ({}).", fmuInst.NumInputVariablesInFMU)); + EnergyPlus::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)); 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, - format("InitExternalInterfaceFMUImport: The number of input variables defined in input file ({})", - fmuInst.NumInputVariablesInIDF)); + EnergyPlus::format("InitExternalInterfaceFMUImport: The number of input variables defined in input file ({})", + fmuInst.NumInputVariablesInIDF)); ShowContinueError( - state, format("of instance \"{}\" of FMU \"{}\" is bigger than the number of input variables", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("in the modelDescription file ({}).", fmuInst.NumInputVariablesInFMU)); + 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)); ShowContinueError(state, "Check the input file and the modelDescription file again."); } } @@ -1403,8 +1409,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError(state, format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableSchedule(k).Name, fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\" that will be mapped to a schedule.", fmu.Name)); + 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, "Please check the name of output variables in the input file and"); ShowContinueError(state, "in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; @@ -1415,8 +1422,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError(state, format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableSchedule(k).Name, fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\" that will be mapped to a schedule.", fmu.Name)); + 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, "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; @@ -1427,8 +1435,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) fmuInst.NumOutputVariablesSchedule = k; if (fmuInst.eplusInputVariableSchedule(k).VarIndex <= 0) { ShowSevereError(state, - format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", - fmuInst.eplusInputVariableSchedule(k).Name)); + EnergyPlus::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", + fmuInst.eplusInputVariableSchedule(k).Name)); ShowContinueError(state, "but variable is not a schedule variable."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1504,8 +1512,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError(state, format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableVariable(k).Name, fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\" that will be mapped to a variable.", fmu.Name)); + 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, "Please check the name of output variables in the input file and in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1515,8 +1524,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError(state, format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableVariable(k).Name, fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\" that will be mapped to a variable.", fmu.Name)); + 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, "This variable is not an FMU output variable. Please check the causality of the variable in the " "modelDescription file."); @@ -1529,8 +1539,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) fmuInst.NumOutputVariablesVariable = k; if (fmuInst.eplusInputVariableVariable(k).VarIndex <= 0) { ShowSevereError(state, - format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", - fmuInst.eplusInputVariableVariable(k).Name)); + EnergyPlus::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", + fmuInst.eplusInputVariableVariable(k).Name)); ShowContinueError(state, "but variable is not an EMS variable."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1609,8 +1619,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError(state, format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableActuator(k).Name, fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\" that will be mapped to an actuator.", fmu.Name)); + 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, "Please check the name of output variables in the input file and in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1620,8 +1631,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError(state, format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableActuator(k).Name, fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\" that will be mapped to an actuator.", fmu.Name)); + 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, "This variable is not an FMU output variable. Please check the causality of the variable in the " "modelDescription file."); @@ -1634,8 +1646,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) fmuInst.NumOutputVariablesActuator = k; if (fmuInst.eplusInputVariableActuator(k).VarIndex <= 0) { ShowSevereError(state, - format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", - fmuInst.eplusInputVariableActuator(k).Name)); + EnergyPlus::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", + fmuInst.eplusInputVariableActuator(k).Name)); ShowContinueError(state, "but variable is not an EMS variable."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1660,30 +1672,34 @@ 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, - format("InitExternalInterfaceFMUImport: The number of output variables defined in input file ({})", - fmuInst.NumOutputVariablesInIDF)); - ShowContinueError(state, - format("of instance \"{}\" of FMU \"{}\" is less than the number of output variables", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("in the modelDescription file ({}).", fmuInst.NumOutputVariablesInFMU)); + EnergyPlus::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)); 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, - format("InitExternalInterfaceFMUImport: The number of output variables defined in input file ({})", - fmuInst.NumOutputVariablesInIDF)); + EnergyPlus::format("InitExternalInterfaceFMUImport: The number of output variables defined in input file ({})", + fmuInst.NumOutputVariablesInIDF)); ShowContinueError( - state, format("of instance \"{}\" of FMU \"{}\" is bigger than the number of output variables", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("in the modelDescription file ({}).", fmuInst.NumOutputVariablesInFMU)); + 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)); ShowContinueError(state, "Check the input file and the modelDescription file again."); } DisplayString( state, - format("Number of inputs in instance \"{}\" of FMU \"{}\" = \"{}\".", fmuInst.Name, fmu.Name, fmuInst.NumInputVariablesInIDF)); + EnergyPlus::format( + "Number of inputs in instance \"{}\" of FMU \"{}\" = \"{}\".", fmuInst.Name, fmu.Name, fmuInst.NumInputVariablesInIDF)); DisplayString( state, - format("Number of outputs in instance \"{}\" of FMU \"{}\" = \"{}\".", fmuInst.Name, fmu.Name, fmuInst.NumOutputVariablesInIDF)); + EnergyPlus::format( + "Number of outputs in instance \"{}\" of FMU \"{}\" = \"{}\".", fmuInst.Name, fmu.Name, fmuInst.NumOutputVariablesInIDF)); } } StopExternalInterfaceIfError(state); @@ -1939,9 +1955,10 @@ void CalcExternalInterfaceFMUImport(EnergyPlusData &state) if (fmuInst.fmistatus != fmiOK) { ShowSevereError( state, - format("ExternalInterface/CalcExternalInterfaceFMUImport: Error when trying to set an input value in instance \"{}\"", - fmuInst.Name)); - ShowContinueError(state, format("of FMU \"{}\"; Error Code = \"{}\"", fmu.Name, fmuInst.fmistatus)); + EnergyPlus::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)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -1999,8 +2016,8 @@ void CalcExternalInterfaceFMUImport(EnergyPlusData &state) if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/CalcExternalInterfaceFMUImport: "); ShowContinueError(state, "Error when trying to set inputs in instance"); - ShowContinueError(state, format("\"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); - ShowContinueError(state, format("Error Code = \"{}\"", fmuInst.fmistatus)); + ShowContinueError(state, EnergyPlus::format("\"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -2137,8 +2154,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, format("ExternalInterface: Continue simulation without updated values from server at t ={:.2T} hours", preSimTim / 3600.0)); + ShowWarningError(state, + EnergyPlus::format("ExternalInterface: Continue simulation without updated values from server at t ={:.2T} hours", + preSimTim / 3600.0)); } state.dataExternalInterface->showContinuationWithoutUpdate = false; } @@ -2197,10 +2215,10 @@ void CalcExternalInterface(EnergyPlusData &state) if (retVal != 0) { continueSimulation = false; ShowSevereError(state, - format("ExternalInterface: Socket communication received error value \"{:2}\" at time = {:.2T} hours.", - retVal, - preSimTim / 3600)); - ShowContinueError(state, format("ExternalInterface: Flag from server \"{:2}\".", flaRea)); + 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)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -2212,7 +2230,8 @@ 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, format("ExternalInterface: Received end of simulation flag at time = {:.2T} hours.", preSimTim / 3600)); + ShowSevereError(state, + EnergyPlus::format("ExternalInterface: Received end of simulation flag at time = {:.2T} hours.", preSimTim / 3600)); StopExternalInterfaceIfError(state); } } @@ -2220,9 +2239,10 @@ void CalcExternalInterface(EnergyPlusData &state) // Make sure we get the right number of double values, unless retVal != 0 if ((flaRea == 0) && (!state.dataExternalInterface->ErrorsFound) && continueSimulation && (nDblRea != isize(state.dataExternalInterface->varInd))) { - ShowSevereError( - state, - format("ExternalInterface: Received \"{}\" double values, expected \"{}\".", nDblRea, size(state.dataExternalInterface->varInd))); + ShowSevereError(state, + EnergyPlus::format("ExternalInterface: Received \"{}\" double values, expected \"{}\".", + nDblRea, + size(state.dataExternalInterface->varInd))); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -2237,7 +2257,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, format("variable index: {}. Variable will not be updated.", i)); + ShowContinueError(state, EnergyPlus::format("variable index: {}. Variable will not be updated.", i)); } } } @@ -2298,8 +2318,9 @@ void GetReportVariableKey( keyNames.deallocate(); } if ((varType == OutputProcessor::VariableType::Invalid) || (iKey > numKeys)) { - ShowSevereError(state, - format("ExternalInterface: Simulation model has no variable \"{}\" with key \"{}\".", VarNames(Loop), varKeys(Loop))); + ShowSevereError( + state, + EnergyPlus::format("ExternalInterface: Simulation model has no variable \"{}\" with key \"{}\".", VarNames(Loop), varKeys(Loop))); state.dataExternalInterface->ErrorsFound = true; } } @@ -2317,7 +2338,7 @@ void WarnIfExternalInterfaceObjectsAreUsed(EnergyPlusData &state, std::string co int const NumObjects = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ObjectWord); if (NumObjects > 0) { - ShowWarningError(state, format("IDF file contains object \"{}\",", ObjectWord)); + ShowWarningError(state, EnergyPlus::format("IDF file contains object \"{}\",", ObjectWord)); ShowContinueError(state, "but object \"ExternalInterface\" with appropriate key entry is not specified. Values will not be updated."); } } @@ -2355,10 +2376,10 @@ void VerifyExternalInterfaceObject(EnergyPlusData &state) (!Util::SameString(state.dataIPShortCut->cAlphaArgs(1), "FunctionalMockupUnitImport")) && (!Util::SameString(state.dataIPShortCut->cAlphaArgs(1), "FunctionalMockupUnitExport"))) { ShowSevereError(state, - format("VerifyExternalInterfaceObject: {}, invalid {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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 d6efc10e465..f2ea5c2172a 100644 --- a/src/EnergyPlus/FanCoilUnits.cc +++ b/src/EnergyPlus/FanCoilUnits.cc @@ -147,25 +147,25 @@ namespace FanCoilUnits { if (CompIndex == 0) { FanCoilNum = Util::FindItemInList(CompName, state.dataFanCoilUnits->FanCoil); if (FanCoilNum == 0) { - ShowFatalError(state, format("SimFanCoil: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimFanCoil: Unit not found={}", CompName)); } CompIndex = FanCoilNum; } else { FanCoilNum = CompIndex; if (FanCoilNum > state.dataFanCoilUnits->NumFanCoils || FanCoilNum < 1) { ShowFatalError(state, - format("SimFanCoil: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - FanCoilNum, - state.dataFanCoilUnits->NumFanCoils, - CompName)); + EnergyPlus::format("SimFanCoil: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + FanCoilNum, + state.dataFanCoilUnits->NumFanCoils, + CompName)); } if (state.dataFanCoilUnits->CheckEquipName(FanCoilNum)) { if (CompName != state.dataFanCoilUnits->FanCoil(FanCoilNum).Name) { ShowFatalError(state, - format("SimFanCoil: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - FanCoilNum, - CompName, - state.dataFanCoilUnits->FanCoil(FanCoilNum).Name)); + EnergyPlus::format("SimFanCoil: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + FanCoilNum, + CompName, + state.dataFanCoilUnits->FanCoil(FanCoilNum).Name)); } state.dataFanCoilUnits->CheckEquipName(FanCoilNum) = false; } @@ -302,10 +302,10 @@ namespace FanCoilUnits { fanCoil.MedSpeedRatio = Numbers(3); // check if low speed ratio < medium speed ratio, if not : warning & set to default values if (fanCoil.LowSpeedRatio > fanCoil.MedSpeedRatio) { - ShowWarningError(state, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("... {} is greater than the medium speed supply air flow ratio.", cNumericFields(2))); - ShowContinueError(state, format("... Fan Coil Unit low speed supply air flow ratio = {:.5T} ", fanCoil.LowSpeedRatio)); - ShowContinueError(state, format("... Fan Coit Unit medium speed supply air flow ratio = {:.5T} ", 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, "... 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; @@ -341,13 +341,13 @@ namespace FanCoilUnits { errFlag = false; ValidateComponent(state, fanCoil.OAMixType, fanCoil.OAMixName, errFlag, CurrentModuleObject); if (errFlag) { - ShowContinueError(state, format("specified in {} = \"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("specified in {} = \"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { // Get outdoor air mixer node numbers OANodeNums = MixedAir::GetOAMixerNodeNumbers(state, fanCoil.OAMixName, errFlag); if (errFlag) { - ShowContinueError(state, format("that was specified in {} = {}", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("that was specified in {} = {}", CurrentModuleObject, fanCoil.Name)); ShowContinueError(state, "..OutdoorAir:Mixer is required. Enter an OutdoorAir:Mixer object with this name."); ErrorsFound = true; } else { @@ -391,9 +391,9 @@ namespace FanCoilUnits { } else if (Util::SameString(CCoilType, "Coil:Cooling:Water:DetailedGeometry")) { fanCoil.CCoilPlantType = DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("For: {}=\"{}\".", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("Invalid Coil Type={}, Name={}", CCoilType, fanCoil.CCoilPlantName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("For: {}=\"{}\".", cAlphaFields(11), Alphas(11))); + ShowContinueError(state, EnergyPlus::format("Invalid Coil Type={}, Name={}", CCoilType, fanCoil.CCoilPlantName)); ShowContinueError(state, "must be \"Coil:Cooling:Water\" or \"Coil:Cooling:Water:DetailedGeometry\""); ErrorsFound = true; } @@ -401,7 +401,7 @@ namespace FanCoilUnits { IsNotOK = false; ValidateComponent(state, fanCoil.CCoilType, fanCoil.CCoilName, IsNotOK, fanCoil.UnitType); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { if (fanCoil.CCoilType_Num != CCoil::HXAssist) { @@ -409,7 +409,7 @@ namespace FanCoilUnits { int coilIndex = WaterCoils::GetWaterCoilIndex(state, fanCoil.CCoilType, fanCoil.CCoilName, IsNotOK); // Other error checks should trap before it gets to this point in the code, but including just in case. if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { fanCoil.CoolCoilFluidInletNode = state.dataWaterCoils->WaterCoil(coilIndex).WaterInletNodeNum; @@ -421,7 +421,7 @@ namespace FanCoilUnits { int coilIndex = WaterCoils::GetWaterCoilIndex(state, CCoilType, fanCoil.CCoilPlantName, IsNotOK); // Other error checks should trap before it gets to this point in the code, but including just in case. if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { fanCoil.CoolCoilFluidInletNode = state.dataWaterCoils->WaterCoil(coilIndex).WaterInletNodeNum; @@ -431,8 +431,8 @@ namespace FanCoilUnits { } } } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("illegal value: {}=\"{}\".", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("illegal value: {}=\"{}\".", cAlphaFields(11), Alphas(11))); ErrorsFound = true; } @@ -442,13 +442,13 @@ namespace FanCoilUnits { IsNotOK = false; ValidateComponent(state, fanCoil.HCoilType, fanCoil.HCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { // mine the hot water node from the coil object int coilIndex = WaterCoils::GetWaterCoilIndex(state, fanCoil.HCoilType, fanCoil.HCoilName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { fanCoil.HeatCoilFluidInletNode = state.dataWaterCoils->WaterCoil(coilIndex).WaterInletNodeNum; @@ -461,13 +461,13 @@ namespace FanCoilUnits { IsNotOK = false; ValidateComponent(state, fanCoil.HCoilType, fanCoil.HCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { int coilIndex; HeatingCoils::GetCoilIndex(state, fanCoil.HCoilName, coilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { fanCoil.DesignHeatingCapacity = state.dataHeatingCoils->HeatingCoil(coilIndex).NominalCapacity; @@ -476,8 +476,8 @@ namespace FanCoilUnits { } } } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("illegal value: {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("illegal value: {}=\"{}\".", cAlphaFields(13), Alphas(13))); ErrorsFound = true; } @@ -491,8 +491,8 @@ namespace FanCoilUnits { if (!lAlphaBlanks(16)) { fanCoil.HVACSizingIndex = Util::FindItemInList(Alphas(16), state.dataSize->ZoneHVACSizing); if (fanCoil.HVACSizingIndex == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(16), Alphas(16))); - ShowContinueError(state, format("Occurs in {} = {}", state.dataFanCoilUnits->cMO_FanCoil, fanCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(16), Alphas(16))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", state.dataFanCoilUnits->cMO_FanCoil, fanCoil.Name)); ErrorsFound = true; } } @@ -515,10 +515,10 @@ namespace FanCoilUnits { if (fanCoil.fanType != fan->type) { ShowSevereCustom(state, eoh, - format("{} was specified as having type {}, but has type {}", - fanCoil.FanName, - HVAC::fanTypeNamesUC[(int)fanCoil.fanType], - HVAC::fanTypeNamesUC[(int)fan->type])); + EnergyPlus::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 +526,11 @@ namespace FanCoilUnits { fanCoil.FanAirVolFlow = fan->maxAirFlowRate; if (fanCoil.MaxAirVolFlow > fanCoil.FanAirVolFlow && fanCoil.FanAirVolFlow != DataSizing::AutoSize) { - ShowWarningError(state, format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); - ShowContinueError(state, format("... {} is greater than the maximum fan flow rate.", cNumericFields(1))); - ShowContinueError(state, format("... Fan Coil Unit flow = {:.5T} m3/s.", fanCoil.MaxAirVolFlow)); - ShowContinueError(state, format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); - ShowContinueError(state, format("... Fan flow = {:.5T} m3/s.", fanCoil.FanAirVolFlow)); + 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)); ShowContinueError(state, "... Fan Coil Unit flow rate reduced to match the fan flow rate and the simulation continues."); fanCoil.MaxAirVolFlow = fanCoil.FanAirVolFlow; } @@ -544,12 +544,13 @@ 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, format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); - ShowContinueError(state, - 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, 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)); 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."); @@ -560,12 +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, format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); - ShowContinueError(state, - 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, 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)); ShowContinueError( state, "...for VariableFanVariableFlow or VariableFanConstantFlow a Fan:SystemModel should have Continuous speed control."); @@ -578,12 +580,13 @@ 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, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("... {} is greater than the 50% of the supply air flow ratio.", cNumericFields(2))); - ShowContinueError(state, format("... Fan Coil Unit low speed supply air flow ratio = {:.5T} ", fanCoil.LowSpeedRatio)); + 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)); } else if (fanCoil.LowSpeedRatio == 0.0) { - ShowWarningError(state, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("... {} is equal to 0.", cNumericFields(2))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::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; @@ -624,19 +627,21 @@ namespace FanCoilUnits { fanCoil.ATMixerOutNode = state.dataFanCoilUnits->ATMixerOutNode; // check that fan coil doesn' have local outside air if (!lAlphaBlanks(8)) { - ShowSevereError( - state, - format("{} = \"{}\". Fan coil unit has local as well as central outdoor air specified", CurrentModuleObject, fanCoil.Name)); + ShowSevereError(state, + EnergyPlus::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, - 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, + EnergyPlus::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, format("..Fan coil unit air inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); + ShowContinueError(state, + EnergyPlus::format("..Fan coil unit air inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); ErrorsFound = true; } // check for supply side air terminal mixer @@ -651,20 +656,23 @@ namespace FanCoilUnits { fanCoil.ATMixerOutNode = state.dataFanCoilUnits->ATMixerOutNode; // check that fan coil doesn' have local outside air if (!lAlphaBlanks(8)) { - ShowSevereError( - state, - format("{} = \"{}\". Fan coil unit has local as well as central outdoor air specified", CurrentModuleObject, fanCoil.Name)); + ShowSevereError(state, + EnergyPlus::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, - format("{} = \"{}\". Fan coil unit air outlet node name must be the same as the air terminal mixer secondary air " + 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)); ShowContinueError( state, "..Air terminal mixer secondary inlet node name is specified in AirTerminal:SingleDuct:SupplySideMixer object."); - ShowContinueError(state, format("..Fan coil unit air outlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirOutNode))); + ShowContinueError( + state, EnergyPlus::format("..Fan coil unit air outlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirOutNode))); ErrorsFound = true; } bool ZoneNodeNotFound = true; @@ -683,13 +691,14 @@ namespace FanCoilUnits { state.dataZoneEquip->ZoneEquipConfig(fanCoil.ControlZoneNum).ReturnNode); } if (!InletNodeFound) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowSevereError(state, EnergyPlus::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, format("..FanCoil inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); + ShowContinueError(state, + EnergyPlus::format("..FanCoil inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); ErrorsFound = true; } } @@ -711,14 +720,16 @@ namespace FanCoilUnits { state.dataZoneEquip->ZoneEquipConfig(fanCoil.ControlZoneNum).ReturnNode); if (!InletNodeFound) { - ShowSevereError(state, - format("{} = \"{}\". Fan coil unit air inlet node name must be the same either as a zone exhaust node name " + 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)); 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, format("..Fan coil unit air inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); + ShowContinueError( + state, EnergyPlus::format("..Fan coil unit air inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); ErrorsFound = true; } } @@ -731,11 +742,12 @@ namespace FanCoilUnits { if (state.dataFanCoilUnits->ZoneInNodeNotFound) { ShowSevereError(state, - format("{} = \"{}\". Fan coil unit air outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - fanCoil.Name)); + EnergyPlus::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, format("..Fan coil unit air outlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirOutNode))); + ShowContinueError( + state, EnergyPlus::format("..Fan coil unit air outlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirOutNode))); ErrorsFound = true; } @@ -744,9 +756,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, format("{} = {}", CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("For {} = {}", cAlphaFields(17), Alphas(17))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(9), Alphas(9))); + 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))); ShowContinueError(state, "...fan operating schedule is allowed for on off or system model fan type only )"); ErrorsFound = true; } else if (fanCoil.fanOpModeSched == nullptr) { @@ -761,8 +773,8 @@ namespace FanCoilUnits { if (!lNumericBlanks(11)) { fanCoil.DesignMinOutletTemp = Numbers(11); if (lNumericBlanks(12)) { - ShowWarningError(state, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("... {} and {} must be used in unison.", cNumericFields(11), cNumericFields(12))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("... {} and {} must be used in unison.", cNumericFields(11), cNumericFields(12))); ErrorsFound = true; } } @@ -771,16 +783,16 @@ namespace FanCoilUnits { fanCoil.DesignMaxOutletTemp = Numbers(12); if (fanCoil.DesignMinOutletTemp != DataSizing::AutoSize && fanCoil.DesignMaxOutletTemp != DataSizing::AutoSize) { if (fanCoil.DesignMaxOutletTemp < fanCoil.DesignMinOutletTemp) { - ShowWarningError(state, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("... {} is greater than {}.", cNumericFields(11), cNumericFields(12))); - ShowContinueError(state, format("... {} = {:.2T} [C].", cNumericFields(11), fanCoil.DesignMinOutletTemp)); - ShowContinueError(state, format("... {} = {:.2T} [C].", cNumericFields(12), fanCoil.DesignMaxOutletTemp)); + 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)); ErrorsFound = true; } } if (lNumericBlanks(11)) { - ShowWarningError(state, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, format("... {} and {} must be used in unison.", cNumericFields(11), cNumericFields(12))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("... {} and {} must be used in unison.", cNumericFields(11), cNumericFields(12))); ErrorsFound = true; } } @@ -842,7 +854,7 @@ namespace FanCoilUnits { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } for (auto &fanCoil : state.dataFanCoilUnits->FanCoil) { @@ -1013,7 +1025,7 @@ namespace FanCoilUnits { state, fanCoil.HCoilName, fanCoil.HCoilPlantTypeOf, fanCoil.HeatCoilPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, format("Reference Unit=\"{}\", type={}", fanCoil.Name, fanCoil.UnitType)); + ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type={}", fanCoil.Name, fanCoil.UnitType)); ShowFatalError(state, "InitFanCoilUnits: Program terminated for previous conditions."); } @@ -1022,7 +1034,8 @@ namespace FanCoilUnits { } else if (fanCoil.HCoilType_Num == HCoil::Electric) { // do nothing, valid type } else { - ShowFatalError(state, format("InitFanCoilUnits: FanCoil={}, invalid heating coil type. Program terminated.", fanCoil.Name)); + ShowFatalError(state, + EnergyPlus::format("InitFanCoilUnits: FanCoil={}, invalid heating coil type. Program terminated.", fanCoil.Name)); } if ((fanCoil.CCoilPlantType == DataPlant::PlantEquipmentType::CoilWaterCooling) || @@ -1030,12 +1043,13 @@ namespace FanCoilUnits { PlantUtilities::ScanPlantLoopsForObject( state, fanCoil.CCoilPlantName, fanCoil.CCoilPlantType, fanCoil.CoolCoilPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, format("Reference Unit=\"{}\", type={}", fanCoil.Name, fanCoil.UnitType)); + ShowContinueError(state, EnergyPlus::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, format("InitFanCoilUnits: FanCoil={}, invalid cooling coil type. Program terminated.", fanCoil.Name)); + ShowFatalError(state, + EnergyPlus::format("InitFanCoilUnits: FanCoil={}, invalid cooling coil type. Program terminated.", fanCoil.Name)); } state.dataFanCoilUnits->MyPlantScanFlag(FanCoilNum) = false; @@ -1048,8 +1062,9 @@ namespace FanCoilUnits { state, state.dataFanCoilUnits->FanCoil(Loop).UnitType, state.dataFanCoilUnits->FanCoil(Loop).Name)) { continue; } - ShowSevereError(state, - format("InitFanCoil: FanCoil Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + 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)); } @@ -1394,11 +1409,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, format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); + ShowWarningError(state, EnergyPlus::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); ShowContinueError(state, "... Maximum supply air flow rate is greater than the maximum fan flow rate."); - ShowContinueError(state, format("... Fan Coil Unit flow = {:.5T} [m3/s].", MaxAirVolFlowDes)); - ShowContinueError(state, format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); - ShowContinueError(state, format("... Fan flow = {:.5T} [m3/s].", fanCoil.FanAirVolFlow)); + 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, "... Fan Coil Unit flow rate reduced to match the fan flow rate and the simulation continues."); MaxAirVolFlowDes = fanCoil.FanAirVolFlow; } @@ -1410,12 +1425,14 @@ namespace FanCoilUnits { MaxAirVolFlowUser = fanCoil.MaxAirVolFlow; if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxAirVolFlowDes - MaxAirVolFlowUser) / MaxAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( + ShowMessage(state, + EnergyPlus::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( state, - format("SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); - ShowContinueError(state, format("User-Specified Supply Air Maximum Flow Rate of {:.5R} [m3/s]", MaxAirVolFlowUser)); - ShowContinueError(state, - format("differs from Design Size Supply Air Maximum Flow Rate of {:.5R} [m3/s]", MaxAirVolFlowDes)); + EnergyPlus::format("differs from Design Size Supply Air Maximum Flow Rate of {:.5R} [m3/s]", MaxAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1429,11 +1446,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, format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); + ShowWarningError(state, EnergyPlus::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); ShowContinueError(state, "... Maximum supply air flow rate is greater than the maximum fan flow rate."); - ShowContinueError(state, format("... Fan Coil Unit flow = {:.5T} m3/s.", fanCoil.MaxAirVolFlow)); - ShowContinueError(state, format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); - ShowContinueError(state, format("... Fan flow = {:.5T} m3/s.", fanCoil.FanAirVolFlow)); + 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, "... Fan Coil Unit flow rate reduced to match the fan flow rate and the simulation continues."); fanCoil.MaxAirVolFlow = fanCoil.FanAirVolFlow; } @@ -1472,12 +1489,14 @@ namespace FanCoilUnits { OutAirVolFlowUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(OutAirVolFlowDes - OutAirVolFlowUser) / OutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); - ShowContinueError(state, format("User-Specified Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); + ShowMessage(state, + EnergyPlus::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( - state, format("differs from Design Size Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowDes)); + state, + EnergyPlus::format("differs from Design Size Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1530,7 +1549,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, format("Occurs in {} Object={}", fanCoil.UnitType, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", fanCoil.UnitType, fanCoil.Name)); ErrorsFound = true; } } @@ -1638,12 +1657,14 @@ namespace FanCoilUnits { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxHotWaterVolFlowDes - MaxHotWaterVolFlowUser) / MaxHotWaterVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( + ShowMessage(state, + EnergyPlus::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( state, - format("SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); - ShowContinueError(state, format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxHotWaterVolFlowUser)); - ShowContinueError(state, - format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", MaxHotWaterVolFlowDes)); + EnergyPlus::format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", MaxHotWaterVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1709,7 +1730,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, format("Occurs in {} Object={}", fanCoil.UnitType, fanCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", fanCoil.UnitType, fanCoil.Name)); ErrorsFound = true; } } @@ -1810,12 +1831,14 @@ namespace FanCoilUnits { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxColdWaterVolFlowDes - MaxColdWaterVolFlowUser) / MaxColdWaterVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( + ShowMessage(state, + EnergyPlus::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( state, - format("SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); - ShowContinueError(state, format("User-Specified Maximum Cold Water Flow of {:.5R}[m3/s]", MaxColdWaterVolFlowUser)); - ShowContinueError(state, - format("differs from Design Size Maximum Cold Water Flow of {:.5R}[m3/s]", MaxColdWaterVolFlowDes)); + EnergyPlus::format("differs from Design Size Maximum Cold Water Flow of {:.5R}[m3/s]", MaxColdWaterVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2099,17 +2122,17 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountC; if (fanCoil.ConvgErrCountC < 2) { - ShowWarningError(state, format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, EnergyPlus::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, format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( state, - format("Min water flow used during iterations = {}, Max water flow used during iterations = {}", - MinWaterFlow, - MaxWaterFlow)); - ShowContinueErrorTimeStamp(state, format("Water flow rate on last iteration = {}", CWFlow)); + 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)); ShowContinueErrorTimeStamp(state, "..Water flow rate set to last iteration value "); } else { ShowRecurringWarningErrorAtEnd( @@ -2118,7 +2141,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountC; if (fanCoil.LimitErrCountC < 2) { - ShowWarningError(state, format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, EnergyPlus::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 { @@ -2129,7 +2152,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountC; if (fanCoil.LimitErrCountC < 2) { - ShowWarningError(state, format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, EnergyPlus::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 { @@ -2245,17 +2268,17 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountH; if (fanCoil.ConvgErrCountH < 2) { - ShowWarningError(state, format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, EnergyPlus::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, format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( state, - format("Min water flow used during iterations = {}, Max water flow used during iterations = {}", - MinWaterFlow, - MaxWaterFlow)); - ShowContinueErrorTimeStamp(state, format("Water flow rate on last iteration = {}", HWFlow)); + 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)); ShowContinueErrorTimeStamp(state, "..Water flow rate set to last iteration value "); } else { ShowRecurringWarningErrorAtEnd( @@ -2264,7 +2287,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, EnergyPlus::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 { @@ -2275,7 +2298,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, EnergyPlus::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 { @@ -2466,15 +2489,17 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountC; if (fanCoil.ConvgErrCountC < 2) { - ShowWarningError(state, format("Part-load ratio cooling control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, + EnergyPlus::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, format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( state, - format("Min part-load used during iterations = {}, Max part-load used during iterations = {}", PLRMin, PLRMax)); - ShowContinueErrorTimeStamp(state, format("Part-load ratio on last iteration = {}", PLR)); + EnergyPlus::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, "..Part-load ratio set to last iteration value "); } else { ShowRecurringWarningErrorAtEnd(state, @@ -2484,9 +2509,10 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountC; if (fanCoil.LimitErrCountC < 2) { - ShowWarningError(state, format("Part-load ratio cooling control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, + EnergyPlus::format("Part-load ratio cooling control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad part-load ratio limits"); - ShowContinueErrorTimeStamp(state, format("..Part-load ratio set to {}", PLRMin)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("..Part-load ratio set to {}", PLRMin)); } else { ShowRecurringWarningErrorAtEnd( state, "Part-load ratio cooling control failed in fan coil unit " + fanCoil.Name, fanCoil.BadMassFlowLimIndexC); @@ -2495,7 +2521,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountC; if (fanCoil.LimitErrCountC < 2) { - ShowWarningError(state, format("Part-load ratio control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, EnergyPlus::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 { @@ -2564,17 +2590,19 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountH; if (fanCoil.ConvgErrCountH < 2) { - ShowWarningError(state, format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, + EnergyPlus::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, format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( state, - format("Min part-load ratio used during iterations = {}, Max part-load used during iterations = {}", - PLRMin, - PLRMax)); - ShowContinueErrorTimeStamp(state, format("Part-load ratio on last iteration = {}", PLR)); + 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)); ShowContinueErrorTimeStamp(state, "..Part-load ratio set to last iteration value "); } else { ShowRecurringWarningErrorAtEnd(state, @@ -2585,9 +2613,10 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, + EnergyPlus::format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad hot part-load ratio limits"); - ShowContinueErrorTimeStamp(state, format("..Part-load ratio set to {}", PLRMin)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("..Part-load ratio set to {}", PLRMin)); } else { ShowRecurringWarningErrorAtEnd(state, "Part-load ratio heating control failed in fan coil unit " + fanCoil.Name, @@ -2597,7 +2626,8 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, + EnergyPlus::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 { @@ -2863,11 +2893,12 @@ namespace FanCoilUnits { // warning if not converged if (Iter > (MaxIterCycl - 1)) { if (fanCoil.MaxIterIndexC == 0) { - ShowWarningMessage(state, - 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, format("Iterations={}", MaxIterCycl)); + 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)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:FourPipeFanCoil=\"" + fanCoil.Name + @@ -2919,13 +2950,14 @@ namespace FanCoilUnits { // warning if not converged if (Iter > (MaxIterCycl - 1)) { if (fanCoil.MaxIterIndexH == 0) { - ShowWarningMessage(state, - 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, format("...Requested zone load = {:.3T} [W]", QZnReq)); - ShowContinueError(state, format("...Fan coil capacity = {:.3T} [W]", QUnitOut)); - ShowContinueErrorTimeStamp(state, format("Iterations={}", MaxIterCycl)); + 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)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:FourPipeFanCoil=\"" + fanCoil.Name + @@ -3799,11 +3831,12 @@ namespace FanCoilUnits { // warning if not converged if (Iter > (MaxIterCycl - 1)) { if (fanCoil.MaxIterIndexC == 0) { - ShowWarningMessage(state, - 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, format("Iterations={}", MaxIterCycl)); + 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)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:FourPipeFanCoil=\"" + fanCoil.Name + @@ -3934,11 +3967,12 @@ namespace FanCoilUnits { // warning if not converged if (Iter > (MaxIterCycl - 1)) { if (fanCoil.MaxIterIndexH == 0) { - ShowWarningMessage(state, - 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, format("Iterations={}", MaxIterCycl)); + 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)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:FourPipeFanCoil=\"" + fanCoil.Name + @@ -3966,12 +4000,13 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountH; if (fanCoil.ConvgErrCountH < 2) { - ShowWarningError(state, format("Electric heating coil control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, EnergyPlus::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, format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( - state, format("Electric heating coil part load ratio used during last iterations = {}", eHeatCoilPLR)); + state, + EnergyPlus::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); @@ -3979,8 +4014,9 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, - format("Part load ratio electric heating coil control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError( + state, + EnergyPlus::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 { @@ -4416,8 +4452,8 @@ namespace FanCoilUnits { } else { // developer error ShowFatalError(state, - format("Developer Error - CalcFanCoilAirAndWaterFlowResidual: Water control node not found for {}", - state.dataFanCoilUnits->FanCoil(FanCoilNum).Name)); + EnergyPlus::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 e7061330247..7cf303cb90d 100644 --- a/src/EnergyPlus/Fans.cc +++ b/src/EnergyPlus/Fans.cc @@ -316,9 +316,10 @@ void GetFanInput(EnergyPlusData &state) fan->deltaPress = rNumericArgs(2); fan->maxAirFlowRate = rNumericArgs(3); if (fan->maxAirFlowRate == 0.0) { - ShowWarningError( - state, - format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", cCurrentModuleObject, fan->Name)); + ShowWarningError(state, + EnergyPlus::format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", + cCurrentModuleObject, + fan->Name)); } fan->maxAirFlowRateIsAutosized = true; fan->motorEff = rNumericArgs(4); @@ -349,7 +350,7 @@ void GetFanInput(EnergyPlusData &state) BranchNodeConnections::TestCompSet(state, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(3), cAlphaArgs(4), "Air Nodes"); if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); } } // for (iFanConstant) @@ -395,9 +396,10 @@ void GetFanInput(EnergyPlusData &state) fan->deltaPress = rNumericArgs(2); fan->maxAirFlowRate = rNumericArgs(3); if (fan->maxAirFlowRate == 0.0) { - ShowWarningError( - state, - format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", cCurrentModuleObject, fan->Name)); + ShowWarningError(state, + EnergyPlus::format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", + cCurrentModuleObject, + fan->Name)); } fan->maxAirFlowRateIsAutosized = true; fan->minAirFracMethod = static_cast(getEnumValue(minFlowFracMethodNamesUC, cAlphaArgs(3))); @@ -413,7 +415,7 @@ void GetFanInput(EnergyPlusData &state) fan->coeffs[4] = rNumericArgs(12); if (fan->coeffs[0] == 0.0 && fan->coeffs[1] == 0.0 && fan->coeffs[2] == 0.0 && fan->coeffs[3] == 0.0 && fan->coeffs[4] == 0.0) { ShowWarningError(state, "Fan Coefficients are all zero. No Fan power will be reported."); - ShowContinueError(state, format("For {}, Fan={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("For {}, Fan={}", cCurrentModuleObject, cAlphaArgs(1))); } fan->inletNodeNum = NodeInputManager::GetOnlySingleNode(state, cAlphaArgs(4), @@ -439,7 +441,7 @@ void GetFanInput(EnergyPlusData &state) BranchNodeConnections::TestCompSet(state, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4), cAlphaArgs(5), "Air Nodes"); if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); } } // for (iFanVAV) @@ -480,10 +482,11 @@ void GetFanInput(EnergyPlusData &state) ShowSevereItemNotFound(state, eoh, cAlphaFieldNames(2), cAlphaArgs(2)); ErrorsFound = true; } else if (fan->availSched->hasFractionalVal(state)) { - ShowWarningCustom( - state, - eoh, - format("{}={} has fracdtional values. Only 0.0 in the schedule value turns the fan off.", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowWarningCustom(state, + eoh, + EnergyPlus::format("{}={} has fracdtional values. Only 0.0 in the schedule value turns the fan off.", + cAlphaFieldNames(2), + cAlphaArgs(2))); } fan->totalEff = rNumericArgs(1); @@ -497,9 +500,10 @@ void GetFanInput(EnergyPlusData &state) fan->maxAirMassFlowRate = fan->maxAirFlowRate * fan->rhoAirStdInit; if (fan->maxAirFlowRate == 0.0) { - ShowWarningError( - state, - format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", cCurrentModuleObject, fan->Name)); + ShowWarningError(state, + EnergyPlus::format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", + cCurrentModuleObject, + fan->Name)); } fan->inletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -553,13 +557,13 @@ void GetFanInput(EnergyPlusData &state) } else if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) { // do not include adjusted for "balanced" exhaust flow in the zone total return calculation ShowWarningError(state, - format("{}: {}: invalid {} = {} for {}={}", - routineName, - cCurrentModuleObject, - cAlphaFieldNames(9), - cAlphaArgs(9), - cAlphaFieldNames(1), - cAlphaArgs(1))); + EnergyPlus::format("{}: {}: invalid {} = {} for {}={}", + routineName, + cCurrentModuleObject, + cAlphaFieldNames(9), + cAlphaArgs(9), + cAlphaFieldNames(1), + cAlphaArgs(1))); ShowContinueError(state, "When zone air mass flow balance is enforced, this input field should be left blank."); ShowContinueError(state, "This schedule will be ignored in the simulation."); fan->balancedFractSched = nullptr; @@ -571,7 +575,7 @@ void GetFanInput(EnergyPlusData &state) ErrorsFound = true; } if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); } } // for (iFanExhaust) @@ -617,9 +621,10 @@ void GetFanInput(EnergyPlusData &state) fan->deltaPress = rNumericArgs(2); fan->maxAirFlowRate = rNumericArgs(3); if (fan->maxAirFlowRate == 0.0) { - ShowWarningError( - state, - format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", cCurrentModuleObject, fan->Name)); + ShowWarningError(state, + EnergyPlus::format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", + cCurrentModuleObject, + fan->Name)); } fan->maxAirFlowRateIsAutosized = true; // the following two structure variables are set here, as well as in InitFan, for the Heat Pump:Water Heater object @@ -663,7 +668,7 @@ void GetFanInput(EnergyPlusData &state) BranchNodeConnections::TestCompSet(state, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(3), cAlphaArgs(4), "Air Nodes"); if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); } } // for (iFanOnOff) @@ -779,9 +784,10 @@ void GetFanInput(EnergyPlusData &state) fan->maxAirFlowRate = rNumericArgs(1); if (fan->maxAirFlowRate == 0.0) { - ShowWarningError( - state, - format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", cCurrentModuleObject, fan->Name)); + ShowWarningError(state, + EnergyPlus::format("{}=\"{}\" has specified 0.0 max air flow rate. It will not be used in the simulation.", + cCurrentModuleObject, + fan->Name)); } fan->maxAirFlowRateIsAutosized = true; fan->minAirFlowRate = rNumericArgs(2); @@ -830,7 +836,7 @@ void GetFanInput(EnergyPlusData &state) fan->endUseSubcategoryName = (NumAlphas > 18) ? cAlphaArgs(19) : "General"; if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); } } // end Number of Component Model FAN Loop @@ -907,7 +913,8 @@ void GetFanInput(EnergyPlusData &state) fan->minPowerFlowFrac = rNumericArgs(2); fan->deltaPress = rNumericArgs(3); if (fan->deltaPress <= 0.0) { - ShowSevereError(state, format("{}: {} zero or negative, invalid entry in {}", routineName, cCurrentModuleObject, cNumericFieldNames(3))); + ShowSevereError( + state, EnergyPlus::format("{}: {} zero or negative, invalid entry in {}", routineName, cCurrentModuleObject, cNumericFieldNames(3))); ErrorsFound = true; } fan->motorEff = rNumericArgs(4); @@ -929,9 +936,9 @@ void GetFanInput(EnergyPlusData &state) if (lAlphaFieldBlanks(7)) { if (fan->speedControl == SpeedControl::Continuous) { - ShowWarningError(state, format("{}{}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, - format("Continuous speed control requires a fan power curve in {} = {}", cAlphaFieldNames(7), cAlphaArgs(7))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError( + state, EnergyPlus::format("Continuous speed control requires a fan power curve in {} = {}", cAlphaFieldNames(7), cAlphaArgs(7))); ErrorsFound = true; } } else if ((fan->powerModFuncFlowFracCurveNum = Curve::GetCurveIndex(state, cAlphaArgs(7))) == 0) { @@ -985,7 +992,7 @@ void GetFanInput(EnergyPlusData &state) } } else { // field set input does not match number of speeds, throw warning - ShowSevereError(state, format("{}: {}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}: {}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Fan with Discrete speed control does not have input for speed data that matches the number of speeds."); ErrorsFound = true; } @@ -997,7 +1004,7 @@ void GetFanInput(EnergyPlusData &state) } } if (increasingOrderError) { - ShowSevereError(state, format("{}: {}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}: {}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Fan with Discrete speed control and multiple speed levels does not have input with flow fractions arranged in " "increasing order."); @@ -1015,7 +1022,7 @@ void GetFanInput(EnergyPlusData &state) } if (foundMissingPowerFraction) { // field set input does not match number of speeds, throw warning - ShowSevereError(state, format("{}: {}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::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."); @@ -1028,7 +1035,7 @@ void GetFanInput(EnergyPlusData &state) state, fan->zoneNum, fan->Name, DataHeatBalance::IntGainType::FanSystemModel, &fan->qdotConvZone, nullptr, &fan->qdotRadZone); } if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); } } // for (iFanSystemModel) @@ -1052,23 +1059,23 @@ void GetFanInput(EnergyPlusData &state) ErrorsFound = true; ShowSevereError(state, "GetFanInput, duplicate fan inlet node names, must be unique for fans."); ShowContinueError(state, - format("Fan={}:{} and Fan={}:{}.", - HVAC::fanTypeNames[(int)fan1->type], - fan1->Name, - HVAC::fanTypeNames[(int)fan2->type], - fan2->Name)); - ShowContinueError(state, format("Inlet Node Name=\"{}\".", state.dataLoopNodes->NodeID(fan1->inletNodeNum))); + 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))); } if (fan1->outletNodeNum == fan2->outletNodeNum) { ErrorsFound = true; ShowSevereError(state, "GetFanInput, duplicate fan outlet node names, must be unique for fans."); ShowContinueError(state, - format("Fan={}:{} and Fan={}:{}.", - HVAC::fanTypeNames[(int)fan1->type], - fan1->Name, - HVAC::fanTypeNames[(int)fan2->type], - fan2->Name)); - ShowContinueError(state, format("Outlet Node Name=\"{}\".", state.dataLoopNodes->NodeID(fan1->outletNodeNum))); + 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))); } } } @@ -1166,7 +1173,7 @@ void GetFanInput(EnergyPlusData &state) } else { for (int speedLoop = 0; speedLoop < fanSystem->numSpeeds; ++speedLoop) { SetupOutputVariable(state, - format("Fan Runtime Fraction Speed {}", speedLoop + 1), + EnergyPlus::format("Fan Runtime Fraction Speed {}", speedLoop + 1), Constant::Units::None, fanSystem->runtimeFracAtSpeed[speedLoop], OutputProcessor::TimeStepType::System, @@ -1226,9 +1233,9 @@ void FanComponent::init(EnergyPlusData &state) continue; } ShowSevereError(state, - format("InitFans: Fan=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - HVAC::fanTypeNames[(int)fan->type], - fan->Name)); + EnergyPlus::format("InitFans: Fan=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + HVAC::fanTypeNames[(int)fan->type], + fan->Name)); } } @@ -1423,10 +1430,10 @@ 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, - format("Drive ratio for {}: {} is too low at design conditions -- check motor speed and drive ratio inputs", - HVAC::fanTypeNames[(int)type], - Name)); - ShowContinueError(state, format("...Design fan speed [rev/min]: {:.2R}", fanSpeed)); + EnergyPlus::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)); } fanTorque = shaftPower / _speedRadS; //[N-m] @@ -1440,9 +1447,10 @@ void FanComponent::set_size(EnergyPlusData &state) // Check for undersized belt and report design size with warning if (fanTorque > (beltMaxTorque + 1.e-5)) { - ShowWarningError(state, - format("Belt for {}: {} is undersized at design conditions -- check belt inputs", HVAC::fanTypeNames[(int)type], Name)); - ShowContinueError(state, format("...Design belt output torque (without oversizing) [Nm]: {:.2R}", fanTorque)); + ShowWarningError( + state, + EnergyPlus::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)); } // Calculate belt max efficiency using correlations and coefficients based on AMCA data @@ -1476,8 +1484,9 @@ void FanComponent::set_size(EnergyPlusData &state) // Check for undersized motor and report design size with warning if (beltInputPower > (motorMaxOutPower + 1.e-5)) { ShowWarningError( - state, format("Motor for {}: {} is undersized at design conditions -- check motor inputs", HVAC::fanTypeNames[(int)type], Name)); - ShowContinueError(state, format("...Design motor output power (without oversizing) [W]: {:.2R}", beltInputPower)); + state, + EnergyPlus::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)); } // Calculate motor max efficiency using correlations and coefficients based on MotorMaster+ data @@ -1509,8 +1518,9 @@ void FanComponent::set_size(EnergyPlusData &state) // Check for undersized VFD and report design size with warning if (motorInputPower > (vfdMaxOutPower + 1.e-5)) { ShowWarningError( - state, format("VFD for {}: {} is undersized at design conditions -- check VFD inputs", HVAC::fanTypeNames[(int)type], Name)); - ShowContinueError(state, format("...Design VFD output power (without oversizing) [W]: {:.2R}", motorInputPower)); + state, + EnergyPlus::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)); } Real64 _vfdOutPowerRatio = motorInputPower / vfdMaxOutPower; // Ratio of VFD output power to max VFD output power [-] @@ -1613,11 +1623,12 @@ void FanComponent::set_size(EnergyPlusData &state) // Check fault availability schedules if (!fault.CheckFaultyAirFilterFanCurve(state)) { - ShowSevereError(state, format("FaultModel:Fouling:AirFilter = \"{}\"", fault.Name)); - ShowContinueError(state, - format("Invalid Fan Curve Name = \"{}\" does not cover ", state.dataCurveManager->curves(fault.fanCurveNum)->Name)); - ShowContinueError(state, format("the operational point of Fan {}", Name)); - ShowFatalError(state, format("SizeFan: Invalid FaultModel:Fouling:AirFilter={}", fault.Name)); + ShowSevereError(state, EnergyPlus::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)); } } } // FanComponent::set_size() @@ -1998,9 +2009,10 @@ void FanComponent::simulateOnOff(EnergyPlusData &state, ObjexxFCL::OptionalWarmupFlag) { - ShowSevereError(state, format("{} = {}\"", HVAC::fanTypeNames[(int)type], Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}\"", HVAC::fanTypeNames[(int)type], Name)); ShowContinueError(state, "Error in Fan Power Ratio curve. Curve output less than 0.0."); - ShowContinueError(state, format("Curve output = {:.5T}, fan speed ratio = {:.5T}", _speedRaisedToPower, _speedRatio)); + ShowContinueError(state, + EnergyPlus::format("Curve output = {:.5T}, fan speed ratio = {:.5T}", _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:"); @@ -2012,9 +2024,10 @@ void FanComponent::simulateOnOff(EnergyPlusData &state, ObjexxFCL::OptionalWarmupFlag) { - ShowSevereError(state, format("{} = {}\"", HVAC::fanTypeNames[(int)type], Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}\"", HVAC::fanTypeNames[(int)type], Name)); ShowContinueError(state, "Error in Fan Efficiency Ratio curve. Curve output less than 0.01."); - ShowContinueError(state, format("Curve output = {:.5T}, fan speed ratio = {:.5T}", _effRatioAtSpeedRatio, _speedRatio)); + ShowContinueError( + state, EnergyPlus::format("Curve output = {:.5T}, fan speed ratio = {:.5T}", _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:"); @@ -2453,7 +2466,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, format("The design operational point of the fan {} does not fall ", FanName)); + ShowWarningError(state, EnergyPlus::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; } @@ -2469,7 +2482,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, format("The operational point of the fan {} may go beyond the fan selection ", FanName)); + ShowWarningError(state, EnergyPlus::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 d2d43f3091e..a2c709be890 100644 --- a/src/EnergyPlus/FaultsManager.cc +++ b/src/EnergyPlus/FaultsManager.cc @@ -380,7 +380,9 @@ namespace FaultsManager { faultsECFouling.EvapCoolerType = cAlphaArgs(4); if (lAlphaFieldBlanks(4)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -388,7 +390,9 @@ namespace FaultsManager { faultsECFouling.EvapCoolerName = cAlphaArgs(5); if (lAlphaFieldBlanks(5)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -406,7 +410,8 @@ namespace FaultsManager { if (EvapCoolerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the boiler with the fault model @@ -461,7 +466,9 @@ namespace FaultsManager { faultsChillerFouling.ChillerType = cAlphaArgs(4); if (lAlphaFieldBlanks(4)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -469,7 +476,9 @@ namespace FaultsManager { faultsChillerFouling.ChillerName = cAlphaArgs(5); if (lAlphaFieldBlanks(5)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -491,19 +500,21 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { if (state.dataPlantChillers->ElectricChiller(ChillerNum).CondenserType != DataPlant::CondenserType::WaterCooled) { // The fault model is only applicable to the chillers with water based condensers - ShowWarningError(state, - format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " - "fault model will not be applied.", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + ShowWarningError( + state, + EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " + "fault model will not be applied.", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); } else { // Link the chiller with the fault model @@ -524,19 +535,21 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { if (state.dataChillerElectricEIR->ElectricEIRChiller(ChillerNum).CondenserType != DataPlant::CondenserType::WaterCooled) { // The fault model is only applicable to the chillers with water based condensers - ShowWarningError(state, - format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " - "fault model will not be applied.", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + ShowWarningError( + state, + EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " + "fault model will not be applied.", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); } else { // Link the chiller with the fault model @@ -557,19 +570,21 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { if (state.dataChillerReformulatedEIR->ElecReformEIRChiller(ChillerNum).CondenserType != DataPlant::CondenserType::WaterCooled) { // The fault model is only applicable to the chillers with water based condensers - ShowWarningError(state, - format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " - "fault model will not be applied.", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + ShowWarningError( + state, + EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " + "fault model will not be applied.", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); } else { // Link the chiller with the fault model @@ -591,19 +606,21 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { if (state.dataPlantChillers->ConstCOPChiller(ChillerNum).CondenserType != DataPlant::CondenserType::WaterCooled) { // The fault model is only applicable to the chillers with water based condensers - ShowWarningError(state, - format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " - "fault model will not be applied.", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + ShowWarningError( + state, + EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " + "fault model will not be applied.", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); } else { // Link the chiller with the fault model @@ -625,19 +642,21 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { if (state.dataPlantChillers->EngineDrivenChiller(ChillerNum).CondenserType != DataPlant::CondenserType::WaterCooled) { // The fault model is only applicable to the chillers with water based condensers - ShowWarningError(state, - format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " - "fault model will not be applied.", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + ShowWarningError( + state, + EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " + "fault model will not be applied.", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); } else { // Link the fault model with the water cooled chiller @@ -659,18 +678,20 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { if (state.dataPlantChillers->GTChiller(ChillerNum).CondenserType != DataPlant::CondenserType::WaterCooled) { // The fault model is only applicable to the chillers with water based condensers - ShowWarningError(state, - format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " - "fault model will not be applied.", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + ShowWarningError( + state, + EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\". The specified chiller is not water cooled. The chiller fouling " + "fault model will not be applied.", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); } else { // Link the fault model with the water cooled chiller @@ -729,7 +750,9 @@ namespace FaultsManager { faultsBoilerFouling.BoilerType = cAlphaArgs(4); if (lAlphaFieldBlanks(4)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -737,7 +760,9 @@ namespace FaultsManager { faultsBoilerFouling.BoilerName = cAlphaArgs(5); if (lAlphaFieldBlanks(5)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -754,7 +779,8 @@ namespace FaultsManager { if (boiler_it == state.dataBoilers->Boiler.end()) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the boiler with the fault model @@ -809,7 +835,9 @@ namespace FaultsManager { faultsCoilSATFouling.CoilType = cAlphaArgs(4); if (lAlphaFieldBlanks(4)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -817,7 +845,9 @@ namespace FaultsManager { faultsCoilSATFouling.CoilName = cAlphaArgs(5); if (lAlphaFieldBlanks(5)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -837,7 +867,8 @@ namespace FaultsManager { if (CoilNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the coil with the fault model @@ -856,19 +887,21 @@ namespace FaultsManager { if (CoilNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { if (state.dataSteamCoils->SteamCoil(CoilNum).TypeOfCoil != SteamCoils::CoilControlType::TemperatureSetPoint) { // The fault model is only applicable to the coils controlled on leaving air temperature - ShowWarningError(state, - 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))); + 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))); } else { // Link the fault model with the coil that is controlled on leaving air temperature state.dataSteamCoils->SteamCoil(CoilNum).FaultyCoilSATFlag = true; @@ -889,7 +922,8 @@ namespace FaultsManager { if (CoilNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -898,7 +932,8 @@ namespace FaultsManager { if (lAlphaFieldBlanks(6)) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(6), cAlphaArgs(6))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(6), cAlphaArgs(6))); state.dataFaultsMgr->ErrorsFound = true; } // Read in controller input if not done yet @@ -913,7 +948,8 @@ namespace FaultsManager { if (ControlNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(6), cAlphaArgs(6))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(6), cAlphaArgs(6))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the controller with the fault model @@ -924,13 +960,13 @@ namespace FaultsManager { if (state.dataHVACControllers->ControllerProps(ControlNum).SensedNode != state.dataWaterCoils->WaterCoil(CoilNum).AirOutletNodeNum) { ShowSevereError(state, - format("{} = \"{}\" invalid {} = \"{}\" does not match {} = \"{}", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(6), - cAlphaArgs(6), - cAlphaFieldNames(5), - cAlphaArgs(5))); + EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\" does not match {} = \"{}", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(6), + cAlphaArgs(6), + cAlphaFieldNames(5), + cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } } @@ -968,7 +1004,8 @@ namespace FaultsManager { if (CoilSysNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the coil system with the fault model @@ -1029,7 +1066,9 @@ namespace FaultsManager { faultsTowerFouling.TowerType = cAlphaArgs(4); if (lAlphaFieldBlanks(4)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1037,7 +1076,9 @@ namespace FaultsManager { faultsTowerFouling.TowerName = cAlphaArgs(5); if (lAlphaFieldBlanks(5)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1053,7 +1094,8 @@ namespace FaultsManager { if (TowerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the tower with the fault model @@ -1065,12 +1107,12 @@ namespace FaultsManager { faultsTowerFouling.TowerType)) { ShowWarningError( state, - format("{} = \"{}\" invalid {} = \"{}\" not match the type of {}. Tower type in the fault model is updated. ", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(4), - cAlphaArgs(4), - cAlphaFieldNames(5))); + 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))); faultsTowerFouling.TowerType = DataPlant::PlantEquipTypeNames[static_cast(state.dataCondenserLoopTowers->towers(TowerNum).TowerType)]; } @@ -1080,12 +1122,13 @@ namespace FaultsManager { if (state.dataCondenserLoopTowers->towers(TowerNum).PerformanceInputMethod_Num != CondenserLoopTowers::PIM::UFactor) { ShowWarningError( state, - format("{} = \"{}\" invalid {} = \"{}. Tower Performance Input Method is not UFactorTimesAreaAndDesignWaterFlowRate. The " - "tower fouling fault model will not be applied to the tower. ", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaFieldNames(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}. Tower Performance Input Method is not UFactorTimesAreaAndDesignWaterFlowRate. The " + "tower fouling fault model will not be applied to the tower. ", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaFieldNames(5))); state.dataCondenserLoopTowers->towers(TowerNum).FaultyTowerFoulingFlag = false; } } @@ -1137,7 +1180,9 @@ namespace FaultsManager { faultsCondSWTFouling.TowerType = cAlphaArgs(4); if (lAlphaFieldBlanks(4)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1145,7 +1190,9 @@ namespace FaultsManager { faultsCondSWTFouling.TowerName = cAlphaArgs(5); if (lAlphaFieldBlanks(5)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1161,7 +1208,8 @@ namespace FaultsManager { if (TowerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the tower with the fault model @@ -1172,12 +1220,12 @@ namespace FaultsManager { if (!Util::SameString(DataPlant::PlantEquipTypeNames[static_cast(state.dataCondenserLoopTowers->towers(TowerNum).TowerType)], faultsCondSWTFouling.TowerType)) { ShowWarningError(state, - format("{} = \"{}\" invalid {} = \"{}\" not match the type of {}. Tower type is updated. ", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(4), - cAlphaArgs(4), - cAlphaFieldNames(5))); + EnergyPlus::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)]; } @@ -1230,7 +1278,9 @@ namespace FaultsManager { faultsChillerSWT.ChillerType = cAlphaArgs(4); if (lAlphaFieldBlanks(4)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1238,7 +1288,9 @@ namespace FaultsManager { faultsChillerSWT.ChillerName = cAlphaArgs(5); if (lAlphaFieldBlanks(5)) { ShowSevereError( - state, format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + state, + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1259,7 +1311,8 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the chiller with the fault model @@ -1278,7 +1331,8 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the chiller with the fault model @@ -1297,7 +1351,8 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the chiller with the fault model @@ -1318,7 +1373,8 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the chiller with the fault model @@ -1338,7 +1394,8 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the chiller with the fault model @@ -1358,7 +1415,8 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the chiller with the fault model @@ -1377,7 +1435,8 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { // Link the chiller with the fault model @@ -1396,7 +1455,8 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { state.dataChillerIndirectAbsorption->IndirectAbsorber(ChillerNum).FaultyChillerSWTFlag = true; @@ -1515,10 +1575,10 @@ namespace FaultsManager { // Related Thermostat Offset Fault Name is required for Humidistat Offset Type: ThermostatOffsetDependent if (lAlphaFieldBlanks(6)) { ShowSevereError(state, - format("{} = \"{}\": {} cannot be blank for Humidistat Offset Type = \"ThermostatOffsetDependent\".", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(6))); + EnergyPlus::format("{} = \"{}\": {} cannot be blank for Humidistat Offset Type = \"ThermostatOffsetDependent\".", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(6))); state.dataFaultsMgr->ErrorsFound = true; } else { faultsHStat.FaultyThermostatName = cAlphaArgs(6); @@ -1545,8 +1605,9 @@ namespace FaultsManager { // Reference offset value is required for Humidistat Offset Type: ThermostatOffsetIndependent if (lAlphaFieldBlanks(1)) { - ShowSevereError(state, - format("{} = \"{}\": {} cannot be blank for Humidistat Offset Type = \"ThermostatOffsetIndependent\".", + ShowSevereError( + state, + EnergyPlus::format("{} = \"{}\": {} cannot be blank for Humidistat Offset Type = \"ThermostatOffsetIndependent\".", cFaultCurrentObject, cAlphaArgs(1), cNumericFieldNames(1))); @@ -1598,7 +1659,7 @@ namespace FaultsManager { // Reference offset value is required if (lAlphaFieldBlanks(1)) { - ShowSevereError(state, format("{} = \"{}\" cannot be blank.", cFaultCurrentObject, cNumericFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("{} = \"{}\" cannot be blank.", cFaultCurrentObject, cNumericFieldNames(1))); state.dataFaultsMgr->ErrorsFound = true; } else { faultsTStat.Offset = rNumericArgs(1); @@ -1667,10 +1728,10 @@ namespace FaultsManager { int CoilNum = Util::FindItemInList(faultsFoulCoil.FouledCoilName, state.dataWaterCoils->WaterCoil); if (CoilNum <= 0) { ShowSevereError(state, - format("{} = \"{}\". Referenced Coil named \"{}\" was not found.", - cFaultCurrentObject, - cAlphaArgs(1), - faultsFoulCoil.FouledCoilName)); + EnergyPlus::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 @@ -1754,7 +1815,8 @@ namespace FaultsManager { } else { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\".", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); + EnergyPlus::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; @@ -1811,7 +1873,8 @@ namespace FaultsManager { if (lAlphaFieldBlanks(4)) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } else { if (Util::makeUPPER(cAlphaArgs(4)) == "CONTROLLER:OUTDOORAIR") { @@ -1828,7 +1891,8 @@ namespace FaultsManager { if (lAlphaFieldBlanks(5)) { ShowSevereError( state, - format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + EnergyPlus::format( + "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } diff --git a/src/EnergyPlus/FluidCoolers.cc b/src/EnergyPlus/FluidCoolers.cc index 438b0e8aa51..f8e4a2cae40 100644 --- a/src/EnergyPlus/FluidCoolers.cc +++ b/src/EnergyPlus/FluidCoolers.cc @@ -112,7 +112,7 @@ FluidCoolerspecs *FluidCoolerspecs::factory(EnergyPlusData &state, DataPlant::Pl } // If we didn't find it, fatal - ShowFatalError(state, format("FluidCooler::factory: Error getting inputs for cooler named: {}", objectName)); + ShowFatalError(state, EnergyPlus::format("FluidCooler::factory: Error getting inputs for cooler named: {}", objectName)); // Shut up the compiler return nullptr; } @@ -282,11 +282,11 @@ void GetFluidCoolerInput(EnergyPlusData &state) DataLoopNode::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, state.dataFluidCoolers->SimpleFluidCooler(FluidCoolerNum).OutdoorAirInletNodeNum)) { ShowSevereError(state, - format("{}= \"{}\" {}= \"{}\" not valid.", - cCurrentModuleObject, - state.dataFluidCoolers->SimpleFluidCooler(FluidCoolerNum).Name, - state.dataIPShortCut->cAlphaFieldNames(5), - AlphArray(5))); + EnergyPlus::format("{}= \"{}\" {}= \"{}\" not valid.", + cCurrentModuleObject, + state.dataFluidCoolers->SimpleFluidCooler(FluidCoolerNum).Name, + state.dataIPShortCut->cAlphaFieldNames(5), + AlphArray(5))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -404,11 +404,11 @@ void GetFluidCoolerInput(EnergyPlusData &state) DataLoopNode::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, state.dataFluidCoolers->SimpleFluidCooler(FluidCoolerNum).OutdoorAirInletNodeNum)) { ShowSevereError(state, - format("{}= \"{}\" {}= \"{}\" not valid.", - cCurrentModuleObject, - state.dataFluidCoolers->SimpleFluidCooler(FluidCoolerNum).Name, - state.dataIPShortCut->cAlphaFieldNames(5), - AlphArray(5))); + EnergyPlus::format("{}= \"{}\" {}= \"{}\" not valid.", + cCurrentModuleObject, + state.dataFluidCoolers->SimpleFluidCooler(FluidCoolerNum).Name, + state.dataIPShortCut->cAlphaFieldNames(5), + AlphArray(5))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -500,68 +500,70 @@ bool FluidCoolerspecs::validateSingleSpeedInputs(EnergyPlusData &state, // wetbulb temperature must be specified for the both the performance input methods if (this->DesignEnteringWaterTemp <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(3))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(3))); ErrorsFound = true; } if (this->DesignEnteringAirTemp <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(4))); ErrorsFound = true; } if (this->DesignEnteringAirWetBulbTemp <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(5))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(5))); ErrorsFound = true; } if (this->DesignEnteringWaterTemp <= this->DesignEnteringAirTemp) { ShowSevereError( state, - format("{}= \"{}\",{} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(3), cNumericFieldNames(4))); + EnergyPlus::format( + "{}= \"{}\",{} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(3), cNumericFieldNames(4))); ErrorsFound = true; } if (this->DesignEnteringAirTemp <= this->DesignEnteringAirWetBulbTemp) { ShowSevereError( state, - format("{}= \"{}\",{} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(4), cNumericFieldNames(5))); + EnergyPlus::format( + "{}= \"{}\",{} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(4), cNumericFieldNames(5))); ErrorsFound = true; } if (this->HighSpeedAirFlowRate <= 0.0 && this->HighSpeedAirFlowRate != DataSizing::AutoSize) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(7), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(7), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->DesignWaterFlowRate <= 0.0 && !this->DesignWaterFlowRateWasAutoSized) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(6), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(6), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->HighSpeedFanPower <= 0.0 && this->HighSpeedFanPower != DataSizing::AutoSize) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(8), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(8), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } @@ -570,37 +572,38 @@ bool FluidCoolerspecs::validateSingleSpeedInputs(EnergyPlusData &state, this->PerformanceInputMethod_Num = PerfInputMethod::U_FACTOR; if (this->HighSpeedFluidCoolerUA <= 0.0 && this->HighSpeedFluidCoolerUA != DataSizing::AutoSize) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(1), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(1), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } } else if (Util::SameString(AlphArray(4), "NominalCapacity")) { this->PerformanceInputMethod_Num = PerfInputMethod::NOMINAL_CAPACITY; if (this->FluidCoolerNominalCapacity <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(2), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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 != 0.0) { if (this->HighSpeedFluidCoolerUA > 0.0) { ShowWarningError(state, - format("{}= \"{}\". Nominal fluid cooler capacity and design fluid cooler UA have been specified.", - cCurrentModuleObject, - this->Name)); + EnergyPlus::format("{}= \"{}\". Nominal fluid cooler capacity and design fluid cooler UA have been specified.", + cCurrentModuleObject, + this->Name)); } else { - ShowWarningError(state, - format("{}= \"{}\". Nominal fluid cooler capacity has been specified and design fluid cooler UA is being autosized.", - cCurrentModuleObject, - this->Name)); + ShowWarningError( + state, + EnergyPlus::format("{}= \"{}\". Nominal fluid cooler capacity has been specified and design fluid cooler UA is being autosized.", + cCurrentModuleObject, + this->Name)); } ShowContinueError(state, "Design fluid cooler UA field must be left blank when nominal fluid cooler capacity performance input method is used."); @@ -608,7 +611,8 @@ bool FluidCoolerspecs::validateSingleSpeedInputs(EnergyPlusData &state, this->HighSpeedFluidCoolerUA = 0.0; } } else { // Fluid cooler performance input method is not specified as a valid "choice" - ShowSevereError(state, format("{}= \"{}\", invalid {} = \"{}\".", cCurrentModuleObject, AlphArray(1), cAlphaFieldNames(4), AlphArray(4))); + ShowSevereError( + state, EnergyPlus::format("{}= \"{}\", invalid {} = \"{}\".", cCurrentModuleObject, AlphArray(1), cAlphaFieldNames(4), AlphArray(4))); ShowContinueError(state, R"(... must be "UFactorTimesAreaAndDesignWaterFlowRate" or "NominalCapacity".)"); ErrorsFound = true; } @@ -640,104 +644,109 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, // wetbulb temperature must be specified for the both the performance input methods if (this->DesignEnteringWaterTemp <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(7))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(7))); ErrorsFound = true; } if (this->DesignEnteringAirTemp <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(8))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(8))); ErrorsFound = true; } if (this->DesignEnteringAirWetBulbTemp <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(9))); + EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 ", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(9))); ErrorsFound = true; } if (this->DesignEnteringWaterTemp <= this->DesignEnteringAirTemp) { ShowSevereError( state, - format("{} = \"{}\", {} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(7), cNumericFieldNames(8))); + EnergyPlus::format( + "{} = \"{}\", {} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(7), cNumericFieldNames(8))); ErrorsFound = true; } if (this->DesignEnteringAirTemp <= this->DesignEnteringAirWetBulbTemp) { ShowSevereError( state, - format("{} = \"{}\", {} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(8), cNumericFieldNames(9))); + EnergyPlus::format( + "{} = \"{}\", {} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(8), cNumericFieldNames(9))); ErrorsFound = true; } // Check various inputs for both the performance input methods if (this->DesignWaterFlowRate <= 0.0 && !this->DesignWaterFlowRateWasAutoSized) { ShowSevereError(state, - format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(10), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, - format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(11), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, - format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(13), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, - format("{}= \"{}\". Fluid cooler air flow rate at low fan speed must be less than the air flow rate at high fan speed.", + 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)); ErrorsFound = true; } if (this->HighSpeedFanPower <= 0.0 && !this->HighSpeedFanPowerWasAutoSized) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(12), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(15), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, format("{}= \"{}\". Fluid cooler low speed fan power must be less than high speed fan power.", cCurrentModuleObject, this->Name)); + ShowSevereError(state, + EnergyPlus::format("{}= \"{}\". Fluid cooler low speed fan power must be less than high speed fan power.", + cCurrentModuleObject, + this->Name)); ErrorsFound = true; } @@ -745,27 +754,28 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, this->PerformanceInputMethod_Num = PerfInputMethod::U_FACTOR; if (this->HighSpeedFluidCoolerUA <= 0.0 && !this->HighSpeedFluidCoolerUAWasAutoSized) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(1), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(2), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, - format("{}= \"{}\". Fluid cooler UA at low fan speed must be less than the fluid cooler UA at high fan speed.", + 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)); ErrorsFound = true; @@ -774,36 +784,38 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, this->PerformanceInputMethod_Num = PerfInputMethod::NOMINAL_CAPACITY; if (this->FluidCoolerNominalCapacity <= 0.0) { ShowSevereError(state, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(4), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, - format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(5), - cAlphaFieldNames(4), - AlphArray(4))); + EnergyPlus::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, - format("{}= \"{}\". Nominal capacity input method and fluid cooler UA at high fan speed have been specified.", + ShowSevereError( + state, + EnergyPlus::format("{}= \"{}\". Nominal capacity input method and fluid cooler UA at high fan speed have been specified.", cCurrentModuleObject, this->Name)); } else { ShowSevereError( state, - format("{}= \"{}\". Nominal capacity input method has been specified and fluid cooler UA at high fan speed is being autosized.", - cCurrentModuleObject, - this->Name)); + EnergyPlus::format( + "{}= \"{}\". Nominal capacity input method has been specified and fluid cooler UA at high fan speed is being autosized.", + cCurrentModuleObject, + this->Name)); } ShowContinueError( state, "Fluid cooler UA at high fan speed must be left blank when nominal fluid cooler capacity performance input method is used."); @@ -811,16 +823,18 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, } if (this->LowSpeedFluidCoolerUA != 0.0) { if (this->LowSpeedFluidCoolerUA > 0.0) { - ShowSevereError(state, - format("{}= \"{}\". Nominal capacity input method and fluid cooler UA at low fan speed have been specified.", + ShowSevereError( + state, + EnergyPlus::format("{}= \"{}\". Nominal capacity input method and fluid cooler UA at low fan speed have been specified.", cCurrentModuleObject, this->Name)); } else { ShowSevereError( state, - format("{}= \"{}\". Nominal capacity input method has been specified and fluid cooler UA at low fan speed is being autosized.", - cCurrentModuleObject, - this->Name)); + EnergyPlus::format( + "{}= \"{}\". Nominal capacity input method has been specified and fluid cooler UA at low fan speed is being autosized.", + cCurrentModuleObject, + this->Name)); } ShowContinueError( state, "Fluid cooler UA at low fan speed must be left blank when nominal fluid cooler capacity performance input method is used."); @@ -828,13 +842,14 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, } if (this->FluidCoolerLowSpeedNomCap >= this->FluidCoolerNominalCapacity) { ShowSevereError(state, - format("{} = \"{}\". Low-speed nominal capacity must be less than the high-speed nominal capacity.", - cCurrentModuleObject, - this->Name)); + EnergyPlus::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, format("{}= \"{}\", invalid {}= \"{}\".", cCurrentModuleObject, AlphArray(1), cAlphaFieldNames(4), AlphArray(4))); + ShowSevereError(state, + EnergyPlus::format("{}= \"{}\", invalid {}= \"{}\".", cCurrentModuleObject, AlphArray(1), cAlphaFieldNames(4), AlphArray(4))); ShowContinueError(state, R"(... must be "UFactorTimesAreaAndDesignWaterFlowRate" or "NominalCapacity".)"); ErrorsFound = true; } @@ -959,12 +974,13 @@ void FluidCoolerspecs::size(EnergyPlusData &state) // temperature auto ensureSizingPlantExitTempIsNotLessThanDesignEnteringAirTemp = [this, &state, PltSizCondNum]() { if (state.dataSize->PlantSizData(PltSizCondNum).ExitTemp <= this->DesignEnteringAirTemp && state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Error when autosizing the UA value for fluid cooler = {}.", this->Name)); - ShowContinueError(state, - format("Design Loop Exit Temperature ({:.2R} C) must be greater than design entering air dry-bulb temperature " - "({:.2R} C) when autosizing the fluid cooler UA.", - state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, - this->DesignEnteringAirTemp)); + ShowSevereError(state, EnergyPlus::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 " + "({:.2R} C) when autosizing the fluid cooler UA.", + state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, + this->DesignEnteringAirTemp)); ShowContinueError(state, "It is recommended that the Design Loop Exit Temperature = design inlet air dry-bulb temp plus the Fluid Cooler " "design approach temperature (e.g., 4 C)."); @@ -1010,7 +1026,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) this->DesignLeavingWaterTemp = state.dataSize->PlantSizData(PltSizCondNum).ExitTemp; } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing error for fluid cooler object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing error for fluid cooler object = {}", this->Name)); ShowFatalError(state, "Autosizing of fluid cooler condenser flow rate requires a loop Sizing:Plant object."); } } @@ -1070,7 +1086,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, format(" Occurs in fluid cooler object = {}", this->Name)); + ShowFatalError(state, EnergyPlus::format(" Occurs in fluid cooler object = {}", this->Name)); } } } @@ -1146,7 +1162,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, format(" Occurs in fluid cooler object = {}", this->Name)); + ShowFatalError(state, EnergyPlus::format(" Occurs in fluid cooler object = {}", this->Name)); } } } @@ -1215,12 +1231,13 @@ 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, format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); - ShowContinueError(state, format("The final UA value ={:.2R} W/K, and the simulation continues...", UA)); + ShowContinueError(state, EnergyPlus::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, format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, + EnergyPlus::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."); @@ -1233,21 +1250,25 @@ void FluidCoolerspecs::size(EnergyPlusData &state) ShowContinueError(state, "on the autosized values shown below or to adjust design fluid cooler air inlet dry-bulb temperature."); ShowContinueError(state, "Plant:Sizing object inputs also influence these results (e.g. DeltaT and ExitTemp)."); ShowContinueError(state, "Inputs to the fluid cooler object:"); - ShowContinueError(state, format("Design Fluid Cooler Load [W] = {:.2R}", DesFluidCoolerLoad)); - ShowContinueError(state, format("Design Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); - ShowContinueError(state, format("Design Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", tmpHighSpeedAirFlowRate)); - ShowContinueError(state, format("Design Fluid Cooler Air Inlet Dry-bulb Temp [C] = {:.2R}", this->AirTemp)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Load [W] = {:.2R}", DesFluidCoolerLoad)); + ShowContinueError(state, + EnergyPlus::format("Design Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); + ShowContinueError(state, + EnergyPlus::format("Design Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", tmpHighSpeedAirFlowRate)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Air Inlet Dry-bulb Temp [C] = {:.2R}", this->AirTemp)); ShowContinueError(state, "Inputs to the plant sizing object:"); + ShowContinueError(state, + EnergyPlus::format("Design Exit Water Temp [C] = {:.2R}", + state.dataSize->PlantSizData(PltSizCondNum).ExitTemp)); + ShowContinueError(state, + EnergyPlus::format("Loop Design Temperature Difference [C] = {:.2R}", + state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->WaterTemp)); ShowContinueError( - state, - format("Design Exit Water Temp [C] = {:.2R}", state.dataSize->PlantSizData(PltSizCondNum).ExitTemp)); + state, EnergyPlus::format("Calculated water outlet temp at low UA [C] (UA = {:.2R} W/K) = {:.2R}", UA0, OutWaterTempAtUA0)); ShowContinueError( - state, - format("Loop Design Temperature Difference [C] = {:.2R}", state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); - ShowContinueError(state, format("Design Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->WaterTemp)); - ShowContinueError(state, format("Calculated water outlet temp at low UA [C] (UA = {:.2R} W/K) = {:.2R}", UA0, OutWaterTempAtUA0)); - ShowContinueError(state, format("Calculated water outlet temp at high UA [C](UA = {:.2R} W/K) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError(state, format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); + 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)); } tmpHighSpeedEvapFluidCoolerUA = UA; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -1297,7 +1318,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing error for fluid cooler object = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing error for fluid cooler object = {}", this->Name)); ShowFatalError(state, "Autosizing of fluid cooler UA requires a loop Sizing:Plant object."); } } @@ -1326,13 +1347,14 @@ void FluidCoolerspecs::size(EnergyPlusData &state) if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating fluid cooler UA."); if (PltSizCondNum > 0) { - ShowContinueError(state, format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); } - ShowContinueError(state, format("The final UA value ={:.2R} W/K, and the simulation continues...", UA)); + 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, format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, + EnergyPlus::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."); @@ -1345,24 +1367,27 @@ void FluidCoolerspecs::size(EnergyPlusData &state) ShowContinueError(state, "on the autosized values shown below or to adjust design fluid cooler air inlet dry-bulb temperature."); ShowContinueError(state, "Plant:Sizing object inputs also influence these results (e.g. DeltaT and ExitTemp)."); ShowContinueError(state, "Inputs to the fluid cooler object:"); - ShowContinueError(state, format("Design Fluid Cooler Load [W] = {:.2R}", DesFluidCoolerLoad)); - ShowContinueError(state, format("Design Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); - ShowContinueError(state, format("Design Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", tmpHighSpeedAirFlowRate)); - ShowContinueError(state, format("Design Fluid Cooler Air Inlet Dry-bulb Temp [C] = {:.2R}", this->AirTemp)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Load [W] = {:.2R}", DesFluidCoolerLoad)); + ShowContinueError(state, + EnergyPlus::format("Design Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", tmpHighSpeedAirFlowRate)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Air Inlet Dry-bulb Temp [C] = {:.2R}", this->AirTemp)); if (PltSizCondNum > 0) { ShowContinueError(state, "Inputs to the plant sizing object:"); - ShowContinueError( - state, - format("Design Exit Water Temp [C] = {:.2R}", state.dataSize->PlantSizData(PltSizCondNum).ExitTemp)); - ShowContinueError( - state, - format("Loop Design Temperature Difference [C] = {:.2R}", state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); + ShowContinueError(state, + EnergyPlus::format("Design Exit Water Temp [C] = {:.2R}", + state.dataSize->PlantSizData(PltSizCondNum).ExitTemp)); + ShowContinueError(state, + EnergyPlus::format("Loop Design Temperature Difference [C] = {:.2R}", + state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); } - ShowContinueError(state, format("Design Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->WaterTemp)); - ShowContinueError(state, format("Calculated water outlet temp at low UA [C] (UA = {:.2R} W/K) = {:.2R}", UA0, OutWaterTempAtUA0)); - ShowContinueError(state, format("Calculated water outlet temp at high UA [C] (UA = {:.2R} W/K) = {:.2R}", UA1, OutWaterTempAtUA1)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->WaterTemp)); + ShowContinueError( + 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)); if (PltSizCondNum > 0) { - ShowFatalError(state, format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); } } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -1505,12 +1530,13 @@ 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, format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); - ShowContinueError(state, format("The final UA value at low fan speed ={:.2R} W/C, and the simulation continues...", UA)); + ShowContinueError(state, EnergyPlus::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, format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, + EnergyPlus::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."); @@ -1523,21 +1549,25 @@ void FluidCoolerspecs::size(EnergyPlusData &state) ShowContinueError(state, "on the autosized values shown below or to adjust design fluid cooler air inlet dry-bulb temperature."); ShowContinueError(state, "Plant:Sizing object inputs also influence these results (e.g. DeltaT and ExitTemp)."); ShowContinueError(state, "Inputs to the fluid cooler object:"); - ShowContinueError(state, format("Design Fluid Cooler Load [W] = {:.2R}", DesFluidCoolerLoad)); - ShowContinueError(state, format("Design Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); - ShowContinueError(state, format("Design Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", this->LowSpeedAirFlowRate)); - ShowContinueError(state, format("Design Fluid Cooler Air Inlet Dry-bulb Temp [C] = {:.2R}", this->AirTemp)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Load [W] = {:.2R}", DesFluidCoolerLoad)); + ShowContinueError(state, + EnergyPlus::format("Design Fluid Cooler Water Volume Flow Rate [m3/s] = {:.6R}", this->DesignWaterFlowRate)); + ShowContinueError(state, + EnergyPlus::format("Design Fluid Cooler Air Volume Flow Rate [m3/s] = {:.2R}", this->LowSpeedAirFlowRate)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Air Inlet Dry-bulb Temp [C] = {:.2R}", this->AirTemp)); ShowContinueError(state, "Inputs to the plant sizing object:"); + ShowContinueError(state, + EnergyPlus::format("Design Exit Water Temp [C] = {:.2R}", + state.dataSize->PlantSizData(PltSizCondNum).ExitTemp)); + ShowContinueError(state, + EnergyPlus::format("Loop Design Temperature Difference [C] = {:.2R}", + state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); + ShowContinueError(state, EnergyPlus::format("Design Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->WaterTemp)); + ShowContinueError(state, + EnergyPlus::format("Calculated water outlet temp at low UA [C](UA = {:.2R} W/C) = {:.2R}", UA0, OutWaterTempAtUA0)); ShowContinueError( - state, - format("Design Exit Water Temp [C] = {:.2R}", state.dataSize->PlantSizData(PltSizCondNum).ExitTemp)); - ShowContinueError( - state, - format("Loop Design Temperature Difference [C] = {:.2R}", state.dataSize->PlantSizData(PltSizCondNum).DeltaT)); - ShowContinueError(state, format("Design Fluid Cooler Water Inlet Temp [C] = {:.2R}", this->WaterTemp)); - ShowContinueError(state, format("Calculated water outlet temp at low UA [C](UA = {:.2R} W/C) = {:.2R}", UA0, OutWaterTempAtUA0)); - ShowContinueError(state, format("Calculated water outlet temp at high UA [C](UA = {:.2R} W/C) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError(state, format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); + 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)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->LowSpeedFluidCoolerUA = UA; @@ -1621,15 +1651,17 @@ 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, format("FluidCooler:TwoSpeed \"{}\". Low speed air flow rate must be less than high speed air flow rate.", this->Name)); + ShowSevereError(state, + EnergyPlus::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, - format("FluidCooler:TwoSpeed \"{}\". Fluid cooler UA at low fan speed must be less than the fluid cooler UA at high fan speed.", - this->Name)); + EnergyPlus::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; } } @@ -1947,17 +1979,20 @@ void FluidCoolerspecs::update(EnergyPlusData &state) if (state.dataLoopNodes->Node(waterOutletNode).MassFlowRate > this->DesWaterMassFlowRate * this->FluidCoolerMassFlowRateMultiplier) { ++this->HighMassFlowErrorCount; if (this->HighMassFlowErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); + ShowWarningError(state, + EnergyPlus::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, format(" Condenser Loop Mass Flow Rate = {:.6T}", state.dataLoopNodes->Node(waterOutletNode).MassFlowRate)); - ShowContinueError(state, format(" Fluid Cooler Design Mass Flow Rate = {:.6T}", this->DesWaterMassFlowRate)); + 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)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( state, - 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), + EnergyPlus::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), this->HighMassFlowErrorIndex, state.dataLoopNodes->Node(waterOutletNode).MassFlowRate, state.dataLoopNodes->Node(waterOutletNode).MassFlowRate); @@ -1970,19 +2005,21 @@ void FluidCoolerspecs::update(EnergyPlusData &state) ++this->OutletWaterTempErrorCount; if (this->OutletWaterTempErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); ShowContinueError( state, - format(" Fluid cooler water outlet temperature ({:.2F} C) is below the specified minimum condenser loop temp of {:.2F} C", - this->OutletWaterTemp, - LoopMinTemp)); + EnergyPlus::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, - format("{} \"{}\" Fluid cooler water outlet temperature is below the specified minimum condenser loop temp. Error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], - this->Name), + 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), this->OutletWaterTempErrorIndex, this->OutletWaterTemp, this->OutletWaterTemp); @@ -1993,15 +2030,16 @@ void FluidCoolerspecs::update(EnergyPlusData &state) if (this->WaterMassFlowRate > 0.0 && this->WaterMassFlowRate <= DataBranchAirLoopPlant::MassFlowTolerance) { ++this->SmallWaterMassFlowErrorCount; if (this->SmallWaterMassFlowErrorCount < 2) { - ShowWarningError(state, format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); ShowContinueError(state, " Fluid cooler water mass flow rate near zero."); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); + ShowContinueError(state, EnergyPlus::format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); } else { ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" Fluid cooler water mass flow rate is near zero. Error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], - this->Name), + EnergyPlus::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 8207ae9b683..4377733066d 100644 --- a/src/EnergyPlus/FluidProperties.cc +++ b/src/EnergyPlus/FluidProperties.cc @@ -825,14 +825,15 @@ namespace Fluid { glycolRaw->Num = df->glycolsRaw.isize(); } } else { - ShowSevereError(state, format("{}: {}=\"{}\", invalid type", routineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("...entered value=\"{}, Only REFRIGERANT or GLYCOL allowed as {}", Alphas(2), cAlphaFields(2))); + ShowSevereError(state, EnergyPlus::format("{}: {}=\"{}\", invalid type", routineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, + EnergyPlus::format("...entered value=\"{}, Only REFRIGERANT or GLYCOL allowed as {}", Alphas(2), cAlphaFields(2))); ErrorsFound = true; } } if (ErrorsFound) { - ShowFatalError(state, format("{}: Previous errors in input cause program termination.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}: Previous errors in input cause program termination.", routineName)); } // Read in all of the temperature arrays in the input file @@ -864,14 +865,15 @@ namespace Fluid { for (int TempLoop = 2; TempLoop <= tempArray.NumOfTemps; ++TempLoop) { if (tempArray.Temps(TempLoop) <= tempArray.Temps(TempLoop - 1)) { - ShowSevereError( - state, format("{}: {} name={}, lists must have data in ascending order", routineName, CurrentModuleObject, tempArray.Name)); + ShowSevereError(state, + EnergyPlus::format( + "{}: {} name={}, lists must have data in ascending order", routineName, CurrentModuleObject, tempArray.Name)); ShowContinueError(state, - format("First out of order occurrence at Temperature #({}) {{{:.3R}}} >= Temp({}) {{{:.3R}}}", - TempLoop - 1, - tempArray.Temps(TempLoop - 1), - TempLoop, - tempArray.Temps(TempLoop))); + EnergyPlus::format("First out of order occurrence at Temperature #({}) {{{:.3R}}} >= Temp({}) {{{:.3R}}}", + TempLoop - 1, + tempArray.Temps(TempLoop - 1), + TempLoop, + tempArray.Temps(TempLoop))); ErrorsFound = true; break; } @@ -927,13 +929,15 @@ namespace Fluid { // Make sure the number of points in the two arrays (temps and values) are the same if (NumNumbers != tempArray.NumOfTemps) { - ShowSevereError(state, format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); + ShowSevereError(state, EnergyPlus::format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); ShowContinueError(state, - format("Temperature Name={}, Temperature array and fluid saturation pressure array must have the " - "same number of points", - tempArray.Name)); + EnergyPlus::format("Temperature Name={}, Temperature array and fluid saturation pressure array must have the " + "same number of points", + tempArray.Name)); ShowContinueError( - state, format("Temperature # points={} whereas {} # {} points={}", tempArray.NumOfTemps, refrig->Name, Alphas(2), NumNumbers)); + state, + EnergyPlus::format( + "Temperature # points={} whereas {} # {} points={}", tempArray.NumOfTemps, refrig->Name, Alphas(2), NumNumbers)); ErrorsFound = true; break; // the TempLoop DO Loop } @@ -983,23 +987,25 @@ namespace Fluid { } else if (Alphas(3) == "FLUID") { if (Alphas(2) != "ENTHALPY" && Alphas(2) != "SPECIFICHEAT" && Alphas(2) != "DENSITY") { - ShowWarningError(state, format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); - ShowContinueError(state, format(R"({}="FLUID", but {}="{}" is not valid.)", cAlphaFields(3), cAlphaFields(2), Alphas(2))); - ShowContinueError(state, format(R"(Valid choices are "Enthalpy", "SpecificHeat", "Density".)")); + ShowWarningError(state, EnergyPlus::format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); + ShowContinueError(state, + EnergyPlus::format(R"({}="FLUID", but {}="{}" is not valid.)", cAlphaFields(3), cAlphaFields(2), Alphas(2))); + ShowContinueError(state, EnergyPlus::format(R"(Valid choices are "Enthalpy", "SpecificHeat", "Density".)")); ShowContinueError(state, "This fluid property will not be processed nor available for the simulation."); } } else if (Alphas(3) == "FLUIDGAS") { if (Alphas(2) != "PRESSURE" && Alphas(2) != "ENTHALPY" && Alphas(2) != "SPECIFICHEAT" && Alphas(2) != "DENSITY") { - ShowWarningError(state, format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); - ShowContinueError(state, format(R"({}="FluidGas", but {}="{}" is not valid.)", cAlphaFields(3), cAlphaFields(2), Alphas(2))); - ShowContinueError(state, format(R"(Valid choices are "Pressure", "Enthalpy", "SpecificHeat", "Density".)")); + ShowWarningError(state, EnergyPlus::format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); + ShowContinueError(state, + EnergyPlus::format(R"({}="FluidGas", but {}="{}" is not valid.)", cAlphaFields(3), cAlphaFields(2), Alphas(2))); + ShowContinueError(state, EnergyPlus::format(R"(Valid choices are "Pressure", "Enthalpy", "SpecificHeat", "Density".)")); ShowContinueError(state, "This fluid property will not be processed nor available for the simulation."); } } else { - ShowWarningError(state, format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); - ShowContinueError(state, format("{}=\"{}\" is not valid.", cAlphaFields(3), Alphas(3))); - ShowContinueError(state, format(R"(Valid choices are "Fluid", "GasFluid".)")); + ShowWarningError(state, EnergyPlus::format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); + ShowContinueError(state, EnergyPlus::format("{}=\"{}\" is not valid.", cAlphaFields(3), Alphas(3))); + ShowContinueError(state, EnergyPlus::format(R"(Valid choices are "Fluid", "GasFluid".)")); ShowContinueError(state, "This fluid property will not be processed nor available for the simulation."); } } // for (inData) @@ -1008,65 +1014,68 @@ namespace Fluid { ErrorObjectHeader eoh{routineName, CurrentModuleObject, refrig->Name}; if (refrig->PsValues.empty()) { - ShowSevereCustom(state, - eoh, - format(R"(No Gas/Fluid Saturation Pressure found. Need properties with {}="Pressure" and {}="FluidGas".)", - cAlphaFields(2), - cAlphaFields(3))); + ShowSevereCustom( + state, + eoh, + EnergyPlus::format(R"(No Gas/Fluid Saturation Pressure found. Need properties with {}="Pressure" and {}="FluidGas".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } if (refrig->HfValues.empty()) { ShowSevereCustom(state, eoh, - format(R"(No Saturated Fluid Enthalpy found. Need properties with {}="Enthalpy" and {}="Fluid".)", - cAlphaFields(2), - cAlphaFields(3))); + EnergyPlus::format(R"(No Saturated Fluid Enthalpy found. Need properties with {}="Enthalpy" and {}="Fluid".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } if (refrig->HfgValues.empty()) { ShowSevereCustom(state, eoh, - format(R"(No Saturated Gas/Fluid Enthalpy found. Need properties with {}="Enthalpy" and {}="FluidGas".)", - cAlphaFields(2), - cAlphaFields(3))); + EnergyPlus::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, - format(R"(No Saturated Fluid Specific Heat found. Need properties with {}="SpecificHeat" and {}="Fluid".)", - cAlphaFields(2), - cAlphaFields(3))); + ShowSevereCustom( + state, + eoh, + EnergyPlus::format(R"(No Saturated Fluid Specific Heat found. Need properties with {}="SpecificHeat" and {}="Fluid".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } if (refrig->CpfgValues.empty()) { - ShowSevereCustom(state, - eoh, - format(R"(No Saturated Gas/Fluid Specific Heat found. Need properties with {}="SpecificHeat" and {}="FluidGas".)", - cAlphaFields(2), - cAlphaFields(3))); + ShowSevereCustom( + state, + eoh, + EnergyPlus::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, - format(R"(No Saturated Fluid Density found. Need properties with {}="Density" and {}="Fluid".)", - cAlphaFields(2), - cAlphaFields(3))); + EnergyPlus::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, - format(R"(No Saturated Gas/Fluid Density found. Need properties with {}="Density" and {}="FluidGas".)", - cAlphaFields(2), - cAlphaFields(3))); + EnergyPlus::format(R"(No Saturated Gas/Fluid Density found. Need properties with {}="Density" and {}="FluidGas".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } } // for (refrigNum) @@ -1149,8 +1158,9 @@ namespace Fluid { refrig->SupTemps = supTempArray.Temps; if (Numbers(1) <= 0.0) { - ShowSevereError(state, format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); - ShowContinueError(state, format("Negative pressures not allowed in fluid property input data, Value =[{:.3R}].", Numbers(1))); + ShowSevereError(state, EnergyPlus::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; continue; } @@ -1201,10 +1211,10 @@ namespace Fluid { if ((NumNumbers - 1) != refrig->NumSupTempPoints) { ShowSevereCustom(state, eoh, - format("Number of superheated {} points ({}) not equal to number of temperature points ({})", - Alphas(2), - NumNumbers - 1, - refrig->NumSupTempPoints)); + EnergyPlus::format("Number of superheated {} points ({}) not equal to number of temperature points ({})", + Alphas(2), + NumNumbers - 1, + refrig->NumSupTempPoints)); ErrorsFound = true; continue; } @@ -1433,10 +1443,10 @@ namespace Fluid { if (!glycolRaw->CpTempArrayName.empty() && glycolRaw->CpTempArrayName != Alphas(3)) { ShowSevereCustom(state, eoh, - format("All specific heat data for the same glycol must use the same temperature list" - "Expected name={}, Entered name={}", - glycolRaw->CpTempArrayName, - Alphas(3))); + EnergyPlus::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; } @@ -1452,10 +1462,10 @@ namespace Fluid { if (!glycolRaw->RhoTempArrayName.empty() && glycolRaw->RhoTempArrayName != Alphas(3)) { ShowSevereCustom(state, eoh, - format("All density data for the same glycol must use the same temperature list" - "Expected name={}, Entered name={}", - glycolRaw->RhoTempArrayName, - Alphas(3))); + EnergyPlus::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; } @@ -1471,10 +1481,10 @@ namespace Fluid { if (!glycolRaw->CondTempArrayName.empty() && glycolRaw->CondTempArrayName != Alphas(3)) { ShowSevereCustom(state, eoh, - format("All conductivity data for the same glycol must use the same temperature list" - "Expected name={}, Entered name={}", - glycolRaw->CondTempArrayName, - Alphas(3))); + EnergyPlus::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; } @@ -1490,10 +1500,10 @@ namespace Fluid { if (!glycolRaw->ViscTempArrayName.empty() && glycolRaw->ViscTempArrayName != Alphas(3)) { ShowSevereCustom(state, eoh, - format("All conductivity data for the same glycol must use the same temperature list" - "Expected name={}, Entered name={}", - glycolRaw->ViscTempArrayName, - Alphas(3))); + EnergyPlus::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; } @@ -1588,9 +1598,9 @@ namespace Fluid { if ((NumNumbers - 1) != glycolRaw->NumCpTempPoints) { ShowSevereCustom(state, eoh, - format("Number of specific heat points ({}) not equal to number of temperature points ({})", - NumNumbers - 1, - glycolRaw->NumCpTempPoints)); + EnergyPlus::format("Number of specific heat points ({}) not equal to number of temperature points ({})", + NumNumbers - 1, + glycolRaw->NumCpTempPoints)); ErrorsFound = true; continue; } @@ -1603,9 +1613,9 @@ namespace Fluid { if ((NumNumbers - 1) != glycolRaw->NumRhoTempPoints) { ShowSevereCustom(state, eoh, - format("Number of density points ({}) not equal to number of temperature points ({})", - NumNumbers - 1, - glycolRaw->NumRhoTempPoints)); + EnergyPlus::format("Number of density points ({}) not equal to number of temperature points ({})", + NumNumbers - 1, + glycolRaw->NumRhoTempPoints)); ErrorsFound = true; continue; } @@ -1618,9 +1628,9 @@ namespace Fluid { if ((NumNumbers - 1) != glycolRaw->NumCondTempPoints) { ShowSevereCustom(state, eoh, - format("Number of conductivity points ({}) not equal to number of temperature points ({})", - NumNumbers - 1, - glycolRaw->NumCondTempPoints)); + EnergyPlus::format("Number of conductivity points ({}) not equal to number of temperature points ({})", + NumNumbers - 1, + glycolRaw->NumCondTempPoints)); ErrorsFound = true; continue; } @@ -1633,9 +1643,9 @@ namespace Fluid { if ((NumNumbers - 1) != glycolRaw->NumViscTempPoints) { ShowSevereCustom(state, eoh, - format("Number of viscosity points ({}) not equal to number of temperature points ({})", - NumNumbers - 1, - glycolRaw->NumViscTempPoints)); + EnergyPlus::format("Number of viscosity points ({}) not equal to number of temperature points ({})", + NumNumbers - 1, + glycolRaw->NumViscTempPoints)); ErrorsFound = true; continue; } @@ -1726,10 +1736,10 @@ namespace Fluid { glycol->CpDataPresent = glycolRaw->CpDataPresent; if (!glycol->CpDataPresent) { - ShowSevereError(state, format("{}: Specific heat data not entered for a {}", routineName, CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Specific heat data not entered for a {}", routineName, CurrentModuleObject)); ShowContinueError(state, "ALL data must be entered for user-defined glycols"); - ShowContinueError(state, format("Glycol mixture name = {}", glycol->Name)); - ShowContinueError(state, format("Glycol fluid name = {}", glycol->GlycolName)); + ShowContinueError(state, EnergyPlus::format("Glycol mixture name = {}", glycol->Name)); + ShowContinueError(state, EnergyPlus::format("Glycol fluid name = {}", glycol->GlycolName)); ErrorsFound = true; continue; } @@ -1748,10 +1758,10 @@ namespace Fluid { glycol->RhoDataPresent = glycolRaw->RhoDataPresent; if (!glycol->RhoDataPresent) { - ShowSevereError(state, format("{}: density data not entered for a {}", routineName, CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: density data not entered for a {}", routineName, CurrentModuleObject)); ShowContinueError(state, "ALL data must be entered for user-defined glycols"); - ShowContinueError(state, format("Glycol mixture name = {}", glycol->Name)); - ShowContinueError(state, format("Glycol fluid name = {}", glycol->GlycolName)); + ShowContinueError(state, EnergyPlus::format("Glycol mixture name = {}", glycol->Name)); + ShowContinueError(state, EnergyPlus::format("Glycol fluid name = {}", glycol->GlycolName)); ErrorsFound = true; continue; } @@ -1770,10 +1780,10 @@ namespace Fluid { glycol->CondDataPresent = glycolRaw->CondDataPresent; if (!glycol->CondDataPresent) { - ShowSevereError(state, format("{}: conductivity data not entered for a {}", routineName, CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: conductivity data not entered for a {}", routineName, CurrentModuleObject)); ShowContinueError(state, "ALL data must be entered for user-defined glycols"); - ShowContinueError(state, format("Glycol mixture name = {}", glycol->Name)); - ShowContinueError(state, format("Glycol fluid name = {}", glycol->GlycolName)); + ShowContinueError(state, EnergyPlus::format("Glycol mixture name = {}", glycol->Name)); + ShowContinueError(state, EnergyPlus::format("Glycol fluid name = {}", glycol->GlycolName)); ErrorsFound = true; continue; } @@ -1792,10 +1802,10 @@ namespace Fluid { glycol->ViscDataPresent = glycolRaw->ViscDataPresent; if (!glycol->ViscDataPresent) { - ShowSevereError(state, format("{}: viscosity data not entered for a {}", routineName, CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: viscosity data not entered for a {}", routineName, CurrentModuleObject)); ShowContinueError(state, "ALL data must be entered for user-defined glycols"); - ShowContinueError(state, format("Glycol mixture name = {}", glycol->Name)); - ShowContinueError(state, format("Glycol fluid name = {}", glycol->GlycolName)); + ShowContinueError(state, EnergyPlus::format("Glycol mixture name = {}", glycol->Name)); + ShowContinueError(state, EnergyPlus::format("Glycol fluid name = {}", glycol->GlycolName)); ErrorsFound = true; continue; } @@ -1844,7 +1854,7 @@ namespace Fluid { lNumericFieldBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}: Previous errors in input cause program termination.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}: Previous errors in input cause program termination.", routineName)); } if (state.dataInputProcessing->inputProcessor->getNumSectionsFound("REPORTGLYCOLS") > 0) { @@ -1920,14 +1930,16 @@ namespace Fluid { // First, find where the actual concentration falls between the concentration data. // Then, interpolate if necessary. if (Concentration < RawConcData(1)) { // Concentration too low - ShowWarningError(state, - format("{}: Glycol concentration out of range for data (too low), concentration = {:.3R}", routineName, Concentration)); + ShowWarningError( + state, + EnergyPlus::format("{}: Glycol concentration out of range for data (too low), concentration = {:.3R}", routineName, Concentration)); ShowContinueError(state, "Check your data or the definition of your glycols in the GlycolConcentrations input"); ShowContinueError(state, "Property data set to data for lowest concentration entered"); InterpData = RawPropData(1, _); } else if (Concentration > RawConcData(NumOfConcs)) { // Concentration too high - ShowWarningError(state, - format("{}: Glycol concentration out of range for data (too high), concentration = {:.3R}", routineName, Concentration)); + ShowWarningError( + state, + EnergyPlus::format("{}: Glycol concentration out of range for data (too high), concentration = {:.3R}", routineName, Concentration)); ShowContinueError(state, "Check your data or the definition of your glycols in the GlycolConcentrations input"); ShowContinueError(state, "Property data set to data for highest concentration entered"); InterpData = RawPropData(NumOfConcs, _); @@ -1955,8 +1967,9 @@ namespace Fluid { } } } else { // user has input data for concentrations that are too close or repeated, this must be fixed - ShowFatalError(state, - format("{}: concentration values too close or data repeated, check your fluid property input data", routineName)); + ShowFatalError( + state, + EnergyPlus::format("{}: concentration values too close or data repeated, check your fluid property input data", routineName)); } } } @@ -2073,7 +2086,8 @@ namespace Fluid { Failure = this->ViscLowTempIndex == 0 || this->ViscHighTempIndex == 0; } if (Failure) { - ShowSevereError(state, format("setTempLimits: Required values for Glycol={} are all zeroes for some data types.", this->Name)); + ShowSevereError(state, + EnergyPlus::format("setTempLimits: Required values for Glycol={} are all zeroes for some data types.", this->Name)); ErrorsFound = true; } } @@ -2224,8 +2238,9 @@ namespace Fluid { Failure = this->RhofLowTempIndex == 0 || this->RhofgLowTempIndex == 0 || this->RhofHighTempIndex == 0 || this->RhofgHighTempIndex == 0; } if (Failure) { - ShowSevereError(state, - format("RefrigProps::setTempimits: Required values for Refrigerant={} are all zeroes for some data types.", this->Name)); + ShowSevereError( + state, + EnergyPlus::format("RefrigProps::setTempimits: Required values for Refrigerant={} are all zeroes for some data types.", this->Name)); ErrorsFound = true; } } @@ -2854,19 +2869,22 @@ namespace Fluid { // send warning if (this->errors[(int)RefrigError::SatTemp].count <= df->RefrigErrorLimitTest) { ShowSevereMessage( - state, format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); + state, + EnergyPlus::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); ShowContinueError(state, - format("...Called From:{}, supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - this->PsTemps(this->PsLowTempIndex), - this->PsTemps(this->PsHighTempIndex))); - ShowContinueError( - state, format("...Supplied Refrigerant Temperature={:.2R} Returned saturated pressure value = {:.0R}", Temperature, ReturnValue)); + EnergyPlus::format("...Called From:{}, supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + this->PsTemps(this->PsLowTempIndex), + this->PsTemps(this->PsHighTempIndex))); + ShowContinueError(state, + EnergyPlus::format("...Supplied Refrigerant Temperature={:.2R} Returned saturated pressure value = {:.0R}", + Temperature, + ReturnValue)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringSevereErrorAtEnd( state, - format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), + EnergyPlus::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), this->errors[(int)RefrigError::SatTemp].index, Temperature, "{C}"); @@ -2887,7 +2905,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -2949,20 +2967,22 @@ namespace Fluid { // send warning if (this->errors[(int)RefrigError::SatPress].count <= df->RefrigErrorLimitTest) { - ShowSevereMessage(state, - format("{}: Saturation pressure is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); + ShowSevereMessage( + state, + EnergyPlus::format("{}: Saturation pressure is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); ShowContinueError(state, - format("...Called From:{}, supplied data range=[{:.0R},{:.0R}]", - CalledFrom, - this->PsValues(this->PsLowPresIndex), - this->PsValues(this->PsHighPresIndex))); - ShowContinueError( - state, format("...Supplied Refrigerant Pressure={:.0R} Returned saturated temperature value ={:.2R}", Pressure, ReturnValue)); + EnergyPlus::format("...Called From:{}, supplied data range=[{:.0R},{:.0R}]", + CalledFrom, + this->PsValues(this->PsLowPresIndex), + this->PsValues(this->PsHighPresIndex))); + ShowContinueError(state, + EnergyPlus::format( + "...Supplied Refrigerant Pressure={:.0R} Returned saturated temperature value ={:.2R}", Pressure, ReturnValue)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringSevereErrorAtEnd( state, - format("{}: Saturation pressure is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), + EnergyPlus::format("{}: Saturation pressure is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), this->errors[(int)RefrigError::SatPress].index, Pressure, "{Pa}"); @@ -2982,7 +3002,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3034,7 +3054,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3074,7 +3094,7 @@ namespace Fluid { if ((Quality < 0.0) || (Quality > 1.0)) { ShowSevereError(state, fmt::format("{}Refrigerant \"{}\", invalid quality, called from {}", routineName, this->Name, CalledFrom)); - ShowContinueError(state, format("Saturated density quality must be between 0 and 1, entered value=[{:.4R}].", Quality)); + 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."); } @@ -3125,19 +3145,22 @@ namespace Fluid { // send warning if (this->errors[(int)RefrigError::SatTempDensity].count <= df->RefrigErrorLimitTest) { ShowSevereMessage( - state, format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); + state, + EnergyPlus::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); ShowContinueError(state, - format("...Called From:{}, supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - this->RhoTemps(this->RhofLowTempIndex), - this->RhoTemps(this->RhofHighTempIndex))); - ShowContinueError( - state, format("...Supplied Refrigerant Temperature={:.2R} Returned saturated density value ={:.2R}", Temperature, ReturnValue)); + EnergyPlus::format("...Called From:{}, supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + this->RhoTemps(this->RhofLowTempIndex), + this->RhoTemps(this->RhofHighTempIndex))); + ShowContinueError(state, + EnergyPlus::format("...Supplied Refrigerant Temperature={:.2R} Returned saturated density value ={:.2R}", + Temperature, + ReturnValue)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringSevereErrorAtEnd( state, - format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), + EnergyPlus::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), this->errors[(int)RefrigError::SatTempDensity].index, Temperature, "{C}"); @@ -3158,7 +3181,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3195,7 +3218,7 @@ namespace Fluid { if ((Quality < 0.0) || (Quality > 1.0)) { ShowSevereError(state, fmt::format("{}: Refrigerant \"{}\", invalid quality, called from {}", routineName, this->Name, CalledFrom)); - ShowContinueError(state, format("Saturated density quality must be between 0 and 1, entered value=[{:.4R}].", Quality)); + 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."); } @@ -3218,7 +3241,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3361,20 +3384,22 @@ namespace Fluid { if (this->errors[(int)RefrigError::SatTempDensity].count <= df->RefrigErrorLimitTest) { ShowWarningMessage( state, - format("{}: Refrigerant [{}] is saturated at the given conditions, saturated enthalpy at given temperature returned. **", - routineName, - this->Name)); + 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)); - ShowContinueError(state, format("Refrigerant temperature = {:.2R}", Temperature)); - ShowContinueError(state, format("Refrigerant pressure = {:.0R}", Pressure)); - ShowContinueError(state, format("Returned Enthalpy value = {:.3R}", ReturnValue)); + 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, - format("{}: Refrigerant [{}] saturated at the given conditions **", routineName, this->Name), - this->errors[(int)RefrigError::SatSupEnthalpy].index, - Temperature, - "{C}"); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{}: Refrigerant [{}] saturated at the given conditions **", routineName, this->Name), + this->errors[(int)RefrigError::SatSupEnthalpy].index, + Temperature, + "{C}"); } return ReturnValue; } @@ -3384,16 +3409,17 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupEnthalpy].count += CurTempRangeErrCount; if (CurTempRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupEnthalpyTemp].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage(state, - format("{}: Refrigerant [{}] Temperature is out of range for superheated enthalpy: values capped **", - routineName, - this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Refrigerant [{}] Temperature is out of range for superheated enthalpy: values capped **", routineName, this->Name), + EnergyPlus::format( + "{}: Refrigerant [{}] Temperature is out of range for superheated enthalpy: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupEnthalpyTemp].index, Temperature, "{C}"); @@ -3403,15 +3429,17 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupEnthalpyPress].count += CurPresRangeErrCount; if (CurPresRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupEnthalpyPress].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage( - state, - format("{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", routineName, this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", routineName, this->Name), + EnergyPlus::format( + "{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupEnthalpyPress].index, Pressure, "{Pa}"); @@ -3434,7 +3462,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3624,20 +3652,21 @@ namespace Fluid { // send warning if (CurSatErrCount > 0) { if (this->errors[(int)RefrigError::SatSupPress].count <= df->RefrigErrorLimitTest) { - ShowSevereMessage(state, - format("{}: Refrigerant [{}] is saturated at the given enthalpy and temperature, saturated enthalpy at given " - "temperature returned. **", - routineName, - this->Name)); + 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)); - ShowContinueError(state, format("Refrigerant temperature = {:.2R}", Temperature)); - ShowContinueError(state, format("Refrigerant Enthalpy = {:.3R}", Enthalpy)); - ShowContinueError(state, format("Returned Pressure value = {:.0R}", ReturnValue)); + 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)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringSevereErrorAtEnd( state, - format("{}: Refrigerant [{}] saturated at the given enthalpy and temperature **", routineName, this->Name), + EnergyPlus::format("{}: Refrigerant [{}] saturated at the given enthalpy and temperature **", routineName, this->Name), this->errors[(int)RefrigError::SatSupPress].index, ReturnValue, "{Pa}"); @@ -3647,16 +3676,17 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupPressTemp].count += CurTempRangeErrCount; if (CurTempRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupPressTemp].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage(state, - format("{}: Refrigerant [{}] Temperature is out of range for superheated pressure: values capped **", - routineName, - this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Refrigerant [{}] Temperature is out of range for superheated pressure: values capped **", routineName, this->Name), + EnergyPlus::format( + "{}: Refrigerant [{}] Temperature is out of range for superheated pressure: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupPressTemp].index, Temperature, "{C}"); @@ -3666,15 +3696,17 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupPressEnthalpy].count += CurEnthalpyRangeErrCount; if (CurEnthalpyRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupPressEnthalpy].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage( - state, - format("{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", routineName, this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Refrigerant [{}] Pressure is out of range for superheated pressure: values capped **", routineName, this->Name), + EnergyPlus::format( + "{}: Refrigerant [{}] Pressure is out of range for superheated pressure: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupPressEnthalpy].index, Enthalpy, "{J}"); @@ -3697,7 +3729,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3746,28 +3778,31 @@ namespace Fluid { RefTSat = this->getSatTemperature(state, Pressure, fmt::format("{}:{}", routineName, CalledFrom)); if (TempLow < RefTSat) { - ShowWarningMessage(state, - format("{}: Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", - routineName, - this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); TempLow = RefTSat; } if (TempUp > RefTHigh) { - ShowWarningMessage(state, - format("{}: Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", - routineName, - this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); TempUp = RefTHigh; } if (TempLow >= TempUp) { - ShowWarningMessage(state, - format("{}Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", - routineName, - this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); TempLow = RefTSat; @@ -3824,7 +3859,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3970,21 +4005,23 @@ namespace Fluid { if (this->errors[(int)RefrigError::SatSupDensity].count <= df->RefrigErrorLimitTest) { ShowWarningMessage( state, - format("{}: Refrigerant [{}] is saturated at the given conditions, saturated density at given temperature returned. **", - routineName, - this->Name)); + 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)); - ShowContinueError(state, format("Refrigerant temperature = {:.2R}", Temperature)); - ShowContinueError(state, format("Refrigerant pressure = {:.0R}", Pressure)); - ShowContinueError(state, format("Returned Density value = {:.3R}", saturated_density)); + 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, - format("{}: Refrigerant [{}] saturated at the given conditions **", routineName, this->Name), - this->errors[(int)RefrigError::SatSupEnthalpy].index, - Temperature, - "{C}"); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{}: Refrigerant [{}] saturated at the given conditions **", routineName, this->Name), + this->errors[(int)RefrigError::SatSupEnthalpy].index, + Temperature, + "{C}"); } return saturated_density; } @@ -3994,16 +4031,17 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupDensityTemp].count += CurTempRangeErrCount; if (CurTempRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupDensityTemp].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage(state, - format("{}: Refrigerant [{}] Temperature is out of range for superheated density: values capped **", - routineName, - this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Refrigerant [{}] Temperature is out of range for superheated density: values capped **", routineName, this->Name), + EnergyPlus::format( + "{}: Refrigerant [{}] Temperature is out of range for superheated density: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupDensityTemp].index, Temperature, "{C}"); @@ -4013,15 +4051,17 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupDensityPress].count += CurPresRangeErrCount; if (CurPresRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupDensityPress].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage( - state, - format("{}: Refrigerant [{}] Pressure is out of range for superheated density: values capped **", routineName, this->Name)); + 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)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Refrigerant [{}] Pressure is out of range for superheated density: values capped **", routineName, this->Name), + EnergyPlus::format( + "{}: Refrigerant [{}] Pressure is out of range for superheated density: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupDensityPress].index, Pressure, "{Pa}"); @@ -4043,7 +4083,7 @@ namespace Fluid { auto &df = state.dataFluid; if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4128,20 +4168,21 @@ namespace Fluid { if (!state.dataGlobal->WarmupFlag) { df->glycolErrorLimits[(int)GlycolError::SpecHeatLow] = ++this->errors[(int)GlycolError::SpecHeatLow].count; if (df->glycolErrorLimits[(int)GlycolError::SpecHeatLow] <= df->GlycolErrorLimitTest) { - ShowWarningMessage( - state, - format("{}: Temperature is out of range (too low) for fluid [{}] specific heat supplied values **", routineName, this->Name)); + ShowWarningMessage(state, + EnergyPlus::format("{}: Temperature is out of range (too low) for fluid [{}] specific heat supplied values **", + routineName, + this->Name)); ShowContinueError(state, - format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - Temp, - this->CpLowTempValue, - this->CpHighTempValue)); + EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + Temp, + this->CpLowTempValue, + this->CpHighTempValue)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Temperature out of range (too low) for fluid [{}] specific heat **", routineName, this->Name), + EnergyPlus::format("{}: Temperature out of range (too low) for fluid [{}] specific heat **", routineName, this->Name), this->errors[(int)GlycolError::SpecHeatLow].index, Temp, "{C}"); @@ -4152,19 +4193,20 @@ namespace Fluid { if (!state.dataGlobal->WarmupFlag) { df->glycolErrorLimits[(int)GlycolError::SpecHeatHigh] = ++this->errors[(int)GlycolError::SpecHeatHigh].count; if (df->glycolErrorLimits[(int)GlycolError::SpecHeatHigh] <= df->GlycolErrorLimitTest) { - ShowWarningMessage(state, - format("{}: Temperature is out of range (too high) for fluid [{}] specific heat **", routineName, this->Name)); + ShowWarningMessage( + state, + EnergyPlus::format("{}: Temperature is out of range (too high) for fluid [{}] specific heat **", routineName, this->Name)); ShowContinueError(state, - format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - Temp, - this->CpLowTempValue, - this->CpHighTempValue)); + EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + Temp, + this->CpLowTempValue, + this->CpHighTempValue)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Temperature out of range (too high) for fluid [{}] specific heat **", routineName, this->Name), + EnergyPlus::format("{}: Temperature out of range (too high) for fluid [{}] specific heat **", routineName, this->Name), this->errors[(int)GlycolError::SpecHeatHigh].index, Temp, "{C}"); @@ -4201,7 +4243,7 @@ namespace Fluid { if (GlycolIndex == 0) { if ((GlycolIndex = GetGlycolNum(state, glycolName)) == 0) { - ShowSevereError(state, format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4278,39 +4320,42 @@ namespace Fluid { if (error == GlycolError::DensityLow) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { - ShowWarningMessage(state, format("{}: Temperature is out of range (too low) for fluid [{}] density **", routineName, this->Name)); + ShowWarningMessage( + state, EnergyPlus::format("{}: Temperature is out of range (too low) for fluid [{}] density **", routineName, this->Name)); ShowContinueError(state, - format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - Temp, - this->RhoLowTempValue, - this->RhoHighTempValue)); + EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + Temp, + this->RhoLowTempValue, + this->RhoHighTempValue)); ShowContinueErrorTimeStamp(state, ""); } - ShowRecurringWarningErrorAtEnd(state, - format("{}: Temperature out of range (too low) for fluid [{}] density **", routineName, this->Name), - this->errors[(int)GlycolError::DensityLow].index, - Temp, - "{C}"); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::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, - format("{}: Temperature is out of range (too high) for fluid [{}] density **", routineName, this->Name)); + ShowWarningMessage( + state, EnergyPlus::format("{}: Temperature is out of range (too high) for fluid [{}] density **", routineName, this->Name)); ShowContinueError(state, - format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - Temp, - this->RhoLowTempValue, - this->RhoHighTempValue)); + EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + Temp, + this->RhoLowTempValue, + this->RhoHighTempValue)); ShowContinueErrorTimeStamp(state, ""); } - ShowRecurringWarningErrorAtEnd(state, - format("{}: Temperature out of range (too high) for fluid [{}] density **", routineName, this->Name), - this->errors[(int)GlycolError::DensityHigh].index, - Temp, - "{C}"); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{}: Temperature out of range (too high) for fluid [{}] density **", routineName, this->Name), + this->errors[(int)GlycolError::DensityHigh].index, + Temp, + "{C}"); } } @@ -4330,7 +4375,7 @@ namespace Fluid { if (GlycolIndex == 0) { if ((GlycolIndex = GetGlycolNum(state, glycolName)) == 0) { - ShowSevereError(state, format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4378,7 +4423,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, format("{}: conductivity data not found for glycol \"{}\", called from {}", routineName, this->Name, CalledFrom)); + ShowSevereError( + state, EnergyPlus::format("{}: conductivity data not found for glycol \"{}\", called from {}", routineName, this->Name, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4410,20 +4456,21 @@ namespace Fluid { if (error == GlycolError::ConductivityLow) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { - ShowWarningMessage(state, - format("{}: Temperature is out of range (too low) for fluid [{}] conductivity **", routineName, this->Name)); + ShowWarningMessage( + state, + EnergyPlus::format("{}: Temperature is out of range (too low) for fluid [{}] conductivity **", routineName, this->Name)); ShowContinueError(state, - format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - Temp, - this->CondLowTempValue, - this->CondHighTempValue)); + EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + Temp, + this->CondLowTempValue, + this->CondHighTempValue)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Temperature out of range (too low) for fluid [{}] conductivity **", routineName, this->Name), + EnergyPlus::format("{}: Temperature out of range (too low) for fluid [{}] conductivity **", routineName, this->Name), this->errors[(int)error].index, Temp, "{C}"); @@ -4431,20 +4478,21 @@ namespace Fluid { else if (error == GlycolError::ConductivityHigh) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { - ShowWarningMessage(state, - format("{}: Temperature is out of range (too high) for fluid [{}] conductivity **", routineName, this->Name)); + ShowWarningMessage( + state, + EnergyPlus::format("{}: Temperature is out of range (too high) for fluid [{}] conductivity **", routineName, this->Name)); ShowContinueError(state, - format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - Temp, - this->CondLowTempValue, - this->CondHighTempValue)); + EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + Temp, + this->CondLowTempValue, + this->CondHighTempValue)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - format("{}: Temperature out of range (too high) for fluid [{}] conductivity **", routineName, this->Name), + EnergyPlus::format("{}: Temperature out of range (too high) for fluid [{}] conductivity **", routineName, this->Name), this->errors[(int)error].index, Temp, "{C}"); @@ -4466,7 +4514,7 @@ namespace Fluid { if (GlycolIndex == 0) { if ((GlycolIndex = GetGlycolNum(state, glycolName)) == 0) { - ShowSevereError(state, format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4515,7 +4563,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, format("{}: viscosity data not found for glycol \"{}\", called from {}", routineName, this->Name, CalledFrom)); + ShowSevereError( + state, EnergyPlus::format("{}: viscosity data not found for glycol \"{}\", called from {}", routineName, this->Name, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4547,42 +4596,44 @@ namespace Fluid { if (error == GlycolError::ViscosityHigh) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { - ShowWarningMessage(state, - format("{}: Temperature is out of range (too low) for fluid [{}] viscosity **", routineName, this->Name)); + ShowWarningMessage( + state, EnergyPlus::format("{}: Temperature is out of range (too low) for fluid [{}] viscosity **", routineName, this->Name)); ShowContinueError(state, - format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - Temp, - this->ViscLowTempValue, - this->ViscHighTempValue)); + EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + Temp, + this->ViscLowTempValue, + this->ViscHighTempValue)); ShowContinueErrorTimeStamp(state, ""); } - ShowRecurringWarningErrorAtEnd(state, - format("{}: Temperature out of range (too low) for fluid [{}] viscosity **", routineName, this->Name), - this->errors[(int)GlycolError::ViscosityLow].index, - Temp, - "{C}"); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{}: Temperature out of range (too low) for fluid [{}] viscosity **", routineName, this->Name), + this->errors[(int)GlycolError::ViscosityLow].index, + Temp, + "{C}"); } else if (error == GlycolError::ViscosityHigh) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { - ShowWarningMessage(state, - format("{}: Temperature is out of range (too high) for fluid [{}] viscosity **", routineName, this->Name)); + ShowWarningMessage( + state, EnergyPlus::format("{}: Temperature is out of range (too high) for fluid [{}] viscosity **", routineName, this->Name)); ShowContinueError(state, - format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", - CalledFrom, - Temp, - this->ViscLowTempValue, - this->ViscHighTempValue)); + EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", + CalledFrom, + Temp, + this->ViscLowTempValue, + this->ViscHighTempValue)); ShowContinueErrorTimeStamp(state, ""); } - ShowRecurringWarningErrorAtEnd(state, - format("{}: Temperature out of range (too high) for fluid [{}] viscosity **", routineName, this->Name), - this->errors[(int)GlycolError::ViscosityHigh].index, - Temp, - "{C}"); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{}: Temperature out of range (too high) for fluid [{}] viscosity **", routineName, this->Name), + this->errors[(int)GlycolError::ViscosityHigh].index, + Temp, + "{C}"); } } @@ -4601,7 +4652,7 @@ namespace Fluid { if (GlycolIndex == 0) { if ((GlycolIndex = GetGlycolNum(state, glycolName)) == 0) { - ShowSevereError(state, format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); + ShowSevereError(state, EnergyPlus::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4911,8 +4962,8 @@ namespace Fluid { 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)); - ShowContinueError(state, format("Refrigerant temperature = {:.2R}", Temperature)); - ShowContinueError(state, format("Returned saturated property value = {:.3R}", ReturnValue)); + ShowContinueError(state, EnergyPlus::format("Refrigerant temperature = {:.2R}", Temperature)); + ShowContinueError(state, EnergyPlus::format("Returned saturated property value = {:.3R}", ReturnValue)); } else { ShowRecurringWarningErrorAtEnd(state, "GetInterpolatedSatProp: Refrigerant temperature for interpolation out of range error", @@ -4956,7 +5007,7 @@ namespace Fluid { NeedOrphanMessage = false; } if (state.dataGlobal->DisplayUnusedObjects) { - ShowMessage(state, format("Refrigerant={}", refrig->Name)); + ShowMessage(state, EnergyPlus::format("Refrigerant={}", refrig->Name)); } else { ++NumUnusedRefrig; } @@ -4983,7 +5034,7 @@ namespace Fluid { NeedOrphanMessage = false; } if (state.dataGlobal->DisplayUnusedObjects) { - ShowMessage(state, format("Glycol={}", glycol->Name)); + ShowMessage(state, EnergyPlus::format("Glycol={}", glycol->Name)); } else { ++NumUnusedGlycol; } @@ -4991,10 +5042,10 @@ namespace Fluid { if (NumUnusedRefrig > 0 || NumUnusedGlycol > 0) { if (NumUnusedRefrig > 0) { - ShowMessage(state, format("There are {} unused refrigerants in input.", NumUnusedRefrig)); + ShowMessage(state, EnergyPlus::format("There are {} unused refrigerants in input.", NumUnusedRefrig)); } if (NumUnusedGlycol > 0) { - ShowMessage(state, format("There are {} unused glycols in input.", NumUnusedGlycol)); + ShowMessage(state, EnergyPlus::format("There are {} unused glycols in input.", NumUnusedGlycol)); } ShowMessage(state, "Use Output:Diagnostics,DisplayUnusedObjects; to see them."); } diff --git a/src/EnergyPlus/FuelCellElectricGenerator.cc b/src/EnergyPlus/FuelCellElectricGenerator.cc index 2536d05c42f..8b0a61e98e6 100644 --- a/src/EnergyPlus/FuelCellElectricGenerator.cc +++ b/src/EnergyPlus/FuelCellElectricGenerator.cc @@ -159,7 +159,7 @@ namespace FuelCellElectricGenerator { } // If we didn't find it, fatal - ShowFatalError(state, format("LocalFuelCellGenFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalFuelCellGenFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -179,7 +179,7 @@ namespace FuelCellElectricGenerator { } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalFuelCellGenFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalFuelCellGenFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -231,7 +231,7 @@ namespace FuelCellElectricGenerator { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (state.dataFuelCellElectGen->NumFuelCellGenerators <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -271,7 +271,7 @@ namespace FuelCellElectricGenerator { int NumFuelCellPMs = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFuelCellPMs <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -339,8 +339,8 @@ namespace FuelCellElectricGenerator { fuelCell.FCPM.ZoneName = AlphArray(5); fuelCell.FCPM.ZoneID = Util::FindItemInList(fuelCell.FCPM.ZoneName, state.dataHeatBal->Zone); if (fuelCell.FCPM.ZoneID == 0 && !s_ipsc->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(5), AlphArray(5))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(5), AlphArray(5))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ShowContinueError(state, "Zone Name was not found "); ErrorsFound = true; } @@ -396,8 +396,8 @@ namespace FuelCellElectricGenerator { } } } else { // throw warning, did not find power module input - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } // loop over NumFuelCellPMs @@ -414,9 +414,9 @@ namespace FuelCellElectricGenerator { state.dataFuelCellElectGen->FuelCell(GeneratorNum).NameFCFuelSup, state.dataGenerator->FuelSupply); // Fuel Supply ID if (state.dataFuelCellElectGen->FuelCell(GeneratorNum).FuelSupNum == 0) { ShowSevereError(state, - format("Fuel Supply Name: {} not found in {}", - state.dataFuelCellElectGen->FuelCell(GeneratorNum).NameFCFuelSup, - state.dataFuelCellElectGen->FuelCell(GeneratorNum).Name)); + EnergyPlus::format("Fuel Supply Name: {} not found in {}", + state.dataFuelCellElectGen->FuelCell(GeneratorNum).NameFCFuelSup, + state.dataFuelCellElectGen->FuelCell(GeneratorNum).Name)); ErrorsFound = true; } } @@ -425,7 +425,7 @@ namespace FuelCellElectricGenerator { int NumFuelCellAirSups = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFuelCellAirSups <= 0) { // Autodesk:Uninit thisFuelCell was possibly uninitialized past this condition - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -526,8 +526,8 @@ namespace FuelCellElectricGenerator { fuelCell.AirSup.NumConstituents = NumAirConstit; if (NumAirConstit > 5) { - ShowSevereError(state, format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(4), NumArray(4))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(4), NumArray(4))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ShowContinueError(state, "Fuel Cell model not set up for more than 5 air constituents"); ErrorsFound = true; } @@ -561,9 +561,9 @@ namespace FuelCellElectricGenerator { // check for molar fractions summing to 1.0. if (std::abs(sum(fuelCell.AirSup.ConstitMolalFract) - 1.0) > 0.0001) { - ShowSevereError(state, format("{} molar fractions do not sum to 1.0", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("..Sum was={:.1R}", sum(fuelCell.AirSup.ConstitMolalFract))); - ShowContinueError(state, format("Entered in {} = {}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("{} molar fractions do not sum to 1.0", s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("..Sum was={:.1R}", sum(fuelCell.AirSup.ConstitMolalFract))); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -574,8 +574,8 @@ namespace FuelCellElectricGenerator { } } } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -613,7 +613,7 @@ namespace FuelCellElectricGenerator { int NumFCWaterSups = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFCWaterSups <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -703,8 +703,8 @@ namespace FuelCellElectricGenerator { } } } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -713,7 +713,7 @@ namespace FuelCellElectricGenerator { int NumFuelCellAuxilHeaters = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFuelCellAuxilHeaters <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -772,8 +772,8 @@ namespace FuelCellElectricGenerator { } } } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -782,8 +782,8 @@ namespace FuelCellElectricGenerator { s_ipsc->cCurrentModuleObject = "Generator:FuelCell:ExhaustGasToWaterHeatExchanger"; int NumFCExhaustGasHXs = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFCExhaustGasHXs <= 0) { - ShowWarningError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("Fuel Cell model requires an {} object", s_ipsc->cCurrentModuleObject)); + 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)); ErrorsFound = true; } @@ -876,8 +876,8 @@ namespace FuelCellElectricGenerator { // store cooling water volume flow rate for autosizing system PlantUtilities::RegisterPlantCompDesignFlow(state, fuelCell.ExhaustHX.WaterInNode, fuelCell.ExhaustHX.WaterVolumeFlowMax); } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -886,8 +886,8 @@ namespace FuelCellElectricGenerator { int NumFCElecStorageUnits = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFCElecStorageUnits <= 0) { - ShowWarningError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("Fuel Cell model requires an {} object", s_ipsc->cCurrentModuleObject)); + 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)); ErrorsFound = true; } @@ -914,8 +914,8 @@ namespace FuelCellElectricGenerator { if (Util::SameString(AlphArray(2), "SimpleEfficiencyWithConstraints")) { fuelCell.ElecStorage.StorageModelMode = DataGenerators::ElectricalStorage::SimpleEffConstraints; } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(2), AlphArray(2))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(2), AlphArray(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -933,8 +933,8 @@ namespace FuelCellElectricGenerator { } } } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -943,8 +943,8 @@ namespace FuelCellElectricGenerator { int NumFCPowerCondUnits = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFCPowerCondUnits <= 0) { - ShowWarningError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("Fuel Cell model requires a {} object", s_ipsc->cCurrentModuleObject)); + 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)); ErrorsFound = true; } @@ -999,8 +999,8 @@ namespace FuelCellElectricGenerator { } } } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -1078,8 +1078,8 @@ namespace FuelCellElectricGenerator { fuelCell.StackCooler.StackCoolerPresent = true; } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -1793,8 +1793,8 @@ namespace FuelCellElectricGenerator { state.dataGenerator->FuelSupply(this->FuelSupNum).CompPowerLossFactor * state.dataGenerator->FuelSupply(this->FuelSupNum).PfuelCompEl; if (state.dataGenerator->FuelSupply(this->FuelSupNum).QskinLoss < 0.0) { - ShowWarningError(state, - format("problem in FuelSupply.QskinLoss {:.3R}", state.dataGenerator->FuelSupply(this->FuelSupNum).QskinLoss)); + ShowWarningError( + state, EnergyPlus::format("problem in FuelSupply.QskinLoss {:.3R}", state.dataGenerator->FuelSupply(this->FuelSupNum).QskinLoss)); state.dataGenerator->FuelSupply(this->FuelSupNum).QskinLoss = 0.0; } @@ -1914,7 +1914,7 @@ namespace FuelCellElectricGenerator { this->AirSup.QskinLoss = this->AirSup.BlowerHeatLossFactor * this->AirSup.PairCompEl; if (this->AirSup.QskinLoss < 0.0) { - ShowWarningError(state, format("problem in AirSup.QskinLoss {:.3R}", this->AirSup.QskinLoss)); + ShowWarningError(state, EnergyPlus::format("problem in AirSup.QskinLoss {:.3R}", this->AirSup.QskinLoss)); this->AirSup.QskinLoss = 0.0; } @@ -1941,7 +1941,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, format("Increase air flow in GENERATOR:FC:AIR SUPPLY object:{}", this->AirSup.Name)); + ShowContinueError(state, EnergyPlus::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 63a98cebea6..37c88906c75 100644 --- a/src/EnergyPlus/Furnaces.cc +++ b/src/EnergyPlus/Furnaces.cc @@ -223,25 +223,25 @@ namespace Furnaces { if (CompIndex == 0) { FurnaceNum = Util::FindItemInList(FurnaceName, state.dataFurnaces->Furnace); if (FurnaceNum == 0) { - ShowFatalError(state, format("SimFurnace: Unit not found={}", FurnaceName)); + ShowFatalError(state, EnergyPlus::format("SimFurnace: Unit not found={}", FurnaceName)); } CompIndex = FurnaceNum; } else { FurnaceNum = CompIndex; if (FurnaceNum > state.dataFurnaces->NumFurnaces || FurnaceNum < 1) { ShowFatalError(state, - format("SimFurnace: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - FurnaceNum, - state.dataFurnaces->NumFurnaces, - FurnaceName)); + EnergyPlus::format("SimFurnace: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + FurnaceNum, + state.dataFurnaces->NumFurnaces, + FurnaceName)); } if (state.dataFurnaces->CheckEquipName(FurnaceNum)) { if (FurnaceName != state.dataFurnaces->Furnace(FurnaceNum).Name) { ShowFatalError(state, - format("SimFurnace: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - FurnaceNum, - FurnaceName, - state.dataFurnaces->Furnace(FurnaceNum).Name)); + EnergyPlus::format("SimFurnace: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + FurnaceNum, + FurnaceName, + state.dataFurnaces->Furnace(FurnaceNum).Name)); } state.dataFurnaces->CheckEquipName(FurnaceNum) = false; } @@ -684,8 +684,8 @@ namespace Furnaces { default:; } if (errorFound) { - ShowSevereError(state, format("The index of \"{}\" is not found", thisFurnace.HeatingCoilName)); - ShowContinueError(state, format("...occurs for {}", thisFurnace.Name)); + ShowSevereError(state, EnergyPlus::format("The index of \"{}\" is not found", thisFurnace.HeatingCoilName)); + ShowContinueError(state, EnergyPlus::format("...occurs for {}", thisFurnace.Name)); errorFound = false; } switch (thisFurnace.SuppHeatCoilType_Num) { @@ -701,8 +701,8 @@ namespace Furnaces { default:; } if (errorFound) { - ShowSevereError(state, format("The index of \"{}\" is not found", thisFurnace.SuppHeatCoilName)); - ShowContinueError(state, format("...occurs for {}", thisFurnace.Name)); + ShowSevereError(state, EnergyPlus::format("The index of \"{}\" is not found", thisFurnace.SuppHeatCoilName)); + ShowContinueError(state, EnergyPlus::format("...occurs for {}", thisFurnace.Name)); errorFound = false; } state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).AFNLoopHeatingCoilMaxRTF = @@ -937,8 +937,8 @@ namespace Furnaces { thisFurnace.ControlZoneNum = Util::FindItemInList(Alphas(6), state.dataHeatBal->Zone); if (thisFurnace.ControlZoneNum == 0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } @@ -991,17 +991,18 @@ namespace Furnaces { } } if (!AirNodeFound) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find Air Node (Zone with Thermostat)."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find correct Primary Air Loop."); - ShowContinueError(state, format("Specified {} = {} is not served by this AirLoopHVAC equipment.", cAlphaFields(6), Alphas(6))); + ShowContinueError( + state, EnergyPlus::format("Specified {} = {} is not served by this AirLoopHVAC equipment.", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } } @@ -1012,8 +1013,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, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(7), Alphas(7))); ErrorsFound = true; } else if ((thisFurnace.FanIndex = Fans::GetFanIndex(state, FanName)) == 0) { @@ -1030,22 +1031,23 @@ 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::Ex, - 0.0, - Clusive::In, - 1.0, - format("For {} = {}, Fan operating mode must be continuous (schedule values > 0)", cAlphaFields(7), Alphas(7))); + Sched::ShowSevereBadMinMax(state, + eoh, + cAlphaFields(5), + Alphas(5), + Clusive::Ex, + 0.0, + Clusive::In, + 1.0, + EnergyPlus::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, format("{} = {}", CurrentModuleObject, thisFurnace.Name)); - ShowContinueError(state, format("{} = {}", cAlphaFields(7), Alphas(7))); - ShowContinueError(state, format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(5))); + 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))); ErrorsFound = true; } } @@ -1062,12 +1064,12 @@ namespace Furnaces { errFlag = false; thisFurnace.HeatingCoilType_Num = HeatingCoils::GetHeatingCoilTypeNum(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -1076,7 +1078,7 @@ namespace Furnaces { errFlag = false; HeatingCoils::GetCoilIndex(state, HeatingCoilName, thisFurnace.HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1084,7 +1086,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignHeatingCapacity = HeatingCoils::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1093,7 +1095,7 @@ namespace Furnaces { HeatingCoilInletNode = HeatingCoils::GetCoilInletNode(state, HeatingCoilType, HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1101,7 +1103,7 @@ namespace Furnaces { errFlag = false; HeatingCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1112,7 +1114,7 @@ namespace Furnaces { thisFurnace.HeatingCoilType_Num = HVAC::Coil_HeatingWater; ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -1120,7 +1122,7 @@ namespace Furnaces { errFlag = false; thisFurnace.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1128,7 +1130,7 @@ namespace Furnaces { errFlag = false; thisFurnace.MaxHeatCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1137,7 +1139,7 @@ namespace Furnaces { HeatingCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1146,7 +1148,7 @@ namespace Furnaces { HeatingCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); thisFurnace.HWCoilAirOutletNode = HeatingCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1154,8 +1156,9 @@ namespace Furnaces { errFlag = false; HVACControllers::CheckCoilWaterInletNode(state, thisFurnace.CoilControlNode, errFlag); if (!errFlag) { // then did find a controller so that is bad - ShowSevereError(state, - format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError( + state, + EnergyPlus::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; @@ -1166,15 +1169,15 @@ namespace Furnaces { thisFurnace.HeatingCoilType_Num = HVAC::Coil_HeatingSteam; ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), HeatingCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), HeatingCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1182,7 +1185,7 @@ namespace Furnaces { errFlag = false; thisFurnace.CoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "COIL:HEATING:STEAM", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1198,7 +1201,7 @@ namespace Furnaces { HeatingCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.HeatingCoilIndex, HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1207,14 +1210,14 @@ namespace Furnaces { HeatingCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.HeatingCoilIndex, HeatingCoilName, errFlag); thisFurnace.HWCoilAirOutletNode = HeatingCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(11), Alphas(11))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%HeatingCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -1226,51 +1229,58 @@ 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, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, - format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError( + state, + EnergyPlus::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, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError( - state, format("...Unitary System inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); } ErrorsFound = true; } // Fan outlet node name must be the same as the heating coil inlet node name if (FanOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); ErrorsFound = true; } // Heating coil outlet node name must be the same as the furnace outlet node name if (HeatingCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError( - state, format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + 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))); } 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, - format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError( - state, format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + 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))); } ErrorsFound = true; } @@ -1281,51 +1291,59 @@ 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, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError( - state, format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); } 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, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError( - state, format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); } ErrorsFound = true; } // Heating coil outlet node name must be the same as the fan inlet node name if (HeatingCoilOutletNode != FanInletNode) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + 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))); ErrorsFound = true; } // Fan coil outlet node name must be the same as the furnace outlet node name if (FanOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + 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))); } 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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + 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))); } ErrorsFound = true; } @@ -1347,24 +1365,25 @@ namespace Furnaces { // Compare the flow rates. if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize && thisFurnace.DesignFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) { - ShowWarningError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError( - state, format("... The {} > Max Volume Flow Rate defined in the associated fan object, should be <=.", cNumericFields(2))); + 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))); ShowContinueError(state, - format("... Entered value = {:.4R}... Fan [{} = {}] Max Value = {:.4R}", - thisFurnace.DesignFanVolFlowRate, - HVAC::fanTypeNames[(int)thisFurnace.fanType], - FanName, - thisFurnace.ActualFanVolFlowRate)); + EnergyPlus::format("... Entered value = {:.4R}... Fan [{} = {}] Max Value = {:.4R}", + thisFurnace.DesignFanVolFlowRate, + HVAC::fanTypeNames[(int)thisFurnace.fanType], + FanName, + thisFurnace.ActualFanVolFlowRate)); ShowContinueError(state, " The HVAC system flow rate is reset to the fan flow rate and the simulation continues."); thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } } if (thisFurnace.DesignFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate <= 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("... The {} <= 0.0, it must be > 0.0.", cNumericFields(2))); - ShowContinueError(state, format("... Entered value = {:.2R}", thisFurnace.DesignFanVolFlowRate)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("... The {} <= 0.0, it must be > 0.0.", cNumericFields(2))); + ShowContinueError(state, EnergyPlus::format("... Entered value = {:.2R}", thisFurnace.DesignFanVolFlowRate)); ErrorsFound = true; } } @@ -1476,8 +1495,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, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } @@ -1530,17 +1549,17 @@ namespace Furnaces { } } if (!AirNodeFound) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find air node (zone with thermostat)."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find correct AirLoopHVAC."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } } @@ -1551,8 +1570,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, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(7), Alphas(7))); ErrorsFound = true; } else if ((thisFurnace.FanIndex = Fans::GetFanIndex(state, FanName)) == 0) { @@ -1569,22 +1588,23 @@ 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, - 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, + EnergyPlus::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, format("{} = {}", CurrentModuleObject, thisFurnace.Name)); - ShowContinueError(state, format("{} = {}", cAlphaFields(7), Alphas(7))); - ShowContinueError(state, format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(5))); + 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))); ErrorsFound = true; } } @@ -1602,13 +1622,13 @@ namespace Furnaces { errFlag = false; thisFurnace.HeatingCoilType_Num = HeatingCoils::GetHeatingCoilTypeNum(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil @@ -1617,7 +1637,7 @@ namespace Furnaces { errFlag = false; HeatingCoils::GetCoilIndex(state, HeatingCoilName, thisFurnace.HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1625,7 +1645,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignHeatingCapacity = HeatingCoils::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1633,7 +1653,7 @@ namespace Furnaces { errFlag = false; HeatingCoilInletNode = HeatingCoils::GetCoilInletNode(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1641,7 +1661,7 @@ namespace Furnaces { errFlag = false; HeatingCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1649,7 +1669,7 @@ namespace Furnaces { errFlag = false; HeatingCoilPLFCurveIndex = HeatingCoils::GetHeatingCoilPLFCurveIndex(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1660,7 +1680,7 @@ namespace Furnaces { thisFurnace.HeatingCoilType_Num = HVAC::Coil_HeatingWater; ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -1668,7 +1688,7 @@ namespace Furnaces { errFlag = false; thisFurnace.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1676,7 +1696,7 @@ namespace Furnaces { errFlag = false; thisFurnace.MaxHeatCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1685,7 +1705,7 @@ namespace Furnaces { HeatingCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1694,7 +1714,7 @@ namespace Furnaces { HeatingCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); thisFurnace.HWCoilAirOutletNode = HeatingCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1702,8 +1722,9 @@ namespace Furnaces { errFlag = false; HVACControllers::CheckCoilWaterInletNode(state, thisFurnace.CoilControlNode, errFlag); if (!errFlag) { // then did find a controller so that is bad - ShowSevereError(state, - format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError( + state, + EnergyPlus::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; @@ -1714,15 +1735,15 @@ namespace Furnaces { thisFurnace.HeatingCoilType_Num = HVAC::Coil_HeatingSteam; ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), HeatingCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), HeatingCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1730,7 +1751,7 @@ namespace Furnaces { errFlag = false; thisFurnace.CoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1747,7 +1768,7 @@ namespace Furnaces { HeatingCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.HeatingCoilIndex, HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1756,14 +1777,14 @@ namespace Furnaces { HeatingCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.HeatingCoilIndex, HeatingCoilName, errFlag); thisFurnace.HWCoilAirOutletNode = HeatingCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(11), Alphas(11))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%HeatingCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -1794,7 +1815,7 @@ namespace Furnaces { if (thisFurnace.CoolingCoilType_Num == HVAC::CoilDX_CoolingSingleSpeed) { ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from DX cooling coil @@ -1802,7 +1823,7 @@ namespace Furnaces { // Get DX cooling coil index DXCoils::GetDXCoilIndex(state, CoolingCoilName, thisFurnace.CoolingCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1810,7 +1831,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = DXCoils::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1819,7 +1840,7 @@ namespace Furnaces { CoolingCoilInletNode = DXCoils::GetCoilInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); CoolingCoilOutletNode = DXCoils::GetCoilOutletNode(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1837,7 +1858,7 @@ namespace Furnaces { thisFurnace.CondenserNodeNum = DXCoils::GetCoilCondenserInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1851,7 +1872,7 @@ namespace Furnaces { } else if (thisFurnace.CoolingCoilType_Num == HVAC::CoilDX_CoolingHXAssisted) { ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heat exchanger assisted cooling coil @@ -1859,7 +1880,7 @@ namespace Furnaces { // Get DX heat exchanger assisted cooling coil index HVACHXAssistedCoolingCoil::GetHXDXCoilIndex(state, CoolingCoilName, thisFurnace.CoolingCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1867,7 +1888,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = HVACHXAssistedCoolingCoil::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1876,7 +1897,7 @@ namespace Furnaces { CoolingCoilInletNode = HVACHXAssistedCoolingCoil::GetCoilInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); CoolingCoilOutletNode = HVACHXAssistedCoolingCoil::GetCoilOutletNode(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1885,7 +1906,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, format("Occurs in {} = {}", cCurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1894,7 +1915,7 @@ namespace Furnaces { int childCCIndex = CoilCoolingDX::factory(state, ChildCoolingCoilName); if (childCCIndex < 0) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, Alphas(1))); errFlag = true; ErrorsFound = true; } @@ -1921,7 +1942,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1949,7 +1970,7 @@ namespace Furnaces { ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { errFlag = false; @@ -1963,7 +1984,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1980,13 +2001,13 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } @@ -1996,8 +2017,8 @@ namespace Furnaces { thisFurnace.DehumidControlType_Num = DehumidificationControlMode::Multimode; thisFurnace.Humidistat = true; if (thisFurnace.CoolingCoilType_Num != HVAC::CoilDX_CoolingHXAssisted) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(14), Alphas(14))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, @@ -2015,7 +2036,7 @@ namespace Furnaces { thisFurnace.DehumidControlType_Num = DehumidificationControlMode::CoolReheat; thisFurnace.Humidistat = true; if (lAlphaBlanks(15)) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::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."); @@ -2035,15 +2056,15 @@ namespace Furnaces { AirNodeFound = true; } if (!AirNodeFound) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find Air Node (Zone with Humidistat)."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } } } else { // invalid input - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(14), Alphas(14))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(14), Alphas(14))); thisFurnace.Humidistat = false; ErrorsFound = true; } @@ -2071,13 +2092,13 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HeatingCoils::GetHeatingCoilTypeNum(state, ReheatingCoilType, ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { ValidateComponent(state, ReheatingCoilType, ReheatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from reheat coil @@ -2085,7 +2106,7 @@ namespace Furnaces { // Get the heating coil index HeatingCoils::GetCoilIndex(state, ReheatingCoilName, thisFurnace.SuppHeatCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2094,7 +2115,7 @@ namespace Furnaces { thisFurnace.DesignSuppHeatingCapacity = HeatingCoils::GetCoilCapacity(state, ReheatingCoilType, ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2102,7 +2123,7 @@ namespace Furnaces { errFlag = false; ReheatCoilInletNode = HeatingCoils::GetCoilInletNode(state, ReheatingCoilType, ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2110,7 +2131,7 @@ namespace Furnaces { errFlag = false; ReheatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, ReheatingCoilType, ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2121,7 +2142,7 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HVAC::Coil_HeatingWater; ValidateComponent(state, ReheatingCoilType, ReheatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -2129,7 +2150,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2138,7 +2159,7 @@ namespace Furnaces { thisFurnace.MaxSuppCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2147,7 +2168,7 @@ namespace Furnaces { ReheatCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", ReheatingCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = ReheatCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2156,7 +2177,7 @@ namespace Furnaces { ReheatCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", ReheatingCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = ReheatCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2164,8 +2185,9 @@ namespace Furnaces { errFlag = false; HVACControllers::CheckCoilWaterInletNode(state, thisFurnace.CoilControlNode, errFlag); if (!errFlag) { // then did find a controller so that is bad - ShowSevereError(state, - format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError( + state, + EnergyPlus::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; @@ -2176,15 +2198,16 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HVAC::Coil_HeatingSteam; ValidateComponent(state, ReheatingCoilType, ReheatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), ReheatingCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, + EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), ReheatingCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2192,7 +2215,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2210,7 +2233,7 @@ namespace Furnaces { ReheatCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.SuppHeatCoilIndex, ReheatingCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = ReheatCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2219,14 +2242,14 @@ namespace Furnaces { ReheatCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.SuppHeatCoilIndex, ReheatingCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = ReheatCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { // Illegal heating coil - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(15), Alphas(15))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(15), Alphas(15))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%SuppHeatCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -2235,135 +2258,153 @@ namespace Furnaces { if (thisFurnace.fanPlace == HVAC::FanPlace::BlowThru) { if (FanInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, - format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError( + state, + EnergyPlus::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, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError( - state, format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); } ErrorsFound = true; } if (thisFurnace.CoolingCoilUpstream) { if (FanOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + 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))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); ErrorsFound = true; } if ((thisFurnace.Humidistat && thisFurnace.DehumidControlType_Num == DehumidificationControlMode::CoolReheat) || ReheatCoilInletNode > 0) { if (HeatingCoilOutletNode != ReheatCoilInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, - format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, - format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilInletNode))); + 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))); ErrorsFound = true; } if (ReheatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, - format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); ShowContinueError( state, - format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::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, format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); ShowContinueError( state, - format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::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, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError( state, - format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError( state, - format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::format("...UnitarySystem outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } } } else { // IF(Furnace(FurnaceNum)%CoolingCoilUpstream)THEN if (FanOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); ErrorsFound = true; } if (HeatingCoilOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + 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))); ErrorsFound = true; } if (CoolingCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, - format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError( state, - format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::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, - format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError( state, - format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::format("...UnitarySystem outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } @@ -2373,140 +2414,162 @@ namespace Furnaces { if (thisFurnace.CoolingCoilUpstream) { if (CoolingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, - format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ShowContinueError( - state, format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); } 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, - format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ShowContinueError( - state, format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); } ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); ErrorsFound = true; } if (HeatingCoilOutletNode != FanInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + 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))); ErrorsFound = true; } if ((thisFurnace.Humidistat && thisFurnace.DehumidControlType_Num == DehumidificationControlMode::CoolReheat) || ReheatCoilInletNode > 0) { if (FanOutletNode != ReheatCoilInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilInletNode))); + 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))); ErrorsFound = true; } if (ReheatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, - format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); ShowContinueError( state, - format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::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, format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); ShowContinueError( state, - format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::format("...UnitarySystem outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } } else { if (FanOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, - format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + 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))); ErrorsFound = true; } } } else { // IF(Furnace(FurnaceNum)%CoolingCoilUpstream)THEN if (HeatingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, - format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError( - state, format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); } 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, - format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError( - state, format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); } ErrorsFound = true; } if (HeatingCoilOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + 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))); ErrorsFound = true; } if (CoolingCoilOutletNode != FanInletNode) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + 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))); ErrorsFound = true; } if (FanOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + 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))); } 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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError( - state, - format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, + EnergyPlus::format("...UnitarySystem outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } @@ -2577,22 +2640,22 @@ namespace Furnaces { thisFurnace.MaxCoolAirVolFlow = Numbers(2); if (thisFurnace.MaxCoolAirVolFlow <= 0 && thisFurnace.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); ErrorsFound = true; } thisFurnace.MaxHeatAirVolFlow = Numbers(3); if (thisFurnace.MaxHeatAirVolFlow <= 0 && thisFurnace.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(3), Numbers(3))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(3), Numbers(3))); ErrorsFound = true; } thisFurnace.MaxNoCoolHeatAirVolFlow = Numbers(4); if (thisFurnace.MaxNoCoolHeatAirVolFlow < 0 && thisFurnace.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(4), Numbers(4))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(4), Numbers(4))); ErrorsFound = true; } @@ -2615,7 +2678,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2629,24 +2692,28 @@ namespace Furnaces { if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.ActualFanVolFlowRate < thisFurnace.MaxCoolAirVolFlow && thisFurnace.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, - 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, format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); + 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))); thisFurnace.MaxCoolAirVolFlow = thisFurnace.ActualFanVolFlowRate; thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } if (thisFurnace.ActualFanVolFlowRate < thisFurnace.MaxHeatAirVolFlow && thisFurnace.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, - 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, format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(3))); + 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))); thisFurnace.MaxHeatAirVolFlow = thisFurnace.ActualFanVolFlowRate; thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } @@ -2680,7 +2747,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -2772,8 +2839,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, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } @@ -2826,17 +2893,17 @@ namespace Furnaces { } } if (!AirNodeFound) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find air node (zone with thermostat)."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find correct AirLoopHVAC."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } @@ -2877,21 +2944,21 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } if (thisFurnace.HeatingCoilType_Num == HVAC::CoilDX_HeatingEmpirical) { ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("...occurs {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2900,7 +2967,7 @@ namespace Furnaces { HeatingCoilInletNode = DXCoils::GetCoilInletNode(state, HeatingCoilType, HeatingCoilName, errFlag); HeatingCoilOutletNode = DXCoils::GetCoilOutletNode(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2908,7 +2975,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignHeatingCapacity = DXCoils::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2916,7 +2983,7 @@ namespace Furnaces { } else if (thisFurnace.HeatingCoilType_Num == HVAC::Coil_HeatingAirToAirVariableSpeed) { ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { if (thisFurnace.bIsIHP) { @@ -2935,8 +3002,8 @@ namespace Furnaces { } } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); ErrorsFound = true; } @@ -2955,7 +3022,7 @@ namespace Furnaces { ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from DX cooling coil @@ -2983,7 +3050,7 @@ namespace Furnaces { CoolingCoilInletNode = DXCoils::GetCoilInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); CoolingCoilOutletNode = DXCoils::GetCoilOutletNode(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2991,7 +3058,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = DXCoils::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3003,7 +3070,7 @@ namespace Furnaces { CoolingCoilInletNode = HVACHXAssistedCoolingCoil::GetCoilInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); CoolingCoilOutletNode = HVACHXAssistedCoolingCoil::GetCoilOutletNode(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3011,7 +3078,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = HVACHXAssistedCoolingCoil::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3025,7 +3092,7 @@ namespace Furnaces { // Furnace(FurnaceNum)%DXCoolCoilName = CoolingCoilName ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { errFlag = false; @@ -3039,7 +3106,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3058,13 +3125,13 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } } @@ -3093,20 +3160,20 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HeatingCoils::GetHeatingCoilTypeNum(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { IsNotOK = false; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3114,7 +3181,7 @@ namespace Furnaces { errFlag = false; SupHeatCoilInletNode = HeatingCoils::GetCoilInletNode(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3123,7 +3190,7 @@ namespace Furnaces { SupHeatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3131,7 +3198,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignSuppHeatingCapacity = HeatingCoils::GetCoilCapacity(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3141,7 +3208,7 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HVAC::Coil_HeatingWater; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -3149,7 +3216,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3157,7 +3224,7 @@ namespace Furnaces { errFlag = false; thisFurnace.MaxSuppCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3166,7 +3233,7 @@ namespace Furnaces { SupHeatCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = SupHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3175,14 +3242,15 @@ namespace Furnaces { SupHeatCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = SupHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::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, - format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError( + state, + EnergyPlus::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; @@ -3193,15 +3261,15 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HVAC::Coil_HeatingSteam; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(12), SuppHeatCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(12), SuppHeatCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3209,7 +3277,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3227,7 +3295,7 @@ namespace Furnaces { SupHeatCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.SuppHeatCoilIndex, SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = SupHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3236,14 +3304,14 @@ namespace Furnaces { SupHeatCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.SuppHeatCoilIndex, SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = SupHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%HeatingCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -3253,9 +3321,9 @@ namespace Furnaces { if (lAlphaBlanks(15)) { thisFurnace.fanOp = HVAC::FanOp::Cycling; if (thisFurnace.fanType != HVAC::FanType::OnOff) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisFurnace.Name)); - ShowContinueError(state, format("{} = {}", cAlphaFields(6), Alphas(6))); - ShowContinueError(state, format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(15))); + 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))); ErrorsFound = true; } } else if ((thisFurnace.fanOpModeSched = Sched::GetSchedule(state, Alphas(15))) == nullptr) { @@ -3274,7 +3342,7 @@ namespace Furnaces { 0.0, Clusive::In, 1.0, - format("For {} = {}, fan operating mode must be continuous (schedule values > 0)", cAlphaFields(7), Alphas(7))); + EnergyPlus::format("For {} = {}, fan operating mode must be continuous (schedule values > 0)", cAlphaFields(7), Alphas(7))); ErrorsFound = true; } @@ -3285,8 +3353,8 @@ namespace Furnaces { thisFurnace.DehumidControlType_Num = DehumidificationControlMode::Multimode; thisFurnace.Humidistat = true; if (thisFurnace.CoolingCoilType_Num != HVAC::CoilDX_CoolingHXAssisted) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(16), Alphas(16))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(16), Alphas(16))); ShowContinueError(state, "Multimode control must be used with a Heat Exchanger Assisted Cooling Coil."); ErrorsFound = true; } @@ -3307,16 +3375,16 @@ namespace Furnaces { AirNodeFound = true; } if (!AirNodeFound) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find Air Node (Zone with Humidistat)."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } } else { // invalid input or blank if (!lAlphaBlanks(16)) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(16), Alphas(16))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(16), Alphas(16))); ErrorsFound = true; } else { thisFurnace.Humidistat = false; @@ -3327,100 +3395,114 @@ namespace Furnaces { // Check node names for child components if (thisFurnace.fanPlace == HVAC::FanPlace::BlowThru) { if (FanInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, - format("...Unitary system inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); ErrorsFound = true; } if (FanOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + 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))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); ErrorsFound = true; } if (HeatingCoilOutletNode != SupHeatCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + state, + EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError( - state, format("...Supplemental heating coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + state, + EnergyPlus::format("...Supplemental heating coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); ErrorsFound = true; } if (SupHeatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Supplemental heating coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); ShowContinueError( state, - format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::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))); ErrorsFound = true; } } else { if (CoolingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); - ShowContinueError(state, - format("...Unitary system inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + 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))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); ErrorsFound = true; } if (HeatingCoilOutletNode != FanInletNode) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + 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))); ErrorsFound = true; } if (FanOutletNode != SupHeatCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, - format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError( - state, format("...Supplemental heating coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + 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))); ErrorsFound = true; } if (SupHeatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("...Supplemental heating coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); ShowContinueError( state, - format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + EnergyPlus::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))); ErrorsFound = true; } } @@ -3455,22 +3537,22 @@ namespace Furnaces { thisFurnace.MaxCoolAirVolFlow = Numbers(1); if (thisFurnace.MaxCoolAirVolFlow <= 0 && thisFurnace.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(1), Numbers(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(1), Numbers(1))); ErrorsFound = true; } thisFurnace.MaxHeatAirVolFlow = Numbers(2); if (thisFurnace.MaxHeatAirVolFlow <= 0 && thisFurnace.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); ErrorsFound = true; } thisFurnace.MaxNoCoolHeatAirVolFlow = Numbers(3); if (thisFurnace.MaxNoCoolHeatAirVolFlow < 0 && thisFurnace.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(3), Numbers(3))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(3), Numbers(3))); ErrorsFound = true; } @@ -3512,7 +3594,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3526,24 +3608,28 @@ namespace Furnaces { if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.ActualFanVolFlowRate < thisFurnace.MaxCoolAirVolFlow && thisFurnace.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, - 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, format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(1))); + 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))); thisFurnace.MaxCoolAirVolFlow = thisFurnace.ActualFanVolFlowRate; thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } if (thisFurnace.ActualFanVolFlowRate < thisFurnace.MaxHeatAirVolFlow && thisFurnace.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, - 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, format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); + 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))); thisFurnace.MaxHeatAirVolFlow = thisFurnace.ActualFanVolFlowRate; thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } @@ -3571,7 +3657,7 @@ namespace Furnaces { errFlag); } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3587,7 +3673,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -3604,7 +3690,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -3704,8 +3790,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, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } @@ -3758,17 +3844,17 @@ namespace Furnaces { } } if (!AirNodeFound) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find air node (zone with thermostat)."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find correct AirLoopHVAC."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } @@ -3779,8 +3865,8 @@ namespace Furnaces { thisFurnace.fanType = static_cast(getEnumValue(HVAC::fanTypeNamesUC, Alphas(6))); if (thisFurnace.fanType != HVAC::FanType::OnOff) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } else if ((thisFurnace.FanIndex = Fans::GetFanIndex(state, FanName)) == 0) { @@ -3801,7 +3887,7 @@ namespace Furnaces { HeatingCoilName = Alphas(9); ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.HeatingCoilIndex = WaterToAirHeatPump::GetCoilIndex(state, HeatingCoilType, HeatingCoilName, errFlag); @@ -3814,7 +3900,7 @@ namespace Furnaces { HeatingCoilName = Alphas(9); ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.HeatingCoilIndex = WaterToAirHeatPumpSimple::GetCoilIndex(state, HeatingCoilType, HeatingCoilName, errFlag); @@ -3827,7 +3913,7 @@ namespace Furnaces { HeatingCoilName = Alphas(9); ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.HeatingCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, HeatingCoilType, HeatingCoilName, errFlag); @@ -3835,8 +3921,8 @@ namespace Furnaces { HeatingCoilOutletNode = VariableSpeedCoils::GetCoilOutletNodeVariableSpeed(state, HeatingCoilType, HeatingCoilName, errFlag); } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); ErrorsFound = true; } @@ -3847,7 +3933,7 @@ namespace Furnaces { CoolingCoilName = Alphas(11); ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.CoolingCoilIndex = WaterToAirHeatPump::GetCoilIndex(state, CoolingCoilType, CoolingCoilName, errFlag); @@ -3860,7 +3946,7 @@ namespace Furnaces { CoolingCoilName = Alphas(11); ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.CoolingCoilIndex = WaterToAirHeatPumpSimple::GetCoilIndex(state, CoolingCoilType, CoolingCoilName, errFlag); @@ -3873,7 +3959,7 @@ namespace Furnaces { CoolingCoilName = Alphas(11); ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.CoolingCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, CoolingCoilType, CoolingCoilName, errFlag); @@ -3881,8 +3967,8 @@ namespace Furnaces { CoolingCoilOutletNode = VariableSpeedCoils::GetCoilOutletNodeVariableSpeed(state, CoolingCoilType, CoolingCoilName, errFlag); } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } @@ -3903,7 +3989,7 @@ namespace Furnaces { thisFurnace.WatertoAirHPType = WAHPCoilType::VarSpeedEquationFit; VariableSpeedCoils::SetVarSpeedCoilData(state, thisFurnace.CoolingCoilIndex, ErrorsFound, _, thisFurnace.HeatingCoilIndex); } else { - ShowContinueError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Cooling coil and heating coil should be of same general type"); ErrorsFound = true; } @@ -3919,20 +4005,20 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HeatingCoils::GetHeatingCoilTypeNum(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { IsNotOK = false; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3940,7 +4026,7 @@ namespace Furnaces { errFlag = false; SupHeatCoilInletNode = HeatingCoils::GetCoilInletNode(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3948,7 +4034,7 @@ namespace Furnaces { errFlag = false; SupHeatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3956,7 +4042,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignSuppHeatingCapacity = HeatingCoils::GetCoilCapacity(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3966,7 +4052,7 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HVAC::Coil_HeatingWater; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -3974,7 +4060,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3982,7 +4068,7 @@ namespace Furnaces { errFlag = false; thisFurnace.MaxSuppCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3991,7 +4077,7 @@ namespace Furnaces { SupHeatCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = SupHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4000,15 +4086,16 @@ namespace Furnaces { SupHeatCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = SupHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::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, - format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError( + state, + EnergyPlus::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; @@ -4019,15 +4106,15 @@ namespace Furnaces { thisFurnace.SuppHeatCoilType_Num = HVAC::Coil_HeatingSteam; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(12), SuppHeatCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(12), SuppHeatCoilName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4035,7 +4122,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4053,7 +4140,7 @@ namespace Furnaces { SupHeatCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.SuppHeatCoilIndex, SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = SupHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4062,14 +4149,14 @@ namespace Furnaces { SupHeatCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.SuppHeatCoilIndex, SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = SupHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%HeatingCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -4088,8 +4175,9 @@ namespace Furnaces { DataLoopNode::ObjectIsNotParent); // need better verification. if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisFurnace.CondenserNodeNum)) { - ShowSevereError(state, format("For {} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format(" Node name of outdoor dry-bulb temperature sensor not valid outdoor air node= {}", Alphas(14))); + 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))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -4101,9 +4189,9 @@ namespace Furnaces { if (lAlphaBlanks(16)) { thisFurnace.fanOp = HVAC::FanOp::Cycling; if (thisFurnace.fanType != HVAC::FanType::OnOff) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisFurnace.Name)); - ShowContinueError(state, format("{} = {}", cAlphaFields(6), Alphas(6))); - ShowContinueError(state, format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(16))); + 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))); ErrorsFound = true; } } else if ((thisFurnace.fanOpModeSched = Sched::GetSchedule(state, Alphas(16))) == nullptr) { @@ -4118,7 +4206,7 @@ namespace Furnaces { thisFurnace.DehumidControlType_Num = DehumidificationControlMode::CoolReheat; thisFurnace.Humidistat = true; if (lAlphaBlanks(17)) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::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."); @@ -4138,16 +4226,16 @@ namespace Furnaces { AirNodeFound = true; } if (!AirNodeFound) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find Air Node (Zone with Humidistat)."); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } } else { // invalid input or blank if (!lAlphaBlanks(17)) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(17), Alphas(17))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(17), Alphas(17))); ErrorsFound = true; } else { thisFurnace.Humidistat = false; @@ -4161,55 +4249,66 @@ namespace Furnaces { CompSetFanInlet = Alphas(3); CompSetCoolInlet = "UNDEFINED"; if (FanInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError( - state, format("For {} = {}, Mismatch between unitary system inlet node and fan inlet node.", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, + EnergyPlus::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, format("..HeatPump Inlet Node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); - ShowContinueError(state, format("..Fan Inlet Node = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, + EnergyPlus::format("..HeatPump Inlet Node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("..Fan Inlet Node = {}", state.dataLoopNodes->NodeID(FanInletNode))); ErrorsFound = true; } if (FanOutletNode != CoolingCoilInletNode) { - ShowSevereError( - state, format("For {} = {}, Mismatch between fan outlet node and cooling coil inlet node.", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, + EnergyPlus::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, format("..Fan outlet node = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("..Cooling coil inlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, EnergyPlus::format("..Fan outlet node = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, EnergyPlus::format("..Cooling coil inlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { ShowSevereError(state, - format("For {} = {}, Mismatch between cooling coil outlet node and heating coil inlet node.", - CurrentModuleObject, - Alphas(1))); + EnergyPlus::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, format("..Cooling coil outlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("..Heating coil inlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, + EnergyPlus::format("..Cooling coil outlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::format("..Heating coil inlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != SupHeatCoilInletNode) { - ShowSevereError(state, - format("For {} = {}, Mismatch between heating coil outlet node and supplemental heating coil inlet node.", + ShowSevereError( + state, + EnergyPlus::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, - format("..Heating coil outlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, - format("..Supplemental heating coil inlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + 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))); ErrorsFound = true; } if (SupHeatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, - format("For {} = {}, Mismatch between supplemental heating coil outlet node and HeatPump outlet node.", + ShowSevereError( + state, + EnergyPlus::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, - format("..Supplemental heating coil outlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); ShowContinueError( - state, format("..HeatPump outlet node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + state, + EnergyPlus::format("..Supplemental heating coil outlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::format("..HeatPump outlet node = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); ErrorsFound = true; } } else { @@ -4217,57 +4316,67 @@ namespace Furnaces { CompSetCoolInlet = Alphas(3); if (CoolingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { ShowSevereError(state, - format("For {} = {}, Mismatch between unitary system inlet node and cooling coil inlet node.", - CurrentModuleObject, - Alphas(1))); + EnergyPlus::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, format("..HeatPump inlet node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); - ShowContinueError(state, format("..Cooling coil inlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError( + state, EnergyPlus::format("..HeatPump inlet node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("..Cooling coil inlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { ShowSevereError(state, - format("For {} = {}, Mismatch between cooling coil outlet node and heating coil inlet node.", - CurrentModuleObject, - Alphas(1))); + EnergyPlus::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, format("..Cooling coil outlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("..Heating coil inlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, + EnergyPlus::format("..Cooling coil outlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::format("..Heating coil inlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != FanInletNode) { - ShowSevereError( - state, format("For {} = {}, Mismatch between heating coil outlet node and fan inlet node.", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, + EnergyPlus::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, format("..Heating coil outlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("..Fan inlet node = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, + EnergyPlus::format("..Heating coil outlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, EnergyPlus::format("..Fan inlet node = {}", state.dataLoopNodes->NodeID(FanInletNode))); ErrorsFound = true; } if (FanOutletNode != SupHeatCoilInletNode) { ShowSevereError(state, - format("For {} = {}, Mismatch between fan outlet node and supplemental heating coil inlet node.", - CurrentModuleObject, - Alphas(1))); + EnergyPlus::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, format("..Fan outlet node = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - format("..Supplemental heating coil inlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + EnergyPlus::format("..Fan outlet node = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError( + state, EnergyPlus::format("..Supplemental heating coil inlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); ErrorsFound = true; } if (SupHeatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, - format("For {} = {}, Mismatch between supplemental heating coil outlet node and HeatPump outlet node.", + ShowSevereError( + state, + EnergyPlus::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, - format("..Supplemental heating coil outlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); ShowContinueError( - state, format("..HeatPump outlet node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + state, + EnergyPlus::format("..Supplemental heating coil outlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); + ShowContinueError(state, + EnergyPlus::format("..HeatPump outlet node = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); ErrorsFound = true; } } @@ -4302,7 +4411,7 @@ namespace Furnaces { thisFurnace.MaxHeatAirVolFlow = WaterToAirHeatPumpSimple::GetCoilAirFlowRate(state, HeatingCoilType, HeatingCoilName, errFlag); thisFurnace.MaxCoolAirVolFlow = WaterToAirHeatPumpSimple::GetCoilAirFlowRate(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.HeatingCoilType_Num == HVAC::Coil_HeatingWaterToAirHPVSEquationFit) { @@ -4310,7 +4419,7 @@ namespace Furnaces { thisFurnace.MaxHeatAirVolFlow = VariableSpeedCoils::GetCoilAirFlowRateVariableSpeed(state, HeatingCoilType, HeatingCoilName, errFlag); thisFurnace.MaxCoolAirVolFlow = VariableSpeedCoils::GetCoilAirFlowRateVariableSpeed(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -4326,21 +4435,21 @@ namespace Furnaces { if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize && thisFurnace.DesignFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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, - format("... Entered value={:.2R}... Fan [{}:{}] Max Value={:.2R}", - thisFurnace.DesignFanVolFlowRate, - HVAC::fanTypeNames[(int)thisFurnace.fanType], - FanName, - thisFurnace.ActualFanVolFlowRate)); + EnergyPlus::format("... Entered value={:.2R}... Fan [{}:{}] Max Value={:.2R}", + thisFurnace.DesignFanVolFlowRate, + HVAC::fanTypeNames[(int)thisFurnace.fanType], + FanName, + thisFurnace.ActualFanVolFlowRate)); } } if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize && thisFurnace.DesignFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate <= 0.0) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "... has a Design Fan Flow Rate <= 0.0, it must be >0.0"); - ShowContinueError(state, format("... Entered value={:.2R}", thisFurnace.DesignFanVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}", thisFurnace.DesignFanVolFlowRate)); ErrorsFound = true; } } @@ -4351,14 +4460,14 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignHeatingCapacity = WaterToAirHeatPump::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.HeatingCoilType_Num == HVAC::Coil_HeatingWaterToAirHPSimple) { errFlag = false; thisFurnace.DesignHeatingCapacity = WaterToAirHeatPumpSimple::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.HeatingCoilType_Num == HVAC::Coil_HeatingWaterToAirHPVSEquationFit) { @@ -4366,7 +4475,7 @@ namespace Furnaces { thisFurnace.DesignHeatingCapacity = VariableSpeedCoils::GetCoilCapacityVariableSpeed(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -4378,14 +4487,14 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = WaterToAirHeatPump::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.CoolingCoilType_Num == HVAC::Coil_CoolingWaterToAirHPSimple) { errFlag = false; thisFurnace.DesignCoolingCapacity = WaterToAirHeatPumpSimple::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.CoolingCoilType_Num == HVAC::Coil_CoolingWaterToAirHPVSEquationFit) { @@ -4393,7 +4502,7 @@ namespace Furnaces { thisFurnace.DesignCoolingCapacity = VariableSpeedCoils::GetCoilCapacityVariableSpeed(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -4820,9 +4929,9 @@ namespace Furnaces { if (thisFurnace.type == HVAC::UnitarySysType::Unitary_HeatPump_AirToAir) { if (std::abs(thisFurnace.DesignCoolingCapacity - thisFurnace.DesignHeatingCapacity) / thisFurnace.DesignCoolingCapacity > 0.2) { ShowWarningError(state, - format("{} \"{}\" heating capacity is disproportionate (> 20% different) to total cooling capacity", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::format("{} \"{}\" heating capacity is disproportionate (> 20% different) to total cooling capacity", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); } } } @@ -4833,21 +4942,21 @@ namespace Furnaces { if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) { ShowWarningError(state, - format("{}={} has a Design Fan Volume Flow Rate > Max Fan Volume Flow Rate, should be <=", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::format("{}={} has a Design Fan Volume Flow Rate > Max Fan Volume Flow Rate, should be <=", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, - format("... Entered value={:.2R}... Fan [{}] Max Value={:.2R}", - thisFurnace.DesignFanVolFlowRate, - HVAC::fanTypeNames[(int)thisFurnace.fanType], - thisFurnace.ActualFanVolFlowRate)); + EnergyPlus::format("... Entered value={:.2R}... Fan [{}] Max Value={:.2R}", + thisFurnace.DesignFanVolFlowRate, + HVAC::fanTypeNames[(int)thisFurnace.fanType], + thisFurnace.ActualFanVolFlowRate)); } if (thisFurnace.DesignFanVolFlowRate <= 0.0) { ShowSevereError(state, - format("{}={} has a Design Fan Volume Flow Rate <= 0.0, it must be >0.0", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); - ShowContinueError(state, format("... Entered value={:.2R}", thisFurnace.DesignFanVolFlowRate)); + EnergyPlus::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)); } state.dataFurnaces->MySecondOneTimeFlag(FurnaceNum) = false; @@ -5072,14 +5181,16 @@ namespace Furnaces { thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxCoolAirVolFlow && thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxNoCoolHeatAirVolFlow) { std::string FanName = state.dataFans->fans(thisFurnace.FanIndex)->Name; - ShowWarningError(state, format("{} \"{}\"", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); - ShowContinueError(state, - format("...For fan type and name = {} \"{}\"", HVAC::fanTypeNames[(int)thisFurnace.fanType], FanName)); + 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)); 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."); - ShowContinueError(state, format("...Fan volumetric flow rate = {:.5R} m3/s.", thisFurnace.ActualFanVolFlowRate)); - ShowContinueError(state, format("...Unitary system volumetric flow rate = {:.5R} m3/s.", thisFurnace.MaxHeatAirVolFlow)); + ShowContinueError( + state, EnergyPlus::format("...Fan volumetric flow rate = {:.5R} m3/s.", thisFurnace.ActualFanVolFlowRate)); + ShowContinueError(state, + EnergyPlus::format("...Unitary system volumetric flow rate = {:.5R} m3/s.", thisFurnace.MaxHeatAirVolFlow)); } } state.dataFurnaces->MyFanFlag(FurnaceNum) = false; @@ -5102,15 +5213,17 @@ namespace Furnaces { } state.dataFurnaces->MyCheckFlag(FurnaceNum) = false; if (thisFurnace.ZoneSequenceCoolingNum == 0 || thisFurnace.ZoneSequenceHeatingNum == 0) { - ShowSevereError(state, - format("{} \"{}\": Airloop air terminal in the zone equipment list for zone = {} not found or is not allowed Zone " + 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, - format("Subroutine InitFurnace: Errors found in getting {} input. Preceding condition(s) causes termination.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type])); + ShowFatalError( + state, + EnergyPlus::format("Subroutine InitFurnace: Errors found in getting {} input. Preceding condition(s) causes termination.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type])); } } @@ -5151,7 +5264,7 @@ namespace Furnaces { if (CntrlZoneTerminalUnitMassFlowRateMax >= HVAC::SmallAirVolFlow) { thisFurnace.ControlZoneMassFlowFrac = CntrlZoneTerminalUnitMassFlowRateMax / SumOfMassFlowRateMax; } else { - ShowSevereError(state, format("{} = {}", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); + ShowSevereError(state, EnergyPlus::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, @@ -5353,15 +5466,16 @@ namespace Furnaces { if (thisFurnace.FanVolFlow != DataSizing::AutoSize) { // Check fan versus system supply air flow rates if (thisFurnace.FanVolFlow + 1e-10 < thisFurnace.CoolVolumeFlowRate(NumOfSpeedCooling)) { - ShowWarningError(state, - 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))); + 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))); ShowContinueError( state, " The MSHP system flow rate when cooling is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::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 @@ -5374,27 +5488,31 @@ namespace Furnaces { // Check flow rates in other speeds and ensure flow rates are not above the max flow rate for (int i = NumOfSpeedCooling - 1; i >= 1; --i) { if (thisFurnace.CoolVolumeFlowRate(i) > thisFurnace.CoolVolumeFlowRate(i + 1)) { - ShowContinueError(state, - 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, format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + 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)); thisFurnace.CoolVolumeFlowRate(i) = thisFurnace.CoolVolumeFlowRate(i + 1); } } } if (NumOfSpeedHeating > 0) { if (thisFurnace.FanVolFlow + 1e-10 < thisFurnace.HeatVolumeFlowRate(NumOfSpeedHeating)) { - ShowWarningError(state, - 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, + 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))); ShowContinueError( state, " The MSHP system flow rate when heating is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, + EnergyPlus::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 @@ -5406,28 +5524,31 @@ namespace Furnaces { for (int i = NumOfSpeedHeating - 1; i >= 1; --i) { if (thisFurnace.HeatVolumeFlowRate(i) > thisFurnace.HeatVolumeFlowRate(i + 1)) { - ShowContinueError(state, - 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, - format(" Occurs in {} system = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + 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)); thisFurnace.HeatVolumeFlowRate(i) = thisFurnace.HeatVolumeFlowRate(i + 1); } } } } if (thisFurnace.FanVolFlow < thisFurnace.IdleVolumeAirRate && thisFurnace.IdleVolumeAirRate != 0.0) { - ShowWarningError(state, - 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, + 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)); 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, format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); thisFurnace.IdleVolumeAirRate = thisFurnace.FanVolFlow; } RhoAir = state.dataEnvrn->StdRhoAir; @@ -5968,11 +6089,12 @@ namespace Furnaces { auto const &thisCoil = state.dataDXCoils->DXCoil(thisFurnace.CoolingCoilIndex); state.dataSize->DataTotCapCurveIndex = thisCoil.CCapFTemp(thisCoil.NumCapacityStages); } else { - ShowWarningError(state, - format("Developer Error in Heat Pump ACCA Sizing: cooling coil not found for {}:{} with coil type = {}.", - thisFurnace.type, - thisFurnace.Name, - HVAC::cAllCoilTypes(thisFurnace.CoolingCoilIndex))); + ShowWarningError( + state, + EnergyPlus::format("Developer Error in Heat Pump ACCA Sizing: cooling coil not found for {}:{} with coil type = {}.", + thisFurnace.type, + thisFurnace.Name, + HVAC::cAllCoilTypes(thisFurnace.CoolingCoilIndex))); } } Real64 TempSize = thisFurnace.DesignCoolingCapacity; @@ -6635,17 +6757,18 @@ namespace Furnaces { if (state.dataFurnaces->Iter > MaxIter) { if (thisFurnace.HeatingMaxIterIndex2 == 0) { - ShowWarningMessage(state, - format("{} \"{}\" -- Exceeded max heating iterations ({}) while adjusting furnace runtime.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name, - MaxIter)); + ShowWarningMessage( + state, + EnergyPlus::format("{} \"{}\" -- Exceeded max heating iterations ({}) while adjusting furnace runtime.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name, + MaxIter)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" -- Exceeded max heating iterations error continues...", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::format("{} \"{}\" -- Exceeded max heating iterations error continues...", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.HeatingMaxIterIndex2); } @@ -7003,45 +7126,49 @@ namespace Furnaces { if (std::abs(SystemSensibleLoad - TempHeatOutput) > HVAC::SmallLoad) { if (thisFurnace.DXHeatingMaxIterIndex == 0) { ShowWarningMessage(state, - format("Heating coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, - 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)); + 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)); } - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + thisFurnace.DXHeatingMaxIterIndex, + SystemSensibleLoad, + SystemSensibleLoad); } } else if (SolFlag == -2) { if (thisFurnace.DXHeatingRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - format("Heating coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, - format("Sensible load to be met by DX heating coil = {:.2T} (watts), and the simulation continues.", - SystemSensibleLoad)); + EnergyPlus::format( + "Sensible load to be met by DX heating coil = {:.2T} (watts), and the simulation continues.", + SystemSensibleLoad)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - DX sensible heating part-load ratio out of range error continues. Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::format( + "{} \"{}\" - DX sensible heating part-load ratio out of range error continues. Sensible load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.DXHeatingRegulaFalsiFailedIndex, SystemSensibleLoad, SystemSensibleLoad); @@ -7299,22 +7426,23 @@ namespace Furnaces { if (SolFlag == -1 && std::abs(SystemSensibleLoad - TempHeatOutput) > HVAC::SmallLoad) { if (thisFurnace.HeatingMaxIterIndex == 0) { ShowWarningMessage(state, - format("Heating coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, - format("Sensible load to be met by heating coil = {:.2T} (watts), sensible output " - "of heating coil = {:.2T} (watts), and the simulation continues.", - SystemSensibleLoad, - TempHeatOutput)); + 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)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Iteration limit exceeded in calculating sensible heating part-load " - "ratio error continues. Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::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); @@ -7322,20 +7450,21 @@ namespace Furnaces { } else if (SolFlag == -2) { if (thisFurnace.HeatingRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - format("Heating coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, - format("Sensible load to be met by heating coil = {:.2T} (watts), and the simulation continues.", - SystemSensibleLoad)); + EnergyPlus::format("Sensible load to be met by heating coil = {:.2T} (watts), and the simulation continues.", + SystemSensibleLoad)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Sensible heating part-load ratio out of range error continues. Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::format( + "{} \"{}\" - Sensible heating part-load ratio out of range error continues. Sensible load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.HeatingRegulaFalsiFailedIndex, SystemSensibleLoad, SystemSensibleLoad); @@ -7525,23 +7654,24 @@ namespace Furnaces { if (std::abs(CoolCoilLoad - TempCoolOutput) > HVAC::SmallLoad) { if (thisFurnace.SensibleMaxIterIndex == 0) { ShowWarningMessage(state, - format("Cooling coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, - format("Sensible load to be met by DX coil = {:.2T} (watts), sensible " - "output of DX coil = {:.2T} (watts), and the simulation continues.", - CoolCoilLoad, - TempCoolOutput)); + 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)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Iteration limit exceeded in calculating sensible cooling " - "part-load ratio error continues. Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::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); @@ -7551,18 +7681,19 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.SensibleRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - format("Cooling coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, format(" Cooling sensible load = {:.2T}", CoolCoilLoad)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Cooling sensible load = {:.2T}", CoolCoilLoad)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Cooling sensible part-load ratio out of range error continues. Sensible cooling load " - "statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::format( + "{} \"{}\" - Cooling sensible part-load ratio out of range error continues. Sensible cooling load " + "statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.SensibleRegulaFalsiFailedIndex, CoolCoilLoad, CoolCoilLoad); @@ -7842,28 +7973,30 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.LatentMaxIterIndex == 0) { ShowWarningMessage(state, - format("Cooling coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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( + ShowContinueError(state, + EnergyPlus::format(" Latent load convergence error (percent) = {:.2T}", + 100.0 * std::abs((SystemMoistureLoad - TempLatentOutput) / + SystemMoistureLoad))); + ShowContinueErrorTimeStamp( state, - format(" Latent load convergence error (percent) = {:.2T}", - 100.0 * std::abs((SystemMoistureLoad - TempLatentOutput) / SystemMoistureLoad))); - ShowContinueErrorTimeStamp(state, - format("Moisture load to be met by DX coil = {:.2T} (watts), Latent " - "output of DX coil = {:.2T} (watts), and the simulation continues.", - SystemMoistureLoad, - TempLatentOutput)); + 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)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Iteration limit exceeded in calculating latent part-load ratio error continues. " - "Latent " - "load convergence error (percent) statistics follow.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::format( + "{} \"{}\" - Iteration limit exceeded in calculating latent part-load ratio error continues. " + "Latent " + "load convergence error (percent) statistics follow.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.LatentMaxIterIndex, 100.0 * std::abs((SystemMoistureLoad - TempLatentOutput) / SystemMoistureLoad), 100.0 * std::abs((SystemMoistureLoad - TempLatentOutput) / SystemMoistureLoad)); @@ -7872,40 +8005,43 @@ namespace Furnaces { } else if (SolFlag == -2) { if (thisFurnace.LatentRegulaFalsiFailedIndex2 == 0) { ShowWarningMessage(state, - format("Cooling coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); - ShowContinueError(state, - format(" Latent part-load ratio determined to be outside the range of {:.3T} to {:.3T}.", - TempMinPLR, - TempMaxPLR)); - ShowContinueErrorTimeStamp(state, - format("A PLR of {:.3T} will be used and the simulation continues.", TempMinPLR)); + EnergyPlus::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)); + ShowContinueErrorTimeStamp( + state, EnergyPlus::format("A PLR of {:.3T} will be used and the simulation continues.", TempMinPLR)); } - ShowRecurringWarningErrorAtEnd(state, - 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, + 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); LatentPartLoadRatio = TempMinPLR; } } else if (SolFlag == -2) { if (thisFurnace.LatentRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - format("Cooling coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, - format("{} \"{}\" - Latent part-load ratio out of range or 0-1 error continues. System moisture load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::format( + "{} \"{}\" - Latent part-load ratio out of range or 0-1 error continues. System moisture load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.LatentRegulaFalsiFailedIndex, SystemMoistureLoad, SystemMoistureLoad); @@ -8304,22 +8440,23 @@ namespace Furnaces { if (std::abs(ZoneSensLoadMet - TotalZoneSensLoad) / TotalZoneSensLoad > CoolErrorToler) { if (thisFurnace.SensibleMaxIterIndex == 0) { ShowWarningMessage(state, - format("Cooling coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, - format("Sensible load to be met by DX coil = {:.2T} (watts), sensible output of DX coil = " - "{:.2T} (watts), and the simulation continues.", - TotalZoneSensLoad, - ZoneSensLoadMet)); + 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)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Iteration limit exceeded in calculating sensible cooling part-load ratio error " - "continues. Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::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); @@ -8342,22 +8479,25 @@ namespace Furnaces { false); if ((ZoneSensLoadMet - TotalZoneSensLoad) / TotalZoneSensLoad > CoolErrorToler) { if (thisFurnace.SensibleRegulaFalsiFailedIndex == 0) { - ShowWarningMessage( - state, - format("Cooling coil control failed for {}:{}", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); + ShowWarningMessage(state, + EnergyPlus::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, - format(" An estimated part-load ratio = {:.2T} will be used and the simulation continues.", CoolPartLoadRatio)); - ShowContinueError( - state, format(" The estimated part-load ratio provides a cooling sensible capacity = {:.2T}", ZoneSensLoadMet)); - ShowContinueErrorTimeStamp(state, format(" Cooling sensible load required = {:.2T}", TotalZoneSensLoad)); + EnergyPlus::format(" The estimated part-load ratio provides a cooling sensible capacity = {:.2T}", ZoneSensLoadMet)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Cooling sensible load required = {:.2T}", TotalZoneSensLoad)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Cooling sensible part-load ratio out of range error continues. Sensible cooling load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::format( + "{} \"{}\" - Cooling sensible part-load ratio out of range error continues. Sensible cooling load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.SensibleRegulaFalsiFailedIndex, TotalZoneSensLoad, TotalZoneSensLoad); @@ -8507,21 +8647,23 @@ namespace Furnaces { if (std::abs(ZoneSensLoadMet - TotalZoneSensLoad) / TotalZoneSensLoad > HeatErrorToler) { if (thisFurnace.WSHPHeatMaxIterIndex == 0) { ShowWarningMessage(state, - format("Heating coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::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, - format("Sensible load to be met by DX coil = {:.2T} (watts), sensible output of DX coil = " - "{:.2T} (watts), and the simulation continues.", - TotalZoneSensLoad, - ZoneSensLoadMet)); + 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)); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Iteration limit exceeded in calculating sensible heating part-load ratio error continues.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::format( + "{} \"{}\" - Iteration limit exceeded in calculating sensible heating part-load ratio error continues.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.WSHPHeatMaxIterIndex, TotalZoneSensLoad, TotalZoneSensLoad); @@ -8543,24 +8685,27 @@ namespace Furnaces { false); if ((ZoneSensLoadMet - TotalZoneSensLoad) / TotalZoneSensLoad > HeatErrorToler) { if (thisFurnace.WSHPHeatRegulaFalsiFailedIndex == 0) { - ShowWarningError( - state, - format("Heating coil control failed for {}:{}", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); + ShowWarningError(state, + EnergyPlus::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, - format(" An estimated part-load ratio = {:.2T} will be used and the simulation continues.", HeatPartLoadRatio)); - ShowContinueError( - state, format(" The estimated part-load ratio provides a heating sensible capacity = {:.2T}", ZoneSensLoadMet)); - ShowContinueErrorTimeStamp(state, format(" Heating sensible load required = {:.2T}", TotalZoneSensLoad)); + EnergyPlus::format(" The estimated part-load ratio provides a heating sensible capacity = {:.2T}", ZoneSensLoadMet)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Heating sensible load required = {:.2T}", TotalZoneSensLoad)); } - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" - Heating sensible part-load ratio out of range error continues.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), - thisFurnace.WSHPHeatRegulaFalsiFailedIndex, - TotalZoneSensLoad, - 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); } } } @@ -9495,40 +9640,43 @@ namespace Furnaces { if (SolFlag == -1) { if (thisFurnace.HotWaterCoilMaxIterIndex == 0) { ShowWarningMessage(state, - format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError( + state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", - SolveMaxIter, - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + EnergyPlus::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, - format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + ShowWarningMessage( + state, + EnergyPlus::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, format("...Given minimum water flow rate={:.3R} kg/s", MinWaterFlow)); - ShowContinueError(state, format("...Given maximum water flow rate={:.3R} kg/s", MaxHotWaterFlow)); + 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, - 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, + 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]"); } } } else { @@ -10063,9 +10211,10 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.ErrCountCyc == 0) { ++thisFurnace.ErrCountCyc; - ShowWarningError( - state, format("Iteration limit exceeded calculating VS WSHP unit cycling ratio, for unit={}", thisFurnace.Name)); - ShowContinueErrorTimeStamp(state, format("Cycling ratio returned={:.2R}", PartLoadFrac)); + ShowWarningError(state, + EnergyPlus::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( state, @@ -10076,8 +10225,9 @@ namespace Furnaces { } } } else if (SolFla == -2) { - ShowFatalError( - state, format("VS WSHP unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", thisFurnace.Name)); + ShowFatalError(state, + EnergyPlus::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 @@ -10135,9 +10285,11 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.ErrCountVar == 0) { ++thisFurnace.ErrCountVar; - ShowWarningError( - state, format("Iteration limit exceeded calculating VS WSHP unit speed ratio, for unit={}", thisFurnace.Name)); - ShowContinueErrorTimeStamp(state, format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); + ShowWarningError(state, + EnergyPlus::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 { ShowRecurringWarningErrorAtEnd( state, @@ -10148,8 +10300,9 @@ namespace Furnaces { } } } else if (SolFla == -2) { - ShowFatalError( - state, format("VS WSHP unit compressor speed calculation failed: speed limits exceeded, for unit={}", thisFurnace.Name)); + ShowFatalError(state, + EnergyPlus::format("VS WSHP unit compressor speed calculation failed: speed limits exceeded, for unit={}", + thisFurnace.Name)); } } } else { @@ -10212,9 +10365,11 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.ErrCountVar2 == 0) { ++thisFurnace.ErrCountVar2; - ShowWarningError(state, - format("Iteration limit exceeded calculating VS WSHP unit speed ratio, for unit={}", thisFurnace.Name)); - ShowContinueErrorTimeStamp(state, format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); + ShowWarningError( + state, + EnergyPlus::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 { ShowRecurringWarningErrorAtEnd(state, thisFurnace.Name + @@ -10225,8 +10380,9 @@ namespace Furnaces { } } } else if (SolFla == -2) { - ShowFatalError(state, - format("VS WSHP unit compressor speed calculation failed: speed limits exceeded, for unit={}", thisFurnace.Name)); + ShowFatalError( + state, + EnergyPlus::format("VS WSHP unit compressor speed calculation failed: speed limits exceeded, for unit={}", thisFurnace.Name)); } } } @@ -11156,7 +11312,7 @@ namespace Furnaces { if (Util::SameString(ChildCoolingCoilType, "COIL:COOLING:DX")) { int childCCIndex_DX = CoilCoolingDX::factory(state, ChildCoolingCoilName); if (childCCIndex_DX < 0) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); errFlag = true; ErrorsFound = true; } @@ -11175,7 +11331,7 @@ namespace Furnaces { thisFurnace.MinOATCompressorCooling = -1000.0; } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -11189,7 +11345,7 @@ namespace Furnaces { thisFurnace.MinOATCompressorHeating = -1000.0; } if (errFlag) { - ShowContinueError(state, format("...occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/General.cc b/src/EnergyPlus/General.cc index b44cf2fae5e..2cad6830e49 100644 --- a/src/EnergyPlus/General.cc +++ b/src/EnergyPlus/General.cc @@ -352,7 +352,7 @@ void ProcessDateString(EnergyPlusData &state, PDay = 0; DateType = Weather::DateType::MonthDay; } else if (FstNum < 0 || FstNum > 366) { - ShowSevereError(state, format("Invalid Julian date Entered={}", String)); + ShowSevereError(state, EnergyPlus::format("Invalid Julian date Entered={}", String)); ErrorsFound = true; } else { InvOrdinalDay(FstNum, PMonth, PDay, 0); @@ -451,7 +451,7 @@ void DetermineDateTokens(EnergyPlusData &state, strip(CurrentString); if (CurrentString == BlankString) { - ShowSevereError(state, format("Invalid date field={}", String)); + ShowSevereError(state, EnergyPlus::format("Invalid date field={}", String)); ErrorsFound = true; } else { int Loop = 0; @@ -473,7 +473,7 @@ void DetermineDateTokens(EnergyPlusData &state, strip(CurrentString); } if (not_blank(CurrentString)) { - ShowSevereError(state, format("Invalid date field={}", String)); + ShowSevereError(state, EnergyPlus::format("Invalid date field={}", String)); ErrorsFound = true; } else if (Loop == 2) { // Field must be Day Month or Month Day (if both numeric, mon / day) @@ -483,7 +483,7 @@ void DetermineDateTokens(EnergyPlusData &state, // Month day, but first field is not numeric, 2nd must be NumField2 = int(Util::ProcessNumber(Fields(2), errFlag)); if (errFlag) { - ShowSevereError(state, format("Invalid date field={}", String)); + ShowSevereError(state, EnergyPlus::format("Invalid date field={}", String)); InternalError = true; } else { TokenDay = NumField2; @@ -561,7 +561,7 @@ void DetermineDateTokens(EnergyPlusData &state, } } } else { // error.... - ShowSevereError(state, format("First date field not numeric, field={}", String)); + ShowSevereError(state, EnergyPlus::format("First date field not numeric, field={}", String)); } } } else { // mm/dd/yyyy or yyyy/mm/dd @@ -586,7 +586,7 @@ void DetermineDateTokens(EnergyPlusData &state, } } else { // Not enough or too many fields - ShowSevereError(state, format("Invalid date field={}", String)); + ShowSevereError(state, EnergyPlus::format("Invalid date field={}", String)); ErrorsFound = true; } } @@ -625,7 +625,7 @@ void ValidateMonthDay(EnergyPlusData &state, } } if (InternalError) { - ShowSevereError(state, format("Invalid Month Day date format={}", String)); + ShowSevereError(state, EnergyPlus::format("Invalid Month Day date format={}", String)); ErrorsFound = true; } else { ErrorsFound = false; @@ -804,10 +804,10 @@ std::string CreateSysTimeIntervalString(EnergyPlusData &state) ++ActualTimeHrS; ActualTimeMinS = 0; } - const std::string TimeStmpS = format("{:02}:{:02}", ActualTimeHrS, ActualTimeMinS); + const std::string TimeStmpS = EnergyPlus::format("{:02}:{:02}", ActualTimeHrS, ActualTimeMinS); Real64 minutes = ((ActualTimeE - static_cast(ActualTimeE)) * FracToMin); - std::string TimeStmpE = format("{:02}:{:2.0F}", static_cast(ActualTimeE), minutes); + std::string TimeStmpE = EnergyPlus::format("{:02}:{:2.0F}", static_cast(ActualTimeE), minutes); if (TimeStmpE[3] == ' ') { TimeStmpE[3] = '0'; @@ -1155,16 +1155,17 @@ void ScanForReports(EnergyPlusData &state, state.dataGlobal->ShowDecayCurvesInEIO = true; break; default: // including empty - ShowWarningError(state, format("{}: No {} supplied.", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1))); + ShowWarningError(state, + EnergyPlus::format("{}: No {} supplied.", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1))); ShowContinueError(state, R"( Legal values are: "Lines", "Vertices", "Details", "DetailsWithVertices", "CostInfo", "ViewFactorIinfo".)"); } } catch (int e) { ShowWarningError(state, - format("{}: Invalid {}=\"{}\" supplied.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}: Invalid {}=\"{}\" supplied.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, R"( Legal values are: "Lines", "Vertices", "Details", "DetailsWithVertices", "CostInfo", "ViewFactorIinfo".)"); } @@ -1426,14 +1427,15 @@ void CheckCreatedZoneItemName(EnergyPlusData &state, bool TooLong = false; if (ItemLength > Constant::MaxNameLength) { ShowWarningError(state, fmt::format("{}{} Combination of ZoneList and Object Name generate a name too long.", calledFrom, CurrentObject)); - ShowContinueError(state, format("Object Name=\"{}\".", ItemName)); - ShowContinueError(state, format("ZoneList/Zone Name=\"{}\".", ZoneName)); + ShowContinueError(state, EnergyPlus::format("Object Name=\"{}\".", ItemName)); + ShowContinueError(state, EnergyPlus::format("ZoneList/Zone Name=\"{}\".", ZoneName)); + ShowContinueError( + state, + EnergyPlus::format("Item length=[{}] > Maximum Length=[{}]. You may need to shorten the names.", ItemLength, Constant::MaxNameLength)); ShowContinueError(state, - format("Item length=[{}] > Maximum Length=[{}]. You may need to shorten the names.", ItemLength, Constant::MaxNameLength)); - ShowContinueError(state, - format("Shortening the Object Name by [{}] characters will assure uniqueness for this ZoneList.", - MaxZoneNameLength + 1 + ItemNameLength - Constant::MaxNameLength)); - ShowContinueError(state, format("name that will be used (may be needed in reporting)=\"{}\".", ResultName)); + EnergyPlus::format("Shortening the Object Name by [{}] characters will assure uniqueness for this ZoneList.", + MaxZoneNameLength + 1 + ItemNameLength - Constant::MaxNameLength)); + ShowContinueError(state, EnergyPlus::format("name that will be used (may be needed in reporting)=\"{}\".", ResultName)); TooLong = true; } @@ -1441,7 +1443,8 @@ void CheckCreatedZoneItemName(EnergyPlusData &state, if (FoundItem != 0) { ShowSevereError(state, fmt::format("{}{}=\"{}\", Duplicate Generated name encountered.", calledFrom, CurrentObject, ItemName)); - ShowContinueError(state, format("name=\"{}\" has already been generated or entered as {} item=[{}].", ResultName, CurrentObject, FoundItem)); + ShowContinueError( + state, EnergyPlus::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 13fcaefcda9..ec9de935948 100644 --- a/src/EnergyPlus/GeneralRoutines.cc +++ b/src/EnergyPlus/GeneralRoutines.cc @@ -226,9 +226,11 @@ void ControlCompOutput(EnergyPlusData &state, state.dataLoopNodes->Node(ActuatedNode).MassFlowRateMinAvail = MinFlow; // Check to make sure that the Minimum Flow rate is less than the max. if (MinFlow > MaxFlow) { - ShowSevereError(state, format("ControlCompOutput:{}:{}, Min Control Flow is > Max Control Flow", CompType, CompName)); + ShowSevereError(state, EnergyPlus::format("ControlCompOutput:{}:{}, Min Control Flow is > Max Control Flow", CompType, CompName)); ShowContinueError( - state, format("Acuated Node={} MinFlow=[{:.3T}], Max Flow={:.3T}", state.dataLoopNodes->NodeID(ActuatedNode), MinFlow, MaxFlow)); + state, + EnergyPlus::format( + "Acuated Node={} MinFlow=[{:.3T}], Max Flow={:.3T}", state.dataLoopNodes->NodeID(ActuatedNode), MinFlow, MaxFlow)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -410,7 +412,7 @@ void ControlCompOutput(EnergyPlusData &state, } else if (Action == iReverseAction) { Denom = -max(std::abs(QZnReq), 100.0); } else { - ShowFatalError(state, format("ControlCompOutput: Illegal Action argument =[{}]", Action)); + ShowFatalError(state, EnergyPlus::format("ControlCompOutput: Illegal Action argument =[{}]", Action)); } } @@ -514,7 +516,7 @@ void ControlCompOutput(EnergyPlusData &state, break; default: - ShowFatalError(state, format("ControlCompOutput: Illegal Component Number argument =[{}]", SimCompNum)); + ShowFatalError(state, EnergyPlus::format("ControlCompOutput: Illegal Component Number argument =[{}]", SimCompNum)); break; } @@ -546,13 +548,14 @@ void ControlCompOutput(EnergyPlusData &state, ++Iter; if ((Iter > MaxIter) && (!state.dataGlobal->WarmupFlag)) { // if ( CompErrIndex == 0 ) { - ShowWarningMessage(state, format("ControlCompOutput: Maximum iterations exceeded for {} = {}", CompType, CompName)); - ShowContinueError(state, format("... Load met = {:.5T} W.", LoadMet)); - ShowContinueError(state, format("... Load requested = {:.5T} W.", QZnReq)); - ShowContinueError(state, format("... Error = {:.8T} %.", std::abs((LoadMet - QZnReq) * 100.0 / Denom))); - ShowContinueError(state, format("... Tolerance = {:.8T} %.", ControlOffset * 100.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, "... Error = (Load met - Load requested) / MAXIMUM(Load requested, 100)"); - ShowContinueError(state, format("... Actuated Node Mass Flow Rate ={:.9R} kg/s", state.dataLoopNodes->Node(ActuatedNode).MassFlowRate)); + ShowContinueError( + state, EnergyPlus::format("... Actuated Node Mass Flow Rate ={:.9R} kg/s", state.dataLoopNodes->Node(ActuatedNode).MassFlowRate)); ShowContinueErrorTimeStamp(state, ""); ShowRecurringWarningErrorAtEnd(state, "ControlCompOutput: Maximum iterations error for " + CompType + " = " + CompName, @@ -636,7 +639,7 @@ void CheckSysSizing(EnergyPlusData &state, // Checks SysSizingRunDone flag. If false throws a fatal error. if (!state.dataSize->SysSizingRunDone) { - ShowSevereError(state, format("For autosizing of {} {}, a system sizing run must be done.", CompType, CompName)); + ShowSevereError(state, EnergyPlus::format("For autosizing of {} {}, a system sizing run must be done.", CompType, CompName)); if (state.dataSize->NumSysSizInput == 0) { ShowContinueError(state, "No \"Sizing:System\" objects were entered."); } @@ -683,7 +686,7 @@ void CheckZoneSizing(EnergyPlusData &state, // Checks ZoneSizingRunDone flag. If false throws a fatal error. if (!state.dataSize->ZoneSizingRunDone) { - ShowSevereError(state, format("For autosizing of {} {}, a zone sizing run must be done.", CompType, CompName)); + ShowSevereError(state, EnergyPlus::format("For autosizing of {} {}, a zone sizing run must be done.", CompType, CompName)); if (state.dataSize->NumZoneSizingInput == 0) { ShowContinueError(state, "No \"Sizing:Zone\" objects were entered."); } @@ -749,12 +752,12 @@ void ValidateComponent(EnergyPlusData &state, int ItemNum = state.dataInputProcessing->inputProcessor->getObjectItemNum(state, std::string{CompType}, CompName); if (ItemNum < 0) { - ShowSevereError(state, format("During {} Input, Invalid Component Type input={}", CallString, CompType)); - ShowContinueError(state, format("Component name={}", CompName)); + ShowSevereError(state, EnergyPlus::format("During {} Input, Invalid Component Type input={}", CallString, CompType)); + ShowContinueError(state, EnergyPlus::format("Component name={}", CompName)); IsNotOK = true; } else if (ItemNum == 0) { - ShowSevereError(state, format("During {} Input, Invalid Component Name input={}", CallString, CompName)); - ShowContinueError(state, format("Component type={}", CompType)); + ShowSevereError(state, EnergyPlus::format("During {} Input, Invalid Component Name input={}", CallString, CompName)); + ShowContinueError(state, EnergyPlus::format("Component type={}", CompType)); IsNotOK = true; } } @@ -789,12 +792,12 @@ void ValidateComponent(EnergyPlusData &state, int ItemNum = state.dataInputProcessing->inputProcessor->getObjectItemNum(state, CompType, CompValType, CompName); if (ItemNum < 0) { - ShowSevereError(state, format("During {} Input, Invalid Component Type input={}", CallString, CompType)); - ShowContinueError(state, format("Component name={}", CompName)); + ShowSevereError(state, EnergyPlus::format("During {} Input, Invalid Component Type input={}", CallString, CompType)); + ShowContinueError(state, EnergyPlus::format("Component name={}", CompName)); IsNotOK = true; } else if (ItemNum == 0) { - ShowSevereError(state, format("During {} Input, Invalid Component Name input={}", CallString, CompName)); - ShowContinueError(state, format("Component type={}", CompType)); + ShowSevereError(state, EnergyPlus::format("During {} Input, Invalid Component Name input={}", CallString, CompName)); + ShowContinueError(state, EnergyPlus::format("Component type={}", CompType)); IsNotOK = true; } } @@ -902,8 +905,8 @@ void TestAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) } if (Count > 0) { ShowSevereError(state, "Duplicate Node detected in Return Air Paths"); - ShowContinueError(state, format("Test Node={}", state.dataLoopNodes->NodeID(TestNode))); - ShowContinueError(state, format("In Air Path={}", state.dataAirLoop->AirToZoneNodeInfo(Loop).AirLoopName)); + ShowContinueError(state, EnergyPlus::format("Test Node={}", state.dataLoopNodes->NodeID(TestNode))); + ShowContinueError(state, EnergyPlus::format("In Air Path={}", state.dataAirLoop->AirToZoneNodeInfo(Loop).AirLoopName)); ErrFound = true; } } @@ -1001,13 +1004,16 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } if (Count == 1 && AirPathNodeName != state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneSupPlenCond(Count2).InletNode)) { - ShowSevereError(state, format("Error in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(BCount).Name)); - ShowContinueError(state, - format("For AirLoopHVAC:SupplyPlenum={}", state.dataZonePlenum->ZoneSupPlenCond(Count2).ZonePlenumName)); - ShowContinueError(state, format("Expected inlet node (supply air path)={}", AirPathNodeName)); - ShowContinueError(state, - format("Encountered node name (supply plenum)={}", - state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneSupPlenCond(Count2).OutletNode(1)))); + ShowSevereError(state, + EnergyPlus::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)))); ErrFound = true; ++NumErr; } @@ -1033,13 +1039,16 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } if (Count == 1 && AirPathNodeName != state.dataLoopNodes->NodeID(state.dataSplitterComponent->SplitterCond(Count2).InletNode)) { - ShowSevereError(state, format("Error in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(BCount).Name)); - ShowContinueError(state, - format("For AirLoopHVAC:ZoneSplitter={}", state.dataSplitterComponent->SplitterCond(Count2).SplitterName)); - ShowContinueError(state, format("Expected inlet node (supply air path)={}", AirPathNodeName)); - ShowContinueError(state, - format("Encountered node name (zone splitter)={}", - state.dataLoopNodes->NodeID(state.dataSplitterComponent->SplitterCond(Count2).InletNode))); + ShowSevereError(state, + EnergyPlus::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))); ErrFound = true; ++NumErr; } @@ -1059,8 +1068,9 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) } } break; default: { - ShowSevereError( - state, format("Invalid Component Type in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(BCount).ComponentType(Count))); + ShowSevereError(state, + EnergyPlus::format("Invalid Component Type in Supply Air Path={}", + state.dataZoneEquip->SupplyAirPath(BCount).ComponentType(Count))); ErrFound = true; ++NumErr; } break; @@ -1120,10 +1130,10 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } if (FoundSupplyPlenum(Count1)) { - ShowSevereError( - state, - format("AirLoopHVAC:SupplyPlenum=\"{}\", duplicate entry.", state.dataZonePlenum->ZoneSupPlenCond(Count1).ZonePlenumName)); - ShowContinueError(state, format("already exists on AirLoopHVAC:SupplyPath=\"{}\".", FoundNames(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))); ErrFound = true; } else { // record use @@ -1144,10 +1154,10 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } if (FoundZoneSplitter(Count1)) { - ShowSevereError( - state, - format("AirLoopHVAC:ZoneSplitter=\"{}\", duplicate entry.", state.dataSplitterComponent->SplitterCond(Count1).SplitterName)); - ShowContinueError(state, format("already exists on AirLoopHVAC:SupplyPath=\"{}\".", FoundNames(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))); ErrFound = true; } else { // record use @@ -1165,8 +1175,8 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } ShowSevereError(state, - format("AirLoopHVAC:SupplyPlenum=\"{}\", not found on any AirLoopHVAC:SupplyPath.", - state.dataZonePlenum->ZoneSupPlenCond(Count1).ZonePlenumName)); + EnergyPlus::format("AirLoopHVAC:SupplyPlenum=\"{}\", not found on any AirLoopHVAC:SupplyPath.", + state.dataZonePlenum->ZoneSupPlenCond(Count1).ZonePlenumName)); } } @@ -1176,8 +1186,8 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } ShowSevereError(state, - format("AirLoopHVAC:ZoneSplitter=\"{}\", not found on any AirLoopHVAC:SupplyPath.", - state.dataSplitterComponent->SplitterCond(Count1).SplitterName)); + EnergyPlus::format("AirLoopHVAC:ZoneSplitter=\"{}\", not found on any AirLoopHVAC:SupplyPath.", + state.dataSplitterComponent->SplitterCond(Count1).SplitterName)); } } @@ -1301,7 +1311,7 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i } if (MixerCount > 1) { - ShowSevereError(state, format("Too many zone mixers in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); + ShowSevereError(state, EnergyPlus::format("Too many zone mixers in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); ErrFound = true; ++NumErr; continue; @@ -1323,12 +1333,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, format("Error in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); - ShowContinueError(state, format("For Connector:Mixer={}", state.dataZoneEquip->ReturnAirPath(BCount).ComponentName(NumComp))); - ShowContinueError(state, format("Expected outlet node (return air path)={}", AirPathNodeName)); + 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)); ShowContinueError(state, - format("Encountered node name (mixer)={}", - state.dataLoopNodes->NodeID(state.dataMixerComponent->MixerCond(Count2).OutletNode))); + EnergyPlus::format("Encountered node name (mixer)={}", + state.dataLoopNodes->NodeID(state.dataMixerComponent->MixerCond(Count2).OutletNode))); ErrFound = true; ++NumErr; } else { @@ -1364,13 +1375,14 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i continue; } if (AirPathNodeName != state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneRetPlenCond(Count2).OutletNode)) { - ShowSevereError(state, format("Error in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); + ShowSevereError(state, EnergyPlus::format("Error in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); ShowContinueError( - state, format("For AirLoopHVAC:ReturnPlenum={}", state.dataZoneEquip->ReturnAirPath(BCount).ComponentName(NumComp))); - ShowContinueError(state, format("Expected outlet node (return air path)={}", AirPathNodeName)); + state, + EnergyPlus::format("For AirLoopHVAC:ReturnPlenum={}", state.dataZoneEquip->ReturnAirPath(BCount).ComponentName(NumComp))); + ShowContinueError(state, EnergyPlus::format("Expected outlet node (return air path)={}", AirPathNodeName)); ShowContinueError(state, - format("Encountered node name (zone return plenum)={}", - state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneRetPlenCond(Count2).OutletNode))); + EnergyPlus::format("Encountered node name (zone return plenum)={}", + state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneRetPlenCond(Count2).OutletNode))); ErrFound = true; ++NumErr; } else { @@ -1473,8 +1485,8 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i } } else { ShowWarningError(state, - format("TestReturnAirPathIntegrity: Air Loop has no Zone Equipment Return Node={}", - state.dataAirLoop->AirToZoneNodeInfo(Count2).AirLoopName)); + EnergyPlus::format("TestReturnAirPathIntegrity: Air Loop has no Zone Equipment Return Node={}", + state.dataAirLoop->AirToZoneNodeInfo(Count2).AirLoopName)); } } } @@ -1504,10 +1516,10 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i continue; } if (FoundReturnPlenum(Count1)) { - ShowSevereError( - state, - format("AirLoopHVAC:ReturnPlenum=\"{}\", duplicate entry.", state.dataZonePlenum->ZoneRetPlenCond(Count1).ZonePlenumName)); - ShowContinueError(state, format("already exists on AirLoopHVAC:ReturnPath=\"{}\".", FoundNames(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))); ErrFound = true; } else { // record use @@ -1530,9 +1542,10 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i continue; } if (FoundZoneMixer(Count1)) { - ShowSevereError(state, - format("AirLoopHVAC:ZoneMixer=\"{}\", duplicate entry.", state.dataMixerComponent->MixerCond(Count1).MixerName)); - ShowContinueError(state, format("already exists on AirLoopHVAC:ReturnPath=\"{}\".", FoundNames(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))); ErrFound = true; } else { // record use @@ -1568,8 +1581,8 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i continue; } ShowSevereError(state, - format("AirLoopHVAC:ReturnPlenum=\"{}\", not found on any AirLoopHVAC:ReturnPath.", - state.dataZonePlenum->ZoneRetPlenCond(Count1).ZonePlenumName)); + EnergyPlus::format("AirLoopHVAC:ReturnPlenum=\"{}\", not found on any AirLoopHVAC:ReturnPath.", + state.dataZonePlenum->ZoneRetPlenCond(Count1).ZonePlenumName)); } } @@ -1579,9 +1592,9 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i continue; } ShowSevereError(state, - format("AirLoopHVAC:ZoneMixer=\"{}\", not found on any AirLoopHVAC:ReturnPath, AirLoopHVAC:ExhaustSystem, " - "AirTerminal:SingleDuct:SeriesPIU:Reheat,", - state.dataMixerComponent->MixerCond(Count1).MixerName)); + EnergyPlus::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/GeneratorFuelSupply.cc b/src/EnergyPlus/GeneratorFuelSupply.cc index 67a5021a42e..2df3e07ea82 100644 --- a/src/EnergyPlus/GeneratorFuelSupply.cc +++ b/src/EnergyPlus/GeneratorFuelSupply.cc @@ -115,7 +115,7 @@ namespace GeneratorFuelSupply { int NumGeneratorFuelSups = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (NumGeneratorFuelSups <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", cCurrentModuleObject)); ErrorsFound = true; } @@ -142,8 +142,8 @@ namespace GeneratorFuelSupply { } else if (Util::SameString("Scheduled", AlphArray(2))) { state.dataGenerator->FuelSupply(FuelSupNum).FuelTempMode = DataGenerators::FuelTemperatureMode::FuelInTempSchedule; } else { - ShowSevereError(state, format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), AlphArray(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), AlphArray(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -168,8 +168,8 @@ namespace GeneratorFuelSupply { state.dataGenerator->FuelSupply(FuelSupNum).CompPowerCurveID = Curve::GetCurveIndex(state, AlphArray(5)); if (state.dataGenerator->FuelSupply(FuelSupNum).CompPowerCurveID == 0) { - ShowSevereError(state, format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, AlphArray(1))); ShowContinueError(state, "Curve named was not found "); ErrorsFound = true; } @@ -183,8 +183,8 @@ namespace GeneratorFuelSupply { } else if (Util::SameString(AlphArray(6), "LiquidGeneric")) { state.dataGenerator->FuelSupply(FuelSupNum).FuelTypeMode = DataGenerators::FuelMode::GenericLiquid; } else { - ShowSevereError(state, format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -198,11 +198,11 @@ namespace GeneratorFuelSupply { state.dataGenerator->FuelSupply(FuelSupNum).NumConstituents = NumFuelConstit; if (NumFuelConstit > 12) { - ShowSevereError(state, format("{} model not set up for more than 12 fuel constituents", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{} model not set up for more than 12 fuel constituents", cCurrentModuleObject)); ErrorsFound = true; } if (NumFuelConstit < 1) { - ShowSevereError(state, format("{} model needs at least one fuel constituent", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{} model needs at least one fuel constituent", cCurrentModuleObject)); ErrorsFound = true; } @@ -213,9 +213,10 @@ namespace GeneratorFuelSupply { // check for molar fractions summing to 1.0. if (std::abs(sum(state.dataGenerator->FuelSupply(FuelSupNum).ConstitMolalFract) - 1.0) > 0.0001) { - ShowSevereError(state, format("{} molar fractions do not sum to 1.0", cCurrentModuleObject)); - ShowContinueError(state, format("Sum was={:.5R}", sum(state.dataGenerator->FuelSupply(FuelSupNum).ConstitMolalFract))); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("{} molar fractions do not sum to 1.0", cCurrentModuleObject)); + ShowContinueError(state, + EnergyPlus::format("Sum was={:.5R}", sum(state.dataGenerator->FuelSupply(FuelSupNum).ConstitMolalFract))); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -228,7 +229,7 @@ namespace GeneratorFuelSupply { } if (ErrorsFound) { - ShowFatalError(state, format("Problem found processing input for {}", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Problem found processing input for {}", cCurrentModuleObject)); } state.dataGeneratorFuelSupply->MyOneTimeFlag = false; @@ -581,7 +582,7 @@ namespace GeneratorFuelSupply { state.dataGenerator->FuelSupply(FuelSupplyNum).GasLibID(i) = thisGasID; if (thisGasID == 0) { - ShowSevereError(state, format("Fuel constituent not found in thermochemistry data: {}", thisName)); + ShowSevereError(state, EnergyPlus::format("Fuel constituent not found in thermochemistry data: {}", thisName)); ErrorsFound = true; } diff --git a/src/EnergyPlus/GlobalNames.cc b/src/EnergyPlus/GlobalNames.cc index 78c1aca6f01..304e7bcdd19 100644 --- a/src/EnergyPlus/GlobalNames.cc +++ b/src/EnergyPlus/GlobalNames.cc @@ -73,7 +73,7 @@ void IntraObjUniquenessCheck(EnergyPlusData &state, bool &ErrorsFound) { if (NameToVerify.empty()) { - ShowSevereError(state, format("E+ object type {} cannot have a blank {} field", CurrentModuleObject, FieldName)); + ShowSevereError(state, EnergyPlus::format("E+ object type {} cannot have a blank {} field", CurrentModuleObject, FieldName)); ErrorsFound = true; // NameToVerify = "xxxxx"; return; @@ -84,7 +84,7 @@ void IntraObjUniquenessCheck(EnergyPlusData &state, UniqueStrings.emplace(NameToVerify); } else { ErrorsFound = true; - ShowSevereError(state, format("{} has a duplicate field {}", CurrentModuleObject, NameToVerify)); + ShowSevereError(state, EnergyPlus::format("{} has a duplicate field {}", CurrentModuleObject, NameToVerify)); } } @@ -96,7 +96,7 @@ bool VerifyUniqueInterObjectName(EnergyPlusData &state, bool &ErrorsFound) { if (object_name.empty()) { - ShowSevereError(state, format("E+ object type {} cannot have blank {} field", object_name, field_name)); + ShowSevereError(state, EnergyPlus::format("E+ object type {} cannot have blank {} field", object_name, field_name)); ErrorsFound = true; // object_name = "xxxxx"; return true; @@ -106,7 +106,8 @@ bool VerifyUniqueInterObjectName(EnergyPlusData &state, names.emplace(object_name, object_type); } else { ErrorsFound = true; - ShowSevereError(state, format("{} with object type {} duplicates a name in object type {}", object_name, object_type, names_iter->second)); + ShowSevereError( + state, EnergyPlus::format("{} with object type {} duplicates a name in object type {}", object_name, object_type, names_iter->second)); return true; } return false; @@ -119,7 +120,7 @@ bool VerifyUniqueInterObjectName(EnergyPlusData &state, bool &ErrorsFound) { if (object_name.empty()) { - ShowSevereError(state, format("E+ object type {} has a blank field", object_name)); + ShowSevereError(state, EnergyPlus::format("E+ object type {} has a blank field", object_name)); ErrorsFound = true; // object_name = "xxxxx"; return true; @@ -129,7 +130,8 @@ bool VerifyUniqueInterObjectName(EnergyPlusData &state, names.emplace(object_name, object_type); } else { ErrorsFound = true; - ShowSevereError(state, format("{} with object type {} duplicates a name in object type {}", object_name, object_type, names_iter->second)); + ShowSevereError( + state, EnergyPlus::format("{} with object type {} duplicates a name in object type {}", object_name, object_type, names_iter->second)); return true; } return false; @@ -151,8 +153,8 @@ void VerifyUniqueChillerName( auto const iter = state.dataGlobalNames->ChillerNames.find(NameToVerify); if (iter != state.dataGlobalNames->ChillerNames.end()) { - ShowSevereError(state, format("{}, duplicate name={}, Chiller Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); - ShowContinueError(state, format("...Current entry is Chiller Type=\"{}\".", TypeToVerify)); + ShowSevereError(state, EnergyPlus::format("{}, duplicate name={}, Chiller Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); + ShowContinueError(state, EnergyPlus::format("...Current entry is Chiller Type=\"{}\".", TypeToVerify)); ErrorsFound = true; } else { state.dataGlobalNames->ChillerNames.emplace(NameToVerify, Util::makeUPPER(TypeToVerify)); @@ -179,8 +181,8 @@ void VerifyUniqueBaseboardName(EnergyPlusData &state, auto const iter = state.dataGlobalNames->BaseboardNames.find(NameToVerify); if (iter != state.dataGlobalNames->BaseboardNames.end()) { - ShowSevereError(state, format("{}, duplicate name={}, Baseboard Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); - ShowContinueError(state, format("...Current entry is Baseboard Type=\"{}\".", TypeToVerify)); + ShowSevereError(state, EnergyPlus::format("{}, duplicate name={}, Baseboard Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); + ShowContinueError(state, EnergyPlus::format("...Current entry is Baseboard Type=\"{}\".", TypeToVerify)); ErrorsFound = true; } else { state.dataGlobalNames->BaseboardNames.emplace(NameToVerify, Util::makeUPPER(TypeToVerify)); @@ -204,8 +206,8 @@ void VerifyUniqueBoilerName( auto const iter = state.dataGlobalNames->BoilerNames.find(NameToVerify); if (iter != state.dataGlobalNames->BoilerNames.end()) { - ShowSevereError(state, format("{}, duplicate name={}, Boiler Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); - ShowContinueError(state, format("...Current entry is Boiler Type=\"{}\".", TypeToVerify)); + ShowSevereError(state, EnergyPlus::format("{}, duplicate name={}, Boiler Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); + ShowContinueError(state, EnergyPlus::format("...Current entry is Boiler Type=\"{}\".", TypeToVerify)); ErrorsFound = true; } else { state.dataGlobalNames->BoilerNames.emplace(NameToVerify, Util::makeUPPER(TypeToVerify)); @@ -228,7 +230,7 @@ void VerifyUniqueCoilName( // Coils. If not found in the list, it is added before returning. if (NameToVerify.empty()) { - ShowSevereError(state, format("\"{}\" cannot have a blank field", TypeToVerify)); + ShowSevereError(state, EnergyPlus::format("\"{}\" cannot have a blank field", TypeToVerify)); ErrorsFound = true; NameToVerify = "xxxxx"; return; @@ -236,8 +238,8 @@ void VerifyUniqueCoilName( auto const iter = state.dataGlobalNames->CoilNames.find(NameToVerify); if (iter != state.dataGlobalNames->CoilNames.end()) { - ShowSevereError(state, format("{}, duplicate name={}, Coil Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); - ShowContinueError(state, format("...Current entry is Coil Type=\"{}\".", TypeToVerify)); + ShowSevereError(state, EnergyPlus::format("{}, duplicate name={}, Coil Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); + ShowContinueError(state, EnergyPlus::format("...Current entry is Coil Type=\"{}\".", TypeToVerify)); ErrorsFound = true; } else { state.dataGlobalNames->CoilNames.emplace(NameToVerify, Util::makeUPPER(TypeToVerify)); @@ -250,8 +252,8 @@ void VerifyUniqueADUName( { auto const iter = state.dataGlobalNames->aDUNames.find(NameToVerify); if (iter != state.dataGlobalNames->aDUNames.end()) { - ShowSevereError(state, format("{}, duplicate name={}, ADU Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); - ShowContinueError(state, format("...Current entry is Air Distribution Unit Type=\"{}\".", TypeToVerify)); + ShowSevereError(state, EnergyPlus::format("{}, duplicate name={}, ADU Type=\"{}\".", StringToDisplay, NameToVerify, iter->second)); + ShowContinueError(state, EnergyPlus::format("...Current entry is Air Distribution Unit Type=\"{}\".", TypeToVerify)); ErrorsFound = true; } else { state.dataGlobalNames->aDUNames.emplace(NameToVerify, Util::makeUPPER(TypeToVerify)); diff --git a/src/EnergyPlus/GroundHeatExchangers/Base.cc b/src/EnergyPlus/GroundHeatExchangers/Base.cc index 875fbc54b91..a94b96fb975 100644 --- a/src/EnergyPlus/GroundHeatExchangers/Base.cc +++ b/src/EnergyPlus/GroundHeatExchangers/Base.cc @@ -363,10 +363,11 @@ void GLHEBase::updateGHX(EnergyPlusData &state) Real64 fluidDensity = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, this->inletTemp, RoutineName); this->designMassFlow = this->designFlow * fluidDensity; ShowWarningError(state, "Check GLHE design inputs & g-functions for consistency"); - ShowContinueError(state, format("For GroundHeatExchanger: {}GLHE delta Temp > 100C.", this->name)); + ShowContinueError(state, EnergyPlus::format("For GroundHeatExchanger: {}GLHE delta Temp > 100C.", this->name)); 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, format("GLHE Current Flow Rate={:.3T}; GLHE Design Flow Rate={:.3T}", this->massFlowRate, this->designMassFlow)); + ShowContinueError( + state, EnergyPlus::format("GLHE Current Flow Rate={:.3T}; GLHE Design Flow Rate={:.3T}", this->massFlowRate, this->designMassFlow)); ++this->numErrorCalls; } } @@ -479,7 +480,7 @@ GLHEBase *GLHEBase::factory(EnergyPlusData &state, DataPlant::PlantEquipmentType } // If we didn't find it, fatal - ShowFatalError(state, format("Ground Heat Exchanger Factory: Error getting inputs for GHX named: {}", objectName)); + ShowFatalError(state, EnergyPlus::format("Ground Heat Exchanger Factory: Error getting inputs for GHX named: {}", objectName)); } void GLHEBase::setupOutput(EnergyPlusData &state) @@ -617,8 +618,9 @@ void GetGroundHeatExchangerInput(EnergyPlusData &state) if (state.dataGroundHeatExchanger->numVertProps > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(GLHEVertProps::moduleName); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, - format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEVertProps::moduleName)); // LCOV_EXCL_LINE + ShowSevereError( + state, + EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEVertProps::moduleName)); // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { @@ -634,8 +636,9 @@ void GetGroundHeatExchangerInput(EnergyPlusData &state) if (state.dataGroundHeatExchanger->numResponseFactors > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(GLHEResponseFactors::moduleName); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError( - state, format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEResponseFactors::moduleName)); // LCOV_EXCL_LINE + ShowSevereError(state, + EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", + GLHEResponseFactors::moduleName)); // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { @@ -651,8 +654,9 @@ void GetGroundHeatExchangerInput(EnergyPlusData &state) if (state.dataGroundHeatExchanger->numVertArray > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(GLHEVertArray::moduleName); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, - format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEVertArray::moduleName)); // LCOV_EXCL_LINE + ShowSevereError( + state, + EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEVertArray::moduleName)); // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { @@ -668,8 +672,9 @@ void GetGroundHeatExchangerInput(EnergyPlusData &state) if (state.dataGroundHeatExchanger->numSingleBorehole > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(GLHEVertSingle::moduleName); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, - format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEVertSingle::moduleName)); // LCOV_EXCL_LINE + ShowSevereError( + state, + EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEVertSingle::moduleName)); // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { @@ -685,7 +690,8 @@ void GetGroundHeatExchangerInput(EnergyPlusData &state) if (state.dataGroundHeatExchanger->numVerticalGLHEs > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(GLHEVert::moduleName); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEVert::moduleName)); // LCOV_EXCL_LINE + ShowSevereError( + state, EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHEVert::moduleName)); // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { @@ -700,8 +706,9 @@ void GetGroundHeatExchangerInput(EnergyPlusData &state) if (state.dataGroundHeatExchanger->numSlinkyGLHEs > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(GLHESlinky::moduleName); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, - format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHESlinky::moduleName)); // LCOV_EXCL_LINE + ShowSevereError( + state, + EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", GLHESlinky::moduleName)); // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); for (auto it = instancesValue.begin(); it != instancesValue.end(); ++it) { diff --git a/src/EnergyPlus/GroundHeatExchangers/BoreholeArray.cc b/src/EnergyPlus/GroundHeatExchangers/BoreholeArray.cc index 7e50ee954df..07e00e96c6e 100644 --- a/src/EnergyPlus/GroundHeatExchangers/BoreholeArray.cc +++ b/src/EnergyPlus/GroundHeatExchangers/BoreholeArray.cc @@ -57,7 +57,7 @@ GLHEVertArray::GLHEVertArray(EnergyPlusData &state, std::string const &objName, // Check for duplicates for (const auto &existingObj : state.dataGroundHeatExchanger->vertArraysVector) { if (objName == existingObj->name) { - ShowFatalError(state, format("Invalid input for {} object: Duplicate name found: {}", this->moduleName, existingObj->name)); + ShowFatalError(state, EnergyPlus::format("Invalid input for {} object: Duplicate name found: {}", this->moduleName, existingObj->name)); } } diff --git a/src/EnergyPlus/GroundHeatExchangers/BoreholeSingle.cc b/src/EnergyPlus/GroundHeatExchangers/BoreholeSingle.cc index 0996bb08f09..fb637402195 100644 --- a/src/EnergyPlus/GroundHeatExchangers/BoreholeSingle.cc +++ b/src/EnergyPlus/GroundHeatExchangers/BoreholeSingle.cc @@ -57,7 +57,7 @@ GLHEVertSingle::GLHEVertSingle(EnergyPlusData &state, std::string const &objName // Check for duplicates for (const auto &existingObj : state.dataGroundHeatExchanger->singleBoreholesVector) { if (objName == existingObj->name) { - ShowFatalError(state, format("Invalid input for {} object: Duplicate name found: {}", this->moduleName, existingObj->name)); + ShowFatalError(state, EnergyPlus::format("Invalid input for {} object: Duplicate name found: {}", this->moduleName, existingObj->name)); } } diff --git a/src/EnergyPlus/GroundHeatExchangers/Properties.cc b/src/EnergyPlus/GroundHeatExchangers/Properties.cc index d422d3db69d..8cd5a4e0050 100644 --- a/src/EnergyPlus/GroundHeatExchangers/Properties.cc +++ b/src/EnergyPlus/GroundHeatExchangers/Properties.cc @@ -58,7 +58,7 @@ GLHEVertProps::GLHEVertProps(EnergyPlusData &state, std::string const &objName, // Check for duplicates for (const auto &existingObj : state.dataGroundHeatExchanger->vertPropsVector) { if (objName == existingObj->name) { - ShowFatalError(state, format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj->name)); + ShowFatalError(state, EnergyPlus::format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj->name)); } } diff --git a/src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc b/src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc index 77e863786ed..9347f1739be 100644 --- a/src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc +++ b/src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc @@ -60,7 +60,7 @@ GLHEResponseFactors::GLHEResponseFactors(EnergyPlusData &state, std::string cons // Check for duplicates for (auto &existingObj : state.dataGroundHeatExchanger->vertPropsVector) { if (objName == existingObj->name) { - ShowFatalError(state, format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj->name)); + ShowFatalError(state, EnergyPlus::format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj->name)); } } @@ -109,7 +109,7 @@ std::shared_ptr BuildAndGetResponseFactorObjectFromArray(En for (int yBH = 1; yBH <= arrayObjectPtr->numBHinYDirection; ++yBH) { bhCounter += 1; std::shared_ptr thisBH(new GLHEVertSingle); - thisBH->name = format("{} BH {} loc: ({}, {})", thisRF->name, bhCounter, xLoc, yLoc); + thisBH->name = EnergyPlus::format("{} BH {} loc: ({}, {})", thisRF->name, bhCounter, xLoc, yLoc); thisBH->props = GLHEVertProps::GetVertProps(state, arrayObjectPtr->props->name); thisBH->xLoc = xLoc; thisBH->yLoc = yLoc; @@ -131,11 +131,13 @@ BuildAndGetResponseFactorsObjectFromSingleBHs(const EnergyPlusData &state, std:: { // Make new response factor object and store it for later use std::shared_ptr thisRF(new GLHEResponseFactors); - thisRF->name = format("Response Factor Object Auto Generated No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1); + thisRF->name = + EnergyPlus::format("Response Factor Object Auto Generated No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1); // Make new props object which has the mean values of the other props objects referenced by the individual BH objects std::shared_ptr thisProps(new GLHEVertProps); - thisProps->name = format("Response Factor Auto Generated Mean Props No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1); + thisProps->name = + EnergyPlus::format("Response Factor Auto Generated Mean Props No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1); for (auto &thisBH : singleBHsForRFVect) { thisProps->bhDiameter += thisBH->props->bhDiameter; thisProps->bhLength += thisBH->props->bhLength; diff --git a/src/EnergyPlus/GroundHeatExchangers/Slinky.cc b/src/EnergyPlus/GroundHeatExchangers/Slinky.cc index bec05f53273..7f5d4a11b1e 100644 --- a/src/EnergyPlus/GroundHeatExchangers/Slinky.cc +++ b/src/EnergyPlus/GroundHeatExchangers/Slinky.cc @@ -60,7 +60,7 @@ GLHESlinky::GLHESlinky(EnergyPlusData &state, std::string const &objName, nlohma // Check for duplicates for (const auto &existingObj : state.dataGroundHeatExchanger->singleBoreholesVector) { if (objName == existingObj->name) { - ShowFatalError(state, format("Invalid input for {} object: Duplicate name found: {}", this->moduleName, existingObj->name)); + ShowFatalError(state, EnergyPlus::format("Invalid input for {} object: Duplicate name found: {}", this->moduleName, existingObj->name)); } } @@ -149,9 +149,9 @@ GLHESlinky::GLHESlinky(EnergyPlusData &state, std::string const &objName, nlohma // Vertical configuration if (this->trenchDepth - this->coilDiameter < 0.0) { // Error: part of the coil is above ground - ShowSevereError(state, format("{}=\"{}\", invalid value in field.", this->moduleName, this->name)); - ShowContinueError(state, format("...{}=[{:.3R}].", "Trench Depth", this->trenchDepth)); - ShowContinueError(state, format("...{}=[{:.3R}].", "Coil Depth", this->coilDepth)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid value in field.", this->moduleName, this->name)); + ShowContinueError(state, EnergyPlus::format("...{}=[{:.3R}].", "Trench Depth", this->trenchDepth)); + ShowContinueError(state, EnergyPlus::format("...{}=[{:.3R}].", "Coil Depth", this->coilDepth)); ShowContinueError(state, "...Part of coil will be above ground."); errorsFound = true; @@ -172,9 +172,9 @@ GLHESlinky::GLHESlinky(EnergyPlusData &state, std::string const &objName, nlohma this->prevTimeSteps = 0.0; if (this->pipe.thickness >= this->pipe.outDia / 2.0) { - ShowSevereError(state, format("{}=\"{}\", invalid value in field.", this->moduleName, this->name)); - ShowContinueError(state, format("...{}=[{:.3R}].", "Pipe Thickness", this->pipe.thickness)); - ShowContinueError(state, format("...{}=[{:.3R}].", "Pipe Outer Diameter", this->pipe.outDia)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid value in field.", this->moduleName, this->name)); + ShowContinueError(state, EnergyPlus::format("...{}=[{:.3R}].", "Pipe Thickness", this->pipe.thickness)); + ShowContinueError(state, EnergyPlus::format("...{}=[{:.3R}].", "Pipe Outer Diameter", this->pipe.outDia)); ShowContinueError(state, "...Radius will be <=0."); errorsFound = true; } @@ -189,7 +189,7 @@ GLHESlinky::GLHESlinky(EnergyPlusData &state, std::string const &objName, nlohma // Check for Errors if (errorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", this->moduleName)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", this->moduleName)); } } diff --git a/src/EnergyPlus/GroundHeatExchangers/Vertical.cc b/src/EnergyPlus/GroundHeatExchangers/Vertical.cc index 4cc2f20ea56..7d564258d86 100644 --- a/src/EnergyPlus/GroundHeatExchangers/Vertical.cc +++ b/src/EnergyPlus/GroundHeatExchangers/Vertical.cc @@ -67,7 +67,7 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: // Check for duplicates for (auto &existingObj : state.dataGroundHeatExchanger->verticalGLHE) { if (objName == existingObj.name) { - ShowFatalError(state, format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj.name)); + ShowFatalError(state, EnergyPlus::format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj.name)); } } @@ -146,14 +146,16 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: bool objNameFound = j.find("ghe_vertical_sizing_object_name") != j.end(); if (!objTypeFound) { - ShowSevereError(state, format("GroundHeatExchanger:System \"{}\"", this->name)); - ShowContinueError(state, format("g-Function Calculation Method = \"{}\"", j["g_function_calculation_method"].get())); + ShowSevereError(state, EnergyPlus::format("GroundHeatExchanger:System \"{}\"", this->name)); + ShowContinueError( + state, EnergyPlus::format("g-Function Calculation Method = \"{}\"", j["g_function_calculation_method"].get())); ShowContinueError(state, "GHE:Vertical:Sizing Object Type not specified."); errorsFound = true; } if (!objNameFound) { - ShowSevereError(state, format("GroundHeatExchanger:System \"{}\"", this->name)); - ShowContinueError(state, format("g-Function Calculation Method = \"{}\"", j["g_function_calculation_method"].get())); + ShowSevereError(state, EnergyPlus::format("GroundHeatExchanger:System \"{}\"", this->name)); + ShowContinueError( + state, EnergyPlus::format("g-Function Calculation Method = \"{}\"", j["g_function_calculation_method"].get())); ShowContinueError(state, "GHE:Vertical:Sizing Object Name not specified."); errorsFound = true; } @@ -162,15 +164,16 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: this->sizingData.type = j.at("ghe_vertical_sizing_object_type"); if (Util::makeUPPER(this->sizingData.type) != "GROUNDHEATEXCHANGER:VERTICAL:SIZING:RECTANGLE") { - ShowSevereError(state, format("GroundHeatExchanger:System \"{}\"", this->name)); - ShowContinueError(state, format("GHE:Vertical:Sizing Object Type not supported \"{}\"", this->sizingData.type)); + ShowSevereError(state, EnergyPlus::format("GroundHeatExchanger:System \"{}\"", this->name)); + ShowContinueError(state, EnergyPlus::format("GHE:Vertical:Sizing Object Type not supported \"{}\"", this->sizingData.type)); errorsFound = true; } auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find("GroundHeatExchanger:Vertical:Sizing:Rectangle"); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, - format("Expected to find GroundHeatExchanger:Vertical:Sizing named {}, but it was missing", this->sizingData.name)); + ShowSevereError( + state, + EnergyPlus::format("Expected to find GroundHeatExchanger:Vertical:Sizing named {}, but it was missing", this->sizingData.name)); errorsFound = true; } @@ -185,9 +188,9 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: this->sizingData.sizingPeriodName = fields.at("sizingperiod_weatherfiledays_name"); auto const spInstances = state.dataInputProcessing->inputProcessor->epJSON.find("SizingPeriod:WeatherFileDays"); if (spInstances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError( - state, - format("Expected to find SizingPeriod:WeatherFileDays named {}, but it was missing", this->sizingData.sizingPeriodName)); + ShowSevereError(state, + EnergyPlus::format("Expected to find SizingPeriod:WeatherFileDays named {}, but it was missing", + this->sizingData.sizingPeriodName)); errorsFound = true; } @@ -202,8 +205,8 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: if (!spIsAnnual) { ShowSevereError(state, - format("SizingPeriod:WeatherFileDays named {}, must be an annual design period of 365 days", - this->sizingData.sizingPeriodName)); + EnergyPlus::format("SizingPeriod:WeatherFileDays named {}, must be an annual design period of 365 days", + this->sizingData.sizingPeriodName)); errorsFound = true; } @@ -274,7 +277,7 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: if (j.find("vertical_well_locations") == j.end()) { ShowSevereError(state, "For a full design GHE simulation, you must provide a GHE:Vertical:Single object"); ShowContinueError(state, "If you enter more than one, only the first is used to specify the borehole design"); - ShowContinueError(state, format("Check references to these objects for GHE:System object: {}", this->name)); + ShowContinueError(state, EnergyPlus::format("Check references to these objects for GHE:System object: {}", this->name)); errorsFound = true; } @@ -302,7 +305,7 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: if (j.find("vertical_well_locations") == j.end()) { // No ResponseFactors, GHEArray, or SingleBH object are referenced ShowSevereError(state, "No GHE:ResponseFactors, GHE:Vertical:Array, or GHE:Vertical:Single objects found"); - ShowContinueError(state, format("Check references to these objects for GHE:System object: {}", this->name)); + ShowContinueError(state, EnergyPlus::format("Check references to these objects for GHE:System object: {}", this->name)); errorsFound = true; } @@ -386,7 +389,7 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: // Check for Errors if (errorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", moduleName)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", moduleName)); } } diff --git a/src/EnergyPlus/HVACControllers.cc b/src/EnergyPlus/HVACControllers.cc index 6bcba779399..a7025427c16 100644 --- a/src/EnergyPlus/HVACControllers.cc +++ b/src/EnergyPlus/HVACControllers.cc @@ -230,29 +230,30 @@ void ManageControllers(EnergyPlusData &state, if (ControllerIndex == 0) { ControlNum = Util::FindItemInList(ControllerName, state.dataHVACControllers->ControllerProps, &ControllerPropsType::ControllerName); if (ControlNum == 0) { - ShowFatalError( - state, - format("ManageControllers: Invalid controller={}. The only valid controller type for an AirLoopHVAC is Controller:WaterCoil.", - ControllerName)); + ShowFatalError(state, + EnergyPlus::format( + "ManageControllers: Invalid controller={}. The only valid controller type for an AirLoopHVAC is Controller:WaterCoil.", + ControllerName)); } ControllerIndex = ControlNum; } else { ControlNum = ControllerIndex; if (ControlNum > state.dataHVACControllers->NumControllers || ControlNum < 1) { ShowFatalError(state, - format("ManageControllers: Invalid ControllerIndex passed={}, Number of controllers={}, Controller name={}", - ControlNum, - state.dataHVACControllers->NumControllers, - ControllerName)); + EnergyPlus::format("ManageControllers: Invalid ControllerIndex passed={}, Number of controllers={}, Controller name={}", + ControlNum, + state.dataHVACControllers->NumControllers, + ControllerName)); } if (state.dataHVACControllers->CheckEquipName(ControlNum)) { if (ControllerName != state.dataHVACControllers->ControllerProps(ControlNum).ControllerName) { ShowFatalError( state, - format("ManageControllers: Invalid ControllerIndex passed={}, Controller name={}, stored Controller Name for that index={}", - ControlNum, - ControllerName, - state.dataHVACControllers->ControllerProps(ControlNum).ControllerName)); + EnergyPlus::format( + "ManageControllers: Invalid ControllerIndex passed={}, Controller name={}, stored Controller Name for that index={}", + ControlNum, + ControllerName, + state.dataHVACControllers->ControllerProps(ControlNum).ControllerName)); } state.dataHVACControllers->CheckEquipName(ControlNum) = false; } @@ -348,7 +349,7 @@ void ManageControllers(EnergyPlusData &state, if (ControllerType == ControllerSimple_Type) { // 'Controller:WaterCoil' CalcSimpleController(state, ControlNum, FirstHVACIteration, IsConvergedFlag, IsUpToDateFlag, ControllerName); } else { - ShowFatalError(state, format("Invalid controller type in ManageControllers={}", controllerProps.ControllerType)); + ShowFatalError(state, EnergyPlus::format("Invalid controller type in ManageControllers={}", controllerProps.ControllerType)); } // Update the current Controller to the outlet nodes @@ -369,12 +370,12 @@ void ManageControllers(EnergyPlusData &state, CheckSimpleController(state, ControlNum, IsConvergedFlag); SaveSimpleController(state, ControlNum, FirstHVACIteration, IsConvergedFlag); } else { - ShowFatalError(state, format("Invalid controller type in ManageControllers={}", controllerProps.ControllerType)); + ShowFatalError(state, EnergyPlus::format("Invalid controller type in ManageControllers={}", controllerProps.ControllerType)); } } break; default: { - ShowFatalError(state, format("ManageControllers: Invalid Operation passed={}, Controller name={}", Operation, ControllerName)); + ShowFatalError(state, EnergyPlus::format("ManageControllers: Invalid Operation passed={}, Controller name={}", Operation, ControllerName)); } break; } @@ -484,27 +485,27 @@ void GetControllerInput(EnergyPlusData &state) controllerProps.ControlVar = static_cast(getEnumValue(ctrlVarNamesUC, AlphArray(2))); if (controllerProps.ControlVar == HVACControllers::CtrlVarType::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, AlphArray(1))); ShowContinueError(state, - format("...Invalid {}=\"{}\", must be Temperature, HumidityRatio, or TemperatureAndHumidityRatio.", - cAlphaFields(2), - AlphArray(2))); + EnergyPlus::format("...Invalid {}=\"{}\", must be Temperature, HumidityRatio, or TemperatureAndHumidityRatio.", + cAlphaFields(2), + AlphArray(2))); ErrorsFound = true; } controllerProps.Action = static_cast(getEnumValue(actionNamesUC, AlphArray(3))); if (controllerProps.Action == ControllerAction::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, AlphArray(1))); - ShowContinueError(state, - format("...Invalid {}=\"{}{}", cAlphaFields(3), AlphArray(3), R"(", must be "Normal", "Reverse" or blank.)")); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, AlphArray(1))); + ShowContinueError( + state, EnergyPlus::format("...Invalid {}=\"{}{}", cAlphaFields(3), AlphArray(3), R"(", must be "Normal", "Reverse" or blank.)")); ErrorsFound = true; } if (AlphArray(4) == "FLOW") { controllerProps.ActuatorVar = HVACControllers::CtrlVarType::Flow; } else { - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("...Invalid {}=\"{}\", only FLOW is allowed.", cAlphaFields(4), AlphArray(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...Invalid {}=\"{}\", only FLOW is allowed.", cAlphaFields(4), AlphArray(4))); ErrorsFound = true; } controllerProps.SensedNode = NodeInputManager::GetOnlySingleNode(state, @@ -530,8 +531,9 @@ void GetControllerInput(EnergyPlusData &state) controllerProps.MinVolFlowActuated = NumArray(3); if (!MixedAir::CheckForControllerWaterCoil(state, DataAirLoop::ControllerKind::WaterCoil, AlphArray(1))) { - ShowSevereError(state, - format("{}{}=\"{}\" not found on any AirLoopHVAC:ControllerList.", RoutineName, CurrentModuleObject, AlphArray(1))); + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\" not found on any AirLoopHVAC:ControllerList.", RoutineName, CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -546,7 +548,8 @@ void GetControllerInput(EnergyPlusData &state) if (NodeNotFound) { // the sensor node is not on the water coil air outlet node - ShowWarningError(state, format("{}{}=\"{}\". ", RoutineName, controllerProps.ControllerType, controllerProps.ControllerName)); + ShowWarningError( + state, EnergyPlus::format("{}{}=\"{}\". ", RoutineName, controllerProps.ControllerType, controllerProps.ControllerName)); ShowContinueError(state, " ..Sensor node not found on water coil air outlet node."); ShowContinueError(state, " ..The sensor node may have been placed on a node downstream of the coil or on an airloop outlet node."); @@ -617,7 +620,7 @@ void GetControllerInput(EnergyPlusData &state) WaterCoils::CheckActuatorNode(state, controllerProps.ActuatedNode, controllerProps.WaterCoilType, ActuatorNodeNotFound); if (ActuatorNodeNotFound) { ErrorsFound = true; - ShowSevereError(state, format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, controllerProps.ControllerName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, controllerProps.ControllerName)); ShowContinueError(state, "...the actuator node must also be a water inlet node of a water coil"); } else { // Node found, check type and action if (controllerProps.WaterCoilType == DataPlant::PlantEquipmentType::CoilWaterCooling || @@ -625,7 +628,7 @@ void GetControllerInput(EnergyPlusData &state) if (controllerProps.Action == ControllerAction::NoAction) { controllerProps.Action = ControllerAction::Reverse; } else if (controllerProps.Action == ControllerAction::NormalAction) { - ShowWarningError(state, format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, controllerProps.ControllerName)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, controllerProps.ControllerName)); ShowContinueError(state, "...Normal action has been specified for a cooling coil - should be Reverse."); ShowContinueError(state, "...overriding user input action with Reverse Action."); controllerProps.Action = ControllerAction::Reverse; @@ -634,7 +637,7 @@ void GetControllerInput(EnergyPlusData &state) if (controllerProps.Action == ControllerAction::NoAction) { controllerProps.Action = ControllerAction::NormalAction; } else if (controllerProps.Action == ControllerAction::Reverse) { - ShowWarningError(state, format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, controllerProps.ControllerName)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, controllerProps.ControllerName)); ShowContinueError(state, "...Reverse action has been specified for a heating coil - should be Normal."); ShowContinueError(state, "...overriding user input action with Normal Action."); controllerProps.Action = ControllerAction::NormalAction; @@ -654,7 +657,7 @@ void GetControllerInput(EnergyPlusData &state) CheckControllerListOrder(state); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting {} input.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {} input.", RoutineName, CurrentModuleObject)); } } @@ -783,10 +786,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg if (state.dataLoopNodes->Node(SensedNode).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the " "controller sensed node."); @@ -797,10 +800,11 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state, SensedNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at " "the controller sensed node."); @@ -813,11 +817,11 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg controllerProps.Action == ControllerAction::Reverse) { ShowWarningError( state, - format( + EnergyPlus::format( "HVACControllers: controller type={} Name=\"{}\" has detected a maximum humidity ratio setpoint at the control node.", controllerProps.ControllerType, controllerProps.ControllerName)); - ShowContinueError(state, format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + ShowContinueError(state, EnergyPlus::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. @@ -832,10 +836,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state.dataLoopNodes->Node(SensedNode).HumRatMax == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("HVACControllers: Missing humidity ratio setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MaximumHumidityRatio\" to establish a " "setpoint at the controller sensed node."); @@ -845,10 +849,11 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state, SensedNode, HVAC::CtrlVarType::HumRat, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - format("HVACControllers: Missing humidity ratio setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MaximumHumidityRatio\" to " "establish a setpoint at the controller sensed node."); @@ -858,10 +863,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg } else if (thisController.HumRatCntrlType == HVAC::CtrlVarType::MinHumRat) { ShowSevereError(state, - format("HVACControllers: incorrect humidity ratio setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MaximumHumidityRatio\" to establish a " "setpoint at the controller sensed node."); @@ -872,10 +877,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg if (state.dataLoopNodes->Node(SensedNode).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the " "controller sensed node."); @@ -886,10 +891,11 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state, SensedNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at " "the controller sensed node."); @@ -899,11 +905,12 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg } if (state.dataLoopNodes->Node(SensedNode).HumRatMax == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, - format("HVACControllers: Missing maximum humidity ratio setpoint for controller type={} Name=\"{}\"", + ShowSevereError( + state, + EnergyPlus::format("HVACControllers: Missing maximum humidity ratio setpoint for controller type={} Name=\"{}\"", controllerProps.ControllerType, controllerProps.ControllerName)); - ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + ShowContinueError(state, EnergyPlus::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."); @@ -913,11 +920,13 @@ 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, - format("HVACControllers: Missing maximum humidity ratio setpoint for controller type={} Name=\"{}\"", + ShowSevereError( + state, + EnergyPlus::format("HVACControllers: Missing maximum humidity ratio setpoint for controller type={} Name=\"{}\"", controllerProps.ControllerType, controllerProps.ControllerName)); - ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + ShowContinueError(state, + EnergyPlus::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."); @@ -930,10 +939,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg if (state.dataLoopNodes->Node(SensedNode).MassFlowRateSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("HVACControllers: Missing mass flow rate setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node Referenced (in Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MassFlowRate\" to establish a " "setpoint at the controller sensed node."); @@ -944,10 +953,11 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state, SensedNode, HVAC::CtrlVarType::MassFlowRate, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - format("HVACControllers: Missing mass flow rate setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, format("Node Referenced (in Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + 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))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MassFlowRate\" to establish a " "setpoint at the controller sensed node."); @@ -976,14 +986,15 @@ 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, - format("{}: Controller:WaterCoil=\"{}\", Maximum Actuated Flow is zero.", RoutineName, thisController.ControllerName)); + ShowWarningError( + state, + EnergyPlus::format("{}: Controller:WaterCoil=\"{}\", Maximum Actuated Flow is zero.", RoutineName, thisController.ControllerName)); thisController.MinVolFlowActuated = 0.0; } else if (thisController.MinVolFlowActuated >= thisController.MaxVolFlowActuated) { ShowFatalError(state, - format("{}: Controller:WaterCoil=\"{}\", Minimum control flow is > or = Maximum control flow.", - RoutineName, - thisController.ControllerName)); + EnergyPlus::format("{}: Controller:WaterCoil=\"{}\", Minimum control flow is > or = Maximum control flow.", + RoutineName, + thisController.ControllerName)); } // Setup root finder after sizing calculation @@ -1118,7 +1129,7 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg } } break; default: { - ShowFatalError(state, format("Invalid Controller Variable Type={}", ControlVariableTypes(thisController.ControlVar))); + ShowFatalError(state, EnergyPlus::format("Invalid Controller Variable Type={}", ControlVariableTypes(thisController.ControlVar))); } break; } @@ -1140,7 +1151,7 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg } } break; default: { - ShowFatalError(state, format("Invalid Actuator Variable Type={}", ControlVariableTypes(thisController.ActuatorVar))); + ShowFatalError(state, EnergyPlus::format("Invalid Actuator Variable Type={}", ControlVariableTypes(thisController.ActuatorVar))); } break; } @@ -1295,8 +1306,8 @@ void CalcSimpleController(EnergyPlusData &state, } else { // Check that the setpoint is defined if (!controllerProps.IsSetPointDefinedFlag) { - ShowSevereError(state, format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, format(" Controller name=\"{}\"", ControllerName)); + ShowSevereError(state, EnergyPlus::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, EnergyPlus::format(" Controller name=\"{}\"", ControllerName)); ShowContinueError(state, " Setpoint is not available/defined."); ShowFatalError(state, "Preceding error causes program termination."); } @@ -1304,19 +1315,19 @@ void CalcSimpleController(EnergyPlusData &state, // - min bound // - max bound if (rootFinders.MinPoint.X != controllerProps.MinAvailActuated) { - ShowSevereError(state, format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, format(" Controller name=\"{}\"", ControllerName)); + ShowSevereError(state, EnergyPlus::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, EnergyPlus::format(" Controller name=\"{}\"", ControllerName)); ShowContinueError(state, " Minimum bound must remain invariant during successive iterations."); - ShowContinueError(state, format(" Minimum root finder point={:.{}T}", rootFinders.MinPoint.X, NumSigDigits)); - ShowContinueError(state, format(" Minimum avail actuated={:.{}T}", controllerProps.MinAvailActuated, NumSigDigits)); + 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, format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, format(" Controller name=\"{}\"", ControllerName)); + ShowSevereError(state, EnergyPlus::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, EnergyPlus::format(" Controller name=\"{}\"", ControllerName)); ShowContinueError(state, " Maximum bound must remain invariant during successive iterations."); - ShowContinueError(state, format(" Maximum root finder point={:.{}T}", rootFinders.MaxPoint.X, NumSigDigits)); - ShowContinueError(state, format(" Maximum avail actuated={:.{}T}", controllerProps.MaxAvailActuated, NumSigDigits)); + ShowContinueError(state, EnergyPlus::format(" Maximum root finder point={:.{}T}", rootFinders.MaxPoint.X, NumSigDigits)); + ShowContinueError(state, EnergyPlus::format(" Maximum avail actuated={:.{}T}", controllerProps.MaxAvailActuated, NumSigDigits)); ShowFatalError(state, "Preceding error causes program termination."); } @@ -1434,27 +1445,30 @@ void FindRootSimpleController(EnergyPlusData &state, // Abnormal case: should never happen } break; case DataRootFinder::RootFinderStatus::ErrorRange: { - ShowSevereError(state, format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, format(" Controller name=\"{}\"", ControllerName)); - ShowContinueError(state, - format(" Root candidate x={:.{}T} does not lie within the min/max bounds.", controllerProps.ActuatedValue, NumSigDigits)); - ShowContinueError(state, format(" Min bound is x={:.{}T}", rootFinders.MinPoint.X, NumSigDigits)); - ShowContinueError(state, format(" Max bound is x={:.{}T}", rootFinders.MaxPoint.X, NumSigDigits)); + ShowSevereError(state, EnergyPlus::format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, EnergyPlus::format(" Controller name=\"{}\"", ControllerName)); + ShowContinueError( + state, + EnergyPlus::format(" Root candidate x={:.{}T} does not lie within the min/max bounds.", controllerProps.ActuatedValue, NumSigDigits)); + ShowContinueError(state, EnergyPlus::format(" Min bound is x={:.{}T}", rootFinders.MinPoint.X, NumSigDigits)); + ShowContinueError(state, EnergyPlus::format(" Max bound is x={:.{}T}", rootFinders.MaxPoint.X, NumSigDigits)); ShowFatalError(state, "Preceding error causes program termination."); // Abnormal case: should never happen } break; case DataRootFinder::RootFinderStatus::ErrorBracket: { - ShowSevereError(state, format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, format(" Controller name={}", controllerProps.ControllerName)); + 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)])); - ShowContinueError( - state, format(" Root candidate x={:.{}T} does not lie within the lower/upper brackets.", controllerProps.ActuatedValue, NumSigDigits)); + ShowContinueError(state, + EnergyPlus::format(" Root candidate x={:.{}T} does not lie within the lower/upper brackets.", + controllerProps.ActuatedValue, + NumSigDigits)); if (rootFinders.LowerPoint.DefinedFlag) { - ShowContinueError(state, format(" Lower bracket is x={:.{}T}", rootFinders.LowerPoint.X, NumSigDigits)); + ShowContinueError(state, EnergyPlus::format(" Lower bracket is x={:.{}T}", rootFinders.LowerPoint.X, NumSigDigits)); } if (rootFinders.UpperPoint.DefinedFlag) { - ShowContinueError(state, format(" Upper bracket is x={:.{}T}", rootFinders.UpperPoint.X, NumSigDigits)); + ShowContinueError(state, EnergyPlus::format(" Upper bracket is x={:.{}T}", rootFinders.UpperPoint.X, NumSigDigits)); } ShowFatalError(state, "Preceding error causes program termination."); @@ -1473,48 +1487,56 @@ void FindRootSimpleController(EnergyPlusData &state, case DataRootFinder::RootFinderStatus::ErrorSlope: { if (!state.dataGlobal->WarmupFlag && controllerProps.BadActionErrCount == 0) { ++controllerProps.BadActionErrCount; - ShowSevereError(state, format("FindRootSimpleController: Controller error for controller = \"{}\"", ControllerName)); + ShowSevereError(state, EnergyPlus::format("FindRootSimpleController: Controller error for controller = \"{}\"", ControllerName)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, fmt::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, format("Controller control type={}", ControlVariableTypes(controllerProps.ControlVar))); + ShowContinueError(state, EnergyPlus::format("Controller control type={}", ControlVariableTypes(controllerProps.ControlVar))); if (controllerProps.ControlVar == CtrlVarType::Temperature) { - ShowContinueError(state, format("Controller temperature setpoint = {:.2T} [C]", controllerProps.SetPointValue)); - ShowContinueError(state, format("Controller sensed temperature = {:.2T} [C]", controllerProps.SensedValue)); + ShowContinueError(state, EnergyPlus::format("Controller temperature setpoint = {:.2T} [C]", controllerProps.SetPointValue)); + ShowContinueError(state, EnergyPlus::format("Controller sensed temperature = {:.2T} [C]", controllerProps.SensedValue)); } else if (controllerProps.ControlVar == CtrlVarType::HumidityRatio) { - ShowContinueError(state, format("Controller humidity ratio setpoint = {:.2T} [kgWater/kgDryAir]", controllerProps.SetPointValue)); - ShowContinueError(state, format("Controller sensed humidity ratio = {:.2T} [kgWater/kgDryAir]", controllerProps.SensedValue)); + 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)); } else if (controllerProps.ControlVar == CtrlVarType::TemperatureAndHumidityRatio) { if (controllerProps.HumRatCtrlOverride) { ShowContinueError(state, "Humidity control is active."); - ShowContinueError(state, format("Controller humidity ratio setpoint = {:.2T} [kgWater/kgDryAir]", controllerProps.SetPointValue)); - ShowContinueError(state, format("Controller sensed humidity ratio = {:.2T} [kgWater/kgDryAir]", controllerProps.SensedValue)); - ShowContinueError(state, - format("Controller humidity ratio setpoint dew-point temperature = {:.2T} [C]", - Psychrometrics::PsyTdpFnWPb(state, controllerProps.SetPointValue, state.dataEnvrn->OutBaroPress))); + 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, - format("Controller temperature setpoint = {:.2T} [C]", state.dataLoopNodes->Node(controllerProps.SensedNode).TempSetPoint)); + 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)); ShowContinueError( - state, format("Controller sensed temperature = {:.2T} [C]", state.dataLoopNodes->Node(controllerProps.SensedNode).Temp)); + state, + EnergyPlus::format("Controller sensed temperature = {:.2T} [C]", state.dataLoopNodes->Node(controllerProps.SensedNode).Temp)); } else { - ShowContinueError(state, format("Controller temperature setpoint = {:.2T} [C]", controllerProps.SetPointValue)); - ShowContinueError(state, format("Controller sensed temperature = {:.2T} [C]", controllerProps.SensedValue)); + ShowContinueError(state, EnergyPlus::format("Controller temperature setpoint = {:.2T} [C]", controllerProps.SetPointValue)); + ShowContinueError(state, EnergyPlus::format("Controller sensed temperature = {:.2T} [C]", controllerProps.SensedValue)); } } else if (controllerProps.ControlVar == CtrlVarType::Flow) { - ShowContinueError(state, format("Controller mass flow rate setpoint = {:.2T} [kg/s]", controllerProps.SetPointValue)); - ShowContinueError(state, format("Controller sensed mass flow rate = {:.2T} [kg/s]", controllerProps.SensedValue)); + 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)); } else { // bad control variable input checked in input routine } if (controllerProps.ActuatorVar == CtrlVarType::Flow) { - ShowContinueError(state, format("Controller actuator mass flow rate set to {:.2T} [kg/s]", controllerProps.MaxAvailActuated)); + ShowContinueError(state, + EnergyPlus::format("Controller actuator mass flow rate set to {:.2T} [kg/s]", controllerProps.MaxAvailActuated)); if (controllerProps.ControlVar == CtrlVarType::Temperature || controllerProps.ControlVar == CtrlVarType::TemperatureAndHumidityRatio) { - ShowContinueError( - state, format("Controller actuator temperature = {:.2T} [C]", state.dataLoopNodes->Node(controllerProps.ActuatedNode).Temp)); + ShowContinueError(state, + EnergyPlus::format("Controller actuator temperature = {:.2T} [C]", + state.dataLoopNodes->Node(controllerProps.ActuatedNode).Temp)); if (controllerProps.WaterCoilType == DataPlant::PlantEquipmentType::CoilWaterCooling || controllerProps.WaterCoilType == DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling) { if (controllerProps.HumRatCtrlOverride) { @@ -1548,9 +1570,9 @@ void FindRootSimpleController(EnergyPlusData &state, } break; default: { // Should never happen - ShowSevereError(state, format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, format(" Controller name={}", ControllerName)); - ShowContinueError(state, format(" Unrecognized root finder status flag={}", rootFinders.StatusFlag)); + ShowSevereError(state, EnergyPlus::format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, EnergyPlus::format(" Controller name={}", ControllerName)); + ShowContinueError(state, EnergyPlus::format(" Unrecognized root finder status flag={}", rootFinders.StatusFlag)); ShowFatalError(state, "Preceding error causes program termination."); } break; } @@ -1700,8 +1722,8 @@ bool CheckMinActiveController(EnergyPlusData &state, int const ControlNum) } break; default: { // Should never happen - ShowSevereError(state, format("CheckMinActiveController: Invalid controller action during {}.", CreateHVACStepFullString(state))); - ShowContinueError(state, format("CheckMinActiveController: Controller name={}", controllerProps.ControllerName)); + ShowSevereError(state, EnergyPlus::format("CheckMinActiveController: Invalid controller action during {}.", CreateHVACStepFullString(state))); + ShowContinueError(state, EnergyPlus::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; @@ -1741,8 +1763,8 @@ bool CheckMaxActiveController(EnergyPlusData &state, int const ControlNum) } break; default: { // Should never happen - ShowSevereError(state, format("CheckMaxActiveController: Invalid controller action during {}.", CreateHVACStepFullString(state))); - ShowContinueError(state, format("CheckMaxActiveController: Controller name={}", ControllerProps.ControllerName)); + ShowSevereError(state, EnergyPlus::format("CheckMaxActiveController: Invalid controller action during {}.", CreateHVACStepFullString(state))); + ShowContinueError(state, EnergyPlus::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; @@ -1794,7 +1816,8 @@ void UpdateController(EnergyPlusData &state, int const ControlNum) // Node(ActuatedNode)%MassFlowRate = ControllerProps(ControlNum)%NextActuatedValue } break; default: { - ShowFatalError(state, format("UpdateController: Invalid Actuator Variable Type={}", ControlVariableTypes(ControllerProps.ActuatorVar))); + ShowFatalError(state, + EnergyPlus::format("UpdateController: Invalid Actuator Variable Type={}", ControlVariableTypes(ControllerProps.ActuatorVar))); } break; } } @@ -2137,7 +2160,8 @@ void SetupAirLoopControllersTracer(EnergyPlusData &state, int const AirLoopNum) airLoopStats.TraceFile->open(); if (!airLoopStats.TraceFile->good()) { - ShowFatalError(state, format("SetupAirLoopControllersTracer: Failed to open air loop trace file \"{}\" for output (write).", TraceFilePath)); + ShowFatalError( + state, EnergyPlus::format("SetupAirLoopControllersTracer: Failed to open air loop trace file \"{}\" for output (write).", TraceFilePath)); return; } @@ -2301,8 +2325,9 @@ void SetupIndividualControllerTracer(EnergyPlusData &state, int const ControlNum TraceFile.open(); if (!TraceFile.good()) { - ShowFatalError(state, - format("SetupIndividualControllerTracer: Failed to open controller trace file \"{}\" for output (write).", TraceFilePath)); + ShowFatalError( + state, + EnergyPlus::format("SetupIndividualControllerTracer: Failed to open controller trace file \"{}\" for output (write).", TraceFilePath)); return; } @@ -2461,8 +2486,9 @@ void TraceIndividualController(EnergyPlusData &state, } break; default: { // Should never happen - ShowFatalError( - state, format("TraceIndividualController: Invalid Operation passed={}, Controller name={}", Operation, ControllerProps.ControllerName)); + ShowFatalError(state, + EnergyPlus::format( + "TraceIndividualController: Invalid Operation passed={}, Controller name={}", Operation, ControllerProps.ControllerName)); } break; } @@ -2546,7 +2572,7 @@ std::string MakeHVACTimeIntervalString(const EnergyPlusData &state) // This function creates a string describing the current time interval of the system // time step. - return format("{} - {}", General::CreateTimeString(GetPreviousHVACTime(state)), General::CreateTimeString(GetCurrentHVACTime(state))); + return EnergyPlus::format("{} - {}", General::CreateTimeString(GetPreviousHVACTime(state)), General::CreateTimeString(GetCurrentHVACTime(state))); } void CheckControllerListOrder(EnergyPlusData &state) @@ -2622,8 +2648,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, - format("Check the AirLoopHVAC:ControllerList for the air loop called \"{}\"", - state.dataAirSystemsData->PrimaryAirSystems(AirSysNum).Name)); + EnergyPlus::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."); @@ -2751,9 +2777,10 @@ int GetControllerIndex(EnergyPlusData &state, std::string const &ControllerName int ControllerIndex = Util::FindItemInList(ControllerName, state.dataHVACControllers->ControllerProps, &ControllerPropsType::ControllerName); if (ControllerIndex == 0) { - ShowFatalError(state, - format("ManageControllers: Invalid controller={}. The only valid controller type for an AirLoopHVAC is Controller:WaterCoil.", - ControllerName)); + ShowFatalError( + state, + EnergyPlus::format("ManageControllers: Invalid controller={}. The only valid controller type for an AirLoopHVAC is Controller:WaterCoil.", + ControllerName)); } return ControllerIndex; diff --git a/src/EnergyPlus/HVACCooledBeam.cc b/src/EnergyPlus/HVACCooledBeam.cc index 12b950378ec..c9f9e94bb54 100644 --- a/src/EnergyPlus/HVACCooledBeam.cc +++ b/src/EnergyPlus/HVACCooledBeam.cc @@ -143,31 +143,32 @@ namespace HVACCooledBeam { if (CompIndex == 0) { CBNum = Util::FindItemInList(CompName, state.dataHVACCooledBeam->CoolBeam); if (CBNum == 0) { - ShowFatalError(state, format("SimCoolBeam: Cool Beam Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimCoolBeam: Cool Beam Unit not found={}", CompName)); } CompIndex = CBNum; } else { CBNum = CompIndex; if (CBNum > state.dataHVACCooledBeam->NumCB || CBNum < 1) { ShowFatalError(state, - format("SimCoolBeam: Invalid CompIndex passed={}, Number of Cool Beam Units={}, System name={}", - CompIndex, - state.dataHVACCooledBeam->NumCB, - CompName)); + EnergyPlus::format("SimCoolBeam: Invalid CompIndex passed={}, Number of Cool Beam Units={}, System name={}", + CompIndex, + state.dataHVACCooledBeam->NumCB, + CompName)); } if (state.dataHVACCooledBeam->CheckEquipName(CBNum)) { if (CompName != state.dataHVACCooledBeam->CoolBeam(CBNum).Name) { ShowFatalError(state, - format("SimCoolBeam: Invalid CompIndex passed={}, Cool Beam Unit name={}, stored Cool Beam Unit for that index={}", - CompIndex, - CompName, - state.dataHVACCooledBeam->CoolBeam(CBNum).Name)); + EnergyPlus::format( + "SimCoolBeam: Invalid CompIndex passed={}, Cool Beam Unit name={}, stored Cool Beam Unit for that index={}", + CompIndex, + CompName, + state.dataHVACCooledBeam->CoolBeam(CBNum).Name)); } state.dataHVACCooledBeam->CheckEquipName(CBNum) = false; } } if (CBNum == 0) { - ShowFatalError(state, format("Cool Beam Unit not found = {}", CompName)); + ShowFatalError(state, EnergyPlus::format("Cool Beam Unit not found = {}", CompName)); } state.dataSize->CurTermUnitSizingNum = @@ -280,8 +281,8 @@ namespace HVACCooledBeam { } else if (Util::SameString(CoolBeam(CBNum).CBTypeString, "Active")) { CoolBeam(CBNum).CBType = CooledBeamType::Active; } else { - ShowSevereError(state, format("Illegal {} = {}.", cAlphaFields(3), CoolBeam(CBNum).CBTypeString)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, CoolBeam(CBNum).Name)); + ShowSevereError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(3), CoolBeam(CBNum).CBTypeString)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, CoolBeam(CBNum).Name)); ErrorsFound = true; } @@ -438,8 +439,10 @@ namespace HVACCooledBeam { if (CoolBeam(CBNum).ADUNum == 0) { ShowSevereError( state, - format("{}No matching Air Distribution Unit, for Unit = [{},{}].", RoutineName, CurrentModuleObject, CoolBeam(CBNum).Name)); - ShowContinueError(state, format("...should have outlet node={}", state.dataLoopNodes->NodeID(CoolBeam(CBNum).AirOutNode))); + EnergyPlus::format( + "{}No matching Air Distribution Unit, for Unit = [{},{}].", RoutineName, CurrentModuleObject, CoolBeam(CBNum).Name)); + ShowContinueError(state, + EnergyPlus::format("...should have outlet node={}", state.dataLoopNodes->NodeID(CoolBeam(CBNum).AirOutNode))); ErrorsFound = true; } else { @@ -465,8 +468,8 @@ namespace HVACCooledBeam { } } if (!AirNodeFound) { - ShowSevereError(state, format("The outlet air node from the {} = {}", CurrentModuleObject, CoolBeam(CBNum).Name)); - ShowContinueError(state, format("did not have a matching Zone Equipment Inlet Node, Node ={}", Alphas(5))); + ShowSevereError(state, EnergyPlus::format("The outlet air node from the {} = {}", CurrentModuleObject, CoolBeam(CBNum).Name)); + ShowContinueError(state, EnergyPlus::format("did not have a matching Zone Equipment Inlet Node, Node ={}", Alphas(5))); ErrorsFound = true; } } @@ -479,7 +482,7 @@ namespace HVACCooledBeam { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input. Preceding conditions cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input. Preceding conditions cause termination.", RoutineName)); } } @@ -544,9 +547,9 @@ namespace HVACCooledBeam { continue; } ShowSevereError(state, - format("InitCoolBeam: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - state.dataDefineEquipment->AirDistUnit(coolBeam.ADUNum).Name)); - ShowContinueError(state, format("...Unit=[{},{}] will not be simulated.", CurrentModuleObject, coolBeam.Name)); + EnergyPlus::format("InitCoolBeam: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", + state.dataDefineEquipment->AirDistUnit(coolBeam.ADUNum).Name)); + ShowContinueError(state, EnergyPlus::format("...Unit=[{},{}] will not be simulated.", CurrentModuleObject, coolBeam.Name)); } } @@ -743,7 +746,7 @@ namespace HVACCooledBeam { state, coolBeam.UnitType, coolBeam.Name, "Maximum Total Chilled Water Flow Rate [m3/s]", coolBeam.MaxCoolWaterVolFlow); } else { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in{} Object={}", coolBeam.UnitType, coolBeam.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in{} Object={}", coolBeam.UnitType, coolBeam.Name)); ErrorsFound = true; } } @@ -823,7 +826,7 @@ namespace HVACCooledBeam { BaseSizer::reportSizerOutput(state, coolBeam.UnitType, coolBeam.Name, "Beam Length [m]", coolBeam.BeamLength); } else { ShowSevereError(state, "Autosizing of cooled beam length requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in{} Object={}", coolBeam.UnitType, coolBeam.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in{} Object={}", coolBeam.UnitType, coolBeam.Name)); ErrorsFound = true; } } @@ -951,10 +954,10 @@ namespace HVACCooledBeam { int SolFlag = 0; General::SolveRoot(state, ErrTolerance, 50, SolFlag, CWFlow, f, MinColdWaterFlow, MaxColdWaterFlow); if (SolFlag == -1) { - ShowWarningError(state, format("Cold water control failed in cooled beam unit {}", coolBeam.Name)); + ShowWarningError(state, EnergyPlus::format("Cold water control failed in cooled beam unit {}", coolBeam.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating cold water mass flow rate"); } else if (SolFlag == -2) { - ShowWarningError(state, format("Cold water control failed in cooled beam unit {}", coolBeam.Name)); + ShowWarningError(state, EnergyPlus::format("Cold water control failed in cooled beam unit {}", coolBeam.Name)); ShowContinueError(state, " Bad cold water flow limits"); } } else { diff --git a/src/EnergyPlus/HVACDXHeatPumpSystem.cc b/src/EnergyPlus/HVACDXHeatPumpSystem.cc index c3fd2a9e959..c9fe845f307 100644 --- a/src/EnergyPlus/HVACDXHeatPumpSystem.cc +++ b/src/EnergyPlus/HVACDXHeatPumpSystem.cc @@ -142,25 +142,26 @@ namespace HVACDXHeatPumpSystem { if (CompIndex == 0) { DXSystemNum = Util::FindItemInList(DXHeatPumpSystemName, DXHeatPumpSystem); if (DXSystemNum == 0) { - ShowFatalError(state, format("SimDXHeatPumpSystem: DXUnit not found={}", DXHeatPumpSystemName)); + ShowFatalError(state, EnergyPlus::format("SimDXHeatPumpSystem: DXUnit not found={}", DXHeatPumpSystemName)); } CompIndex = DXSystemNum; } else { DXSystemNum = CompIndex; if (DXSystemNum > NumDXHeatPumpSystems || DXSystemNum < 1) { ShowFatalError(state, - format("SimDXHeatPumpSystem: Invalid CompIndex passed={}, Number of DX Units={}, DX Unit name={}", - DXSystemNum, - NumDXHeatPumpSystems, - DXHeatPumpSystemName)); + EnergyPlus::format("SimDXHeatPumpSystem: Invalid CompIndex passed={}, Number of DX Units={}, DX Unit name={}", + DXSystemNum, + NumDXHeatPumpSystems, + DXHeatPumpSystemName)); } if (state.dataHVACDXHeatPumpSys->CheckEquipName(DXSystemNum)) { if (DXHeatPumpSystemName != DXHeatPumpSystem(DXSystemNum).Name) { - ShowFatalError(state, - format("SimDXHeatPumpSystem: Invalid CompIndex passed={}, DX Unit name={}, stored DX Unit Name for that index={}", - DXSystemNum, - DXHeatPumpSystemName, - DXHeatPumpSystem(DXSystemNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimDXHeatPumpSystem: Invalid CompIndex passed={}, DX Unit name={}, stored DX Unit Name for that index={}", + DXSystemNum, + DXHeatPumpSystemName, + DXHeatPumpSystem(DXSystemNum).Name)); } state.dataHVACDXHeatPumpSys->CheckEquipName(DXSystemNum) = false; } @@ -203,7 +204,8 @@ namespace HVACDXHeatPumpSystem { state.dataHVACDXHeatPumpSys->OnOffAirFlowRatio); } break; default: { - ShowFatalError(state, format("SimDXCoolingSystem: Invalid DX Heating System/Coil={}", DXHeatPumpSystem(DXSystemNum).HeatPumpCoilType)); + ShowFatalError( + state, EnergyPlus::format("SimDXCoolingSystem: Invalid DX Heating System/Coil={}", DXHeatPumpSystem(DXSystemNum).HeatPumpCoilType)); } break; } // set econo lockout flag @@ -331,8 +333,8 @@ namespace HVACDXHeatPumpSystem { DXHeatPumpSystem(DXHeatSysNum).HeatPumpCoilName = Alphas(4); } else { - ShowSevereError(state, format("Invalid entry for {} :{}", cAlphaFields(3), Alphas(3))); - ShowContinueError(state, format("In {}=\"{}\".", CurrentModuleObject, DXHeatPumpSystem(DXHeatSysNum).Name)); + ShowSevereError(state, EnergyPlus::format("Invalid entry for {} :{}", cAlphaFields(3), Alphas(3))); + ShowContinueError(state, EnergyPlus::format("In {}=\"{}\".", CurrentModuleObject, DXHeatPumpSystem(DXHeatSysNum).Name)); state.dataHVACDXHeatPumpSys->ErrorsFound = true; } @@ -375,7 +377,7 @@ namespace HVACDXHeatPumpSystem { IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("In {} = \"{}\".", CurrentModuleObject, DXHeatPumpSystem(DXHeatSysNum).Name)); + ShowContinueError(state, EnergyPlus::format("In {} = \"{}\".", CurrentModuleObject, DXHeatPumpSystem(DXHeatSysNum).Name)); state.dataHVACDXHeatPumpSys->ErrorsFound = true; } @@ -397,7 +399,7 @@ namespace HVACDXHeatPumpSystem { } // End of the DX System Loop if (state.dataHVACDXHeatPumpSys->ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Program terminates.", RoutineName)); } for (DXHeatSysNum = 1; DXHeatSysNum <= NumDXHeatPumpSystems; ++DXHeatSysNum) { @@ -476,18 +478,18 @@ namespace HVACDXHeatPumpSystem { if (state.dataLoopNodes->Node(ControlNode).TempSetPoint == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("{}: Missing temperature setpoint for DX unit= {}", - DXHeatPumpSystem.DXHeatPumpSystemType, - DXHeatPumpSystem.Name)); + EnergyPlus::format("{}: Missing temperature setpoint for DX unit= {}", + DXHeatPumpSystem.DXHeatPumpSystemType, + DXHeatPumpSystem.Name)); ShowContinueError(state, " use a Set Point Manager to establish a setpoint at the unit control node."); state.dataHVACGlobal->SetPointErrorFlag = true; } else { CheckIfNodeSetPointManagedByEMS(state, ControlNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - format("{}: Missing temperature setpoint for DX unit= {}", - DXHeatPumpSystem.DXHeatPumpSystemType, - DXHeatPumpSystem.Name)); + EnergyPlus::format("{}: Missing temperature setpoint for DX unit= {}", + DXHeatPumpSystem.DXHeatPumpSystemType, + DXHeatPumpSystem.Name)); ShowContinueError(state, " use a Set Point Manager to establish a setpoint at the unit control node."); ShowContinueError(state, " or use an EMS actuator to establish a temperature setpoint at the unit control node."); @@ -695,11 +697,13 @@ namespace HVACDXHeatPumpSystem { ++DXHeatPumpSystem.DXCoilSensPLRIter; ShowWarningError( state, - format("{} - Iteration limit exceeded calculating DX unit sensible part-load ratio for unit = {}", - DXHeatPumpSystem.DXHeatPumpSystemType, - DXHeatPumpSystem.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + EnergyPlus::format( + "{} - Iteration limit exceeded calculating DX unit sensible part-load ratio for unit = {}", + DXHeatPumpSystem.DXHeatPumpSystemType, + DXHeatPumpSystem.Name)); + ShowContinueError( + state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); + 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:"); @@ -719,12 +723,13 @@ namespace HVACDXHeatPumpSystem { if (!state.dataGlobal->WarmupFlag) { if (DXHeatPumpSystem.DXCoilSensPLRFail < 1) { ++DXHeatPumpSystem.DXCoilSensPLRFail; - ShowWarningError(state, - format("{} - DX unit sensible part-load ratio calculation failed: part-load ratio " - "limits exceeded, for unit = {}", - DXHeatPumpSystem.DXHeatPumpSystemType, - DXHeatPumpSystem.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::format("{} - DX unit sensible part-load ratio calculation failed: part-load ratio " + "limits exceeded, for unit = {}", + DXHeatPumpSystem.DXHeatPumpSystemType, + DXHeatPumpSystem.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:"); @@ -895,13 +900,15 @@ namespace HVACDXHeatPumpSystem { if (!state.dataGlobal->WarmupFlag) { if (DXHeatPumpSystem.DXCoilSensPLRIter < 1) { ++DXHeatPumpSystem.DXCoilSensPLRIter; - ShowWarningError(state, - format("{} - Iteration limit exceeded calculating DX unit sensible part-load " - "ratio for unit = {}", - DXHeatPumpSystem.DXHeatPumpSystemType, - DXHeatPumpSystem.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::format("{} - Iteration limit exceeded calculating DX unit sensible part-load " + "ratio for unit = {}", + DXHeatPumpSystem.DXHeatPumpSystemType, + DXHeatPumpSystem.Name)); + ShowContinueError( + state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); + 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:"); @@ -921,12 +928,13 @@ namespace HVACDXHeatPumpSystem { if (!state.dataGlobal->WarmupFlag) { if (DXHeatPumpSystem.DXCoilSensPLRFail < 1) { ++DXHeatPumpSystem.DXCoilSensPLRFail; - ShowWarningError(state, - format("{} - DX unit sensible part-load ratio calculation failed: part-load " - "ratio limits exceeded, for unit = {}", - DXHeatPumpSystem.DXHeatPumpSystemType, - DXHeatPumpSystem.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::format("{} - DX unit sensible part-load ratio calculation failed: part-load " + "ratio limits exceeded, for unit = {}", + DXHeatPumpSystem.DXHeatPumpSystemType, + DXHeatPumpSystem.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:"); @@ -968,13 +976,15 @@ namespace HVACDXHeatPumpSystem { if (!state.dataGlobal->WarmupFlag) { if (DXHeatPumpSystem.DXCoilSensPLRIter < 1) { ++DXHeatPumpSystem.DXCoilSensPLRIter; - ShowWarningError(state, - format("{} - Iteration limit exceeded calculating DX unit sensible part-load " - "ratio for unit = {}", - DXHeatPumpSystem.DXHeatPumpSystemType, - DXHeatPumpSystem.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::format("{} - Iteration limit exceeded calculating DX unit sensible part-load " + "ratio for unit = {}", + DXHeatPumpSystem.DXHeatPumpSystemType, + DXHeatPumpSystem.Name)); + ShowContinueError( + state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); + 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:"); @@ -994,12 +1004,13 @@ namespace HVACDXHeatPumpSystem { if (!state.dataGlobal->WarmupFlag) { if (DXHeatPumpSystem.DXCoilSensPLRFail < 1) { ++DXHeatPumpSystem.DXCoilSensPLRFail; - ShowWarningError(state, - format("{} - DX unit sensible part-load ratio calculation failed: part-load " - "ratio limits exceeded, for unit = {}", - DXHeatPumpSystem.DXHeatPumpSystemType, - DXHeatPumpSystem.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::format("{} - DX unit sensible part-load ratio calculation failed: part-load " + "ratio limits exceeded, for unit = {}", + DXHeatPumpSystem.DXHeatPumpSystemType, + DXHeatPumpSystem.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:"); @@ -1027,8 +1038,9 @@ namespace HVACDXHeatPumpSystem { } } break; default: { - ShowFatalError(state, - format("ControlDXHeatingSystem: Invalid DXHeatPumpSystem coil type = {}", DXHeatPumpSystem.HeatPumpCoilType)); + ShowFatalError( + state, + EnergyPlus::format("ControlDXHeatingSystem: Invalid DXHeatPumpSystem coil type = {}", DXHeatPumpSystem.HeatPumpCoilType)); } break; } } diff --git a/src/EnergyPlus/HVACDuct.cc b/src/EnergyPlus/HVACDuct.cc index 3542dfa822c..c985e585b4b 100644 --- a/src/EnergyPlus/HVACDuct.cc +++ b/src/EnergyPlus/HVACDuct.cc @@ -137,25 +137,26 @@ namespace HVACDuct { if (CompIndex == 0) { DuctNum = Util::FindItemInList(CompName, state.dataHVACDuct->Duct); if (DuctNum == 0) { - ShowFatalError(state, format("SimDuct: Component not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimDuct: Component not found={}", CompName)); } CompIndex = DuctNum; } else { DuctNum = CompIndex; if (DuctNum > state.dataHVACDuct->NumDucts || DuctNum < 1) { ShowFatalError(state, - format("SimDuct: Invalid CompIndex passed={}, Number of Components={}, Entered Component name={}", - DuctNum, - state.dataHVACDuct->NumDucts, - CompName)); + EnergyPlus::format("SimDuct: Invalid CompIndex passed={}, Number of Components={}, Entered Component name={}", + DuctNum, + state.dataHVACDuct->NumDucts, + CompName)); } if (state.dataHVACDuct->CheckEquipName(DuctNum)) { if (CompName != state.dataHVACDuct->Duct(DuctNum).Name) { - ShowFatalError(state, - format("SimDuct: Invalid CompIndex passed={}, Component name={}, stored Component Name for that index={}", - DuctNum, - CompName, - state.dataHVACDuct->Duct(DuctNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimDuct: Invalid CompIndex passed={}, Component name={}, stored Component Name for that index={}", + DuctNum, + CompName, + state.dataHVACDuct->Duct(DuctNum).Name)); } state.dataHVACDuct->CheckEquipName(DuctNum) = false; } @@ -244,7 +245,7 @@ namespace HVACDuct { // No output variables if (ErrorsFound) { - ShowFatalError(state, format("{} Errors found in input", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{} Errors found in input", RoutineName)); } } diff --git a/src/EnergyPlus/HVACFourPipeBeam.cc b/src/EnergyPlus/HVACFourPipeBeam.cc index d34f4125032..045940a66b4 100644 --- a/src/EnergyPlus/HVACFourPipeBeam.cc +++ b/src/EnergyPlus/HVACFourPipeBeam.cc @@ -192,22 +192,22 @@ namespace FourPipeBeam { !state.dataIPShortCut->lAlphaFieldBlanks(8)) { // outlet node but no inlet node for chilled water thisBeam->beamCoolingPresent = false; ShowWarningError(state, - format("{}{}: missing {} for {}={}, simulation continues with no beam cooling", - routineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(7), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}{}: missing {} for {}={}, simulation continues with no beam cooling", + routineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(7), + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1))); } else if (!state.dataIPShortCut->lAlphaFieldBlanks(7) && state.dataIPShortCut->lAlphaFieldBlanks(8)) { // inlet node but no outlet node for chilled water thisBeam->beamCoolingPresent = false; ShowWarningError(state, - format("{}{}: missing {} for {}={}, simulation continues with no beam cooling", - routineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(8), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}{}: missing {} for {}={}, simulation continues with no beam cooling", + routineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(8), + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1))); } else { thisBeam->beamCoolingPresent = true; thisBeam->cWInNodeNum = GetOnlySingleNode(state, @@ -237,22 +237,22 @@ namespace FourPipeBeam { !state.dataIPShortCut->lAlphaFieldBlanks(10)) { // outlet node but no inlet node for hot water thisBeam->beamHeatingPresent = false; ShowWarningError(state, - format("{}{}: missing {} for {}={}, simulation continues with no beam heating", - routineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(9), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}{}: missing {} for {}={}, simulation continues with no beam heating", + routineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(9), + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1))); } else if (!state.dataIPShortCut->lAlphaFieldBlanks(9) && state.dataIPShortCut->lAlphaFieldBlanks(10)) { // inlet node but no outlet node for hot water thisBeam->beamHeatingPresent = false; ShowWarningError(state, - format("{}{}: missing {} for {}={}, simulation continues with no beam heating", - routineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(10), - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}{}: missing {} for {}={}, simulation continues with no beam heating", + routineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(10), + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1))); } else { thisBeam->beamHeatingPresent = true; thisBeam->hWInNodeNum = GetOnlySingleNode(state, @@ -299,20 +299,23 @@ namespace FourPipeBeam { thisBeam->modCoolingQdotDeltaTFuncNum = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(11)); if (thisBeam->modCoolingQdotDeltaTFuncNum == 0 && thisBeam->beamCoolingPresent) { - ShowSevereError(state, format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); ErrorsFound = true; } thisBeam->modCoolingQdotAirFlowFuncNum = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(12)); if (thisBeam->modCoolingQdotAirFlowFuncNum == 0 && thisBeam->beamCoolingPresent) { - ShowSevereError(state, format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(12), state.dataIPShortCut->cAlphaArgs(12))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(12), state.dataIPShortCut->cAlphaArgs(12))); ErrorsFound = true; } thisBeam->modCoolingQdotCWFlowFuncNum = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(13)); if (thisBeam->modCoolingQdotCWFlowFuncNum == 0 && thisBeam->beamCoolingPresent) { - ShowSevereError(state, format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); ErrorsFound = true; } thisBeam->qDotNormRatedHeating = state.dataIPShortCut->rNumericArgs(9); @@ -320,20 +323,23 @@ namespace FourPipeBeam { thisBeam->vDotNormRatedHW = state.dataIPShortCut->rNumericArgs(11); thisBeam->modHeatingQdotDeltaTFuncNum = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(14)); if (thisBeam->modHeatingQdotDeltaTFuncNum == 0 && thisBeam->beamHeatingPresent) { - ShowSevereError(state, format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); ErrorsFound = true; } thisBeam->modHeatingQdotAirFlowFuncNum = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(15)); if (thisBeam->modHeatingQdotAirFlowFuncNum == 0 && thisBeam->beamHeatingPresent) { - ShowSevereError(state, format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); ErrorsFound = true; } thisBeam->modHeatingQdotHWFlowFuncNum = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(16)); if (thisBeam->modHeatingQdotHWFlowFuncNum == 0 && thisBeam->beamHeatingPresent) { - ShowSevereError(state, format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(16), state.dataIPShortCut->cAlphaArgs(16))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", routineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(16), state.dataIPShortCut->cAlphaArgs(16))); ErrorsFound = true; } // Register component set data @@ -452,9 +458,10 @@ namespace FourPipeBeam { } // assumes if there isn't one assigned, it's an error if (thisBeam->aDUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for Unit = [{},{}].", routineName, cCurrentModuleObject, thisBeam->name)); - ShowContinueError(state, format("...should have outlet node={}", state.dataLoopNodes->NodeID(thisBeam->airOutNodeNum))); + ShowSevereError( + state, + EnergyPlus::format("{}No matching Air Distribution Unit, for Unit = [{},{}].", routineName, cCurrentModuleObject, thisBeam->name)); + ShowContinueError(state, EnergyPlus::format("...should have outlet node={}", state.dataLoopNodes->NodeID(thisBeam->airOutNodeNum))); ErrorsFound = true; } else { @@ -485,8 +492,9 @@ namespace FourPipeBeam { } } if (!airNodeFound) { - ShowSevereError(state, format("The outlet air node from the {} = {}", cCurrentModuleObject, thisBeam->name)); - ShowContinueError(state, format("did not have a matching Zone Equipment Inlet Node, Node ={}", state.dataIPShortCut->cAlphaArgs(5))); + 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))); ErrorsFound = true; } @@ -494,7 +502,7 @@ namespace FourPipeBeam { state.dataFourPipeBeam->FourPipeBeams.push_back(thisBeam); return thisBeam; } - ShowFatalError(state, format("{}Errors found in getting input. Preceding conditions cause termination.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input. Preceding conditions cause termination.", routineName)); return nullptr; } @@ -566,7 +574,7 @@ namespace FourPipeBeam { this->cWInNodeNum, _); if (errFlag) { - ShowFatalError(state, format("{} Program terminated for previous conditions.", routineName)); + ShowFatalError(state, EnergyPlus::format("{} Program terminated for previous conditions.", routineName)); } } if (this->beamHeatingPresent) { @@ -581,7 +589,7 @@ namespace FourPipeBeam { this->hWInNodeNum, _); if (errFlag) { - ShowFatalError(state, format("{} Program terminated for previous conditions.", routineName)); + ShowFatalError(state, EnergyPlus::format("{} Program terminated for previous conditions.", routineName)); } } this->plantLoopScanFlag = false; @@ -592,10 +600,10 @@ namespace FourPipeBeam { if (this->aDUNum != 0) { if (!CheckZoneEquipmentList(state, "ZONEHVAC:AIRDISTRIBUTIONUNIT", state.dataDefineEquipment->AirDistUnit(this->aDUNum).Name)) { ShowSevereError(state, - format("{}: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - routineName, - state.dataDefineEquipment->AirDistUnit(this->aDUNum).Name)); - ShowContinueError(state, format("...Unit=[{},{}] will not be simulated.", this->unitType, this->name)); + 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)); } this->zoneEquipmentListChecked = true; } @@ -809,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, format("Occurs in {} Object={}", this->unitType, this->name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", this->unitType, this->name)); ErrorsFound = true; } else { this->cWTempIn = state.dataSize->PlantSizData(pltSizCoolNum).ExitTemp; @@ -858,10 +866,10 @@ namespace FourPipeBeam { int SolFlag = 0; General::SolveRoot(state, ErrTolerance, 50, SolFlag, mDotAirSolutionCooling, f, minFlow, maxFlowCool); if (SolFlag == -1) { - ShowWarningError(state, format("Cooling load sizing search failed in four pipe beam unit called {}", this->name)); + ShowWarningError(state, EnergyPlus::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, format("Cooling load sizing search failed in four pipe beam unit called {}", this->name)); + ShowWarningError(state, EnergyPlus::format("Cooling load sizing search failed in four pipe beam unit called {}", this->name)); ShowContinueError(state, " Bad size limits"); } } @@ -882,7 +890,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, format("Occurs in {} Object={}", this->unitType, this->name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", this->unitType, this->name)); ErrorsFound = true; } else { this->hWTempIn = state.dataSize->PlantSizData(pltSizHeatNum).ExitTemp; @@ -931,10 +939,10 @@ namespace FourPipeBeam { int SolFlag = 0; General::SolveRoot(state, ErrTolerance, 50, SolFlag, mDotAirSolutionHeating, f, 0.0, maxFlowHeat); if (SolFlag == -1) { - ShowWarningError(state, format("Heating load sizing search failed in four pipe beam unit called {}", this->name)); + ShowWarningError(state, EnergyPlus::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, format("Heating load sizing search failed in four pipe beam unit called {}", this->name)); + ShowWarningError(state, EnergyPlus::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 0ac30e87c82..ea680c3c07d 100644 --- a/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc +++ b/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc @@ -134,25 +134,27 @@ namespace HVACHXAssistedCoolingCoil { if (CompIndex == 0) { HXAssistedCoilNum = Util::FindItemInList(HXAssistedCoilName, state.dataHVACAssistedCC->HXAssistedCoil); if (HXAssistedCoilNum == 0) { - ShowFatalError(state, format("HX Assisted Coil not found={}", HXAssistedCoilName)); + ShowFatalError(state, EnergyPlus::format("HX Assisted Coil not found={}", HXAssistedCoilName)); } CompIndex = HXAssistedCoilNum; } else { HXAssistedCoilNum = CompIndex; if (HXAssistedCoilNum > state.dataHVACAssistedCC->TotalNumHXAssistedCoils || HXAssistedCoilNum < 1) { - ShowFatalError(state, - format("SimHXAssistedCoolingCoil: Invalid CompIndex passed={}, Number of HX Assisted Cooling Coils={}, Coil name={}", - HXAssistedCoilNum, - state.dataHVACAssistedCC->TotalNumHXAssistedCoils, - HXAssistedCoilName)); + ShowFatalError( + state, + EnergyPlus::format("SimHXAssistedCoolingCoil: Invalid CompIndex passed={}, Number of HX Assisted Cooling Coils={}, Coil name={}", + HXAssistedCoilNum, + state.dataHVACAssistedCC->TotalNumHXAssistedCoils, + HXAssistedCoilName)); } if (state.dataHVACAssistedCC->CheckEquipName(HXAssistedCoilNum)) { if (!HXAssistedCoilName.empty() && HXAssistedCoilName != state.dataHVACAssistedCC->HXAssistedCoil(HXAssistedCoilNum).Name) { - ShowFatalError(state, - format("SimHXAssistedCoolingCoil: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - HXAssistedCoilNum, - HXAssistedCoilName, - state.dataHVACAssistedCC->HXAssistedCoil(HXAssistedCoilNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimHXAssistedCoolingCoil: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + HXAssistedCoilNum, + HXAssistedCoilName, + state.dataHVACAssistedCC->HXAssistedCoil(HXAssistedCoilNum).Name)); } state.dataHVACAssistedCC->CheckEquipName(HXAssistedCoilNum) = false; } @@ -318,7 +320,7 @@ namespace HVACHXAssistedCoolingCoil { int coolingCoilIndex_temp = CoilCoolingDX::factory(state, thisHXCoil.CoolingCoilName); thisHXCoil.CoolingCoilIndex = coolingCoilIndex_temp; if (coolingCoilIndex_temp < 0) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, AlphArray(5))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, AlphArray(5))); CoolingCoilErrFlag = true; ErrorsFound = true; } @@ -328,7 +330,7 @@ namespace HVACHXAssistedCoolingCoil { CoolingCoilErrFlag = true; } if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); ErrorsFound = true; } } else if (Util::SameString(thisHXCoil.CoolingCoilType, "Coil:Cooling:DX:SingleSpeed")) { @@ -339,7 +341,7 @@ namespace HVACHXAssistedCoolingCoil { DXCoils::GetDXCoilIndex( state, thisHXCoil.CoolingCoilName, thisHXCoil.CoolingCoilIndex, CoolingCoilErrFlag, thisHXCoil.CoolingCoilType); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); ErrorsFound = true; } } else if (Util::SameString(thisHXCoil.CoolingCoilType, "Coil:Cooling:DX:VariableSpeed")) { @@ -350,78 +352,83 @@ namespace HVACHXAssistedCoolingCoil { thisHXCoil.CoolingCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, AlphArray(4), AlphArray(5), CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); ErrorsFound = true; } thisHXCoil.DXCoilNumOfSpeeds = VariableSpeedCoils::GetVSCoilNumOfSpeeds(state, thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); - ShowContinueError(state, format("Invalid {}=\"{}\"", cAlphaFields(4), thisHXCoil.CoolingCoilType)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid {}=\"{}\"", cAlphaFields(4), thisHXCoil.CoolingCoilType)); ErrorsFound = true; } HXErrFlag = false; SupplyAirInletNode = HeatRecovery::GetSupplyInletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SupplyAirOutletNode = HeatRecovery::GetSupplyOutletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SecondaryAirInletNode = HeatRecovery::GetSecondaryInletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SecondaryAirOutletNode = HeatRecovery::GetSecondaryOutletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (Util::SameString(thisHXCoil.CoolingCoilType, "Coil:Cooling:DX")) { CoolingCoilInletNodeNum = state.dataCoilCoolingDX->coilCoolingDXs[thisHXCoil.CoolingCoilIndex].evapInletNodeIndex; if (SupplyAirOutletNode != CoolingCoilInletNodeNum) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - format("The supply air outlet node name in heat exchanger {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + EnergyPlus::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 {}=\"{}\"", + thisHXCoil.CoolingCoilType, + thisHXCoil.CoolingCoilName)); ShowContinueError( state, - format("must match the cooling coil inlet node name in {}=\"{}\"", thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName)); - ShowContinueError(state, - format("Heat exchanger supply air outlet node name=\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); - ShowContinueError(state, format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); + 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))); ErrorsFound = true; } CoolingCoilOutletNodeNum = state.dataCoilCoolingDX->coilCoolingDXs[thisHXCoil.CoolingCoilIndex].evapOutletNodeIndex; if (SecondaryAirInletNode != CoolingCoilOutletNodeNum) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - format("The secondary air inlet node name in heat exchanger {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + EnergyPlus::format("The secondary air inlet node name in heat exchanger {}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - format("must match the cooling coil air outlet node name in {}=\"{}\"", - thisHXCoil.CoolingCoilType, - thisHXCoil.CoolingCoilName)); - ShowContinueError( - state, format("Heat exchanger secondary air inlet node name =\"{}\".", state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + EnergyPlus::format("must match the cooling coil air outlet node name in {}=\"{}\"", + thisHXCoil.CoolingCoilType, + thisHXCoil.CoolingCoilName)); ShowContinueError(state, - format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); + EnergyPlus::format("Heat exchanger secondary air inlet node name =\"{}\".", + state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + ShowContinueError( + state, + EnergyPlus::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); ErrorsFound = true; } @@ -431,44 +438,49 @@ namespace HVACHXAssistedCoolingCoil { CoolingCoilInletNodeNum = DXCoils::GetCoilInletNode(state, thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SupplyAirOutletNode != CoolingCoilInletNodeNum) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - format("The supply air outlet node name in heat exchanger = {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + EnergyPlus::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 = {}=\"{}\"", + thisHXCoil.CoolingCoilType, + thisHXCoil.CoolingCoilName)); ShowContinueError( state, - format("must match the cooling coil inlet node name in = {}=\"{}\"", thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName)); - ShowContinueError(state, - format("Heat exchanger supply air outlet node name=\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); - ShowContinueError(state, format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); + 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))); ErrorsFound = true; } CoolingCoilErrFlag = false; CoolingCoilOutletNodeNum = DXCoils::GetCoilOutletNode(state, thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SecondaryAirInletNode != CoolingCoilOutletNodeNum) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - format("The secondary air inlet node name in heat exchanger ={}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + EnergyPlus::format("The secondary air inlet node name in heat exchanger ={}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - format("must match the cooling coil air outlet node name in = {}=\"{}\".", - thisHXCoil.CoolingCoilType, - thisHXCoil.CoolingCoilName)); - ShowContinueError( - state, format("Heat exchanger secondary air inlet node name =\"{}\".", state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + EnergyPlus::format("must match the cooling coil air outlet node name in = {}=\"{}\".", + thisHXCoil.CoolingCoilType, + thisHXCoil.CoolingCoilName)); ShowContinueError(state, - format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); + EnergyPlus::format("Heat exchanger secondary air inlet node name =\"{}\".", + state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + ShowContinueError( + state, + EnergyPlus::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); ErrorsFound = true; } @@ -478,44 +490,49 @@ namespace HVACHXAssistedCoolingCoil { CoolingCoilInletNodeNum = VariableSpeedCoils::GetCoilInletNodeVariableSpeed( state, thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SupplyAirOutletNode != CoolingCoilInletNodeNum) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - format("The supply air outlet node name in heat exchanger = {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + EnergyPlus::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 = {}=\"{}\"", + thisHXCoil.CoolingCoilType, + thisHXCoil.CoolingCoilName)); ShowContinueError( state, - format("must match the cooling coil inlet node name in = {}=\"{}\"", thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName)); - ShowContinueError(state, - format("Heat exchanger supply air outlet node name=\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); - ShowContinueError(state, format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); + 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))); ErrorsFound = true; } CoolingCoilErrFlag = false; CoolingCoilOutletNodeNum = VariableSpeedCoils::GetCoilOutletNodeVariableSpeed( state, thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SecondaryAirInletNode != CoolingCoilOutletNodeNum) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - format("The secondary air inlet node name in heat exchanger ={}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + EnergyPlus::format("The secondary air inlet node name in heat exchanger ={}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - format("must match the cooling coil air outlet node name in = {}=\"{}\".", - thisHXCoil.CoolingCoilType, - thisHXCoil.CoolingCoilName)); - ShowContinueError( - state, format("Heat exchanger secondary air inlet node name =\"{}\".", state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + EnergyPlus::format("must match the cooling coil air outlet node name in = {}=\"{}\".", + thisHXCoil.CoolingCoilType, + thisHXCoil.CoolingCoilName)); ShowContinueError(state, - format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); + EnergyPlus::format("Heat exchanger secondary air inlet node name =\"{}\".", + state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + ShowContinueError( + state, + EnergyPlus::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); ErrorsFound = true; } } @@ -637,25 +654,25 @@ namespace HVACHXAssistedCoolingCoil { HXErrFlag = false; SupplyAirInletNode = HeatRecovery::GetSupplyInletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SupplyAirOutletNode = HeatRecovery::GetSupplyOutletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SecondaryAirInletNode = HeatRecovery::GetSecondaryInletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SecondaryAirOutletNode = HeatRecovery::GetSecondaryOutletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (Util::SameString(thisHXCoil.CoolingCoilType, "Coil:Cooling:Water") || @@ -678,51 +695,55 @@ namespace HVACHXAssistedCoolingCoil { HVACControllers::GetControllerNameAndIndex( state, CoolingCoilWaterInletNodeNum, thisHXCoil.ControllerName, thisHXCoil.ControllerIndex, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SupplyAirOutletNode != CoolingCoilInletNodeNum) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - format("The supply air outlet node name in heat exchanger = {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + EnergyPlus::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 = {}=\"{}\"", + thisHXCoil.CoolingCoilType, + thisHXCoil.CoolingCoilName)); ShowContinueError( state, - format("must match the cooling coil inlet node name in = {}=\"{}\"", thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName)); - ShowContinueError(state, - format("Heat exchanger supply air outlet node name =\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); - ShowContinueError(state, - format("Cooling coil air inlet node name = \"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); + 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))); ErrorsFound = true; } CoolingCoilErrFlag = false; CoolingCoilOutletNodeNum = WaterCoils::GetCoilOutletNode(state, thisHXCoil.CoolingCoilType, thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SecondaryAirInletNode != CoolingCoilOutletNodeNum) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - format("The secondary air inlet node name in heat exchanger = {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + EnergyPlus::format("The secondary air inlet node name in heat exchanger = {}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - format("must match the cooling coil air outlet node name in = {}=\"{}\".", - thisHXCoil.CoolingCoilType, - thisHXCoil.CoolingCoilName)); - ShowContinueError( - state, format("Heat exchanger secondary air inlet node name = \"{}\".", state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + EnergyPlus::format("must match the cooling coil air outlet node name in = {}=\"{}\".", + thisHXCoil.CoolingCoilType, + thisHXCoil.CoolingCoilName)); ShowContinueError(state, - format("Cooling coil air outlet node name = \"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); + EnergyPlus::format("Heat exchanger secondary air inlet node name = \"{}\".", + state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + ShowContinueError( + state, + EnergyPlus::format("Cooling coil air outlet node name = \"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); ErrorsFound = true; } } else { - ShowWarningError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); - ShowContinueError(state, format("Invalid {}=\"{}\"", cAlphaFields(4), thisHXCoil.CoolingCoilType)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid {}=\"{}\"", cAlphaFields(4), thisHXCoil.CoolingCoilType)); ErrorsFound = true; } BranchNodeConnections::TestCompSet(state, @@ -810,7 +831,7 @@ namespace HVACHXAssistedCoolingCoil { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Previous error condition causes termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Previous error condition causes termination.", RoutineName)); } } @@ -1013,10 +1034,10 @@ namespace HVACHXAssistedCoolingCoil { if (thisHXCoil.MaxIterCounter < 1) { ++thisHXCoil.MaxIterCounter; ShowWarningError(state, - format("{} \"{}\" -- Exceeded max iterations ({}) while calculating operating conditions.", - thisHXCoil.HXAssistedCoilType, - thisHXCoil.Name, - MaxIter)); + EnergyPlus::format("{} \"{}\" -- Exceeded max iterations ({}) while calculating operating conditions.", + thisHXCoil.HXAssistedCoilType, + thisHXCoil.Name, + MaxIter)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd(state, @@ -1065,7 +1086,7 @@ namespace HVACHXAssistedCoolingCoil { if (!CurrentModuleObject.empty()) { ShowSevereError(state, fmt::format("{}, GetHXDXCoilIndex: HX Assisted Cooling Coil not found={}", CurrentModuleObject, HXDXCoilName)); } else { - ShowSevereError(state, format("GetHXDXCoilIndex: HX Assisted Cooling Coil not found={}", HXDXCoilName)); + ShowSevereError(state, EnergyPlus::format("GetHXDXCoilIndex: HX Assisted Cooling Coil not found={}", HXDXCoilName)); } ErrorsFound = true; } @@ -1106,26 +1127,28 @@ namespace HVACHXAssistedCoolingCoil { } if (HXAssistedCoilNum == 0) { - ShowFatalError(state, format("CheckHXAssistedCoolingCoilSchedule: HX Assisted Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("CheckHXAssistedCoolingCoilSchedule: HX Assisted Coil not found={}", CompName)); } CompIndex = HXAssistedCoilNum; Value = 1.0; // not scheduled? } else { HXAssistedCoilNum = CompIndex; if (HXAssistedCoilNum > state.dataHVACAssistedCC->TotalNumHXAssistedCoils || HXAssistedCoilNum < 1) { - ShowFatalError(state, - format("CheckHXAssistedCoolingCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", - HXAssistedCoilNum, - state.dataHVACAssistedCC->TotalNumHXAssistedCoils, - CompName)); + ShowFatalError( + state, + EnergyPlus::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, - format("CheckHXAssistedCoolingCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - HXAssistedCoilNum, - CompName, - state.dataHVACAssistedCC->HXAssistedCoil(HXAssistedCoilNum).Name)); + EnergyPlus::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? @@ -1207,7 +1230,7 @@ namespace HVACHXAssistedCoolingCoil { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ShowContinueError(state, "... Coil Capacity returned as -1000."); ErrorsFound = true; CoilCapacity = -1000.0; @@ -1258,7 +1281,7 @@ namespace HVACHXAssistedCoolingCoil { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).HXAssistedCoilType_Num; } if (PrintWarning) { - ShowSevereError(state, format("GetCoilGroupTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilGroupTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); } ErrorsFound = true; return 0; @@ -1298,7 +1321,7 @@ namespace HVACHXAssistedCoolingCoil { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilType_Num; } if (PrintWarning) { - ShowSevereError(state, format("GetCoilObjectTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilObjectTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); } ErrorsFound = true; return 0; @@ -1336,7 +1359,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).HXAssistedCoilInletNodeNum; } - ShowSevereError(state, format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -1386,14 +1409,14 @@ namespace HVACHXAssistedCoolingCoil { ErrorsFound); } else { // even though validated in Get, still check. ShowSevereError(state, - format("GetCoilWaterInletNode: Invalid Cooling Coil for HX Assisted Coil, Type=\"{}\" Name=\"{}\"", - state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilType, - CoilName)); + EnergyPlus::format("GetCoilWaterInletNode: Invalid Cooling Coil for HX Assisted Coil, Type=\"{}\" Name=\"{}\"", + state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilType, + CoilName)); ErrorsFound = true; NodeNumber = 0; // Autodesk:Return Added line to set return value } } else { - ShowSevereError(state, format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -1433,7 +1456,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).HXAssistedCoilOutletNodeNum; } - ShowSevereError(state, format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -1470,7 +1493,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilType; } - ShowSevereError(state, format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return ""; } @@ -1507,7 +1530,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilName; } - ShowSevereError(state, format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return ""; } @@ -1545,7 +1568,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, format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -1582,7 +1605,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilType; } - ShowSevereError(state, format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return ""; } @@ -1620,7 +1643,7 @@ namespace HVACHXAssistedCoolingCoil { CoolingCoilType = state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilType; CoolingCoilName = state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilName; } else { - ShowSevereError(state, format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CoolingCoilType = ""; CoolingCoilName = ""; @@ -1677,12 +1700,13 @@ namespace HVACHXAssistedCoolingCoil { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxWaterFlowRate = -1000.0; } } else { - ShowSevereError(state, format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxWaterFlowRate = -1000.0; } @@ -1732,12 +1756,12 @@ namespace HVACHXAssistedCoolingCoil { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetHXCoilAirFlowRate: Could not find HX, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetHXCoilAirFlowRate: Could not find HX, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxAirFlowRate = -1000.0; } } else { - ShowSevereError(state, format("GetHXCoilAirFlowRate: Could not find HX, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetHXCoilAirFlowRate: Could not find HX, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxAirFlowRate = -1000.0; } diff --git a/src/EnergyPlus/HVACInterfaceManager.cc b/src/EnergyPlus/HVACInterfaceManager.cc index 15af7521e1c..3e56aa8eb65 100644 --- a/src/EnergyPlus/HVACInterfaceManager.cc +++ b/src/EnergyPlus/HVACInterfaceManager.cc @@ -1264,7 +1264,7 @@ void SetupCommonPipes(EnergyPlusData &state) if (first_supply_component_type == DataPlant::PlantEquipmentType::PumpVariableSpeed) { // If/when the model supports variable-pumping primary, this can be removed. ShowWarningError(state, "SetupCommonPipes: detected variable speed pump on supply inlet of CommonPipe plant loop"); - ShowContinueError(state, format("Occurs on plant loop name = {}", thisPlantLoop.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs on plant loop name = {}", thisPlantLoop.Name)); ShowContinueError(state, "The common pipe model does not support varying the flow rate on the primary/supply side"); ShowContinueError(state, "The primary/supply side will operate as if constant speed, and the simulation continues"); } @@ -1307,7 +1307,7 @@ void SetupCommonPipes(EnergyPlusData &state) thisCommonPipe.SupplySideInletPumpType = FlowType::Variable; // If/when the model supports variable-pumping primary, this can be removed. ShowWarningError(state, "SetupCommonPipes: detected variable speed pump on supply inlet of TwoWayCommonPipe plant loop"); - ShowContinueError(state, format("Occurs on plant loop name = {}", thisPlantLoop.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs on plant loop name = {}", thisPlantLoop.Name)); ShowContinueError(state, "The common pipe model does not support varying the flow rate on the primary/supply side"); ShowContinueError(state, "The primary/supply side will operate as if constant speed, and the simulation continues"); } diff --git a/src/EnergyPlus/HVACManager.cc b/src/EnergyPlus/HVACManager.cc index 9eba8e3e190..1395dcf304a 100644 --- a/src/EnergyPlus/HVACManager.cc +++ b/src/EnergyPlus/HVACManager.cc @@ -992,11 +992,11 @@ void SimHVAC(EnergyPlusData &state) if (state.dataHVACMgr->ErrCount < 15) { state.dataHVACMgr->ErrEnvironmentName = state.dataEnvrn->EnvironmentName; ShowWarningError(state, - format("SimHVAC: Maximum iterations ({}) exceeded for all HVAC loops, at {}, {} {}", - state.dataConvergeParams->MaxIter, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state))); + EnergyPlus::format("SimHVAC: Maximum iterations ({}) exceeded for all HVAC loops, at {}, {} {}", + state.dataConvergeParams->MaxIter, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state))); if (state.dataHVACGlobal->SimAirLoopsFlag) { ShowContinueError(state, "The solution for one or more of the Air Loop HVAC systems did not appear to converge"); } @@ -1094,10 +1094,11 @@ void SimHVAC(EnergyPlusData &state) FoundOscillationByDuplicate = true; ShowContinueError( state, - format("Node named {} shows oscillating humidity ratio across iterations with a repeated value of {:.6R}", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - humRatInletNode[0])); + EnergyPlus::format( + "Node named {} shows oscillating humidity ratio across iterations with a repeated value of {:.6R}", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + humRatInletNode[0])); break; } } @@ -1123,11 +1124,12 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound) { ShowContinueError( state, - format("Node named {} shows monotonically decreasing humidity ratio with a trend " - "rate across iterations of {:.6R} [ kg-water/kg-dryair/iteration]", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - SlopeHumRat)); + EnergyPlus::format( + "Node named {} shows monotonically decreasing humidity ratio with a trend " + "rate across iterations of {:.6R} [ kg-water/kg-dryair/iteration]", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + SlopeHumRat)); } } else { // check for monotonic increase MonotonicIncreaseFound = true; @@ -1140,11 +1142,12 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicIncreaseFound) { ShowContinueError( state, - format("Node named {} shows monotonically increasing humidity ratio with a trend " - "rate across iterations of {:.6R} [ kg-water/kg-dryair/iteration]", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - SlopeHumRat)); + EnergyPlus::format( + "Node named {} shows monotonically increasing humidity ratio with a trend " + "rate across iterations of {:.6R} [ kg-water/kg-dryair/iteration]", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + SlopeHumRat)); } } } // significant slope in iterates @@ -1154,11 +1157,11 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound || MonotonicIncreaseFound || FoundOscillationByDuplicate) { std::string HistoryTrace; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { - HistoryTrace += format("{:.6R},", humRatInletNode[StackDepth]); + HistoryTrace += EnergyPlus::format("{:.6R},", humRatInletNode[StackDepth]); } ShowContinueError( state, - format( + EnergyPlus::format( "Node named {} humidity ratio [kg-water/kg-dryair] iteration history trace (most recent first): {}", state.dataLoopNodes->NodeID(state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), HistoryTrace)); @@ -1181,10 +1184,11 @@ void SimHVAC(EnergyPlusData &state) FoundOscillationByDuplicate = true; ShowContinueError( state, - format("Node named {} shows oscillating mass flow rate across iterations with a repeated value of {:.6R}", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - mdotInletNode[0])); + EnergyPlus::format( + "Node named {} shows oscillating mass flow rate across iterations with a repeated value of {:.6R}", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + mdotInletNode[0])); break; } } @@ -1209,11 +1213,12 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound) { ShowContinueError( state, - format("Node named {} shows monotonically decreasing mass flow rate with a trend " - "rate across iterations of {:.6R} [kg/s/iteration]", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - SlopeMdot)); + EnergyPlus::format( + "Node named {} shows monotonically decreasing mass flow rate with a trend " + "rate across iterations of {:.6R} [kg/s/iteration]", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + SlopeMdot)); } } else { // check for monotonic increase MonotonicIncreaseFound = true; @@ -1226,11 +1231,12 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicIncreaseFound) { ShowContinueError( state, - format("Node named {} shows monotonically increasing mass flow rate with a trend " - "rate across iterations of {:.6R} [kg/s/iteration]", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - SlopeMdot)); + EnergyPlus::format( + "Node named {} shows monotonically increasing mass flow rate with a trend " + "rate across iterations of {:.6R} [kg/s/iteration]", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + SlopeMdot)); } } } // significant slope in iterates @@ -1240,13 +1246,14 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound || MonotonicIncreaseFound || FoundOscillationByDuplicate) { std::string HistoryTrace; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { - HistoryTrace += format("{:.6R},", mdotInletNode[StackDepth]); + HistoryTrace += EnergyPlus::format("{:.6R},", mdotInletNode[StackDepth]); } - ShowContinueError(state, - format("Node named {} mass flow rate [kg/s] iteration history trace (most recent first): {}", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - HistoryTrace)); + ShowContinueError( + state, + EnergyPlus::format( + "Node named {} mass flow rate [kg/s] iteration history trace (most recent first): {}", + state.dataLoopNodes->NodeID(state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + HistoryTrace)); } // need to report trace // end mass flow rate @@ -1266,10 +1273,11 @@ void SimHVAC(EnergyPlusData &state) FoundOscillationByDuplicate = true; ShowContinueError( state, - format("Node named {} shows oscillating temperatures across iterations with a repeated value of {:.6R}", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - inletTemp[0])); + EnergyPlus::format( + "Node named {} shows oscillating temperatures across iterations with a repeated value of {:.6R}", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + inletTemp[0])); break; } } @@ -1295,11 +1303,12 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound) { ShowContinueError( state, - format("Node named {} shows monotonically decreasing temperature with a trend rate " - "across iterations of {:.4R} [C/iteration]", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - SlopeTemps)); + EnergyPlus::format( + "Node named {} shows monotonically decreasing temperature with a trend rate " + "across iterations of {:.4R} [C/iteration]", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + SlopeTemps)); } } else { // check for monotonic increase MonotonicIncreaseFound = true; @@ -1312,11 +1321,12 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicIncreaseFound) { ShowContinueError( state, - format("Node named {} shows monotonically increasing temperatures with a trend " - "rate across iterations of {:.4R} [C/iteration]", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - SlopeTemps)); + EnergyPlus::format( + "Node named {} shows monotonically increasing temperatures with a trend " + "rate across iterations of {:.4R} [C/iteration]", + state.dataLoopNodes->NodeID( + state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + SlopeTemps)); } } } // significant slope in iterates @@ -1326,13 +1336,14 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound || MonotonicIncreaseFound || FoundOscillationByDuplicate) { std::string HistoryTrace; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { - HistoryTrace += format("{:.6R},", inletTemp[StackDepth]); + HistoryTrace += EnergyPlus::format("{:.6R},", inletTemp[StackDepth]); } - ShowContinueError(state, - format("Node named {} temperature [C] iteration history trace (most recent first): {}", - state.dataLoopNodes->NodeID( - state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), - HistoryTrace)); + ShowContinueError( + state, + EnergyPlus::format( + "Node named {} temperature [C] iteration history trace (most recent first): {}", + state.dataLoopNodes->NodeID(state.dataConvergeParams->ZoneInletConvergence(ZoneNum).InletNode(NodeIndex).NodeNum), + HistoryTrace)); } // need to report trace // end Temperature checks @@ -1345,23 +1356,26 @@ void SimHVAC(EnergyPlusData &state) bool MonotonicDecreaseFound; if (state.dataConvergeParams->PlantConvergence(LoopNum).PlantMassFlowNotConverged) { - ShowContinueError( - state, format("Plant System Named = {} did not converge for mass flow rate", state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError(state, + EnergyPlus::format("Plant System Named = {} did not converge for mass flow rate", + state.dataPlnt->PlantLoop(LoopNum).Name)); ShowContinueError(state, "Check values should be zero. Most Recent values listed first."); std::string HistoryTrace; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { - HistoryTrace += - format("{:.6R},", state.dataConvergeParams->PlantConvergence(LoopNum).PlantFlowDemandToSupplyTolValue[StackDepth]); + HistoryTrace += EnergyPlus::format( + "{:.6R},", state.dataConvergeParams->PlantConvergence(LoopNum).PlantFlowDemandToSupplyTolValue[StackDepth]); } - ShowContinueError(state, - format("Demand-to-Supply interface mass flow rate check value iteration history trace: {}", HistoryTrace)); + ShowContinueError( + state, + EnergyPlus::format("Demand-to-Supply interface mass flow rate check value iteration history trace: {}", HistoryTrace)); HistoryTrace = ""; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { - HistoryTrace += - format("{:.6R},", state.dataConvergeParams->PlantConvergence(LoopNum).PlantFlowSupplyToDemandTolValue[StackDepth]); + HistoryTrace += EnergyPlus::format( + "{:.6R},", state.dataConvergeParams->PlantConvergence(LoopNum).PlantFlowSupplyToDemandTolValue[StackDepth]); } - ShowContinueError(state, - format("Supply-to-Demand interface mass flow rate check value iteration history trace: {}", HistoryTrace)); + ShowContinueError( + state, + EnergyPlus::format("Supply-to-Demand interface mass flow rate check value iteration history trace: {}", HistoryTrace)); // now work with history logs for mass flow to detect issues for (DataPlant::LoopSideLocation ThisLoopSide : DataPlant::LoopSideKeys) { @@ -1382,9 +1396,10 @@ void SimHVAC(EnergyPlusData &state) FoundOscillationByDuplicate = true; ShowContinueError( state, - format("Node named {} shows oscillating flow rates across iterations with a repeated value of {:.7R}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, - mdotHistInletNode(1))); + EnergyPlus::format( + "Node named {} shows oscillating flow rates across iterations with a repeated value of {:.7R}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, + mdotHistInletNode(1))); break; } } @@ -1408,11 +1423,12 @@ void SimHVAC(EnergyPlusData &state) } } if (MonotonicDecreaseFound) { - ShowContinueError(state, - format("Node named {} shows monotonically decreasing mass flow rate with a trend " - "rate across iterations of {:.7R} [kg/s/iteration]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, - SlopeMdot)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} shows monotonically decreasing mass flow rate with a trend " + "rate across iterations of {:.7R} [kg/s/iteration]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, + SlopeMdot)); } } else { // check for monotonic increase MonotonicIncreaseFound = true; @@ -1423,11 +1439,12 @@ void SimHVAC(EnergyPlusData &state) } } if (MonotonicIncreaseFound) { - ShowContinueError(state, - format("Node named {} shows monotonically increasing mass flow rate with a trend " - "rate across iterations of {:.7R} [kg/s/iteration]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, - SlopeMdot)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} shows monotonically increasing mass flow rate with a trend " + "rate across iterations of {:.7R} [kg/s/iteration]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, + SlopeMdot)); } } } // significant slope found @@ -1436,12 +1453,13 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound || MonotonicIncreaseFound || FoundOscillationByDuplicate) { HistoryTrace = ""; for (int StackDepth = 1; StackDepth <= DataPlant::NumConvergenceHistoryTerms; ++StackDepth) { - HistoryTrace += format("{:.7R},", mdotHistInletNode(StackDepth)); + HistoryTrace += EnergyPlus::format("{:.7R},", mdotHistInletNode(StackDepth)); } - ShowContinueError(state, - format("Node named {} mass flow rate [kg/s] iteration history trace (most recent first): {}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, - HistoryTrace)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} mass flow rate [kg/s] iteration history trace (most recent first): {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, + HistoryTrace)); } // need to report trace // end of inlet node @@ -1458,9 +1476,10 @@ void SimHVAC(EnergyPlusData &state) FoundOscillationByDuplicate = true; ShowContinueError( state, - format("Node named {} shows oscillating flow rates across iterations with a repeated value of {:.7R}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, - mdotHistOutletNode(1))); + EnergyPlus::format( + "Node named {} shows oscillating flow rates across iterations with a repeated value of {:.7R}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, + mdotHistOutletNode(1))); break; } } @@ -1484,11 +1503,12 @@ void SimHVAC(EnergyPlusData &state) } } if (MonotonicDecreaseFound) { - ShowContinueError(state, - format("Node named {} shows monotonically decreasing mass flow rate with a trend " - "rate across iterations of {:.7R} [kg/s/iteration]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, - SlopeMdot)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} shows monotonically decreasing mass flow rate with a trend " + "rate across iterations of {:.7R} [kg/s/iteration]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, + SlopeMdot)); } } else { // check for monotonic increase MonotonicIncreaseFound = true; @@ -1499,11 +1519,12 @@ void SimHVAC(EnergyPlusData &state) } } if (MonotonicIncreaseFound) { - ShowContinueError(state, - format("Node named {} shows monotonically increasing mass flow rate with a trend " - "rate across iterations of {:.7R} [kg/s/iteration]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, - SlopeMdot)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} shows monotonically increasing mass flow rate with a trend " + "rate across iterations of {:.7R} [kg/s/iteration]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, + SlopeMdot)); } } } // significant slope found @@ -1512,12 +1533,13 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound || MonotonicIncreaseFound || FoundOscillationByDuplicate) { HistoryTrace = ""; for (int StackDepth = 1; StackDepth <= DataPlant::NumConvergenceHistoryTerms; ++StackDepth) { - HistoryTrace += format("{:.7R},", mdotHistOutletNode(StackDepth)); + HistoryTrace += EnergyPlus::format("{:.7R},", mdotHistOutletNode(StackDepth)); } - ShowContinueError(state, - format("Node named {} mass flow rate [kg/s] iteration history trace (most recent first): {}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, - HistoryTrace)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} mass flow rate [kg/s] iteration history trace (most recent first): {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, + HistoryTrace)); } // need to report trace // end of Outlet node @@ -1527,22 +1549,25 @@ void SimHVAC(EnergyPlusData &state) if (state.dataConvergeParams->PlantConvergence(LoopNum).PlantTempNotConverged) { ShowContinueError( - state, format("Plant System Named = {} did not converge for temperature", state.dataPlnt->PlantLoop(LoopNum).Name)); + state, + EnergyPlus::format("Plant System Named = {} did not converge for temperature", state.dataPlnt->PlantLoop(LoopNum).Name)); ShowContinueError(state, "Check values should be zero. Most Recent values listed first."); std::string HistoryTrace; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { - HistoryTrace += - format("{:.6R},", state.dataConvergeParams->PlantConvergence(LoopNum).PlantTempDemandToSupplyTolValue[StackDepth]); + HistoryTrace += EnergyPlus::format( + "{:.6R},", state.dataConvergeParams->PlantConvergence(LoopNum).PlantTempDemandToSupplyTolValue[StackDepth]); } - ShowContinueError(state, - format("Demand-to-Supply interface temperature check value iteration history trace: {}", HistoryTrace)); + ShowContinueError( + state, + EnergyPlus::format("Demand-to-Supply interface temperature check value iteration history trace: {}", HistoryTrace)); HistoryTrace = ""; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { - HistoryTrace += - format("{:.6R},", state.dataConvergeParams->PlantConvergence(LoopNum).PlantTempSupplyToDemandTolValue[StackDepth]); + HistoryTrace += EnergyPlus::format( + "{:.6R},", state.dataConvergeParams->PlantConvergence(LoopNum).PlantTempSupplyToDemandTolValue[StackDepth]); } - ShowContinueError(state, - format("Supply-to-Demand interface temperature check value iteration history trace: {}", HistoryTrace)); + ShowContinueError( + state, + EnergyPlus::format("Supply-to-Demand interface temperature check value iteration history trace: {}", HistoryTrace)); // now work with history logs for mass flow to detect issues for (DataPlant::LoopSideLocation ThisLoopSide : DataPlant::LoopSideKeys) { @@ -1563,9 +1588,10 @@ void SimHVAC(EnergyPlusData &state) FoundOscillationByDuplicate = true; ShowContinueError( state, - format("Node named {} shows oscillating temperatures across iterations with a repeated value of {:.5R}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, - tempHistInletNode(1))); + EnergyPlus::format( + "Node named {} shows oscillating temperatures across iterations with a repeated value of {:.5R}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, + tempHistInletNode(1))); break; } } @@ -1589,11 +1615,12 @@ void SimHVAC(EnergyPlusData &state) } } if (MonotonicDecreaseFound) { - ShowContinueError(state, - format("Node named {} shows monotonically decreasing temperatures with a trend " - "rate across iterations of {:.5R} [C/iteration]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, - SlopeTemps)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} shows monotonically decreasing temperatures with a trend " + "rate across iterations of {:.5R} [C/iteration]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, + SlopeTemps)); } } else { // check for monotonic increase MonotonicIncreaseFound = true; @@ -1604,11 +1631,12 @@ void SimHVAC(EnergyPlusData &state) } } if (MonotonicIncreaseFound) { - ShowContinueError(state, - format("Node named {} shows monotonically increasing temperatures with a trend " - "rate across iterations of {:.5R} [C/iteration]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, - SlopeTemps)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} shows monotonically increasing temperatures with a trend " + "rate across iterations of {:.5R} [C/iteration]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, + SlopeTemps)); } } } // significant slope found @@ -1617,12 +1645,12 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound || MonotonicIncreaseFound || FoundOscillationByDuplicate) { HistoryTrace = ""; for (int StackDepth = 1; StackDepth <= DataPlant::NumConvergenceHistoryTerms; ++StackDepth) { - HistoryTrace += format("{:.5R},", tempHistInletNode(StackDepth)); + HistoryTrace += EnergyPlus::format("{:.5R},", tempHistInletNode(StackDepth)); } ShowContinueError(state, - format("Node named {} temperature [C] iteration history trace (most recent first): {}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, - HistoryTrace)); + EnergyPlus::format("Node named {} temperature [C] iteration history trace (most recent first): {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameIn, + HistoryTrace)); } // need to report trace // end of inlet node @@ -1639,9 +1667,10 @@ void SimHVAC(EnergyPlusData &state) FoundOscillationByDuplicate = true; ShowContinueError( state, - format("Node named {} shows oscillating temperatures across iterations with a repeated value of {:.5R}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, - tempHistOutletNode(1))); + EnergyPlus::format( + "Node named {} shows oscillating temperatures across iterations with a repeated value of {:.5R}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, + tempHistOutletNode(1))); break; } } @@ -1667,11 +1696,12 @@ void SimHVAC(EnergyPlusData &state) } } if (MonotonicDecreaseFound) { - ShowContinueError(state, - format("Node named {} shows monotonically decreasing temperatures with a trend " - "rate across iterations of {:.5R} [C/iteration]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, - SlopeTemps)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} shows monotonically decreasing temperatures with a trend " + "rate across iterations of {:.5R} [C/iteration]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, + SlopeTemps)); } } else { // check for monotonic increase MonotonicIncreaseFound = true; @@ -1684,11 +1714,12 @@ void SimHVAC(EnergyPlusData &state) } } if (MonotonicIncreaseFound) { - ShowContinueError(state, - format("Node named {} shows monotonically increasing temperatures with a trend " - "rate across iterations of {:.5R} [C/iteration]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, - SlopeTemps)); + ShowContinueError( + state, + EnergyPlus::format("Node named {} shows monotonically increasing temperatures with a trend " + "rate across iterations of {:.5R} [C/iteration]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, + SlopeTemps)); } } } // significant slope found @@ -1697,12 +1728,12 @@ void SimHVAC(EnergyPlusData &state) if (MonotonicDecreaseFound || MonotonicIncreaseFound || FoundOscillationByDuplicate) { HistoryTrace = ""; for (int StackDepth = 1; StackDepth <= DataPlant::NumConvergenceHistoryTerms; ++StackDepth) { - HistoryTrace += format("{:.5R},", tempHistOutletNode(StackDepth)); + HistoryTrace += EnergyPlus::format("{:.5R},", tempHistOutletNode(StackDepth)); } ShowContinueError(state, - format("Node named {} temperature [C] iteration history trace (most recent first): {}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, - HistoryTrace)); + EnergyPlus::format("Node named {} temperature [C] iteration history trace (most recent first): {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(ThisLoopSide).NodeNameOut, + HistoryTrace)); } // need to report trace // end of Outlet node @@ -1713,17 +1744,17 @@ void SimHVAC(EnergyPlusData &state) } } else { if (state.dataEnvrn->EnvironmentName == state.dataHVACMgr->ErrEnvironmentName) { - ShowRecurringWarningErrorAtEnd( - state, - format("SimHVAC: Exceeding Maximum iterations for all HVAC loops, during {} continues", state.dataEnvrn->EnvironmentName), - state.dataHVACMgr->MaxErrCount); + ShowRecurringWarningErrorAtEnd(state, + EnergyPlus::format("SimHVAC: Exceeding Maximum iterations for all HVAC loops, during {} continues", + state.dataEnvrn->EnvironmentName), + state.dataHVACMgr->MaxErrCount); } else { state.dataHVACMgr->MaxErrCount = 0; state.dataHVACMgr->ErrEnvironmentName = state.dataEnvrn->EnvironmentName; - ShowRecurringWarningErrorAtEnd( - state, - format("SimHVAC: Exceeding Maximum iterations for all HVAC loops, during {} continues", state.dataEnvrn->EnvironmentName), - state.dataHVACMgr->MaxErrCount); + ShowRecurringWarningErrorAtEnd(state, + EnergyPlus::format("SimHVAC: Exceeding Maximum iterations for all HVAC loops, during {} continues", + state.dataEnvrn->EnvironmentName), + state.dataHVACMgr->MaxErrCount); } } } @@ -2919,8 +2950,9 @@ void SetHeatToReturnAirFlag(EnergyPlusData &state) if (zoneEquipConfig.ZonalSystemOnly || CyclingFan) { auto const &thisZone = state.dataHeatBal->Zone(ControlledZoneNum); if (thisZone.RefrigCaseRA) { - ShowWarningError(state, - format("For zone={} return air cooling by refrigerated cases will be applied to the zone air.", thisZone.Name)); + ShowWarningError( + state, + EnergyPlus::format("For zone={} return air cooling by refrigerated cases 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."); } for (int LightNum = 1; LightNum <= state.dataHeatBal->TotLights; ++LightNum) { @@ -2928,8 +2960,9 @@ void SetHeatToReturnAirFlag(EnergyPlusData &state) continue; } if (state.dataHeatBal->Lights(LightNum).FractionReturnAir > 0.0) { - ShowWarningError(state, - format("For zone={} return air heat gain from lights will be applied to the zone air.", thisZone.Name)); + ShowWarningError( + state, + EnergyPlus::format("For zone={} return air heat gain from lights 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."); break; } @@ -2940,7 +2973,8 @@ void SetHeatToReturnAirFlag(EnergyPlusData &state) if (state.dataSurface->SurfWinAirflowDestination(SurfNum) == DataSurfaces::WindowAirFlowDestination::Return) { ShowWarningError( state, - format("For zone={} return air heat gain from air flow windows will be applied to the zone air.", thisZone.Name)); + EnergyPlus::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."); } } @@ -3022,15 +3056,15 @@ void CheckAirLoopFlowBalance(EnergyPlusData &state) Real64 unbalancedExhaustDelta = thisAirLoopFlow.SupFlow - thisAirLoopFlow.OAFlow - thisAirLoopFlow.SysRetFlow; if (unbalancedExhaustDelta > HVAC::SmallMassFlow) { ShowSevereError(state, - format("CheckAirLoopFlowBalance: AirLoopHVAC {} is unbalanced. Supply is > return plus outdoor air.", - state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); + EnergyPlus::format("CheckAirLoopFlowBalance: AirLoopHVAC {} is unbalanced. Supply is > return plus outdoor air.", + state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format(" Flows [m3/s at standard density]: Supply={:.6R} Return={:.6R} Outdoor Air={:.6R}", - thisAirLoopFlow.SupFlow / state.dataEnvrn->StdRhoAir, - thisAirLoopFlow.SysRetFlow / state.dataEnvrn->StdRhoAir, - thisAirLoopFlow.OAFlow / state.dataEnvrn->StdRhoAir)); - ShowContinueError(state, format(" Imbalance={:.6R}", unbalancedExhaustDelta / state.dataEnvrn->StdRhoAir)); + EnergyPlus::format(" Flows [m3/s at standard density]: Supply={:.6R} Return={:.6R} Outdoor Air={:.6R}", + thisAirLoopFlow.SupFlow / state.dataEnvrn->StdRhoAir, + thisAirLoopFlow.SysRetFlow / state.dataEnvrn->StdRhoAir, + thisAirLoopFlow.OAFlow / state.dataEnvrn->StdRhoAir)); + ShowContinueError(state, EnergyPlus::format(" Imbalance={:.6R}", unbalancedExhaustDelta / state.dataEnvrn->StdRhoAir)); ShowContinueError(state, " This error will only be reported once per system."); thisAirLoopFlow.FlowError = true; } @@ -3053,26 +3087,30 @@ void ConvergenceErrors(EnergyPlusData &state, auto &arrayRef = HVACNotConverged; if (std::any_of(std::begin(arrayRef), std::end(arrayRef), [](bool i) { return i; })) { - ShowContinueError( - state, format("Air System Named = {} did not converge for {}", state.dataAirLoop->AirToZoneNodeInfo(AirSysNum).AirLoopName, CaseName)); + ShowContinueError(state, + EnergyPlus::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 += format("{:.6R},", DemandToSupply[StackDepth]); + HistoryTrace += EnergyPlus::format("{:.6R},", DemandToSupply[StackDepth]); } - ShowContinueError(state, format("Demand-to-Supply interface {} check value iteration history trace: {}", CaseName, HistoryTrace)); + ShowContinueError(state, EnergyPlus::format("Demand-to-Supply interface {} check value iteration history trace: {}", CaseName, HistoryTrace)); HistoryTrace = ""; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { - HistoryTrace += format("{:.6R},", SupplyDeck1ToDemand[StackDepth]); + HistoryTrace += EnergyPlus::format("{:.6R},", SupplyDeck1ToDemand[StackDepth]); } - ShowContinueError(state, format("Supply-to-demand interface deck 1 {} check value iteration history trace: {}", CaseName, HistoryTrace)); + ShowContinueError(state, + EnergyPlus::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 += format("{:.6R},", SupplyDeck2ToDemand[StackDepth]); + HistoryTrace += EnergyPlus::format("{:.6R},", SupplyDeck2ToDemand[StackDepth]); } - ShowContinueError(state, format("Supply-to-demand interface deck 2 {} check value iteration history trace: {}", CaseName, HistoryTrace)); + ShowContinueError( + state, EnergyPlus::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 9947a20dff3..b3a893eb406 100644 --- a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc +++ b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc @@ -150,25 +150,25 @@ namespace HVACMultiSpeedHeatPump { if (CompIndex == 0) { MSHeatPumpNum = Util::FindItemInList(CompName, state.dataHVACMultiSpdHP->MSHeatPump); if (MSHeatPumpNum == 0) { - ShowFatalError(state, format("MultiSpeed Heat Pump is not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("MultiSpeed Heat Pump is not found={}", CompName)); } CompIndex = MSHeatPumpNum; } else { MSHeatPumpNum = CompIndex; if (MSHeatPumpNum > state.dataHVACMultiSpdHP->NumMSHeatPumps || MSHeatPumpNum < 1) { ShowFatalError(state, - format("SimMSHeatPump: Invalid CompIndex passed={}, Number of MultiSpeed Heat Pumps={}, Heat Pump name={}", - MSHeatPumpNum, - state.dataHVACMultiSpdHP->NumMSHeatPumps, - CompName)); + EnergyPlus::format("SimMSHeatPump: Invalid CompIndex passed={}, Number of MultiSpeed Heat Pumps={}, Heat Pump name={}", + MSHeatPumpNum, + state.dataHVACMultiSpdHP->NumMSHeatPumps, + CompName)); } if (state.dataHVACMultiSpdHP->CheckEquipName(MSHeatPumpNum)) { if (CompName != state.dataHVACMultiSpdHP->MSHeatPump(MSHeatPumpNum).Name) { ShowFatalError(state, - format("SimMSHeatPump: Invalid CompIndex passed={}, Heat Pump name={}{}", - MSHeatPumpNum, - CompName, - state.dataHVACMultiSpdHP->MSHeatPump(MSHeatPumpNum).Name)); + EnergyPlus::format("SimMSHeatPump: Invalid CompIndex passed={}, Heat Pump name={}{}", + MSHeatPumpNum, + CompName, + state.dataHVACMultiSpdHP->MSHeatPump(MSHeatPumpNum).Name)); } state.dataHVACMultiSpdHP->CheckEquipName(MSHeatPumpNum) = false; } @@ -511,7 +511,7 @@ namespace HVACMultiSpeedHeatPump { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataHVACMultiSpdHP->CurrentModuleObject); if (state.dataHVACMultiSpdHP->NumMSHeatPumps <= 0) { - ShowSevereError(state, format("No {} objects specified in input file.", state.dataHVACMultiSpdHP->CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} objects specified in input file.", state.dataHVACMultiSpdHP->CurrentModuleObject)); ErrorsFound = true; } @@ -583,11 +583,11 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.ControlZoneName = Alphas(5); if (thisMSHP.ControlZoneNum == 0) { ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cAlphaFields(5), - thisMSHP.ControlZoneName)); + EnergyPlus::format("{}, \"{}\" {} not found: {}", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cAlphaFields(5), + thisMSHP.ControlZoneName)); ErrorsFound = true; } @@ -647,17 +647,20 @@ namespace HVACMultiSpeedHeatPump { } if (!AirNodeFound) { ShowSevereError(state, - format("Did not find Air Node ({}), {} = \"\"{}", - cAlphaFields(5), - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name)); - ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + EnergyPlus::format("Did not find Air Node ({}), {} = \"\"{}", + cAlphaFields(5), + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name)); + ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } if (!AirLoopFound) { - ShowSevereError( - state, format("Did not find correct AirLoopHVAC for {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); - ShowContinueError(state, format("The {} = {} is not served by this Primary Air Loop equipment.", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, + EnergyPlus::format("Did not find correct AirLoopHVAC for {} = {}", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name)); + ShowContinueError( + state, EnergyPlus::format("The {} = {} is not served by this Primary Air Loop equipment.", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } @@ -711,41 +714,43 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatCoilNum = state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Coil:Heating:DX:MultiSpeed", Alphas(11)); thisMSHP.DXHeatCoilName = Alphas(11); if (thisMSHP.HeatCoilNum <= 0) { - ShowSevereError(state, format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} \"{}\" not found.", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("{} must be Coil:Heating:DX:MultiSpeed ", cAlphaFields(10))); + 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:DX:MultiSpeed ", cAlphaFields(10))); ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + RoutineName, + state.dataHVACMultiSpdHP->CurrentModuleObject)); ErrorsFound = true; } LocalError = false; DXCoils::GetDXCoilIndex(state, thisMSHP.DXHeatCoilName, thisMSHP.DXHeatCoilIndex, LocalError, "Coil:Heating:DX:MultiSpeed"); if (LocalError) { - ShowSevereError(state, format("The index of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } HeatingCoilInletNode = DXCoils::GetCoilInletNode(state, Alphas(10), Alphas(11), LocalError); if (LocalError) { - ShowSevereError(state, format("The inlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } HeatingCoilOutletNode = DXCoils::GetCoilOutletNode(state, Alphas(10), Alphas(11), LocalError); if (LocalError) { - ShowSevereError(state, format("The outlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } thisMSHP.MinOATCompressorHeating = DXCoils::GetMinOATCompressor(state, thisMSHP.DXHeatCoilIndex, LocalError); if (LocalError) { - ShowContinueError(state, - format("...for heating coil. Occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError( + state, + EnergyPlus::format("...for heating coil. Occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); LocalError = false; } BranchNodeConnections::SetUpCompSets(state, @@ -763,13 +768,14 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatCoilNum = state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Coil:Heating:Electric:MultiStage", Alphas(11)); if (thisMSHP.HeatCoilNum <= 0) { - ShowSevereError(state, format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} \"{}\" not found.", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("{} must be Coil:Heating:Electric:MultiStage ", cAlphaFields(10))); + 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))); ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + RoutineName, + state.dataHVACMultiSpdHP->CurrentModuleObject)); ErrorsFound = true; } } else { @@ -777,13 +783,14 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatCoilNum = state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Coil:Heating:Gas:MultiStage", Alphas(11)); if (thisMSHP.HeatCoilNum <= 0) { - ShowSevereError(state, format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} \"{}\" not found.", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("{} must be Coil:Heating:Gas:MultiStage ", cAlphaFields(10))); + 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))); ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + RoutineName, + state.dataHVACMultiSpdHP->CurrentModuleObject)); ErrorsFound = true; } } @@ -795,22 +802,22 @@ namespace HVACMultiSpeedHeatPump { HeatingCoils::GetCoilIndex(state, thisMSHP.HeatCoilName, thisMSHP.HeatCoilIndex, LocalError); } if (LocalError) { - ShowSevereError(state, format("The index of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } HeatingCoilInletNode = HeatingCoils::GetCoilInletNode(state, Alphas(10), Alphas(11), LocalError); if (LocalError) { - ShowSevereError(state, format("The inlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } HeatingCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, Alphas(10), Alphas(11), LocalError); if (LocalError) { - ShowSevereError(state, format("The outlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } @@ -835,7 +842,7 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatCoilType = HVAC::Coil_HeatingWater; ValidateComponent(state, Alphas(10), Alphas(11), IsNotOK, state.dataHVACMultiSpdHP->CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -844,7 +851,8 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -852,7 +860,8 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.MaxCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -861,7 +870,8 @@ namespace HVACMultiSpeedHeatPump { HeatingCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", thisMSHP.HeatCoilName, errFlag); thisMSHP.CoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -869,7 +879,8 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; HeatingCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } BranchNodeConnections::SetUpCompSets(state, @@ -884,7 +895,8 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatCoilType = HVAC::Coil_HeatingSteam; ValidateComponent(state, Alphas(10), Alphas(11), IsNotOK, state.dataHVACMultiSpdHP->CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } else { // mine data from heating coil object @@ -894,8 +906,10 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.HeatCoilNum == 0) { ShowSevereError( state, - format("{} illegal {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, cAlphaFields(10), thisMSHP.HeatCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + EnergyPlus::format( + "{} illegal {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, cAlphaFields(10), thisMSHP.HeatCoilName)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -903,7 +917,8 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.CoilControlNode = SteamCoils::GetCoilAirOutletNode(state, "Coil:Heating:Steam", thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -919,7 +934,8 @@ namespace HVACMultiSpeedHeatPump { HeatingCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisMSHP.HeatCoilNum, thisMSHP.HeatCoilName, errFlag); thisMSHP.CoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -927,7 +943,8 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; HeatingCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisMSHP.HeatCoilNum, thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -941,12 +958,12 @@ namespace HVACMultiSpeedHeatPump { } } else { ShowSevereError(state, - 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, format("The entered {} = \"{}\".", cAlphaFields(10), Alphas(10))); + 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))); ErrorsFound = true; } @@ -954,50 +971,52 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.CoolCoilType = HVAC::CoilDX_MultiSpeedCooling; thisMSHP.DXCoolCoilName = Alphas(13); if (state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Coil:Cooling:DX:MultiSpeed", Alphas(13)) <= 0) { - ShowSevereError(state, format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} \"{}\" not found.", cAlphaFields(13), Alphas(13))); - ShowContinueError(state, format("{} must be Coil:Cooling:DX:MultiSpeed ", cAlphaFields(12))); + 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))); ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + EnergyPlus::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, format("The index of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } CoolingCoilInletNode = DXCoils::GetCoilInletNode(state, Alphas(12), Alphas(13), LocalError); if (LocalError) { - ShowSevereError(state, format("The inlet node number of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } CoolingCoilOutletNode = DXCoils::GetCoilOutletNode(state, Alphas(12), Alphas(13), LocalError); if (LocalError) { - ShowSevereError(state, format("The outlet node number of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } thisMSHP.MinOATCompressorCooling = DXCoils::GetMinOATCompressor(state, thisMSHP.DXCoolCoilIndex, LocalError); if (LocalError) { - ShowContinueError(state, - format("...for cooling coil. Occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError( + state, + EnergyPlus::format("...for cooling coil. Occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); LocalError = false; } } else { ShowSevereError(state, - format("The allowed {} is Coil:Cooling:DX:MultiSpeed in {} \"{}\"", - cAlphaFields(12), - state.dataHVACMultiSpdHP->CurrentModuleObject, - Alphas(1))); - ShowContinueError(state, format("The entered {} = \"{}\".", cAlphaFields(12), Alphas(12))); + 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))); ErrorsFound = true; } BranchNodeConnections::SetUpCompSets(state, @@ -1015,8 +1034,9 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.SuppHeatCoilNum = HeatingCoils::GetHeatingCoilIndex(state, "Coil:Heating:Fuel", Alphas(15), errFlag); if (thisMSHP.SuppHeatCoilNum <= 0 || errFlag) { - ShowContinueError(state, format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} of type Coil:Heating:Fuel \"{}\" not found.", cAlphaFields(15), Alphas(15))); + 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))); ErrorsFound = true; } @@ -1024,15 +1044,15 @@ namespace HVACMultiSpeedHeatPump { LocalError = false; SuppHeatCoilInletNode = HeatingCoils::GetCoilInletNode(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, format("The inlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } SuppHeatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, format("The outlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } @@ -1040,8 +1060,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, format("The capacity {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("The capacity {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } @@ -1058,8 +1078,9 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.SuppHeatCoilNum = HeatingCoils::GetHeatingCoilIndex(state, "Coil:Heating:Electric", Alphas(15), errFlag); if (thisMSHP.SuppHeatCoilNum <= 0 || errFlag) { - ShowContinueError(state, format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} of type Coil:Heating:Electric \"{}\" not found.", cAlphaFields(15), Alphas(15))); + 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))); ErrorsFound = true; } @@ -1067,15 +1088,15 @@ namespace HVACMultiSpeedHeatPump { LocalError = false; SuppHeatCoilInletNode = HeatingCoils::GetCoilInletNode(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, format("The inlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } SuppHeatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, format("The outlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + 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))); ErrorsFound = true; LocalError = false; } @@ -1083,8 +1104,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, format("The capacity {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("The capacity {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } @@ -1102,7 +1123,7 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.SuppHeatCoilType = HVAC::Coil_HeatingWater; ValidateComponent(state, Alphas(14), thisMSHP.SuppHeatCoilName, IsNotOK, state.dataHVACMultiSpdHP->CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -1110,7 +1131,8 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.SuppCoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", thisMSHP.SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1119,7 +1141,8 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.MaxSuppCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", thisMSHP.SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1128,7 +1151,8 @@ namespace HVACMultiSpeedHeatPump { SuppHeatCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", thisMSHP.SuppHeatCoilName, errFlag); thisMSHP.SuppCoilAirInletNode = SuppHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1137,7 +1161,8 @@ namespace HVACMultiSpeedHeatPump { SuppHeatCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", thisMSHP.SuppHeatCoilName, errFlag); thisMSHP.SuppCoilAirOutletNode = SuppHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } BranchNodeConnections::SetUpCompSets(state, @@ -1153,7 +1178,8 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.SuppHeatCoilType = HVAC::Coil_HeatingSteam; ValidateComponent(state, Alphas(14), thisMSHP.SuppHeatCoilName, IsNotOK, state.dataHVACMultiSpdHP->CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } else { // mine data from heating coil object @@ -1162,8 +1188,10 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.SuppHeatCoilNum == 0) { ShowSevereError( state, - format("{} illegal {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, cAlphaFields(14), thisMSHP.SuppHeatCoilName)); - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + EnergyPlus::format( + "{} illegal {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, cAlphaFields(14), thisMSHP.SuppHeatCoilName)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1171,7 +1199,8 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.SuppCoilControlNode = SteamCoils::GetCoilAirOutletNode(state, "Coil:Heating:Steam", thisMSHP.SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1187,7 +1216,8 @@ namespace HVACMultiSpeedHeatPump { SuppHeatCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisMSHP.SuppHeatCoilNum, thisMSHP.SuppHeatCoilName, errFlag); thisMSHP.SuppCoilAirInletNode = SuppHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1196,7 +1226,8 @@ namespace HVACMultiSpeedHeatPump { SuppHeatCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisMSHP.SuppHeatCoilNum, thisMSHP.SuppHeatCoilName, errFlag); thisMSHP.SuppCoilAirOutletNode = SuppHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1212,11 +1243,11 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.SuppHeatCoilType == 0) { ShowSevereError(state, - format("{}, \"{}\", {} is not allowed = {}", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cAlphaFields(14), - Alphas(14))); + EnergyPlus::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; } @@ -1231,8 +1262,9 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.SuppMaxOATemp > 21.0) { ShowSevereError( state, - format("{}, \"{}\", {} is greater than 21.0", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(3))); - ShowContinueError(state, format("The input value is {:.2R}", Numbers(3))); + EnergyPlus::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; } OutputReportPredefined::PreDefTableEntry( @@ -1242,18 +1274,18 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.AuxOffCyclePower = Numbers(5); if (thisMSHP.AuxOnCyclePower < 0.0) { ShowSevereError(state, - format("{}, \"{}\", A negative value for {} is not allowed ", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(4))); + EnergyPlus::format("{}, \"{}\", A negative value for {} is not allowed ", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(4))); ErrorsFound = true; } if (thisMSHP.AuxOffCyclePower < 0.0) { ShowSevereError(state, - format("{}, \"{}\", A negative value for {} is not allowed ", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(5))); + EnergyPlus::format("{}, \"{}\", A negative value for {} is not allowed ", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(5))); ErrorsFound = true; } @@ -1272,8 +1304,9 @@ namespace HVACMultiSpeedHeatPump { NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisMSHP.HeatRecInletNodeNum == 0) { - ShowSevereError( - state, format("{}, \"{}\", Missing {}.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cAlphaFields(16))); + ShowSevereError(state, + EnergyPlus::format( + "{}, \"{}\", Missing {}.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cAlphaFields(16))); ErrorsFound = true; } thisMSHP.HeatRecOutletNodeNum = GetOnlySingleNode(state, @@ -1286,8 +1319,9 @@ namespace HVACMultiSpeedHeatPump { NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisMSHP.HeatRecOutletNodeNum == 0) { - ShowSevereError( - state, format("{}, \"{}\", Missing {}.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cAlphaFields(17))); + ShowSevereError(state, + EnergyPlus::format( + "{}, \"{}\", Missing {}.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cAlphaFields(17))); ErrorsFound = true; } BranchNodeConnections::TestCompSet( @@ -1303,28 +1337,28 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatRecOutletNodeNum = 0; if (!lAlphaBlanks(16) || !lAlphaBlanks(17)) { ShowWarningError(state, - format("Since {} = 0.0, heat recovery is inactive for {} = {}", - cNumericFields(6), - state.dataHVACMultiSpdHP->CurrentModuleObject, - Alphas(1))); - ShowContinueError(state, format("However, {} or {} was specified.", cAlphaFields(16), cAlphaFields(17))); + 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))); } } thisMSHP.MaxHeatRecOutletTemp = Numbers(7); if (thisMSHP.MaxHeatRecOutletTemp < 0.0) { ShowSevereError(state, - format("{}, \"{}\", The value for {} is below 0.0", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(7))); + EnergyPlus::format("{}, \"{}\", The value for {} is below 0.0", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(7))); ErrorsFound = true; } if (thisMSHP.MaxHeatRecOutletTemp > 100.0) { ShowSevereError(state, - format("{}, \"{}\", The value for {} is above 100.0", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(7))); + EnergyPlus::format("{}, \"{}\", The value for {} is above 100.0", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(7))); ErrorsFound = true; } @@ -1332,7 +1366,7 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.IdleVolumeAirRate < 0.0 && thisMSHP.IdleVolumeAirRate != DataSizing::AutoSize) { ShowSevereError( state, - format( + EnergyPlus::format( "{}, \"{}\", {} cannot be less than zero.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(8))); ErrorsFound = true; } @@ -1351,20 +1385,20 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.NumOfSpeedHeating < 2 || thisMSHP.NumOfSpeedHeating > 4) { if (thisMSHP.HeatCoilType == HVAC::CoilDX_MultiSpeedHeating) { ShowSevereError(state, - format("{}, The maximum {} is 4, and the minimum number is 2", - state.dataHVACMultiSpdHP->CurrentModuleObject, - cNumericFields(9))); - ShowContinueError(state, format("The input value is {:.0R}", Numbers(9))); + EnergyPlus::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; } } thisMSHP.NumOfSpeedCooling = Numbers(10); if (thisMSHP.NumOfSpeedCooling < 2 || thisMSHP.NumOfSpeedCooling > 4) { ShowSevereError(state, - format("{}, The maximum {} is 4, and the minimum number is 2", - state.dataHVACMultiSpdHP->CurrentModuleObject, - cNumericFields(10))); - ShowContinueError(state, format("The input value is {:.0R}", Numbers(10))); + EnergyPlus::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; } @@ -1379,10 +1413,10 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.HeatCoilType == HVAC::CoilDX_MultiSpeedHeating) { if (thisMSHP.HeatVolumeFlowRate(i) <= 0.0 && thisMSHP.HeatVolumeFlowRate(i) != DataSizing::AutoSize) { ShowSevereError(state, - format("{}, \"{}\", {} must be greater than zero.", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(10 + i))); + EnergyPlus::format("{}, \"{}\", {} must be greater than zero.", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(10 + i))); ErrorsFound = true; } } @@ -1403,8 +1437,9 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.HeatVolumeFlowRate(i) < thisMSHP.HeatVolumeFlowRate(j)) { ShowSevereError( state, - format("{}, \"{}\", {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(10 + i))); - ShowContinueError(state, format(" cannot be less than {}", cNumericFields(10 + j))); + EnergyPlus::format( + "{}, \"{}\", {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(10 + i))); + ShowContinueError(state, EnergyPlus::format(" cannot be less than {}", cNumericFields(10 + j))); ErrorsFound = true; } } @@ -1426,10 +1461,10 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.CoolVolumeFlowRate(i) = Numbers(14 + i); if (thisMSHP.CoolVolumeFlowRate(i) <= 0.0 && thisMSHP.CoolVolumeFlowRate(i) != DataSizing::AutoSize) { ShowSevereError(state, - format("{}, \"{}\", {} must be greater than zero.", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(14 + i))); + EnergyPlus::format("{}, \"{}\", {} must be greater than zero.", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(14 + i))); ErrorsFound = true; } } @@ -1449,8 +1484,9 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.CoolVolumeFlowRate(i) < thisMSHP.CoolVolumeFlowRate(j)) { ShowSevereError( state, - format("{}, \"{}\", {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(14 + i))); - ShowContinueError(state, format(" cannot be less than {}", cNumericFields(14 + j))); + EnergyPlus::format( + "{}, \"{}\", {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(14 + i))); + ShowContinueError(state, EnergyPlus::format(" cannot be less than {}", cNumericFields(14 + j))); ErrorsFound = true; } } @@ -1460,85 +1496,108 @@ namespace HVACMultiSpeedHeatPump { // Check node integrity if (thisMSHP.fanPlace == HVAC::FanPlace::BlowThru) { if (thisMSHP.FanInletNode != thisMSHP.AirInletNodeNum) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + 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))); ShowContinueError( - state, format("When a blow through fan is specified, the fan inlet node name must be the same as the {}", cAlphaFields(3))); - ShowContinueError(state, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanInletNode))); - ShowContinueError(state, format("...{} = {}", cAlphaFields(3), state.dataLoopNodes->NodeID(thisMSHP.AirInletNodeNum))); + state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanInletNode))); + ShowContinueError(state, + EnergyPlus::format("...{} = {}", cAlphaFields(3), state.dataLoopNodes->NodeID(thisMSHP.AirInletNodeNum))); ErrorsFound = true; } if (thisMSHP.FanOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanOutletNode))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + 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))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); ErrorsFound = true; } if (HeatingCoilOutletNode != SuppHeatCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilInletNode))); + 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))); ErrorsFound = true; } if (SuppHeatCoilOutletNode != thisMSHP.AirOutletNodeNum) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); - ShowContinueError(state, format("The supplemental heating coil outlet node name must be the same as the {}", cAlphaFields(4))); + ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( - state, format("...Supplemental heating coil outlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilOutletNode))); - ShowContinueError(state, format("...{} = {}", cAlphaFields(4), state.dataLoopNodes->NodeID(thisMSHP.AirOutletNodeNum))); + 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))); + ShowContinueError(state, + EnergyPlus::format("...{} = {}", cAlphaFields(4), state.dataLoopNodes->NodeID(thisMSHP.AirOutletNodeNum))); ErrorsFound = true; } } else { if (CoolingCoilInletNode != thisMSHP.AirInletNodeNum) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( state, - format("When a draw through fan is specified, the cooling coil inlet node name must be the same as the {}", cAlphaFields(3))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); - ShowContinueError(state, format("...{} = {}", cAlphaFields(3), state.dataLoopNodes->NodeID(thisMSHP.AirInletNodeNum))); + EnergyPlus::format("When a draw through fan is specified, the cooling coil inlet node name must be the same as the {}", + cAlphaFields(3))); + ShowContinueError(state, + EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, + EnergyPlus::format("...{} = {}", cAlphaFields(3), state.dataLoopNodes->NodeID(thisMSHP.AirInletNodeNum))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); ErrorsFound = true; } if (HeatingCoilOutletNode != thisMSHP.FanInletNode) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanInletNode))); + 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))); ErrorsFound = true; } if (thisMSHP.FanOutletNode != SuppHeatCoilInletNode) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanOutletNode))); - ShowContinueError(state, format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilInletNode))); + 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))); ErrorsFound = true; } if (SuppHeatCoilOutletNode != thisMSHP.AirOutletNodeNum) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); - ShowContinueError(state, format("The reheat coil outlet node name must be the same as the {}", cAlphaFields(4))); - ShowContinueError(state, format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilOutletNode))); - ShowContinueError(state, format("...{} = {}", cAlphaFields(4), state.dataLoopNodes->NodeID(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))); + ShowContinueError(state, + EnergyPlus::format("...{} = {}", cAlphaFields(4), state.dataLoopNodes->NodeID(thisMSHP.AirOutletNodeNum))); ErrorsFound = true; } } @@ -1547,34 +1606,37 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.HeatCoilType == HVAC::CoilDX_MultiSpeedHeating) { i = DXCoils::GetDXCoilNumberOfSpeeds(state, Alphas(10), Alphas(11), ErrorsFound); if (thisMSHP.NumOfSpeedHeating != i) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( - state, format("The {} is not equal to the number defined in {} = {}", cNumericFields(9), cAlphaFields(11), Alphas(11))); + state, + EnergyPlus::format("The {} is not equal to the number defined in {} = {}", cNumericFields(9), cAlphaFields(11), Alphas(11))); ErrorsFound = true; } } else if (thisMSHP.HeatCoilType == HVAC::Coil_HeatingElectric_MultiStage || thisMSHP.HeatCoilType == HVAC::Coil_HeatingGas_MultiStage) { i = HeatingCoils::GetHeatingCoilNumberOfStages(state, Alphas(10), Alphas(11), ErrorsFound); if (thisMSHP.NumOfSpeedHeating != i) { - ShowSevereError(state, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( - state, format("The {} is not equal to the number defined in {} = {}", cNumericFields(9), cAlphaFields(11), Alphas(11))); + state, + EnergyPlus::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, format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); - ShowContinueError(state, - format("The {} is not equal to the number defined in {} = {}", cNumericFields(10), cAlphaFields(13), Alphas(13))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } } if (ErrorsFound) { ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + RoutineName, + state.dataHVACMultiSpdHP->CurrentModuleObject)); } // End of multispeed heat pump @@ -2064,8 +2126,9 @@ namespace HVACMultiSpeedHeatPump { } MSHeatPump(MSHeatPumpNum).MyCheckFlag = false; if (MSHeatPump(MSHeatPumpNum).ZoneSequenceCoolingNum == 0 || MSHeatPump(MSHeatPumpNum).ZoneSequenceHeatingNum == 0) { - ShowSevereError(state, - format("AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed, \"{}\": Airloop air terminal in the zone equipment list for " + 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)); @@ -2110,7 +2173,8 @@ namespace HVACMultiSpeedHeatPump { if (CntrlZoneTerminalUnitMassFlowRateMax >= HVAC::SmallAirVolFlow) { MSHeatPump(MSHeatPumpNum).FlowFraction = CntrlZoneTerminalUnitMassFlowRateMax / SumOfMassFlowRateMax; } else { - ShowSevereError(state, format("{} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + ShowSevereError(state, + EnergyPlus::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, @@ -2252,71 +2316,82 @@ namespace HVACMultiSpeedHeatPump { if (MSHeatPump(MSHeatPumpNum).FanVolFlow != DataSizing::AutoSize) { // Check fan versus system supply air flow rates if (MSHeatPump(MSHeatPumpNum).FanVolFlow < MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(NumOfSpeedCooling)) { - ShowWarningError(state, - 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))); + 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))); ShowContinueError( state, " The MSHP system flow rate when cooling is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, - format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + ShowContinueError( + state, + EnergyPlus::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, - 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, format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + 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)); MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(i + 1); } } } if (MSHeatPump(MSHeatPumpNum).FanVolFlow < MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(NumOfSpeedHeating)) { - ShowWarningError(state, - 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))); + 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))); ShowContinueError( state, " The MSHP system flow rate when heating is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, - format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + ShowContinueError( + state, + EnergyPlus::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, - 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, - format(" Occurs in {} system = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + 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.dataHVACMultiSpdHP->CurrentModuleObject, + MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(i + 1); } } } if (MSHeatPump(MSHeatPumpNum).FanVolFlow < MSHeatPump(MSHeatPumpNum).IdleVolumeAirRate && MSHeatPump(MSHeatPumpNum).IdleVolumeAirRate != 0.0) { - ShowWarningError(state, - 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)); + 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)); 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, - format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + ShowContinueError( + state, + EnergyPlus::format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).IdleVolumeAirRate = MSHeatPump(MSHeatPumpNum).FanVolFlow; } RhoAir = state.dataEnvrn->StdRhoAir; @@ -2439,7 +2514,8 @@ namespace HVACMultiSpeedHeatPump { ShowWarningError(state, "ZoneControl:Thermostat:StagedDualSetpoint is found, but is not applied to this " "AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed object = "); - ShowContinueError(state, format("{}. Please make correction. Simulation continues...", MSHeatPump(MSHeatPumpNum).Name)); + ShowContinueError(state, + EnergyPlus::format("{}. Please make correction. Simulation continues...", MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).MyStagedFlag = false; } } @@ -2515,11 +2591,13 @@ namespace HVACMultiSpeedHeatPump { ++MSHeatPump(MSHeatPumpNum).CoolCountAvail; ShowWarningError( state, - 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, format("Availability schedule returned={:.1R}", coilAvailSched->getCurrentVal())); + 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)); + ShowContinueErrorTimeStamp(state, + EnergyPlus::format("Availability schedule returned={:.1R}", coilAvailSched->getCurrentVal())); } else { ++MSHeatPump(MSHeatPumpNum).CoolCountAvail; ShowRecurringWarningErrorAtEnd(state, @@ -2545,11 +2623,13 @@ namespace HVACMultiSpeedHeatPump { ++MSHeatPump(MSHeatPumpNum).HeatCountAvail; ShowWarningError( state, - 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, format("Availability schedule returned={:.1R}", coilAvailSched->getCurrentVal())); + 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)); + ShowContinueErrorTimeStamp(state, + EnergyPlus::format("Availability schedule returned={:.1R}", coilAvailSched->getCurrentVal())); } else { ++MSHeatPump(MSHeatPumpNum).HeatCountAvail; ShowRecurringWarningErrorAtEnd(state, @@ -2792,7 +2872,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, format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -2815,7 +2895,7 @@ namespace HVACMultiSpeedHeatPump { BaseSizer::reportSizerOutput(state, state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name, - format("Speed {} Supply Air Flow Rate During Cooling Operation [m3/s]", i), + EnergyPlus::format("Speed {} Supply Air Flow Rate During Cooling Operation [m3/s]", i), MSHeatPump.CoolVolumeFlowRate(i)); } } @@ -2829,7 +2909,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, format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -2852,7 +2932,7 @@ namespace HVACMultiSpeedHeatPump { BaseSizer::reportSizerOutput(state, state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name, - format("Speed{}Supply Air Flow Rate During Heating Operation [m3/s]", i), + EnergyPlus::format("Speed{}Supply Air Flow Rate During Heating Operation [m3/s]", i), MSHeatPump.HeatVolumeFlowRate(i)); } } @@ -2864,7 +2944,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, format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -3415,9 +3495,10 @@ namespace HVACMultiSpeedHeatPump { if (!state.dataGlobal->WarmupFlag) { if (state.dataHVACMultiSpdHP->ErrCountCyc == 0) { ++state.dataHVACMultiSpdHP->ErrCountCyc; // TODO: Why is the error count shared among all heat pump units? - ShowWarningError(state, - format("Iteration limit exceeded calculating DX unit cycling ratio, for unit={}", MSHeatPump.Name)); - ShowContinueErrorTimeStamp(state, format("Cycling ratio returned={:.2R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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; ShowRecurringWarningErrorAtEnd( @@ -3429,9 +3510,9 @@ namespace HVACMultiSpeedHeatPump { } } } else if (SolFla == -2) { - ShowFatalError( - state, - format("DX unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", MSHeatPump.DXCoolCoilName)); + ShowFatalError(state, + EnergyPlus::format("DX unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", + MSHeatPump.DXCoolCoilName)); } } else { // Check to see which speed to meet the load @@ -3499,9 +3580,11 @@ namespace HVACMultiSpeedHeatPump { if (!state.dataGlobal->WarmupFlag) { if (state.dataHVACMultiSpdHP->ErrCountVar == 0) { ++state.dataHVACMultiSpdHP->ErrCountVar; - ShowWarningError(state, - format("Iteration limit exceeded calculating DX unit speed ratio, for unit={}", MSHeatPump.Name)); - ShowContinueErrorTimeStamp(state, format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); + ShowWarningError( + state, + EnergyPlus::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 { ++state.dataHVACMultiSpdHP->ErrCountVar; ShowRecurringWarningErrorAtEnd( @@ -3513,9 +3596,9 @@ namespace HVACMultiSpeedHeatPump { } } } else if (SolFla == -2) { - ShowFatalError( - state, - format("DX unit compressor speed calculation failed: speed limits exceeded, for unit={}", MSHeatPump.DXCoolCoilName)); + ShowFatalError(state, + EnergyPlus::format("DX unit compressor speed calculation failed: speed limits exceeded, for unit={}", + MSHeatPump.DXCoolCoilName)); } } } else { @@ -3552,10 +3635,10 @@ namespace HVACMultiSpeedHeatPump { if (!state.dataGlobal->WarmupFlag) { if (state.dataHVACMultiSpdHP->ErrCountCyc == 0) { ++state.dataHVACMultiSpdHP->ErrCountCyc; - ShowWarningError( - state, - format("Iteration limit exceeded calculating DX unit cycling ratio, for unit={}", MSHeatPump.Name)); - ShowContinueErrorTimeStamp(state, format("Cycling ratio returned={:.2R}", PartLoadFrac)); + ShowWarningError(state, + EnergyPlus::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; ShowRecurringWarningErrorAtEnd( @@ -3568,8 +3651,8 @@ namespace HVACMultiSpeedHeatPump { } } else if (SolFla == -2) { ShowFatalError(state, - format("DX unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", - MSHeatPump.DXCoolCoilName)); + EnergyPlus::format("DX unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", + MSHeatPump.DXCoolCoilName)); } } else { FullOutput = LowOutput; @@ -3633,9 +3716,10 @@ namespace HVACMultiSpeedHeatPump { ++state.dataHVACMultiSpdHP->ErrCountVar; ShowWarningError( state, - format("Iteration limit exceeded calculating DX unit speed ratio, for unit={}", MSHeatPump.Name)); + EnergyPlus::format("Iteration limit exceeded calculating DX unit speed ratio, for unit={}", + MSHeatPump.Name)); ShowContinueErrorTimeStamp( - state, format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); + state, EnergyPlus::format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); } else { ++state.dataHVACMultiSpdHP->ErrCountVar; ShowRecurringWarningErrorAtEnd( @@ -3648,9 +3732,10 @@ namespace HVACMultiSpeedHeatPump { } } } else if (SolFla == -2) { - ShowFatalError(state, - format("DX unit compressor speed calculation failed: speed limits exceeded, for unit={}", - MSHeatPump.DXCoolCoilName)); + ShowFatalError( + state, + EnergyPlus::format("DX unit compressor speed calculation failed: speed limits exceeded, for unit={}", + MSHeatPump.DXCoolCoilName)); } } else { SpeedRatio = 1.0; @@ -4341,30 +4426,32 @@ namespace HVACMultiSpeedHeatPump { if (SolFlag == -1) { if (MSHeatPump.HotWaterCoilMaxIterIndex == 0) { ShowWarningMessage(state, - format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", - CurrentModuleObject, - MSHeatPump.Name)); + EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", + CurrentModuleObject, + MSHeatPump.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError( + state, + EnergyPlus::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", - SolveMaxIter, - CurrentModuleObject, - MSHeatPump.Name), + EnergyPlus::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, - format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - CurrentModuleObject, - MSHeatPump.Name)); + ShowWarningMessage( + state, + EnergyPlus::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, format("...Given minimum water flow rate={:.3R} kg/s", MinWaterFlow)); - ShowContinueError(state, format("...Given maximum water flow rate={:.3R} kg/s", MaxHotWaterFlow)); + 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, "CalcNonDXHeatingCoils: Hot water coil control failed (flow limits) for " + diff --git a/src/EnergyPlus/HVACSingleDuctInduc.cc b/src/EnergyPlus/HVACSingleDuctInduc.cc index a5d0c93c636..0a1781f4957 100644 --- a/src/EnergyPlus/HVACSingleDuctInduc.cc +++ b/src/EnergyPlus/HVACSingleDuctInduc.cc @@ -127,25 +127,26 @@ namespace HVACSingleDuctInduc { if (CompIndex == 0) { IUNum = Util::FindItemInList(CompName, state.dataHVACSingleDuctInduc->IndUnit); if (IUNum == 0) { - ShowFatalError(state, format("SimIndUnit: Induction Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimIndUnit: Induction Unit not found={}", CompName)); } CompIndex = IUNum; } else { IUNum = CompIndex; if (IUNum > state.dataHVACSingleDuctInduc->NumIndUnits || IUNum < 1) { ShowFatalError(state, - format("SimIndUnit: Invalid CompIndex passed={}, Number of Induction Units={}, System name={}", - CompIndex, - state.dataHVACSingleDuctInduc->NumIndUnits, - CompName)); + EnergyPlus::format("SimIndUnit: Invalid CompIndex passed={}, Number of Induction Units={}, System name={}", + CompIndex, + state.dataHVACSingleDuctInduc->NumIndUnits, + CompName)); } if (state.dataHVACSingleDuctInduc->CheckEquipName(IUNum)) { if (CompName != state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name) { - ShowFatalError(state, - format("SimIndUnit: Invalid CompIndex passed={}, Induction Unit name={}, stored Induction Unit for that index={}", - CompIndex, - CompName, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimIndUnit: Invalid CompIndex passed={}, Induction Unit name={}, stored Induction Unit for that index={}", + CompIndex, + CompName, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); } state.dataHVACSingleDuctInduc->CheckEquipName(IUNum) = false; } @@ -165,8 +166,8 @@ namespace HVACSingleDuctInduc { SimFourPipeIndUnit(state, IUNum, ZoneNum, ZoneNodeNum, FirstHVACIteration); } break; default: { - ShowSevereError(state, format("Illegal Induction Unit Type used={}", indUnit.UnitType)); - ShowContinueError(state, format("Occurs in Induction Unit={}", indUnit.Name)); + ShowSevereError(state, EnergyPlus::format("Illegal Induction Unit Type used={}", indUnit.UnitType)); + ShowContinueError(state, EnergyPlus::format("Occurs in Induction Unit={}", indUnit.Name)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -310,7 +311,7 @@ namespace HVACSingleDuctInduc { state.dataHVACSingleDuctInduc->IndUnit(IUNum).HWControlNode = WaterCoils::GetCoilWaterInletNode( state, state.dataHVACSingleDuctInduc->IndUnit(IUNum).HCoilType, state.dataHVACSingleDuctInduc->IndUnit(IUNum).HCoil, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("In {} = {}", CurrentModuleObject, state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + ShowContinueError(state, EnergyPlus::format("In {} = {}", CurrentModuleObject, state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueError(state, "..Only Coil:Heating:Water is allowed."); ErrorsFound = true; } @@ -331,7 +332,7 @@ namespace HVACSingleDuctInduc { state.dataHVACSingleDuctInduc->IndUnit(IUNum).CWControlNode = WaterCoils::GetCoilWaterInletNode( state, state.dataHVACSingleDuctInduc->IndUnit(IUNum).CCoilType, state.dataHVACSingleDuctInduc->IndUnit(IUNum).CCoil, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("In {} = {}", CurrentModuleObject, state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + ShowContinueError(state, EnergyPlus::format("In {} = {}", CurrentModuleObject, state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueError(state, "..Only Coil:Cooling:Water or Coil:Cooling:Water:DetailedGeometry is allowed."); ErrorsFound = true; } @@ -348,7 +349,8 @@ namespace HVACSingleDuctInduc { errFlag, CurrentModuleObject); if (errFlag) { - ShowContinueError(state, format("...specified in {} = {}", CurrentModuleObject, state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + ShowContinueError( + state, EnergyPlus::format("...specified in {} = {}", CurrentModuleObject, state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ErrorsFound = true; } @@ -385,13 +387,13 @@ namespace HVACSingleDuctInduc { // one assumes if there isn't one assigned, it's an error? if (state.dataHVACSingleDuctInduc->IndUnit(IUNum).ADUNum == 0) { ShowSevereError(state, - format("{}No matching Air Distribution Unit, for Unit = [{},{}].", - RoutineName, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); - ShowContinueError( - state, - format("...should have outlet node={}", state.dataLoopNodes->NodeID(state.dataHVACSingleDuctInduc->IndUnit(IUNum).OutAirNode))); + EnergyPlus::format("{}No matching Air Distribution Unit, for Unit = [{},{}].", + RoutineName, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + ShowContinueError(state, + EnergyPlus::format("...should have outlet node={}", + state.dataLoopNodes->NodeID(state.dataHVACSingleDuctInduc->IndUnit(IUNum).OutAirNode))); ErrorsFound = true; } else { // Fill the Zone Equipment data with the supply air inlet node number of this unit. @@ -406,13 +408,14 @@ namespace HVACSingleDuctInduc { if (state.dataHVACSingleDuctInduc->IndUnit(IUNum).OutAirNode == zoneEquipConfig.InletNode(SupAirIn)) { if (zoneEquipConfig.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(state.dataHVACSingleDuctInduc->IndUnit(IUNum).OutAirNode))); ShowContinueError(state, - format("{} already connects to another zone", - state.dataLoopNodes->NodeID(state.dataHVACSingleDuctInduc->IndUnit(IUNum).OutAirNode))); - ShowContinueError(state, - format("Occurs for terminal unit {} = {}", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + EnergyPlus::format("Occurs for terminal unit {} = {}", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -430,10 +433,11 @@ namespace HVACSingleDuctInduc { } } if (!AirNodeFound) { - ShowSevereError( - state, - format("The outlet air node from the {} = {}", CurrentModuleObject, state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); - ShowContinueError(state, format("did not have a matching Zone Equipment Inlet Node, Node ={}", Alphas(3))); + ShowSevereError(state, + EnergyPlus::format("The outlet air node from the {} = {}", + CurrentModuleObject, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + ShowContinueError(state, EnergyPlus::format("did not have a matching Zone Equipment Inlet Node, Node ={}", Alphas(3))); ErrorsFound = true; } } @@ -454,7 +458,7 @@ namespace HVACSingleDuctInduc { lAlphaBlanks.deallocate(); lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input. Preceding conditions cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input. Preceding conditions cause termination.", RoutineName)); } } @@ -517,9 +521,9 @@ namespace HVACSingleDuctInduc { } if (errFlag) { ShowContinueError(state, - format("Reference Unit=\"{}\", type={}", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType)); + EnergyPlus::format("Reference Unit=\"{}\", type={}", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType)); } if (state.dataHVACSingleDuctInduc->IndUnit(IUNum).CoolingCoilType == DataPlant::PlantEquipmentType::CoilWaterCooling || state.dataHVACSingleDuctInduc->IndUnit(IUNum).CoolingCoilType == DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling) { @@ -537,9 +541,9 @@ namespace HVACSingleDuctInduc { } if (errFlag) { ShowContinueError(state, - format("Reference Unit=\"{}\", type={}", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType)); + EnergyPlus::format("Reference Unit=\"{}\", type={}", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType)); ShowFatalError(state, "InitIndUnit: Program terminated for previous conditions."); } state.dataHVACSingleDuctInduc->MyPlantScanFlag(IUNum) = false; @@ -580,12 +584,12 @@ namespace HVACSingleDuctInduc { continue; } ShowSevereError(state, - format("InitIndUnit: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - state.dataDefineEquipment->AirDistUnit(state.dataHVACSingleDuctInduc->IndUnit(Loop).ADUNum).Name)); + EnergyPlus::format("InitIndUnit: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", + state.dataDefineEquipment->AirDistUnit(state.dataHVACSingleDuctInduc->IndUnit(Loop).ADUNum).Name)); ShowContinueError(state, - format("...Unit=[{},{}] will not be simulated.", - state.dataHVACSingleDuctInduc->IndUnit(Loop).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(Loop).Name)); + EnergyPlus::format("...Unit=[{},{}] will not be simulated.", + state.dataHVACSingleDuctInduc->IndUnit(Loop).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(Loop).Name)); } } @@ -776,12 +780,14 @@ namespace HVACSingleDuctInduc { if ((std::abs(MaxTotAirVolFlowDes - MaxTotAirVolFlowUser) / MaxTotAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); - ShowContinueError(state, format("User-Specified Maximum Total Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowUser)); + EnergyPlus::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueError( - state, format("differs from Design Size Maximum Total Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowDes)); + state, EnergyPlus::format("User-Specified Maximum Total Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Maximum Total Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -856,9 +862,9 @@ namespace HVACSingleDuctInduc { } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); ShowContinueError(state, - format("Occurs in{} Object={}", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + EnergyPlus::format("Occurs in{} Object={}", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ErrorsFound = true; } state.dataHVACSingleDuctInduc->IndUnit(IUNum).MaxVolHotWaterFlow = MaxVolHotWaterFlowDes; @@ -892,15 +898,17 @@ namespace HVACSingleDuctInduc { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); - ShowContinueError(state, - format("User-Specified Maximum Hot Water Flow Rate of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + ShowMessage( + state, + EnergyPlus::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueError( state, - format("differs from Design Size Maximum Hot Water Flow Rate of {:.5R} [m3/s]", MaxVolHotWaterFlowDes)); + EnergyPlus::format("User-Specified Maximum Hot Water Flow Rate of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Hot Water Flow Rate of {:.5R} [m3/s]", + MaxVolHotWaterFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -983,9 +991,9 @@ namespace HVACSingleDuctInduc { } else { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); ShowContinueError(state, - format("Occurs in{} Object={}", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + EnergyPlus::format("Occurs in{} Object={}", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ErrorsFound = true; } state.dataHVACSingleDuctInduc->IndUnit(IUNum).MaxVolColdWaterFlow = MaxVolColdWaterFlowDes; @@ -1007,15 +1015,17 @@ namespace HVACSingleDuctInduc { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolColdWaterFlowDes - MaxVolColdWaterFlowUser) / MaxVolColdWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); - ShowContinueError( - state, format("User-Specified Maximum Cold Water Flow Rate of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); + ShowMessage( + state, + EnergyPlus::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueError( state, - format("differs from Design Size Maximum Cold Water Flow Rate of {:.5R} [m3/s]", MaxVolColdWaterFlowDes)); + EnergyPlus::format("User-Specified Maximum Cold Water Flow Rate of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Cold Water Flow Rate of {:.5R} [m3/s]", + MaxVolColdWaterFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1160,29 +1170,31 @@ namespace HVACSingleDuctInduc { if (SolFlag == -1) { if (state.dataHVACSingleDuctInduc->IndUnit(IUNum).HWCoilFailNum1 == 0) { ShowWarningMessage(state, - format("SimFourPipeIndUnit: Hot water coil control failed for {}=\"{}\"", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + EnergyPlus::format("SimFourPipeIndUnit: Hot water coil control failed for {}=\"{}\"", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError( + state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - format("SimFourPipeIndUnit: Hot water coil control failed (iteration limit [{}]) for {}=\"{}\"", - SolveMaxIter, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name), + EnergyPlus::format("SimFourPipeIndUnit: Hot water coil control failed (iteration limit [{}]) for {}=\"{}\"", + SolveMaxIter, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name), state.dataHVACSingleDuctInduc->IndUnit(IUNum).HWCoilFailNum1); } else if (SolFlag == -2) { if (state.dataHVACSingleDuctInduc->IndUnit(IUNum).HWCoilFailNum2 == 0) { - ShowWarningMessage(state, - format("SimFourPipeIndUnit: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + ShowWarningMessage( + state, + EnergyPlus::format("SimFourPipeIndUnit: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad hot water maximum flow rate limits"); - ShowContinueError(state, format("...Given minimum water flow rate={:.3R} kg/s", MinHotWaterFlow)); - ShowContinueError(state, format("...Given maximum water flow rate={:.3R} kg/s", MaxHotWaterFlow)); + ShowContinueError(state, EnergyPlus::format("...Given minimum water flow rate={:.3R} kg/s", MinHotWaterFlow)); + ShowContinueError(state, EnergyPlus::format("...Given maximum water flow rate={:.3R} kg/s", MaxHotWaterFlow)); } ShowRecurringWarningErrorAtEnd(state, "SimFourPipeIndUnit: Hot water coil control failed (flow limits) for " + @@ -1212,29 +1224,31 @@ namespace HVACSingleDuctInduc { if (SolFlag == -1) { if (state.dataHVACSingleDuctInduc->IndUnit(IUNum).CWCoilFailNum1 == 0) { ShowWarningMessage(state, - format("SimFourPipeIndUnit: Cold water coil control failed for {}=\"{}\"", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + EnergyPlus::format("SimFourPipeIndUnit: Cold water coil control failed for {}=\"{}\"", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format(" Iteration limit [{}] exceeded in calculating cold water mass flow rate", SolveMaxIter)); + ShowContinueError( + state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating cold water mass flow rate", SolveMaxIter)); } - ShowRecurringWarningErrorAtEnd(state, - format("SimFourPipeIndUnit: Cold water coil control failed (iteration limit [{}]) for {}=\"{}", - SolveMaxIter, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name), - state.dataHVACSingleDuctInduc->IndUnit(IUNum).CWCoilFailNum1); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("SimFourPipeIndUnit: Cold water coil control failed (iteration limit [{}]) for {}=\"{}", + SolveMaxIter, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name), + state.dataHVACSingleDuctInduc->IndUnit(IUNum).CWCoilFailNum1); } else if (SolFlag == -2) { if (state.dataHVACSingleDuctInduc->IndUnit(IUNum).CWCoilFailNum2 == 0) { - ShowWarningMessage(state, - format("SimFourPipeIndUnit: Cold water coil control failed (maximum flow limits) for {}=\"{}\"", - state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); + ShowWarningMessage( + state, + EnergyPlus::format("SimFourPipeIndUnit: Cold water coil control failed (maximum flow limits) for {}=\"{}\"", + state.dataHVACSingleDuctInduc->IndUnit(IUNum).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(IUNum).Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad cold water maximum flow rate limits"); - ShowContinueError(state, format("...Given minimum water flow rate={:.3R} kg/s", MinColdWaterFlow)); - ShowContinueError(state, format("...Given maximum water flow rate={:.3R} kg/s", MaxColdWaterFlow)); + ShowContinueError(state, EnergyPlus::format("...Given minimum water flow rate={:.3R} kg/s", MinColdWaterFlow)); + ShowContinueError(state, EnergyPlus::format("...Given maximum water flow rate={:.3R} kg/s", MaxColdWaterFlow)); } ShowRecurringWarningErrorAtEnd(state, "SimFourPipeIndUnit: Cold water coil control failed (flow limits) for " + diff --git a/src/EnergyPlus/HVACStandAloneERV.cc b/src/EnergyPlus/HVACStandAloneERV.cc index 21a509c9e7a..9ac22804752 100644 --- a/src/EnergyPlus/HVACStandAloneERV.cc +++ b/src/EnergyPlus/HVACStandAloneERV.cc @@ -128,25 +128,25 @@ void SimStandAloneERV(EnergyPlusData &state, if (CompIndex == 0) { StandAloneERVNum = Util::FindItem(CompName, state.dataHVACStandAloneERV->StandAloneERV); if (StandAloneERVNum == 0) { - ShowFatalError(state, format("SimStandAloneERV: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimStandAloneERV: Unit not found={}", CompName)); } CompIndex = StandAloneERVNum; } else { StandAloneERVNum = CompIndex; if (StandAloneERVNum > state.dataHVACStandAloneERV->NumStandAloneERVs || StandAloneERVNum < 1) { ShowFatalError(state, - format("SimStandAloneERV: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - StandAloneERVNum, - state.dataHVACStandAloneERV->NumStandAloneERVs, - CompName)); + EnergyPlus::format("SimStandAloneERV: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + StandAloneERVNum, + state.dataHVACStandAloneERV->NumStandAloneERVs, + CompName)); } if (state.dataHVACStandAloneERV->CheckEquipName(StandAloneERVNum)) { if (CompName != state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name) { ShowFatalError(state, - format("SimStandAloneERV: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - StandAloneERVNum, - CompName, - state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name)); + EnergyPlus::format("SimStandAloneERV: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + StandAloneERVNum, + CompName, + state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name)); } state.dataHVACStandAloneERV->CheckEquipName(StandAloneERVNum) = false; } @@ -264,14 +264,14 @@ void GetStandAloneERV(EnergyPlusData &state) standAloneERV.hxType = HeatRecovery::GetHeatExchangerObjectTypeNum(state, standAloneERV.HeatExchangerName, standAloneERV.HeatExchangerIndex, errFlag); if (errFlag) { - ShowContinueError(state, format("... occurs in {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowContinueError(state, EnergyPlus::format("... occurs in {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ErrorsFound = true; } errFlag = false; HXSupAirFlowRate = HeatRecovery::GetSupplyAirFlowRate(state, standAloneERV.HeatExchangerName, errFlag); if (errFlag) { - ShowContinueError(state, format("... occurs in {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowContinueError(state, EnergyPlus::format("... occurs in {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ErrorsFound = true; } standAloneERV.DesignHXVolFlowRate = HXSupAirFlowRate; @@ -312,7 +312,7 @@ void GetStandAloneERV(EnergyPlusData &state) standAloneERV.SupplyAirInletNode = HeatRecovery::GetSupplyInletNode(state, standAloneERV.HeatExchangerName, errFlag); standAloneERV.ExhaustAirInletNode = HeatRecovery::GetSecondaryInletNode(state, standAloneERV.HeatExchangerName, errFlag); if (errFlag) { - ShowContinueError(state, format("... occurs in {} ={}", CurrentModuleObject, standAloneERV.Name)); + ShowContinueError(state, EnergyPlus::format("... occurs in {} ={}", CurrentModuleObject, standAloneERV.Name)); ErrorsFound = true; } standAloneERV.SupplyAirInletNode = GetOnlySingleNode(state, @@ -354,10 +354,10 @@ void GetStandAloneERV(EnergyPlusData &state) // Check that supply air inlet node is an OA node if (!OutAirNodeManager::CheckOutAirNodeNumber(state, standAloneERV.SupplyAirInletNode)) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError(state, - format(" Node name of supply air inlet node not valid Outdoor Air Node = {}", - state.dataLoopNodes->NodeID(standAloneERV.SupplyAirInletNode))); + EnergyPlus::format(" Node name of supply air inlet node not valid Outdoor Air Node = {}", + state.dataLoopNodes->NodeID(standAloneERV.SupplyAirInletNode))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -386,30 +386,36 @@ void GetStandAloneERV(EnergyPlusData &state) } } if (!ZoneInletNodeFound) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError(state, "... Node name of supply air outlet node does not appear in a ZoneHVAC:EquipmentConnections object."); - ShowContinueError(state, format("... Supply air outlet node = {}", state.dataLoopNodes->NodeID(standAloneERV.SupplyAirOutletNode))); + ShowContinueError(state, + EnergyPlus::format("... Supply air outlet node = {}", state.dataLoopNodes->NodeID(standAloneERV.SupplyAirOutletNode))); ErrorsFound = true; } if (!ZoneExhaustNodeFound) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError(state, "... Node name of exhaust air inlet node does not appear in a ZoneHVAC:EquipmentConnections object."); - ShowContinueError(state, format("... Exhaust air inlet node = {}", state.dataLoopNodes->NodeID(standAloneERV.ExhaustAirInletNode))); + ShowContinueError(state, + EnergyPlus::format("... Exhaust air inlet node = {}", state.dataLoopNodes->NodeID(standAloneERV.ExhaustAirInletNode))); ErrorsFound = true; } // If nodes are found, make sure they are in the same zone if (ZoneInletNodeFound && ZoneExhaustNodeFound) { if (ZoneInletCZN != ZoneExhaustCZN) { - ShowSevereError(state, format("For {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError(state, "... Node name of supply air outlet node and exhasut air inlet node must appear in the same " "ZoneHVAC:EquipmentConnections object."); - ShowContinueError(state, format("... Supply air outlet node = {}", state.dataLoopNodes->NodeID(standAloneERV.SupplyAirOutletNode))); ShowContinueError( - state, format("... ZoneHVAC:EquipmentConnections Zone Name = {}", state.dataZoneEquip->ZoneEquipConfig(ZoneInletCZN).ZoneName)); - ShowContinueError(state, format("... Exhaust air inlet node = {}", state.dataLoopNodes->NodeID(standAloneERV.ExhaustAirInletNode))); + state, EnergyPlus::format("... Supply air outlet node = {}", state.dataLoopNodes->NodeID(standAloneERV.SupplyAirOutletNode))); + ShowContinueError(state, + EnergyPlus::format("... ZoneHVAC:EquipmentConnections Zone Name = {}", + state.dataZoneEquip->ZoneEquipConfig(ZoneInletCZN).ZoneName)); ShowContinueError( - state, format("... ZoneHVAC:EquipmentConnections Zone Name = {}", state.dataZoneEquip->ZoneEquipConfig(ZoneExhaustCZN).ZoneName)); + state, EnergyPlus::format("... Exhaust air inlet node = {}", state.dataLoopNodes->NodeID(standAloneERV.ExhaustAirInletNode))); + ShowContinueError(state, + EnergyPlus::format("... ZoneHVAC:EquipmentConnections Zone Name = {}", + state.dataZoneEquip->ZoneEquipConfig(ZoneExhaustCZN).ZoneName)); ErrorsFound = true; } } @@ -430,8 +436,10 @@ void GetStandAloneERV(EnergyPlusData &state) if (state.dataInputProcessing->inputProcessor->getObjectItemNum( state, "ZoneHVAC:EnergyRecoveryVentilator:Controller", standAloneERV.ControllerName) <= 0) { - ShowSevereError( - state, format("{} controller type ZoneHVAC:EnergyRecoveryVentilator:Controller not found = {}", CurrentModuleObject, Alphas(6))); + ShowSevereError(state, + EnergyPlus::format("{} controller type ZoneHVAC:EnergyRecoveryVentilator:Controller not found = {}", + CurrentModuleObject, + Alphas(6))); ErrorsFound = true; standAloneERV.ControllerNameDefined = false; } else { @@ -454,77 +462,83 @@ void GetStandAloneERV(EnergyPlusData &state) standAloneERV.AirVolFlowPerOccupant = Numbers(4); if (standAloneERV.SupplyAirVolFlow == DataSizing::AutoSize && standAloneERV.DesignSAFanVolFlowRate != DataSizing::AutoSize) { - ShowSevereError(state, format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError(state, - format("... When autosizing ERV, supply air fan = {} \"{}\" must also be autosized.", - HVAC::fanTypeNames[(int)standAloneERV.supplyAirFanType], - standAloneERV.SupplyAirFanName)); + EnergyPlus::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, format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError(state, - format("... When autosizing ERV, exhaust air fan = {} \"{}\" must also be autosized.", - HVAC::fanTypeNames[(int)standAloneERV.exhaustAirFanType], - standAloneERV.ExhaustAirFanName)); + EnergyPlus::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, format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError( state, - format("... When autosizing ERV {}, nominal supply air flow rate for heat exchanger with name = {} must also be autosized.", - cNumericFields(1), - standAloneERV.HeatExchangerName)); + EnergyPlus::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, format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError( state, - format("... When autosizing ERV {}, nominal supply air flow rate for heat exchanger with name = {} must also be autosized.", - cNumericFields(2), - standAloneERV.HeatExchangerName)); + EnergyPlus::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, - format("{} = {} has a {} > Max Volume Flow Rate defined in the associated fan object, should be <=", - CurrentModuleObject, - standAloneERV.Name, - cNumericFields(1))); - ShowContinueError(state, - format("... Entered value={:.2R}... Fan [{} \"{}\"] Max Value = {:.2R}", - standAloneERV.SupplyAirVolFlow, - HVAC::fanTypeNames[(int)standAloneERV.supplyAirFanType], - standAloneERV.SupplyAirFanName, - standAloneERV.DesignSAFanVolFlowRate)); + EnergyPlus::format("{} = {} has a {} > Max Volume Flow Rate defined in the associated fan object, should be <=", + CurrentModuleObject, + standAloneERV.Name, + cNumericFields(1))); ShowContinueError(state, - format(" The ERV {} is reset to the supply air fan flow rate and the simulation continues.", cNumericFields(1))); + EnergyPlus::format("... Entered value={:.2R}... Fan [{} \"{}\"] Max Value = {:.2R}", + standAloneERV.SupplyAirVolFlow, + HVAC::fanTypeNames[(int)standAloneERV.supplyAirFanType], + 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))); standAloneERV.SupplyAirVolFlow = standAloneERV.DesignSAFanVolFlowRate; } } if (standAloneERV.SupplyAirVolFlow != DataSizing::AutoSize) { if (standAloneERV.SupplyAirVolFlow <= 0.0) { - ShowSevereError(state, - format("{} = {} has a {} <= 0.0, it must be >0.0", CurrentModuleObject, standAloneERV.Name, cNumericFields(1))); - ShowContinueError(state, format("... Entered value={:.2R}", standAloneERV.SupplyAirVolFlow)); + ShowSevereError( + state, + EnergyPlus::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, format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError( state, - format("... Autosizing {} requires at least one input for {} or {}.", cNumericFields(1), cNumericFields(3), cNumericFields(4))); + EnergyPlus::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, format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); - ShowContinueError(state, format("... When autosizing, {} and {} must both be autosized.", cNumericFields(1), cNumericFields(2))); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowContinueError(state, + EnergyPlus::format("... When autosizing, {} and {} must both be autosized.", cNumericFields(1), cNumericFields(2))); ErrorsFound = true; } } @@ -533,39 +547,43 @@ void GetStandAloneERV(EnergyPlusData &state) if (standAloneERV.DesignEAFanVolFlowRate != DataSizing::AutoSize && standAloneERV.ExhaustAirVolFlow != DataSizing::AutoSize) { if (standAloneERV.ExhaustAirVolFlow > standAloneERV.DesignEAFanVolFlowRate) { ShowWarningError(state, - format("{} = {} has an {} > Max Volume Flow Rate defined in the associated fan object, should be <=", - CurrentModuleObject, - standAloneERV.Name, - cNumericFields(2))); - ShowContinueError(state, - format("... Entered value={:.2R}... Fan [{}:{}] Max Value = {:.2R}", - standAloneERV.ExhaustAirVolFlow, - HVAC::fanTypeNames[(int)standAloneERV.exhaustAirFanType], - standAloneERV.ExhaustAirFanName, - standAloneERV.DesignEAFanVolFlowRate)); + EnergyPlus::format("{} = {} has an {} > Max Volume Flow Rate defined in the associated fan object, should be <=", + CurrentModuleObject, + standAloneERV.Name, + cNumericFields(2))); ShowContinueError(state, - format(" The ERV {} is reset to the exhaust air fan flow rate and the simulation continues.", cNumericFields(2))); + EnergyPlus::format("... Entered value={:.2R}... Fan [{}:{}] Max Value = {:.2R}", + standAloneERV.ExhaustAirVolFlow, + HVAC::fanTypeNames[(int)standAloneERV.exhaustAirFanType], + 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))); standAloneERV.ExhaustAirVolFlow = standAloneERV.DesignEAFanVolFlowRate; } } if (standAloneERV.ExhaustAirVolFlow != DataSizing::AutoSize) { if (standAloneERV.ExhaustAirVolFlow <= 0.0) { - ShowSevereError(state, - format("{} = {} has an {} <= 0.0, it must be >0.0", CurrentModuleObject, standAloneERV.Name, cNumericFields(2))); - ShowContinueError(state, format("... Entered value={:.2R}", standAloneERV.ExhaustAirVolFlow)); + ShowSevereError( + state, + EnergyPlus::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, format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError( state, - format("... Autosizing {} requires at least one input for {} or {}.", cNumericFields(2), cNumericFields(3), cNumericFields(4))); + EnergyPlus::format( + "... Autosizing {} requires at least one input for {} or {}.", cNumericFields(2), cNumericFields(3), cNumericFields(4))); ErrorsFound = true; } if (standAloneERV.SupplyAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); - ShowContinueError(state, format("... When autosizing, {} and {} must both be autosized.", cNumericFields(1), cNumericFields(2))); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowContinueError(state, + EnergyPlus::format("... When autosizing, {} and {} must both be autosized.", cNumericFields(1), cNumericFields(2))); ErrorsFound = true; } } @@ -606,21 +624,23 @@ void GetStandAloneERV(EnergyPlusData &state) if (state.dataInputProcessing->inputProcessor->getObjectItemNum( state, "HeatExchanger:AirToAir:SensibleAndLatent", standAloneERV.HeatExchangerName) <= 0) { ShowSevereError(state, - format("{} heat exchanger type HeatExchanger:AirToAir:SensibleAndLatent not found = {}", - CurrentModuleObject, - standAloneERV.HeatExchangerName)); + EnergyPlus::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, format("{} supply fan type Fan:OnOff not found = {}", CurrentModuleObject, standAloneERV.SupplyAirFanName)); + ShowSevereError( + state, EnergyPlus::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, - format("{} supply fan type Fan:SystemModel not found = {}", CurrentModuleObject, standAloneERV.SupplyAirFanName)); + ShowSevereError( + state, + EnergyPlus::format("{} supply fan type Fan:SystemModel not found = {}", CurrentModuleObject, standAloneERV.SupplyAirFanName)); ErrorsFound = true; } } @@ -628,13 +648,15 @@ 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, format("{} exhaust fan type Fan:OnOff not found = {}", CurrentModuleObject, standAloneERV.ExhaustAirFanName)); + ShowSevereError( + state, EnergyPlus::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, - format("{} exhaust fan type Fan:SystemModel not found = {}", CurrentModuleObject, standAloneERV.ExhaustAirFanName)); + ShowSevereError( + state, + EnergyPlus::format("{} exhaust fan type Fan:SystemModel not found = {}", CurrentModuleObject, standAloneERV.ExhaustAirFanName)); ErrorsFound = true; } } @@ -668,8 +690,9 @@ void GetStandAloneERV(EnergyPlusData &state) AirFlowRate = state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirVolFlow; state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ControllerIndex = OutAirNum; } else { - ShowSevereError( - state, format("GetERVController: Could not find ZoneHVAC:EnergyRecoveryVentilator with {} = \"{}\"", cAlphaFields(1), Alphas(1))); + ShowSevereError(state, + EnergyPlus::format( + "GetERVController: Could not find ZoneHVAC:EnergyRecoveryVentilator with {} = \"{}\"", cAlphaFields(1), Alphas(1))); ErrorsFound = true; AirFlowRate = -1000.0; } @@ -720,8 +743,8 @@ void GetStandAloneERV(EnergyPlusData &state) if (!lAlphaBlanks(2)) { thisOAController.EnthalpyCurvePtr = Curve::GetCurveIndex(state, Alphas(2)); if (Curve::GetCurveIndex(state, Alphas(2)) == 0) { - ShowSevereError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("...{} not found:{}", cAlphaFields(2), Alphas(2))); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...{} not found:{}", cAlphaFields(2), Alphas(2))); ErrorsFound = true; } else { // Verify Curve Object, only legal types are Quadratic and Cubic @@ -750,8 +773,8 @@ void GetStandAloneERV(EnergyPlusData &state) } } else if ((!lAlphaBlanks(3)) && (!lAlphaBlanks(4))) { if ((lNumericBlanks(1)) && (lNumericBlanks(3)) && (lNumericBlanks(4)) && lAlphaBlanks(2)) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("... Invalid {}{} = {}{}", cAlphaFields(3), cAlphaFields(4), Alphas(3), Alphas(4))); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::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 { @@ -761,8 +784,8 @@ void GetStandAloneERV(EnergyPlusData &state) } } else if ((lAlphaBlanks(3)) && (!lAlphaBlanks(4))) { if ((lNumericBlanks(1)) && (lNumericBlanks(3)) && (lNumericBlanks(4)) && lAlphaBlanks(2)) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("... Invalid {} = {}", cAlphaFields(4), Alphas(4))); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("... Invalid {} = {}", cAlphaFields(4), Alphas(4))); ShowContinueError(state, "... Assumed NO EXHAUST AIR ENTHALPY LIMIT."); thisOAController.Econo = MixedAir::EconoOp::NoEconomizer; } else { @@ -772,8 +795,8 @@ void GetStandAloneERV(EnergyPlusData &state) } } else if ((!lAlphaBlanks(3)) && (lAlphaBlanks(4))) { if ((lNumericBlanks(1)) && (lNumericBlanks(3)) && (lNumericBlanks(4)) && lAlphaBlanks(2)) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("... Invalid {} = {}", cAlphaFields(3), Alphas(3))); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("... Invalid {} = {}", cAlphaFields(3), Alphas(3))); ShowContinueError(state, "... Assumed NO EXHAUST AIR TEMP LIMIT "); thisOAController.Econo = MixedAir::EconoOp::NoEconomizer; } else { @@ -806,9 +829,9 @@ void GetStandAloneERV(EnergyPlusData &state) ZoneNodeFound = true; } if (!ZoneNodeFound) { - ShowSevereError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "... Did not find Air Node (Zone with Humidistat)"); - ShowContinueError(state, format("... Specified {} = {}", cAlphaFields(7), Alphas(7))); + ShowContinueError(state, EnergyPlus::format("... Specified {} = {}", cAlphaFields(7), Alphas(7))); ShowContinueError(state, "... A ZoneHVAC:EquipmentConnections object must be specified for this zone."); ErrorsFound = true; } else { @@ -821,14 +844,14 @@ void GetStandAloneERV(EnergyPlusData &state) break; } if (!HStatFound) { - ShowSevereError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::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; @@ -836,9 +859,9 @@ void GetStandAloneERV(EnergyPlusData &state) if (Numbers(5) <= 0.0 && NumNumbers > 4) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("... {} must be greater than 0.", cNumericFields(5))); - ShowContinueError(state, format("... {} is reset to 1 and the simulation continues.", cNumericFields(5))); + 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))); HighRHOARatio = 1.0; @@ -858,9 +881,9 @@ void GetStandAloneERV(EnergyPlusData &state) } } else if (!Util::SameString(Alphas(6), "No") && NumAlphas > 4 && (!lAlphaBlanks(5))) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("... Invalid {} = {}", cAlphaFields(6), Alphas(6))); - ShowContinueError(state, format("... {} is assumed to be \"No\" and the simulation continues.", cAlphaFields(6))); + 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))); } // IF(Util::SameString(Alphas(6),'Yes'))THEN thisOAController.HighRHOAFlowRatio = HighRHOARatio; @@ -879,21 +902,22 @@ 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, format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("... A {} was entered as {:.4R}", cNumericFields(5), HighRHOARatio)); + ShowWarningError(state, EnergyPlus::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, - format("... Associated fan object = {} \"{}\"", - HVAC::fanTypeNames[(int)state.dataHVACStandAloneERV->StandAloneERV(WhichERV).supplyAirFanType], - state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirFanName)); + EnergyPlus::format("... Modified value = {:.2R}", + state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirVolFlow * HighRHOARatio)); ShowContinueError(state, - format("... Modified value = {:.2R}", - state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirVolFlow * HighRHOARatio)); - ShowContinueError(state, - format(" ... Supply Fan Max Volume Flow Rate = {:.2R}", - state.dataHVACStandAloneERV->StandAloneERV(WhichERV).DesignSAFanVolFlowRate)); + EnergyPlus::format(" ... Supply Fan Max Volume Flow Rate = {:.2R}", + state.dataHVACStandAloneERV->StandAloneERV(WhichERV).DesignSAFanVolFlowRate)); ShowContinueError(state, "... The ERV supply air fan will limit the air flow through the ERV and the simulation continues."); } } @@ -903,21 +927,22 @@ 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, format("ZoneHVAC:EnergyRecoveryVentilator:Controller \"{}\"", Alphas(1))); - ShowContinueError(state, format("... A {} was entered as {:.4R}", cNumericFields(5), HighRHOARatio)); + ShowWarningError(state, EnergyPlus::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, - format("... Associated fan object = {} \"{}\"", - HVAC::fanTypeNames[(int)state.dataHVACStandAloneERV->StandAloneERV(WhichERV).exhaustAirFanType], - state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ExhaustAirFanName)); - ShowContinueError(state, - format("... Modified value = {:.2R}", - state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ExhaustAirVolFlow * HighRHOARatio)); + EnergyPlus::format("... Modified value = {:.2R}", + state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ExhaustAirVolFlow * HighRHOARatio)); ShowContinueError(state, - format(" ... Exhaust Fan Max Volume Flow Rate = {:.2R}", - state.dataHVACStandAloneERV->StandAloneERV(WhichERV).DesignEAFanVolFlowRate)); + EnergyPlus::format(" ... Exhaust Fan Max Volume Flow Rate = {:.2R}", + state.dataHVACStandAloneERV->StandAloneERV(WhichERV).DesignEAFanVolFlowRate)); ShowContinueError(state, "... The ERV exhaust air fan will limit the air flow through the ERV and the simulation continues."); } } @@ -1097,9 +1122,9 @@ void InitStandAloneERV(EnergyPlusData &state, continue; } ShowSevereError(state, - format("InitStandAloneERV: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataHVACStandAloneERV->StandAloneERV(Loop).UnitType, - state.dataHVACStandAloneERV->StandAloneERV(Loop).Name)); + 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)); } } @@ -1367,12 +1392,15 @@ void SizeStandAloneERV(EnergyPlusData &state, int const StandAloneERVNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DesignSAFanVolFlowRateDes - DesignSAFanVolFlowRateUser) / DesignSAFanVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - 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, format("User-Specified Supply Fan Maximum Flow Rate of {:.5R} [m3/s]", DesignSAFanVolFlowRateUser)); - ShowContinueError(state, format("differs from the ERV Supply Air Flow Rate of {:.5R} [m3/s]", DesignSAFanVolFlowRateDes)); + 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)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Supply Fan Maximum Flow Rate of {:.5R} [m3/s]", DesignSAFanVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from the ERV Supply Air Flow Rate of {:.5R} [m3/s]", DesignSAFanVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1496,11 +1524,13 @@ void CalcStandAloneERV(EnergyPlusData &state, Real64 TotalSupplyMassFlow = state.dataLoopNodes->Node(SupInletNode).MassFlowRate; if (TotalExhaustMassFlow > TotalSupplyMassFlow && !state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance) { ShowWarningError(state, - format("For {} \"{}\" there is unbalanced exhaust air flow.", - state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).UnitType, - state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name)); - ShowContinueError(state, format("... The exhaust air mass flow rate = {:.6R}", state.dataLoopNodes->Node(ExhaustInletNode).MassFlowRate)); - ShowContinueError(state, format("... The supply air mass flow rate = {:.6R}", state.dataLoopNodes->Node(SupInletNode).MassFlowRate)); + EnergyPlus::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( + state, EnergyPlus::format("... The supply air mass flow rate = {:.6R}", state.dataLoopNodes->Node(SupInletNode).MassFlowRate)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "... Unless there is balancing infiltration / ventilation air flow, this will result in"); ShowContinueError(state, "... load due to induced outside air being neglected in the simulation."); @@ -1570,7 +1600,7 @@ Real64 GetSupplyAirFlowRate(EnergyPlusData &state, } } - ShowSevereError(state, format("Could not find ZoneHVAC:EnergyRecoveryVentilator with Controller Name=\"{}\"", ERVCtrlName)); + ShowSevereError(state, EnergyPlus::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 45606dfaa26..e9069b38a6d 100644 --- a/src/EnergyPlus/HVACUnitaryBypassVAV.cc +++ b/src/EnergyPlus/HVACUnitaryBypassVAV.cc @@ -154,25 +154,26 @@ namespace HVACUnitaryBypassVAV { if (CompIndex == 0) { CBVAVNum = Util::FindItemInList(CompName, state.dataHVACUnitaryBypassVAV->CBVAV); if (CBVAVNum == 0) { - ShowFatalError(state, format("SimUnitaryBypassVAV: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimUnitaryBypassVAV: Unit not found={}", CompName)); } CompIndex = CBVAVNum; } else { CBVAVNum = CompIndex; if (CBVAVNum > state.dataHVACUnitaryBypassVAV->NumCBVAV || CBVAVNum < 1) { ShowFatalError(state, - format("SimUnitaryBypassVAV: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - CBVAVNum, - state.dataHVACUnitaryBypassVAV->NumCBVAV, - CompName)); + EnergyPlus::format("SimUnitaryBypassVAV: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + CBVAVNum, + state.dataHVACUnitaryBypassVAV->NumCBVAV, + CompName)); } if (state.dataHVACUnitaryBypassVAV->CheckEquipName(CBVAVNum)) { if (CompName != state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum).Name) { - ShowFatalError(state, - format("SimUnitaryBypassVAV: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - CBVAVNum, - CompName, - state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimUnitaryBypassVAV: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + CBVAVNum, + CompName, + state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum).Name)); } state.dataHVACUnitaryBypassVAV->CheckEquipName(CBVAVNum) = false; } @@ -379,49 +380,49 @@ namespace HVACUnitaryBypassVAV { thisCBVAV.MaxCoolAirVolFlow = Numbers(1); if (thisCBVAV.MaxCoolAirVolFlow <= 0.0 && thisCBVAV.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(1), Numbers(1))); - ShowContinueError(state, format("{} must be greater than zero.", cNumericFields(1))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(1), Numbers(1))); + ShowContinueError(state, EnergyPlus::format("{} must be greater than zero.", cNumericFields(1))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); ErrorsFound = true; } thisCBVAV.MaxHeatAirVolFlow = Numbers(2); if (thisCBVAV.MaxHeatAirVolFlow <= 0.0 && thisCBVAV.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(2), Numbers(2))); - ShowContinueError(state, format("{} must be greater than zero.", cNumericFields(2))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(2), Numbers(2))); + ShowContinueError(state, EnergyPlus::format("{} must be greater than zero.", cNumericFields(2))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); ErrorsFound = true; } thisCBVAV.MaxNoCoolHeatAirVolFlow = Numbers(3); if (thisCBVAV.MaxNoCoolHeatAirVolFlow < 0.0 && thisCBVAV.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(3), Numbers(3))); - ShowContinueError(state, format("{} must be greater than or equal to zero.", cNumericFields(3))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", 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, thisCBVAV.Name)); ErrorsFound = true; } thisCBVAV.CoolOutAirVolFlow = Numbers(4); if (thisCBVAV.CoolOutAirVolFlow < 0.0 && thisCBVAV.CoolOutAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(4), Numbers(4))); - ShowContinueError(state, format("{} must be greater than or equal to zero.", cNumericFields(4))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", 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, thisCBVAV.Name)); ErrorsFound = true; } thisCBVAV.HeatOutAirVolFlow = Numbers(5); if (thisCBVAV.HeatOutAirVolFlow < 0.0 && thisCBVAV.HeatOutAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(5), Numbers(5))); - ShowContinueError(state, format("{} must be greater than or equal to zero.", cNumericFields(5))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", 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, thisCBVAV.Name)); ErrorsFound = true; } thisCBVAV.NoCoolHeatOutAirVolFlow = Numbers(6); if (thisCBVAV.NoCoolHeatOutAirVolFlow < 0.0 && thisCBVAV.NoCoolHeatOutAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(6), Numbers(6))); - ShowContinueError(state, format("{} must be greater than or equal to zero.", cNumericFields(6))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + 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, thisCBVAV.Name)); ErrorsFound = true; } @@ -495,17 +496,19 @@ namespace HVACUnitaryBypassVAV { thisCBVAV.plenumIndex = ZonePlenum::getReturnPlenumIndexFromInletNode(state, thisCBVAV.PlenumMixerInletAirNode); thisCBVAV.mixerIndex = MixerComponent::getZoneMixerIndexFromInletNode(state, thisCBVAV.PlenumMixerInletAirNode); if (thisCBVAV.plenumIndex > 0 && thisCBVAV.mixerIndex > 0) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Illegal connection for {} = \"{}\".", cAlphaFields(20), Alphas(20))); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal connection for {} = \"{}\".", cAlphaFields(20), Alphas(20))); ShowContinueError( - state, format("{} cannot be connected to both an AirloopHVAC:ReturnPlenum and an AirloopHVAC:ZoneMixer.", cAlphaFields(20))); + state, + EnergyPlus::format("{} cannot be connected to both an AirloopHVAC:ReturnPlenum and an AirloopHVAC:ZoneMixer.", cAlphaFields(20))); ErrorsFound = true; } else if (thisCBVAV.plenumIndex == 0 && thisCBVAV.mixerIndex == 0 && thisCBVAV.PlenumMixerInletAirNode > 0) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Illegal connection for {} = \"{}\".", cAlphaFields(20), Alphas(20))); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal connection for {} = \"{}\".", cAlphaFields(20), Alphas(20))); ShowContinueError( state, - format("{} must be connected to an AirloopHVAC:ReturnPlenum or AirloopHVAC:ZoneMixer. No connection found.", cAlphaFields(20))); + EnergyPlus::format("{} must be connected to an AirloopHVAC:ReturnPlenum or AirloopHVAC:ZoneMixer. No connection found.", + cAlphaFields(20))); ErrorsFound = true; } @@ -548,13 +551,13 @@ namespace HVACUnitaryBypassVAV { bool errFlag = false; ValidateComponent(state, thisCBVAV.OAMixType, thisCBVAV.OAMixName, errFlag, CurrentModuleObject); if (errFlag) { - ShowContinueError(state, format("specified in {} = \"{}\".", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("specified in {} = \"{}\".", CurrentModuleObject, thisCBVAV.Name)); ErrorsFound = true; } else { // Get OA Mixer node numbers OANodeNums = MixedAir::GetOAMixerNodeNumbers(state, thisCBVAV.OAMixName, errFlag); if (errFlag) { - ShowContinueError(state, format("that was specified in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("that was specified in {} = {}", CurrentModuleObject, thisCBVAV.Name)); ShowContinueError(state, "..OutdoorAir:Mixer is required. Enter an OutdoorAir:Mixer object with this name."); ErrorsFound = true; } else { @@ -566,24 +569,25 @@ namespace HVACUnitaryBypassVAV { } if (thisCBVAV.MixerInletAirNode != OANodeNums(3)) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Illegal {} = {}.", cAlphaFields(5), MixerInletNodeName)); - ShowContinueError( - state, format("{} must be the same as the return air stream node specified in the OutdoorAir:Mixer object.", cAlphaFields(5))); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.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))); ErrorsFound = true; } if (thisCBVAV.MixerInletAirNode == thisCBVAV.AirInNode) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Illegal {} = {}.", cAlphaFields(5), MixerInletNodeName)); - ShowContinueError(state, format("{} must be different than the {}.", cAlphaFields(5), cAlphaFields(4))); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(5), MixerInletNodeName)); + ShowContinueError(state, EnergyPlus::format("{} must be different than the {}.", cAlphaFields(5), cAlphaFields(4))); ErrorsFound = true; } if (thisCBVAV.SplitterOutletAirNode == thisCBVAV.AirOutNode) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); - ShowContinueError(state, format("{} must be different than the {}.", cAlphaFields(6), cAlphaFields(7))); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); + ShowContinueError(state, EnergyPlus::format("{} must be different than the {}.", cAlphaFields(6), cAlphaFields(7))); ErrorsFound = true; } @@ -611,15 +615,16 @@ namespace HVACUnitaryBypassVAV { if (thisCBVAV.fanPlace == HVAC::FanPlace::DrawThru) { if (thisCBVAV.SplitterOutletAirNode != fanOutletNode) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); - ShowContinueError(state, - format("{} must be the same as the fan outlet node specified in {} = {}: {} when draw through {} is selected.", - cAlphaFields(6), - cAlphaFields(10), - Alphas(10), - thisCBVAV.FanName, - cAlphaFields(11))); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::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), + thisCBVAV.FanName, + cAlphaFields(11))); ErrorsFound = true; } } @@ -627,26 +632,28 @@ namespace HVACUnitaryBypassVAV { if (thisCBVAV.FanVolFlow != DataSizing::AutoSize) { if (thisCBVAV.FanVolFlow < thisCBVAV.MaxCoolAirVolFlow && thisCBVAV.MaxCoolAirVolFlow != DataSizing::AutoSize) { ShowWarningError(state, - format("{} - air flow rate = {:.7T} in {} = {} is less than the ", - CurrentModuleObject, - thisCBVAV.FanVolFlow, - cAlphaFields(11), - thisCBVAV.FanName) + + EnergyPlus::format("{} - air flow rate = {:.7T} in {} = {} is less than the ", + CurrentModuleObject, + thisCBVAV.FanVolFlow, + cAlphaFields(11), + thisCBVAV.FanName) + cNumericFields(1)); - ShowContinueError(state, format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(1))); - ShowContinueError(state, format(" Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, + EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(1))); + ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); thisCBVAV.MaxCoolAirVolFlow = thisCBVAV.FanVolFlow; } if (thisCBVAV.FanVolFlow < thisCBVAV.MaxHeatAirVolFlow && thisCBVAV.MaxHeatAirVolFlow != DataSizing::AutoSize) { ShowWarningError(state, - format("{} - air flow rate = {:.7T} in {} = {} is less than the ", - CurrentModuleObject, - thisCBVAV.FanVolFlow, - cAlphaFields(11), - thisCBVAV.FanName) + + EnergyPlus::format("{} - air flow rate = {:.7T} in {} = {} is less than the ", + CurrentModuleObject, + thisCBVAV.FanVolFlow, + cAlphaFields(11), + thisCBVAV.FanName) + cNumericFields(2)); - ShowContinueError(state, format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); - ShowContinueError(state, format(" Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, + EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); + ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); thisCBVAV.MaxHeatAirVolFlow = thisCBVAV.FanVolFlow; } } @@ -654,18 +661,20 @@ namespace HVACUnitaryBypassVAV { // only check that OA flow in cooling is >= SA flow in cooling when they are not autosized if (thisCBVAV.CoolOutAirVolFlow > thisCBVAV.MaxCoolAirVolFlow && thisCBVAV.CoolOutAirVolFlow != DataSizing::AutoSize && thisCBVAV.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowWarningError(state, format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(4), cNumericFields(1))); - ShowContinueError(state, format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(4))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + 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, thisCBVAV.Name)); thisCBVAV.CoolOutAirVolFlow = thisCBVAV.FanVolFlow; } // only check that SA flow in heating is >= OA flow in heating when they are not autosized if (thisCBVAV.HeatOutAirVolFlow > thisCBVAV.MaxHeatAirVolFlow && thisCBVAV.HeatOutAirVolFlow != DataSizing::AutoSize && thisCBVAV.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowWarningError(state, format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(5), cNumericFields(2))); - ShowContinueError(state, format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(5))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + 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, thisCBVAV.Name)); thisCBVAV.HeatOutAirVolFlow = thisCBVAV.FanVolFlow; } @@ -677,7 +686,7 @@ namespace HVACUnitaryBypassVAV { DXCoilErrFlag = false; DXCoils::GetDXCoilIndex(state, thisCBVAV.DXCoolCoilName, thisCBVAV.DXCoolCoilIndexNum, DXCoilErrFlag, thisCoolCoilType); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.DXCoilInletNode = state.dataDXCoils->DXCoil(thisCBVAV.DXCoolCoilIndexNum).AirInNode; @@ -689,7 +698,7 @@ namespace HVACUnitaryBypassVAV { thisCBVAV.DXCoolCoilIndexNum = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, thisCoolCoilType, thisCBVAV.DXCoolCoilName, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.DXCoilInletNode = state.dataVariableSpeedCoils->VarSpeedCoil(thisCBVAV.DXCoolCoilIndexNum).AirInletNodeNum; @@ -701,8 +710,9 @@ namespace HVACUnitaryBypassVAV { int ActualCoolCoilType = HVACHXAssistedCoolingCoil::GetCoilObjectTypeNum(state, thisCoolCoilType, thisCBVAV.DXCoolCoilName, DXErrorsFound); if (DXErrorsFound) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("CoilSystem:Cooling:DX:HeatExchangerAssisted \"{}\" not found.", thisCBVAV.DXCoolCoilName)); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, + EnergyPlus::format("CoilSystem:Cooling:DX:HeatExchangerAssisted \"{}\" not found.", thisCBVAV.DXCoolCoilName)); ErrorsFound = true; } else { if (ActualCoolCoilType == HVAC::CoilDX_CoolingSingleSpeed) { @@ -713,7 +723,7 @@ namespace HVACUnitaryBypassVAV { DXCoilErrFlag, "Coil:Cooling:DX:SingleSpeed"); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { // the "coil" nodes are actually the parent nodes of the wrapped HX @@ -731,7 +741,7 @@ namespace HVACUnitaryBypassVAV { HVACHXAssistedCoolingCoil::GetHXDXCoilName(state, thisCoolCoilType, thisCBVAV.DXCoolCoilName, DXCoilErrFlag), DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.DXCoilInletNode = state.dataVariableSpeedCoils->VarSpeedCoil(thisCBVAV.DXCoolCoilIndexNum).AirInletNodeNum; @@ -742,7 +752,7 @@ namespace HVACUnitaryBypassVAV { } else if (ActualCoolCoilType == HVAC::CoilDX_Cooling) { thisCBVAV.DXCoolCoilIndexNum = CoilCoolingDX::factory(state, thisCBVAV.DXCoolCoilName); if (thisCBVAV.DXCoolCoilIndexNum == -1) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { auto const &newCoil = state.dataCoilCoolingDX->coilCoolingDXs[thisCBVAV.DXCoolCoilIndexNum]; @@ -756,7 +766,7 @@ namespace HVACUnitaryBypassVAV { DXCoilErrFlag = false; DXCoils::GetDXCoilIndex(state, thisCBVAV.DXCoolCoilName, thisCBVAV.DXCoolCoilIndexNum, DXCoilErrFlag, thisCoolCoilType); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.DXCoilInletNode = state.dataDXCoils->DXCoil(thisCBVAV.DXCoolCoilIndexNum).AirInNode; @@ -785,11 +795,12 @@ namespace HVACUnitaryBypassVAV { } else { if (!lAlphaBlanks(13)) { - ShowWarningError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, - format("{} = {} not found. Supply air fan operating mode set to constant operation and simulation continues.", - cAlphaFields(13), - Alphas(13))); + ShowWarningError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError( + state, + EnergyPlus::format("{} = {} not found. Supply air fan operating mode set to constant operation and simulation continues.", + cAlphaFields(13), + Alphas(13))); } thisCBVAV.fanOp = HVAC::FanOp::Continuous; if (thisCBVAV.MaxNoCoolHeatAirVolFlow == 0.0) { @@ -804,14 +815,15 @@ namespace HVACUnitaryBypassVAV { if (thisCBVAV.FanVolFlow < thisCBVAV.MaxNoCoolHeatAirVolFlow && thisCBVAV.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize && thisCBVAV.MaxNoCoolHeatAirVolFlow != 0.0) { ShowWarningError(state, - format("{} - air flow rate = {:.7T} in {} = {} is less than ", - CurrentModuleObject, - thisCBVAV.FanVolFlow, - cAlphaFields(11), - thisCBVAV.FanName) + + EnergyPlus::format("{} - air flow rate = {:.7T} in {} = {} is less than ", + CurrentModuleObject, + thisCBVAV.FanVolFlow, + cAlphaFields(11), + thisCBVAV.FanName) + cNumericFields(3)); - ShowContinueError(state, format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(3))); - ShowContinueError(state, format(" Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, + EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(3))); + ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); thisCBVAV.MaxNoCoolHeatAirVolFlow = thisCBVAV.FanVolFlow; } } @@ -819,9 +831,10 @@ namespace HVACUnitaryBypassVAV { // that MaxNoCoolHeatAirVolFlow is /= 0 (trigger to use compressor ON flow, see AirFlowControl variable initialization above) if (thisCBVAV.NoCoolHeatOutAirVolFlow > thisCBVAV.MaxNoCoolHeatAirVolFlow && thisCBVAV.NoCoolHeatOutAirVolFlow != DataSizing::AutoSize && thisCBVAV.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize && thisCBVAV.MaxNoCoolHeatAirVolFlow != 0.0) { - ShowWarningError(state, format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(6), cNumericFields(3))); - ShowContinueError(state, format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(6))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + 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, thisCBVAV.Name)); thisCBVAV.NoCoolHeatOutAirVolFlow = thisCBVAV.FanVolFlow; } @@ -837,7 +850,7 @@ namespace HVACUnitaryBypassVAV { DXCoilErrFlag, HVAC::coilTypeNamesUC[static_cast(thisCBVAV.HeatCoilType)]); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.MinOATCompressor = state.dataDXCoils->DXCoil(thisCBVAV.DXHeatCoilIndexNum).MinOATCompressor; @@ -848,7 +861,7 @@ namespace HVACUnitaryBypassVAV { thisCBVAV.DXHeatCoilIndexNum = VariableSpeedCoils::GetCoilIndexVariableSpeed( state, HVAC::cAllCoilTypes(static_cast(thisCBVAV.HeatCoilType) + 1), thisCBVAV.HeatCoilName, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.MinOATCompressor = state.dataVariableSpeedCoils->VarSpeedCoil(thisCBVAV.DXHeatCoilIndexNum).MinOATCompressor; @@ -858,7 +871,7 @@ namespace HVACUnitaryBypassVAV { } else if (thisCBVAV.HeatCoilType == HVAC::CoilType::HeatingGasOrOtherFuel || thisCBVAV.HeatCoilType == HVAC::CoilType::HeatingElectric) { HeatingCoils::GetCoilIndex(state, thisCBVAV.HeatCoilName, thisCBVAV.DXHeatCoilIndexNum, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.MinOATCompressor = -999.9; @@ -868,7 +881,7 @@ namespace HVACUnitaryBypassVAV { } else if (thisCBVAV.HeatCoilType == HVAC::CoilType::HeatingWater) { thisCBVAV.DXHeatCoilIndexNum = WaterCoils::GetWaterCoilIndex(state, "COIL:HEATING:WATER", thisCBVAV.HeatCoilName, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.CoilControlNode = state.dataWaterCoils->WaterCoil(thisCBVAV.DXHeatCoilIndexNum).WaterInletNodeNum; @@ -879,7 +892,7 @@ namespace HVACUnitaryBypassVAV { } else if (thisCBVAV.HeatCoilType == HVAC::CoilType::HeatingSteam) { thisCBVAV.HeatCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", thisCBVAV.HeatCoilName, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { thisCBVAV.HeatingCoilInletNode = state.dataSteamCoils->SteamCoil(thisCBVAV.HeatCoilIndex).AirInletNodeNum; @@ -895,18 +908,19 @@ namespace HVACUnitaryBypassVAV { } if (thisCBVAV.DXCoilOutletNode != thisCBVAV.HeatingCoilInletNode) { - ShowSevereError(state, format("{} illegal coil placement. Cooling coil must be upstream of heating coil.", CurrentModuleObject)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowSevereError(state, + EnergyPlus::format("{} illegal coil placement. Cooling coil must be upstream of heating coil.", CurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); ErrorsFound = true; } if (thisCBVAV.fanPlace == HVAC::FanPlace::BlowThru) { if (thisCBVAV.SplitterOutletAirNode != thisCBVAV.HeatingCoilOutletNode) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); ShowContinueError( state, - format( + EnergyPlus::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(thisCBVAV.HeatCoilType)], @@ -915,27 +929,29 @@ namespace HVACUnitaryBypassVAV { ErrorsFound = true; } if (thisCBVAV.MixerMixedAirNode != thisCBVAV.FanInletNodeNum) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, - 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), - thisCBVAV.OAMixName, - cAlphaFields(12))); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.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), + thisCBVAV.OAMixName, + cAlphaFields(12))); ErrorsFound = true; } } if (thisCBVAV.fanPlace == HVAC::FanPlace::DrawThru) { if (thisCBVAV.MixerMixedAirNode != thisCBVAV.DXCoilInletNode) { - ShowSevereError(state, format("{}: {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, - 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), - thisCBVAV.OAMixName, - cAlphaFields(12))); + ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, thisCBVAV.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), + thisCBVAV.OAMixName, + cAlphaFields(12))); ErrorsFound = true; } } @@ -949,8 +965,8 @@ namespace HVACUnitaryBypassVAV { } else if (Util::SameString(Alphas(18), "LoadPriority")) { thisCBVAV.PriorityControl = PriorityCtrlMode::LoadPriority; } else { - ShowSevereError(state, format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(18), Alphas(18))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(18), Alphas(18))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); ShowContinueError(state, "Valid choices are CoolingPriority, HeatingPriority, ZonePriority or LoadPriority."); ErrorsFound = true; } @@ -968,9 +984,10 @@ namespace HVACUnitaryBypassVAV { } if (thisCBVAV.MinLATCooling > thisCBVAV.MaxLATHeating) { - ShowWarningError(state, format("{}: illegal leaving air temperature specified.", CurrentModuleObject)); - ShowContinueError(state, format("Resetting {} equal to {} and the simulation continues.", cNumericFields(7), cNumericFields(8))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + 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, thisCBVAV.Name)); thisCBVAV.MinLATCooling = thisCBVAV.MaxLATHeating; } @@ -983,25 +1000,27 @@ namespace HVACUnitaryBypassVAV { if (thisCBVAV.CoolCoilType == HVAC::CoilType::DXCoolingTwoStageWHumControl) { thisCBVAV.DehumidControlType = DehumidControl::Multimode; } else { - ShowWarningError(state, format("Invalid {} = {}", cAlphaFields(19), Alphas(19))); - ShowContinueError(state, format("In {} \"{}\".", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Valid only with {} = Coil:Cooling:DX:TwoStageWithHumidityControlMode.", cAlphaFields(14))); - ShowContinueError(state, format("Setting {} to \"None\" and the simulation continues.", cAlphaFields(19))); + ShowWarningError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(19), Alphas(19))); + ShowContinueError(state, EnergyPlus::format("In {} \"{}\".", CurrentModuleObject, thisCBVAV.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))); thisCBVAV.DehumidControlType = DehumidControl::None; } } else if (Util::SameString(Alphas(19), "CoolReheat")) { if (thisCBVAV.CoolCoilType == HVAC::CoilType::DXCoolingTwoStageWHumControl) { thisCBVAV.DehumidControlType = DehumidControl::CoolReheat; } else { - ShowWarningError(state, format("Invalid {} = {}", cAlphaFields(19), Alphas(19))); - ShowContinueError(state, format("In {} \"{}\".", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, format("Valid only with {} = Coil:Cooling:DX:TwoStageWithHumidityControlMode.", cAlphaFields(14))); - ShowContinueError(state, format("Setting {} to \"None\" and the simulation continues.", cAlphaFields(19))); + ShowWarningError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(19), Alphas(19))); + ShowContinueError(state, EnergyPlus::format("In {} \"{}\".", CurrentModuleObject, thisCBVAV.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))); thisCBVAV.DehumidControlType = DehumidControl::None; } } else { - ShowSevereError(state, format("Invalid {} ={}", cAlphaFields(19), Alphas(19))); - ShowContinueError(state, format("In {} \"{}\".", CurrentModuleObject, thisCBVAV.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {} ={}", cAlphaFields(19), Alphas(19))); + ShowContinueError(state, EnergyPlus::format("In {} \"{}\".", CurrentModuleObject, thisCBVAV.Name)); } if (NumNumbers > 8) { @@ -1016,10 +1035,12 @@ namespace HVACUnitaryBypassVAV { if (thisCBVAV.fanType != fanType2) { ShowWarningError( state, - format("{} has {} = {} which is inconsistent with the fan object.", CurrentModuleObject, cAlphaFields(10), Alphas(10))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, - format(" The fan object ({}) is actually a valid fan type and the simulation continues.", thisCBVAV.FanName)); + EnergyPlus::format( + "{} has {} = {} which is inconsistent with the fan object.", CurrentModuleObject, cAlphaFields(10), Alphas(10))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError( + state, + EnergyPlus::format(" The fan object ({}) is actually a valid fan type and the simulation continues.", thisCBVAV.FanName)); ShowContinueError(state, " Node connections errors may result due to the inconsistent fan type."); } } @@ -1118,10 +1139,11 @@ namespace HVACUnitaryBypassVAV { FoundTstatZone = true; } if (!FoundTstatZone) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, thisCBVAV.Name)); - ShowContinueError(state, - format("Thermostat not found in zone = {} and the simulation continues.", - state.dataZoneEquip->ZoneEquipConfig(thisCBVAV.ControlledZoneNum(AirLoopZoneNum)).ZoneName)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, thisCBVAV.Name)); + ShowContinueError( + state, + EnergyPlus::format("Thermostat not found in zone = {} and the simulation continues.", + state.dataZoneEquip->ZoneEquipConfig(thisCBVAV.ControlledZoneNum(AirLoopZoneNum)).ZoneName)); ShowContinueError(state, "This zone will not be controlled to a temperature setpoint."); } int zoneNum = thisCBVAV.ControlledZoneNum(AirLoopZoneNum); @@ -1138,10 +1160,11 @@ namespace HVACUnitaryBypassVAV { if (thisCBVAV.ZoneSequenceCoolingNum(AirLoopZoneNum) == 0 || thisCBVAV.ZoneSequenceHeatingNum(AirLoopZoneNum) == 0) { ShowSevereError( state, - 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.", - thisCBVAV.Name, - state.dataZoneEquip->ZoneEquipConfig(zoneNum).ZoneName)); + EnergyPlus::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.", + thisCBVAV.Name, + state.dataZoneEquip->ZoneEquipConfig(zoneNum).ZoneName)); ErrorsFound = true; } } else { @@ -1155,7 +1178,7 @@ namespace HVACUnitaryBypassVAV { } // CBVAVNum = 1,NumCBVAV if (ErrorsFound) { - ShowFatalError(state, format("GetCBVAV: Errors found in getting {} input.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetCBVAV: Errors found in getting {} input.", CurrentModuleObject)); } for (int CBVAVNum = 1; CBVAVNum <= NumCBVAV; ++CBVAVNum) { @@ -1397,7 +1420,7 @@ namespace HVACUnitaryBypassVAV { } if (ErrorsFound) { - ShowContinueError(state, format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); } // fill outlet node for heating coil cBVAV.CoilOutletNode = DataPlant::CompData::getPlantComponent(state, cBVAV.plantLoc).NodeNumOut; @@ -1462,7 +1485,8 @@ namespace HVACUnitaryBypassVAV { ErrorFlag = false; Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", cBVAV.HeatCoilName, ErrorFlag); if (ErrorFlag) { - ShowContinueError(state, format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); } if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 FluidDensity = @@ -1480,7 +1504,8 @@ namespace HVACUnitaryBypassVAV { ErrorFlag = false; Real64 CoilMaxVolFlowRate = SteamCoils::GetCoilMaxSteamFlowRate(state, cBVAV.HeatCoilIndex, ErrorFlag); if (ErrorFlag) { - ShowContinueError(state, format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); } if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 FluidDensity = @@ -1506,84 +1531,90 @@ namespace HVACUnitaryBypassVAV { std::string CurrentModuleObject = "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass"; // Check fan versus system supply air flow rates if (cBVAV.FanVolFlow < cBVAV.MaxCoolAirVolFlow) { - ShowWarningError(state, - 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)); + 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)); ShowContinueError( state, " The CBVAV system flow rate when cooling is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.MaxCoolAirVolFlow = cBVAV.FanVolFlow; } if (cBVAV.FanVolFlow < cBVAV.MaxHeatAirVolFlow) { - ShowWarningError(state, - 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)); + 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)); ShowContinueError( state, " The CBVAV system flow rate when heating is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.MaxHeatAirVolFlow = cBVAV.FanVolFlow; } if (cBVAV.FanVolFlow < cBVAV.MaxNoCoolHeatAirVolFlow && cBVAV.MaxNoCoolHeatAirVolFlow != 0.0) { - ShowWarningError(state, - 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)); + 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)); 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, format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, EnergyPlus::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, - 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)); + 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)); ShowContinueError( state, " The CBVAV outdoor flow rate when cooling is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.CoolOutAirVolFlow = cBVAV.FanVolFlow; } if (cBVAV.FanVolFlow < cBVAV.HeatOutAirVolFlow) { - ShowWarningError(state, - 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)); + 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)); ShowContinueError( state, " The CBVAV outdoor flow rate when heating is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.HeatOutAirVolFlow = cBVAV.FanVolFlow; } if (cBVAV.FanVolFlow < cBVAV.NoCoolHeatOutAirVolFlow) { - ShowWarningError(state, - 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)); + 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)); 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, format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.NoCoolHeatOutAirVolFlow = cBVAV.FanVolFlow; } int MixerOutsideAirNode = cBVAV.MixerOutsideAirNode; @@ -1686,7 +1717,7 @@ namespace HVACUnitaryBypassVAV { if (cBVAV.DehumidControlType != DehumidControl::None) { if (state.dataLoopNodes->Node(OutNode).HumRatMax == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowWarningError(state, format("Unitary System:VAV:ChangeOverBypass = {}", cBVAV.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -1699,7 +1730,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, format("Unitary System:VAV:ChangeOverBypass = {}", cBVAV.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -1852,7 +1883,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, format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -1874,7 +1905,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, format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -1896,7 +1927,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, format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -1921,7 +1952,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, format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -2141,10 +2172,11 @@ namespace HVACUnitaryBypassVAV { if (SolFla == -1 && !state.dataGlobal->WarmupFlag) { if (cBVAV.HXDXIterationExceeded < 1) { ++cBVAV.HXDXIterationExceeded; - ShowWarningError(state, - format("Iteration limit exceeded calculating HX assisted DX unit part-load ratio, for unit = {}", - cBVAV.DXCoolCoilName)); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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:"); } else { @@ -2165,12 +2197,14 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.HXDXIterationFailed; ShowSevereError( state, - format("HX assisted DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - cBVAV.DXCoolCoilName)); + EnergyPlus::format( + "HX assisted DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + cBVAV.DXCoolCoilName)); ShowContinueErrorTimeStamp( state, - format("An estimated part-load ratio of {:.3R}will be used and the simulation continues. Occurrence info:", - PartLoadFrac)); + EnergyPlus::format( + "An estimated part-load ratio of {:.3R}will be used and the simulation continues. Occurrence info:", + PartLoadFrac)); } else { ShowRecurringWarningErrorAtEnd(state, cBVAV.Name + @@ -2228,10 +2262,10 @@ namespace HVACUnitaryBypassVAV { if (SolFla == -1 && !state.dataGlobal->WarmupFlag) { if (cBVAV.DXIterationExceeded < 1) { ++cBVAV.DXIterationExceeded; - ShowWarningError( - state, - format("Iteration limit exceeded calculating DX unit part-load ratio, for unit = {}", cBVAV.DXCoolCoilName)); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError(state, + EnergyPlus::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:"); } else { @@ -2250,13 +2284,15 @@ namespace HVACUnitaryBypassVAV { state.dataLoopNodes->Node(cBVAV.DXCoilOutletNode).Temp))); if (cBVAV.DXIterationFailed < 1) { ++cBVAV.DXIterationFailed; - ShowSevereError(state, - format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + ShowSevereError( + state, + EnergyPlus::format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", cBVAV.DXCoolCoilName)); ShowContinueErrorTimeStamp( state, - format("An estimated part-load ratio of {:.3R}will be used and the simulation continues. Occurrence info:", - PartLoadFrac)); + EnergyPlus::format( + "An estimated part-load ratio of {:.3R}will be used and the simulation continues. Occurrence info:", + PartLoadFrac)); } else { ShowRecurringWarningErrorAtEnd(state, cBVAV.Name + ", Part-load ratio calculation failed for DX unit error continues.", @@ -2453,42 +2489,46 @@ namespace HVACUnitaryBypassVAV { if (!state.dataGlobal->WarmupFlag) { if (cBVAV.DXIterationExceeded < 4) { ++cBVAV.DXIterationExceeded; - ShowWarningError(state, - 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, format("Calculated speed ratio = {:.4R}", SpeedRatio)); + 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)); + 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, - 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); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::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); } } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (cBVAV.DXIterationFailed < 4) { ++cBVAV.DXIterationFailed; - ShowWarningError(state, - 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, format("Estimated speed ratio = {:.3R}", TempSpeedReqst / TempSpeedOut)); + 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)); + ShowContinueError(state, + EnergyPlus::format("Estimated speed ratio = {:.3R}", TempSpeedReqst / TempSpeedOut)); ShowContinueErrorTimeStamp( state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); } ShowRecurringWarningErrorAtEnd( state, - format( + EnergyPlus::format( "{} \"{}\" - DX unit speed ratio calculation failed error continues. speed ratio statistics follow.", HVAC::coilTypeNamesUC[static_cast(cBVAV.CoolCoilType)], cBVAV.DXCoolCoilName), @@ -2527,23 +2567,25 @@ namespace HVACUnitaryBypassVAV { if (!state.dataGlobal->WarmupFlag) { if (cBVAV.DXCyclingIterationExceeded < 4) { ++cBVAV.DXCyclingIterationExceeded; - ShowWarningError(state, - 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, format("Estimated cycling ratio = {:.3R}", (TempSpeedReqst / TempSpeedOut))); - ShowContinueError(state, format("Calculated cycling ratio = {:.3R}", LocalPartLoadFrac)); + 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)); + ShowContinueError( + state, EnergyPlus::format("Estimated cycling ratio = {:.3R}", (TempSpeedReqst / 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, - format(" {} \"{}\" - Iteration limit exceeded calculating low speed cycling ratio " - "error continues. Sensible PLR statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.CoolCoilType)], - cBVAV.DXCoolCoilName), + EnergyPlus::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); @@ -2555,23 +2597,26 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXCyclingIterationFailed; ShowWarningError( state, - format("{} - DX unit low speed cycling ratio calculation failed: limits exceeded, for unit = {}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.CoolCoilType)], - cBVAV.Name)); - ShowContinueError(state, - format("Estimated low speed cycling ratio = {:.3R}", TempSpeedReqst / TempSpeedOut)); + EnergyPlus::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)); ShowContinueErrorTimeStamp(state, "The estimated low speed cycling ratio will be used and the simulation " "continues. Occurrence info:"); } - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + cBVAV.DXCyclingIterationFailedIndex, + LocalPartLoadFrac, + LocalPartLoadFrac); } LocalPartLoadFrac = TempSpeedReqst / TempSpeedOut; } @@ -2637,9 +2682,10 @@ namespace HVACUnitaryBypassVAV { if (SolFla == -1) { if (cBVAV.MMDXIterationExceeded < 1) { ++cBVAV.MMDXIterationExceeded; - ShowWarningError(state, - format("Iteration limit exceeded calculating DX unit part-load ratio, for unit={}", cBVAV.Name)); - ShowContinueErrorTimeStamp(state, format("Part-load ratio returned = {:.2R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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:"); } else { @@ -2660,8 +2706,9 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.MMDXIterationFailed; ShowSevereError( state, - format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit={}", cBVAV.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + EnergyPlus::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:"); } else { @@ -2718,9 +2765,9 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DMDXIterationExceeded; ShowWarningError( state, - format("Iteration limit exceeded calculating DX unit dehumidifying part-load ratio, for unit = {}", - cBVAV.Name)); - ShowContinueErrorTimeStamp(state, format("Part-load ratio returned={:.2R}", PartLoadFrac)); + EnergyPlus::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:"); } else { @@ -2739,11 +2786,12 @@ namespace HVACUnitaryBypassVAV { state.dataLoopNodes->Node(cBVAV.DXCoilOutletNode).Temp))); if (cBVAV.DMDXIterationFailed < 1) { ++cBVAV.DMDXIterationFailed; - ShowSevereError(state, - format("DX unit dehumidifying part-load ratio calculation failed: part-load ratio limits " + ShowSevereError( + state, + EnergyPlus::format("DX unit dehumidifying part-load ratio calculation failed: part-load ratio limits " "exceeded, for unit = {}", cBVAV.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + 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 { @@ -2811,10 +2859,11 @@ namespace HVACUnitaryBypassVAV { if (SolFla == -1) { if (cBVAV.CRDXIterationExceeded < 1) { ++cBVAV.CRDXIterationExceeded; - ShowWarningError(state, - format("Iteration limit exceeded calculating DX unit cool reheat part-load ratio, for unit = {}", - cBVAV.Name)); - ShowContinueErrorTimeStamp(state, format("Part-load ratio returned = {:.2R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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:"); } else { @@ -2835,10 +2884,10 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.CRDXIterationFailed; ShowSevereError( state, - format( + EnergyPlus::format( "DX unit cool reheat part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", cBVAV.Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + 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 { @@ -2861,8 +2910,9 @@ namespace HVACUnitaryBypassVAV { state.dataHVACUnitaryBypassVAV->SaveCompressorPLR = state.dataDXCoils->DXCoilPartLoadRatio(cBVAV.DXCoolCoilIndexNum); } break; default: { - ShowFatalError( - state, format("SimCBVAV System: Invalid DX Cooling Coil={}", HVAC::coilTypeNamesUC[static_cast(cBVAV.CoolCoilType)])); + ShowFatalError(state, + EnergyPlus::format("SimCBVAV System: Invalid DX Cooling Coil={}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.CoolCoilType)])); } break; } } else { // IF(OutdoorDryBulbTemp .GE. cBVAV%MinOATCompressor)THEN @@ -3006,18 +3056,21 @@ namespace HVACUnitaryBypassVAV { PartLoadFrac, OnOffAirFlowRatio); if (SolFla == -1 && !state.dataGlobal->WarmupFlag) { - ShowWarningError( - state, format("Iteration limit exceeded calculating DX unit part-load ratio, for unit = {}", cBVAV.HeatCoilName)); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError(state, + EnergyPlus::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, - format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + ShowSevereError( + state, + EnergyPlus::format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", cBVAV.HeatCoilName)); ShowContinueErrorTimeStamp( state, - format("A part-load ratio of {:.3R}will be used and the simulation continues. Occurrence info:", PartLoadFrac)); + EnergyPlus::format("A part-load ratio of {:.3R}will be used and the simulation continues. Occurrence info:", + PartLoadFrac)); ShowContinueError(state, "Please send this information to the EnergyPlus support group."); } } @@ -3202,44 +3255,48 @@ namespace HVACUnitaryBypassVAV { if (!state.dataGlobal->WarmupFlag) { if (cBVAV.DXHeatIterationExceeded < 4) { ++cBVAV.DXHeatIterationExceeded; - ShowWarningError(state, - 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, format("Calculated speed ratio = {:.4R}", SpeedRatio)); + 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)); + 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, - 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); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::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); } } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (cBVAV.DXHeatIterationFailed < 4) { ++cBVAV.DXHeatIterationFailed; - ShowWarningError(state, - 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)); + 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)); ShowContinueErrorTimeStamp(state, " Speed ratio will be set to 0.5, and the simulation continues. Occurrence info:"); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - DX unit speed ratio calculation failed error continues. speed ratio statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.HeatCoilType)], - cBVAV.HeatCoilName), + EnergyPlus::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); @@ -3268,49 +3325,53 @@ namespace HVACUnitaryBypassVAV { if (!state.dataGlobal->WarmupFlag) { if (cBVAV.DXHeatCyclingIterationExceeded < 4) { ++cBVAV.DXHeatCyclingIterationExceeded; - ShowWarningError(state, - 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, format("Estimated cycling ratio = {:.3R}", (DesOutTemp / TempSpeedOut))); - ShowContinueError(state, format("Calculated cycling ratio = {:.3R}", LocalPartLoadFrac)); + 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)); + 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, - 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, + 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); } } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (cBVAV.DXHeatCyclingIterationFailed < 4) { ++cBVAV.DXHeatCyclingIterationFailed; - ShowWarningError(state, - format("{} - DX unit low speed cycling ratio calculation failed: limits exceeded, for unit = {}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.HeatCoilType)], - cBVAV.Name)); + ShowWarningError( + state, + EnergyPlus::format("{} - DX unit low speed cycling ratio calculation failed: limits exceeded, for unit = {}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.HeatCoilType)], + cBVAV.Name)); ShowContinueError(state, - format("Estimated low speed cycling ratio = {:.3R}", - (DesOutTemp - TempNoOutput) / (TempSpeedOutSpeed1 - TempNoOutput))); + 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, - 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, + 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); } LocalPartLoadFrac = (DesOutTemp - TempNoOutput) / (TempSpeedOutSpeed1 - TempNoOutput); } @@ -3352,7 +3413,8 @@ namespace HVACUnitaryBypassVAV { CalcNonDXHeatingCoils(state, CBVAVNum, FirstHVACIteration, QHeater, cBVAV.fanOp, QHeaterActual); } break; default: { - ShowFatalError(state, format("SimCBVAV System: Invalid Heating Coil={}", HVAC::coilTypeNamesUC[static_cast(cBVAV.HeatCoilType)])); + ShowFatalError( + state, EnergyPlus::format("SimCBVAV System: Invalid Heating Coil={}", HVAC::coilTypeNamesUC[static_cast(cBVAV.HeatCoilType)])); } break; } @@ -3864,29 +3926,32 @@ namespace HVACUnitaryBypassVAV { General::SolveRoot(state, ErrTolerance, SolveMaxIter, SolFlag, HotWaterMdot, f, MinWaterFlow, MaxHotWaterFlow); if (SolFlag == -1) { if (thisCBVAV.HotWaterCoilMaxIterIndex == 0) { - ShowWarningMessage( - state, - format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); + ShowWarningMessage(state, + EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", + thisCBVAV.UnitType, + thisCBVAV.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError( + state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", - SolveMaxIter, - thisCBVAV.UnitType, - thisCBVAV.Name), + EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", + SolveMaxIter, + thisCBVAV.UnitType, + thisCBVAV.Name), thisCBVAV.HotWaterCoilMaxIterIndex); } else if (SolFlag == -2) { if (thisCBVAV.HotWaterCoilMaxIterIndex2 == 0) { - ShowWarningMessage(state, - format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - thisCBVAV.UnitType, - thisCBVAV.Name)); + ShowWarningMessage( + state, + EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", + thisCBVAV.UnitType, + thisCBVAV.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad hot water maximum flow rate limits"); - ShowContinueError(state, format("...Given minimum water flow rate={:.3R} kg/s", MinWaterFlow)); - ShowContinueError(state, format("...Given maximum water flow rate={:.3R} kg/s", MaxHotWaterFlow)); + 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, "CalcNonDXHeatingCoils: Hot water coil control failed (flow limits) for " + diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index a0a54fd9579..42a3f025b28 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -170,26 +170,28 @@ void SimulateVRF(EnergyPlusData &state, if (CompIndex == 0) { VRFTUNum = Util::FindItemInList(CompName, state.dataHVACVarRefFlow->VRFTU); if (VRFTUNum == 0) { - ShowFatalError(state, format("SimulateVRF: VRF Terminal Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimulateVRF: VRF Terminal Unit not found={}", CompName)); } CompIndex = VRFTUNum; } else { VRFTUNum = CompIndex; if (VRFTUNum > state.dataHVACVarRefFlow->NumVRFTU || VRFTUNum < 1) { - ShowFatalError(state, - format("SimulateVRF: Invalid CompIndex passed={}, Number of VRF Terminal Units = {}, VRF Terminal Unit name = {}", - VRFTUNum, - state.dataHVACVarRefFlow->NumVRFTU, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimulateVRF: Invalid CompIndex passed={}, Number of VRF Terminal Units = {}, VRF Terminal Unit name = {}", + VRFTUNum, + state.dataHVACVarRefFlow->NumVRFTU, + CompName)); } if (state.dataHVACVarRefFlow->CheckEquipName(VRFTUNum)) { if (!CompName.empty() && CompName != state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name) { - ShowFatalError(state, - format("SimulateVRF: Invalid CompIndex passed={}, VRF Terminal Unit name={}, stored VRF TU Name for that index={}", - VRFTUNum, - CompName, - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimulateVRF: Invalid CompIndex passed={}, VRF Terminal Unit name={}, stored VRF TU Name for that index={}", + VRFTUNum, + CompName, + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); } state.dataHVACVarRefFlow->CheckEquipName(VRFTUNum) = false; } @@ -298,7 +300,7 @@ PlantComponent *VRFCondenserEquipment::factory(EnergyPlusData &state, std::strin } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalVRFCondenserFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalVRFCondenserFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -339,7 +341,7 @@ void VRFCondenserEquipment::simulate(EnergyPlusData &state, this->WaterCondenserMassFlow, FirstHVACIteration); } else { - ShowFatalError(state, format("SimVRFCondenserPlant:: Invalid loop connection {}", cVRFTypes(VRF_HeatPump))); + ShowFatalError(state, EnergyPlus::format("SimVRFCondenserPlant:: Invalid loop connection {}", cVRFTypes(VRF_HeatPump))); } } @@ -600,22 +602,23 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (TotCoolCapTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag && NumTUInCoolingMode > 0) { if (vrf.CoolCapFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); + ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); + ShowContinueError(state, + EnergyPlus::format(" Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", + TotCoolCapTempModFac)); ShowContinueError( state, - format(" Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", TotCoolCapTempModFac)); - ShowContinueError(state, - 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)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - vrf.Name), + EnergyPlus::format("{} \"{}\": Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", + PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], + vrf.Name), vrf.CoolCapFTErrorIndex, TotCoolCapTempModFac, TotCoolCapTempModFac); @@ -627,22 +630,25 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (TotCoolEIRTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag && NumTUInCoolingMode > 0) { if (vrf.EIRFTempCoolErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); - ShowContinueError(state, - format(" Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - TotCoolEIRTempModFac)); - ShowContinueError(state, - 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)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - vrf.Name), + EnergyPlus::format( + "{} \"{}\": Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", + PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], + vrf.Name), vrf.EIRFTempCoolErrorIndex, TotCoolEIRTempModFac, TotCoolEIRTempModFac); @@ -663,22 +669,23 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (TotCoolCapTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag && NumTUInCoolingMode > 0) { if (vrf.CoolCapFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); + ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); + ShowContinueError(state, + EnergyPlus::format(" Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", + TotCoolCapTempModFac)); ShowContinueError( state, - format(" Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", TotCoolCapTempModFac)); - ShowContinueError(state, - 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)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - vrf.Name), + EnergyPlus::format("{} \"{}\": Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", + PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], + vrf.Name), vrf.CoolCapFTErrorIndex, TotCoolCapTempModFac, TotCoolCapTempModFac); @@ -689,22 +696,25 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (TotCoolEIRTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag && NumTUInCoolingMode > 0) { if (vrf.EIRFTempCoolErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); - ShowContinueError(state, - format(" Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - TotCoolEIRTempModFac)); - ShowContinueError(state, - 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)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - vrf.Name), + EnergyPlus::format( + "{} \"{}\": Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", + PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], + vrf.Name), vrf.EIRFTempCoolErrorIndex, TotCoolEIRTempModFac, TotCoolEIRTempModFac); @@ -779,25 +789,27 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (TotHeatCapTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag && NumTUInHeatingMode > 0) { if (vrf.HeatCapFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); - ShowContinueError( - state, - format(" Heating Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", TotHeatCapTempModFac)); + 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)); switch (vrf.HeatingPerformanceOATType) { case HVAC::OATType::DryBulb: { - ShowContinueError(state, - 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, + 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)); } break; case HVAC::OATType::WetBulb: { - ShowContinueError(state, - 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, + 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)); } break; default: // should never get here @@ -808,9 +820,10 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Heating Capacity Ratio Modifier curve (function of temperature) output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - vrf.Name), + EnergyPlus::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); @@ -821,24 +834,25 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (TotHeatEIRTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag && NumTUInHeatingMode > 0) { if (vrf.EIRFTempHeatErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); - ShowContinueError(state, - format(" Heating Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - TotHeatEIRTempModFac)); + 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)); switch (vrf.HeatingPerformanceOATType) { case HVAC::OATType::DryBulb: { ShowContinueError(state, - 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)); + 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)); } break; case HVAC::OATType::WetBulb: { ShowContinueError(state, - 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)); + 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)); } break; default: break; @@ -847,9 +861,10 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Heating Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - vrf.Name), + EnergyPlus::format( + "{} \"{}\": Heating Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", + PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], + vrf.Name), vrf.EIRFTempHeatErrorIndex, TotHeatEIRTempModFac, TotHeatEIRTempModFac); @@ -894,26 +909,29 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (DefrostEIRTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag) { if (vrf.DefrostHeatErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); + ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); ShowContinueError( state, - format(" Defrost Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - DefrostEIRTempModFac)); - ShowContinueError(state, - 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)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + vrf.DefrostHeatErrorIndex, + DefrostEIRTempModFac, + DefrostEIRTempModFac); DefrostEIRTempModFac = 0.0; } } @@ -1158,8 +1176,9 @@ 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, format(" Cooling EIR Modifier curve (function of PLR) output is negative ({:.3T}).", EIRFPLRModFac)); - ShowContinueError(state, format(" Negative value occurs using a cooling Part Load Ratio (PLR) of {:.2T}.", CoolingPLR)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1198,8 +1217,9 @@ 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, format(" Heating EIR Modifier curve (function of PLR) output is negative ({:.3T}).", EIRFPLRModFac)); - ShowContinueError(state, format(" Negative value occurs using a heating Part Load Ratio (PLR) of {:.2T}.", HeatingPLR)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1380,8 +1400,9 @@ void GetVRFInput(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( state, - format("{}Errors found in getting AirConditioner:VariableRefrigerantFlow system input. Preceding condition(s) causes termination.", - RoutineName)); + EnergyPlus::format( + "{}Errors found in getting AirConditioner:VariableRefrigerantFlow system input. Preceding condition(s) causes termination.", + RoutineName)); } } @@ -1781,19 +1802,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) auto [MinCurvePLR, MinCurveVal, MaxCurvePLR, MaxCurveVal] = checkCurveMinMaxOutput(thisVrfSys.CoolPLFFPLR); if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(12), cAlphaArgs(12))); - ShowContinueError(state, - format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + 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)); 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, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(12), cAlphaArgs(12))); - ShowContinueError(state, - format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + 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)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisVrfSys.CoolPLFFPLR, ErrorsFound, 1.0); } @@ -1809,12 +1830,12 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.MinOATHeating = rNumericArgs(8); thisVrfSys.MaxOATHeating = rNumericArgs(9); if (thisVrfSys.MinOATHeating >= thisVrfSys.MaxOATHeating) { - ShowSevereError(state, format("{}, \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowSevereError(state, EnergyPlus::format("{}, \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(8), - thisVrfSys.MinOATHeating, - thisVrfSys.MaxOATHeating)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(8), + thisVrfSys.MinOATHeating, + thisVrfSys.MaxOATHeating)); ErrorsFound = true; } @@ -1919,7 +1940,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError( state, - format( + EnergyPlus::format( "{}, \"{}\" illegal {} input for this object = {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(19), cAlphaArgs(19))); ShowContinueError(state, "... input must be WETBULBTEMPERATURE or DRYBULBTEMPERATURE."); ErrorsFound = true; @@ -1975,19 +1996,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) auto [MinCurvePLR, MinCurveVal, MaxCurvePLR, MaxCurveVal] = checkCurveMinMaxOutput(thisVrfSys.HeatPLFFPLR); if (MinCurveVal < 0.7) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(23), cAlphaArgs(23))); - ShowContinueError(state, - format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + 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)); 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, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(23), cAlphaArgs(23))); - ShowContinueError(state, - format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + 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)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisVrfSys.HeatPLFFPLR, ErrorsFound, 1.0); } @@ -2001,20 +2022,21 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.CoolEIRFPLR1 > 0) { Curve::GetCurveMinMaxValues(state, thisVrfSys.CoolEIRFPLR1, minEIRfLowPLRXInput, maxEIRfLowPLRXInput); if (minEIRfLowPLRXInput > thisVrfSys.MinPLR) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFieldNames(9), cAlphaArgs(9))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFieldNames(9), cAlphaArgs(9))); ShowContinueError(state, - format("...Curve minimum value of X = {:.3T} must be <= Minimum Heat Pump Part-Load Ratio = {:.3T}.", - minEIRfLowPLRXInput, - thisVrfSys.MinPLR)); + EnergyPlus::format("...Curve minimum value of X = {:.3T} must be <= Minimum Heat Pump Part-Load Ratio = {:.3T}.", + minEIRfLowPLRXInput, + thisVrfSys.MinPLR)); ErrorsFound = true; } if (maxEIRfLowPLRXInput < 1.0) { - ShowWarningError(state, format("{}{}=\"{}\", suspicious", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("...{} = {} has unexpected value.", cAlphaFieldNames(9), cAlphaArgs(9))); - ShowContinueError(state, - format("...Curve maximum value of X = {:.3T} should be 1 and will result in lower energy use than expected.", - maxEIRfLowPLRXInput)); + 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)); } minEIRfLowPLRXInput = 0.0; maxEIRfLowPLRXInput = 0.0; @@ -2022,20 +2044,21 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.HeatEIRFPLR1 > 0) { Curve::GetCurveMinMaxValues(state, thisVrfSys.HeatEIRFPLR1, minEIRfLowPLRXInput, maxEIRfLowPLRXInput); if (minEIRfLowPLRXInput > thisVrfSys.MinPLR) { - ShowWarningError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("...{} = {} has out of range value.", cAlphaFieldNames(20), cAlphaArgs(20))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFieldNames(20), cAlphaArgs(20))); ShowContinueError(state, - format("...Curve minimum value of X = {:.3T} must be <= Minimum Heat Pump Part-Load Ratio = {:.3T}.", - minEIRfLowPLRXInput, - thisVrfSys.MinPLR)); + EnergyPlus::format("...Curve minimum value of X = {:.3T} must be <= Minimum Heat Pump Part-Load Ratio = {:.3T}.", + minEIRfLowPLRXInput, + thisVrfSys.MinPLR)); ErrorsFound = true; } if (maxEIRfLowPLRXInput < 1.0) { - ShowWarningError(state, format("{}{}=\"{}\", suspicious", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("...{} = {} has unexpected value.", cAlphaFieldNames(20), cAlphaArgs(20))); - ShowContinueError(state, - format("...Curve maximum value of X = {:.3T} should be 1 and will result in lower energy use than expected.", - maxEIRfLowPLRXInput)); + 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)); } } @@ -2045,13 +2068,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.ThermostatPriority == ThermostatCtrlType::MasterThermostatPriority) { if (thisVrfSys.MasterZonePtr == 0) { - ShowSevereError(state, format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("{} must be entered when {} = {}", cAlphaFieldNames(24), cAlphaFieldNames(25), cAlphaArgs(25))); + ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, + EnergyPlus::format("{} must be entered when {} = {}", cAlphaFieldNames(24), cAlphaFieldNames(25), cAlphaArgs(25))); ErrorsFound = true; } } else if (thisVrfSys.ThermostatPriority == ThermostatCtrlType::Invalid) { - ShowSevereError(state, format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFieldNames(25), cAlphaArgs(25))); + ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFieldNames(25), cAlphaArgs(25))); ErrorsFound = true; } @@ -2066,8 +2090,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.ZoneTUListPtr = Util::FindItemInList(cAlphaArgs(27), state.dataHVACVarRefFlow->TerminalUnitList); if (thisVrfSys.ZoneTUListPtr == 0) { - ShowSevereError(state, format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("{} = {} not found.", cAlphaFieldNames(27), cAlphaArgs(27))); + ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, EnergyPlus::format("{} = {} not found.", cAlphaFieldNames(27), cAlphaArgs(27))); ErrorsFound = true; } @@ -2078,8 +2102,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else if (Util::SameString(cAlphaArgs(28), "Yes")) { thisVrfSys.HeatRecoveryUsed = true; } else { - ShowSevereError(state, format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFieldNames(28), cAlphaArgs(28))); + ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFieldNames(28), cAlphaArgs(28))); ErrorsFound = true; } } @@ -2122,8 +2146,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (!lAlphaFieldBlanks(31)) { thisVrfSys.DefrostStrategy = static_cast(getEnumValue(StandardRatings::DefrostStratUC, cAlphaArgs(31))); if (thisVrfSys.DefrostStrategy == StandardRatings::DefrostStrat::Invalid) { - ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(31), cAlphaArgs(31))); + ShowSevereError( + state, + EnergyPlus::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(31), cAlphaArgs(31))); ErrorsFound = true; } } else { @@ -2135,8 +2160,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) static_cast(getEnumValue(StandardRatings::HPdefrostControlUC, cAlphaArgs(32))); if (thisVrfSys.DefrostControl == StandardRatings::HPdefrostControl::Invalid) { - ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(32), cAlphaArgs(32))); + ShowSevereError( + state, + EnergyPlus::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(32), cAlphaArgs(32))); ErrorsFound = true; } @@ -2157,15 +2183,17 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) cAlphaFieldNames(33)); // Field Name } else { if (thisVrfSys.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle) { - ShowSevereError( - state, format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(33), cAlphaArgs(33))); + ShowSevereError(state, + EnergyPlus::format( + "{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(33), cAlphaArgs(33))); ErrorsFound = true; } } } else { if (thisVrfSys.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle) { - ShowSevereError(state, - format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(33), cAlphaArgs(33))); + ShowSevereError( + state, + EnergyPlus::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(33), cAlphaArgs(33))); ErrorsFound = true; } } @@ -2175,7 +2203,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.DefrostCapacity == 0.0 && thisVrfSys.DefrostStrategy == StandardRatings::DefrostStrat::Resistive) { ShowWarningError( state, - format("{}, \"{}\" {} = 0.0 for defrost strategy = RESISTIVE.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(21))); + EnergyPlus::format( + "{}, \"{}\" {} = 0.0 for defrost strategy = RESISTIVE.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(21))); } thisVrfSys.MaxOATDefrost = rNumericArgs(22); @@ -2191,11 +2220,12 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.CondenserType = DataHeatBalance::RefrigCondenserType::Water; thisVrfSys.VRFType = PlantEquipmentType::HeatPumpVRF; if (thisVrfSys.HeatingPerformanceOATType == HVAC::OATType::WetBulb) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, format("{} = {}", cAlphaFieldNames(34), cAlphaArgs(34))); - ShowContinueError(state, format("Illegal {} input for this object = {}", cAlphaFieldNames(19), cAlphaArgs(19))); + 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))); ShowContinueError(state, "... input must be DRYBULBTEMPERATURE when Condenser Type is WaterCooled."); - ShowContinueError(state, format("... {} will be reset to DRYBULBTEMPERATURE and simulation continues.", cAlphaFieldNames(19))); + ShowContinueError( + state, EnergyPlus::format("... {} will be reset to DRYBULBTEMPERATURE and simulation continues.", cAlphaFieldNames(19))); } } if (thisVrfSys.CondenserType == DataHeatBalance::RefrigCondenserType::Invalid) { @@ -2225,11 +2255,11 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisVrfSys.CondenserNodeNum)) { ShowSevereError(state, - format("{}, \"{}\" {} not a valid Outdoor Air Node = {}", - cCurrentModuleObject, - thisVrfSys.Name, - cAlphaFieldNames(35), - cAlphaArgs(35))); + EnergyPlus::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; } @@ -2262,15 +2292,15 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) ObjectIsNotParent); TestCompSet(state, cCurrentModuleObject, thisVrfSys.Name, cAlphaArgs(35), cAlphaArgs(36), "Condenser Water Nodes"); } else if (lAlphaFieldBlanks(36) && thisVrfSys.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { - ShowSevereError(state, format("{}, \"{}\" {} is blank.", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(36))); + ShowSevereError(state, EnergyPlus::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, format("{}, \"{}\" {} is blank.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(23))); - ShowContinueError(state, format("...input is required when {} = {}", cAlphaFieldNames(34), cAlphaArgs(34))); + ShowSevereError(state, EnergyPlus::format("{}, \"{}\" {} is blank.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(23))); + ShowContinueError(state, EnergyPlus::format("...input is required when {} = {}", cAlphaFieldNames(34), cAlphaArgs(34))); ErrorsFound = true; } } else { @@ -2299,7 +2329,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, format("{}, \"{}\" {} must be >= 0", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(27))); + ShowSevereError(state, EnergyPlus::format("{}, \"{}\" {} must be >= 0", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(27))); ErrorsFound = true; } @@ -2311,7 +2341,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.BasinHeaterSetPointTemp < 2.0) { ShowWarningError( state, - format( + EnergyPlus::format( "{}, \"{}\" {} is less than 2 deg C. Freezing could occur.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(28))); } } @@ -2338,18 +2368,20 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.MinOATHeatRecovery = rNumericArgs(29); if (thisVrfSys.MinOATHeatRecovery < thisVrfSys.MinOATCooling || thisVrfSys.MinOATHeatRecovery < thisVrfSys.MinOATHeating) { ShowWarningError(state, - format("{} = \"{}\", {} is less than the minimum temperature in heat pump mode.", - cCurrentModuleObject, - thisVrfSys.Name, - cNumericFieldNames(29))); - ShowContinueError(state, format("...{} = {:.2T} C", cNumericFieldNames(29), thisVrfSys.MinOATHeatRecovery)); - ShowContinueError(state, format("...Minimum Outdoor Temperature in Cooling Mode = {:.2T} C", thisVrfSys.MinOATCooling)); - ShowContinueError(state, format("...Minimum Outdoor Temperature in Heating Mode = {:.2T} C", thisVrfSys.MinOATHeating)); + 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)); 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, format("... adjusted {} = {:.2T} C", cNumericFieldNames(29), thisVrfSys.MinOATHeatRecovery)); + ShowContinueError(state, EnergyPlus::format("... adjusted {} = {:.2T} C", cNumericFieldNames(29), thisVrfSys.MinOATHeatRecovery)); } } if (lAlphaFieldBlanks(30)) { @@ -2358,18 +2390,20 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.MaxOATHeatRecovery = rNumericArgs(30); if (thisVrfSys.MaxOATHeatRecovery > thisVrfSys.MaxOATCooling || thisVrfSys.MaxOATHeatRecovery > thisVrfSys.MaxOATHeating) { ShowWarningError(state, - format("{} = \"{}\", {} is greater than the maximum temperature in heat pump mode.", - cCurrentModuleObject, - thisVrfSys.Name, - cNumericFieldNames(30))); - ShowContinueError(state, format("...{} = {:.2T} C", cNumericFieldNames(30), thisVrfSys.MaxOATHeatRecovery)); - ShowContinueError(state, format("...Maximum Outdoor Temperature in Cooling Mode = {:.2T} C", thisVrfSys.MaxOATCooling)); - ShowContinueError(state, format("...Maximum Outdoor Temperature in Heating Mode = {:.2T} C", thisVrfSys.MaxOATHeating)); + 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)); 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, format("... adjusted {} = {:.2T} C", cNumericFieldNames(30), thisVrfSys.MaxOATHeatRecovery)); + ShowContinueError(state, EnergyPlus::format("... adjusted {} = {:.2T} C", cNumericFieldNames(30), thisVrfSys.MaxOATHeatRecovery)); } } @@ -2511,19 +2545,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfFluidCtrl.MinOATCooling >= thisVrfFluidCtrl.MaxOATCooling) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(3), - thisVrfFluidCtrl.MinOATCooling, - thisVrfFluidCtrl.MaxOATCooling)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(3), + thisVrfFluidCtrl.MinOATCooling, + thisVrfFluidCtrl.MaxOATCooling)); ErrorsFound = true; } if (thisVrfFluidCtrl.MinOATHeating >= thisVrfFluidCtrl.MaxOATHeating) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(5), - thisVrfFluidCtrl.MinOATHeating, - thisVrfFluidCtrl.MaxOATHeating)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(5), + thisVrfFluidCtrl.MinOATHeating, + thisVrfFluidCtrl.MaxOATHeating)); ErrorsFound = true; } @@ -2551,19 +2585,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfFluidCtrl.IUEvapTempLow >= thisVrfFluidCtrl.IUEvapTempHigh) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(11), - thisVrfFluidCtrl.IUEvapTempLow, - thisVrfFluidCtrl.IUEvapTempHigh)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(11), + thisVrfFluidCtrl.IUEvapTempLow, + thisVrfFluidCtrl.IUEvapTempHigh)); ErrorsFound = true; } if (thisVrfFluidCtrl.IUCondTempLow >= thisVrfFluidCtrl.IUCondTempHigh) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(13), - thisVrfFluidCtrl.IUCondTempLow, - thisVrfFluidCtrl.IUCondTempHigh)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(13), + thisVrfFluidCtrl.IUCondTempLow, + thisVrfFluidCtrl.IUCondTempHigh)); ErrorsFound = true; } @@ -2594,10 +2628,11 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrl.Name + "\", invalid"); - ShowContinueError(state, - format("...illegal {} type for this object = {}", - cAlphaFieldNames(6), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUEvapTempCurve)->curveType)])); + ShowContinueError( + state, + EnergyPlus::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; } @@ -2625,10 +2660,11 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrl.Name + "\", invalid"); - ShowContinueError(state, - format("...illegal {} type for this object = {}", - cAlphaFieldNames(7), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUCondTempCurve)->curveType)])); + ShowContinueError( + state, + EnergyPlus::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; } @@ -2655,7 +2691,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, format("...The value is recalculated based on the provided \"{}\" value.", cNumericFieldNames(18))); + ShowContinueError(state, EnergyPlus::format("...The value is recalculated based on the provided \"{}\" value.", cNumericFieldNames(18))); } // Crank case @@ -2784,9 +2820,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrl.Name + "\", invalid"); ShowContinueError(state, - format("...not found {}=\"{}\".", - cAlphaFieldNames(Count2Index + 2 * NumCompSpd), - cAlphaArgs(Count2Index + 2 * NumCompSpd))); + EnergyPlus::format("...not found {}=\"{}\".", + cAlphaFieldNames(Count2Index + 2 * NumCompSpd), + cAlphaArgs(Count2Index + 2 * NumCompSpd))); } ErrorsFound = true; } else { @@ -2814,9 +2850,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrl.Name + "\", invalid"); ShowContinueError(state, - format("...not found {}=\"{}\".", - cAlphaFieldNames(Count2Index + 2 * NumCompSpd + 1), - cAlphaArgs(Count2Index + 2 * NumCompSpd + 1))); + EnergyPlus::format("...not found {}=\"{}\".", + cAlphaFieldNames(Count2Index + 2 * NumCompSpd + 1), + cAlphaArgs(Count2Index + 2 * NumCompSpd + 1))); } ErrorsFound = true; } else { @@ -2912,28 +2948,28 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfFluidCtrlHR.MinOATCooling >= thisVrfFluidCtrlHR.MaxOATCooling) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(3), - thisVrfFluidCtrlHR.MinOATCooling, - thisVrfFluidCtrlHR.MaxOATCooling)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(3), + thisVrfFluidCtrlHR.MinOATCooling, + thisVrfFluidCtrlHR.MaxOATCooling)); ErrorsFound = true; } if (thisVrfFluidCtrlHR.MinOATHeating >= thisVrfFluidCtrlHR.MaxOATHeating) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(5), - thisVrfFluidCtrlHR.MinOATHeating, - thisVrfFluidCtrlHR.MaxOATHeating)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(5), + thisVrfFluidCtrlHR.MinOATHeating, + thisVrfFluidCtrlHR.MaxOATHeating)); ErrorsFound = true; } if (thisVrfFluidCtrlHR.MinOATHeatRecovery >= thisVrfFluidCtrlHR.MaxOATHeatRecovery) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(7), - thisVrfFluidCtrlHR.MinOATHeating, - thisVrfFluidCtrlHR.MaxOATHeating)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(7), + thisVrfFluidCtrlHR.MinOATHeating, + thisVrfFluidCtrlHR.MaxOATHeating)); ErrorsFound = true; } if (thisVrfFluidCtrlHR.MinOATHeatRecovery < thisVrfFluidCtrlHR.MinOATCooling && @@ -2941,28 +2977,32 @@ 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, format("...{} = {:.2T} C", cNumericFieldNames(7), thisVrfFluidCtrlHR.MinOATHeatRecovery)); - ShowContinueError(state, format("...Minimum Outdoor Temperature in Cooling Mode = {:.2T} C", thisVrfFluidCtrlHR.MinOATCooling)); - ShowContinueError(state, format("...Minimum Outdoor Temperature in Heating Mode = {:.2T} C", thisVrfFluidCtrlHR.MinOATHeating)); + 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, "...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, format("... adjusted {} = {:.2T} C", cNumericFieldNames(7), thisVrfFluidCtrlHR.MinOATHeatRecovery)); + ShowContinueError(state, EnergyPlus::format("... adjusted {} = {:.2T} 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, format("...{} = {:.2T} C", cNumericFieldNames(8), thisVrfFluidCtrlHR.MaxOATHeatRecovery)); - ShowContinueError(state, format("...Maximum Outdoor Temperature in Cooling Mode = {:.2T} C", thisVrfFluidCtrlHR.MaxOATCooling)); - ShowContinueError(state, format("...Maximum Outdoor Temperature in Heating Mode = {:.2T} C", thisVrfFluidCtrlHR.MaxOATHeating)); + 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, "...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, format("... adjusted {} = {:.2T} C", cNumericFieldNames(8), thisVrfFluidCtrlHR.MaxOATHeatRecovery)); + ShowContinueError(state, EnergyPlus::format("... adjusted {} = {:.2T} C", cNumericFieldNames(8), thisVrfFluidCtrlHR.MaxOATHeatRecovery)); } // IU Control Type @@ -2986,19 +3026,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfFluidCtrlHR.IUEvapTempLow >= thisVrfFluidCtrlHR.IUEvapTempHigh) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(11), - thisVrfFluidCtrlHR.IUEvapTempLow, - thisVrfFluidCtrlHR.IUEvapTempHigh)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(11), + thisVrfFluidCtrlHR.IUEvapTempLow, + thisVrfFluidCtrlHR.IUEvapTempHigh)); ErrorsFound = true; } if (thisVrfFluidCtrlHR.IUCondTempLow >= thisVrfFluidCtrlHR.IUCondTempHigh) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(13), - thisVrfFluidCtrlHR.IUCondTempLow, - thisVrfFluidCtrlHR.IUCondTempHigh)); + EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", + cNumericFieldNames(13), + thisVrfFluidCtrlHR.IUCondTempLow, + thisVrfFluidCtrlHR.IUCondTempHigh)); ErrorsFound = true; } @@ -3049,10 +3089,11 @@ 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, - format("...illegal {} type for this object = {}", - cAlphaFieldNames(6), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUEvapTempCurve)->curveType)])); + ShowContinueError( + state, + EnergyPlus::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; } @@ -3077,10 +3118,11 @@ 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, - format("...illegal {} type for this object = {}", - cAlphaFieldNames(7), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUCondTempCurve)->curveType)])); + ShowContinueError( + state, + EnergyPlus::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; } @@ -3107,7 +3149,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, format("...The value is recalculated based on the provided \"{}\" value.", cNumericFieldNames(25))); + ShowContinueError(state, EnergyPlus::format("...The value is recalculated based on the provided \"{}\" value.", cNumericFieldNames(25))); } // Crank case @@ -3226,9 +3268,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrlHR.Name + "\", invalid"); ShowContinueError(state, - format("...not found {}=\"{}\".", - cAlphaFieldNames(Count2Index + 2 * NumCompSpd), - cAlphaArgs(Count2Index + 2 * NumCompSpd))); + EnergyPlus::format("...not found {}=\"{}\".", + cAlphaFieldNames(Count2Index + 2 * NumCompSpd), + cAlphaArgs(Count2Index + 2 * NumCompSpd))); } ErrorsFound = true; } else { @@ -3256,9 +3298,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrlHR.Name + "\", invalid"); ShowContinueError(state, - format("...not found {}=\"{}\".", - cAlphaFieldNames(Count2Index + 2 * NumCompSpd + 1), - cAlphaArgs(Count2Index + 2 * NumCompSpd + 1))); + EnergyPlus::format("...not found {}=\"{}\".", + cAlphaFieldNames(Count2Index + 2 * NumCompSpd + 1), + cAlphaArgs(Count2Index + 2 * NumCompSpd + 1))); } ErrorsFound = true; } else { @@ -3403,7 +3445,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, format("Actual type of fan {} = {}", FanName, HVAC::fanTypeNames[(int)thisVrfTU.fanType])); + ShowContinueError(state, EnergyPlus::format("Actual type of fan {} = {}", FanName, HVAC::fanTypeNames[(int)thisVrfTU.fanType])); ErrorsFound = true; } @@ -3454,8 +3496,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) 0.0, Clusive::In, 1.0, - format("For fan type = {}, operating mode must be continuous (schedule values > 0).", - HVAC::fanTypeNames[(int)HVAC::FanType::Constant])); + EnergyPlus::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 @@ -4420,7 +4462,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } ShowWarningError(state, cCurrentModuleObject + " = " + thisVrfTU.Name + " with Fan:SystemModel is used in " + cAlphaArgs(8) + "\""); - ShowContinueError(state, format("...The number of speed = {:.0R}.", double(fanSystem->numSpeeds))); + 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."); } } @@ -4630,8 +4672,9 @@ 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, format("ZoneTerminalUnitList \"{}\"", thisTUList.Name)); - ShowContinueError(state, format("...Zone Terminal Unit = {} improperly connected to system.", thisTUList.ZoneTUName(VRFTUNum))); + ShowSevereError(state, EnergyPlus::format("ZoneTerminalUnitList \"{}\"", thisTUList.Name)); + ShowContinueError(state, + EnergyPlus::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."); @@ -4642,9 +4685,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, format("ZoneTerminalUnitList \"{}\"", thisTUList.Name)); + ShowWarningError(state, EnergyPlus::format("ZoneTerminalUnitList \"{}\"", thisTUList.Name)); ShowWarningError(state, "...Only 1 Terminal Unit connected to system and heat recovery is selected."); - ShowContinueError(state, format("...Heat recovery will be disabled for {}.", thisVRFSys.Name)); + ShowContinueError(state, EnergyPlus::format("...Heat recovery will be disabled for {}.", thisVRFSys.Name)); thisVRFSys.HeatRecoveryUsed = false; } } @@ -4656,20 +4699,21 @@ 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, - format("The number of AirConditioner:VariableRefrigerantFlow objects ({}) does not match the number of " - "ZoneTerminalUnitList objects ({}).", - state.dataHVACVarRefFlow->NumVRFCond, - state.dataHVACVarRefFlow->NumVRFTULists)); + EnergyPlus::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, - 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, + EnergyPlus::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, - format("...AirConditioner:VariableRefrigerantFlow = {} Zone Terminal Unit List Name not found.", - state.dataHVACVarRefFlow->VRF(NumCond).Name)); + EnergyPlus::format("...AirConditioner:VariableRefrigerantFlow = {} Zone Terminal Unit List Name not found.", + state.dataHVACVarRefFlow->VRF(NumCond).Name)); } } ShowContinueError(state, "...listing ZoneTerminalUnitList objects."); @@ -4863,14 +4907,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) OutputProcessor::StoreType::Average, thisVrf.Name); SetupOutputVariable(state, - format("VRF Heat Pump Cooling {} Rate", sFuelType), + EnergyPlus::format("VRF Heat Pump Cooling {} Rate", sFuelType), Constant::Units::W, thisVrf.ElecCoolingPower, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisVrf.Name); SetupOutputVariable(state, - format("VRF Heat Pump Cooling {} Energy", sFuelType), + EnergyPlus::format("VRF Heat Pump Cooling {} Energy", sFuelType), Constant::Units::J, thisVrf.CoolElecConsumption, OutputProcessor::TimeStepType::System, @@ -4880,14 +4924,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) OutputProcessor::Group::HVAC, OutputProcessor::EndUseCat::Cooling); SetupOutputVariable(state, - format("VRF Heat Pump Heating {} Rate", sFuelType), + EnergyPlus::format("VRF Heat Pump Heating {} Rate", sFuelType), Constant::Units::W, thisVrf.ElecHeatingPower, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisVrf.Name); SetupOutputVariable(state, - format("VRF Heat Pump Heating {} Energy", sFuelType), + EnergyPlus::format("VRF Heat Pump Heating {} Energy", sFuelType), Constant::Units::J, thisVrf.HeatElecConsumption, OutputProcessor::TimeStepType::System, @@ -5053,14 +5097,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { // defrost energy applied to fuel type SetupOutputVariable(state, - format("VRF Heat Pump Defrost {} Rate", sFuelType), + EnergyPlus::format("VRF Heat Pump Defrost {} Rate", sFuelType), Constant::Units::W, thisVrf.DefrostPower, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisVrf.Name); SetupOutputVariable(state, - format("VRF Heat Pump Defrost {} Energy", sFuelType), + EnergyPlus::format("VRF Heat Pump Defrost {} Energy", sFuelType), Constant::Units::J, thisVrf.DefrostConsumption, OutputProcessor::TimeStepType::System, @@ -5298,8 +5342,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & ShowSevereError(state, fmt::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, format("... Cooling coil air outlet node = {}", nodeID(coolCoilAirOutNode))); - ShowContinueError(state, format("... Heating coil air inlet node = {}", nodeID(heatCoilAirInNode))); + ShowContinueError(state, EnergyPlus::format("... Cooling coil air outlet node = {}", nodeID(coolCoilAirOutNode))); + ShowContinueError(state, EnergyPlus::format("... Heating coil air inlet node = {}", nodeID(heatCoilAirInNode))); } ErrorsFound = true; } @@ -5314,8 +5358,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, format("... OA mixer return air stream node name = {}.", nodeID(VRFTUOAMixerRetNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("... OA mixer return air stream node name = {}.", nodeID(VRFTUOAMixerRetNodeNum))); } ErrorsFound = true; } @@ -5327,8 +5371,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... OA mixer mixed air node name = {}.", nodeID(VRFTUOAMixerMixedNodeNum))); - ShowContinueError(state, format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); + ShowContinueError(state, EnergyPlus::format("... OA mixer mixed air node name = {}.", nodeID(VRFTUOAMixerMixedNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); } ErrorsFound = true; } @@ -5339,8 +5383,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... OA mixer mixed air node name = {}.", nodeID(VRFTUOAMixerMixedNodeNum))); - ShowContinueError(state, format("... Heating coil inlet node name = {}.", nodeID(heatCoilAirInNode))); + ShowContinueError(state, EnergyPlus::format("... OA mixer mixed air node name = {}.", nodeID(VRFTUOAMixerMixedNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Heating coil inlet node name = {}.", nodeID(heatCoilAirInNode))); } ErrorsFound = true; } @@ -5354,8 +5398,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); } ErrorsFound = true; } @@ -5366,8 +5410,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, format("... Heating coil inlet node name = {}.", nodeID(heatCoilAirInNode))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Heating coil inlet node name = {}.", nodeID(heatCoilAirInNode))); } ErrorsFound = true; } @@ -5381,8 +5425,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, format("... Fan inlet node name = {}.", nodeID(fanInletNode))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Fan inlet node name = {}.", nodeID(fanInletNode))); } ErrorsFound = true; } @@ -5393,8 +5437,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, format("... Fan inlet node name = {}.", nodeID(VRFTUOAMixerRetNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Fan inlet node name = {}.", nodeID(VRFTUOAMixerRetNodeNum))); } ErrorsFound = true; } @@ -5408,8 +5452,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... The fan outlet node name = {}.", nodeID(fanOutletNode))); - ShowContinueError(state, format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); + ShowContinueError(state, EnergyPlus::format("... The fan outlet node name = {}.", nodeID(fanOutletNode))); + ShowContinueError(state, EnergyPlus::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); } ErrorsFound = true; } @@ -5421,8 +5465,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Cooling coil outlet node name = {}.", nodeID(coolCoilAirOutNode))); - ShowContinueError(state, format("... The fan inlet node name = {}.", nodeID(fanInletNode))); + ShowContinueError(state, EnergyPlus::format("... Cooling coil outlet node name = {}.", nodeID(coolCoilAirOutNode))); + ShowContinueError(state, EnergyPlus::format("... The fan inlet node name = {}.", nodeID(fanInletNode))); } ErrorsFound = true; } @@ -5436,8 +5480,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Heating coil outlet node name = {}.", nodeID(heatCoilAirOutNode))); - ShowContinueError(state, format("... The fan inlet node name = {}.", nodeID(fanInletNode))); + ShowContinueError(state, EnergyPlus::format("... Heating coil outlet node name = {}.", nodeID(heatCoilAirOutNode))); + ShowContinueError(state, EnergyPlus::format("... The fan inlet node name = {}.", nodeID(fanInletNode))); } ErrorsFound = true; } @@ -5448,8 +5492,9 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & ShowSevereError(state, fmt::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, format("... Supplemental heating coil outlet node name = {}.", nodeID(SuppHeatCoilAirOutletNode))); - ShowContinueError(state, format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); + ShowContinueError(state, + EnergyPlus::format("... Supplemental heating coil outlet node name = {}.", nodeID(SuppHeatCoilAirOutletNode))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); } ErrorsFound = true; } @@ -5460,8 +5505,9 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); - ShowContinueError(state, format("... Supplemental heating coil inlet node name = {}.", nodeID(SuppHeatCoilAirInletNode))); + ShowContinueError(state, EnergyPlus::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); + ShowContinueError(state, + EnergyPlus::format("... Supplemental heating coil inlet node name = {}.", nodeID(SuppHeatCoilAirInletNode))); } ErrorsFound = true; } @@ -5472,8 +5518,9 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Heating coil outlet node name = {}.", nodeID(heatCoilAirOutNode))); - ShowContinueError(state, format("... Supplemental heating coil inlet node name = {}.", nodeID(SuppHeatCoilAirInletNode))); + ShowContinueError(state, EnergyPlus::format("... Heating coil outlet node name = {}.", nodeID(heatCoilAirOutNode))); + ShowContinueError(state, + EnergyPlus::format("... Supplemental heating coil inlet node name = {}.", nodeID(SuppHeatCoilAirInletNode))); } ErrorsFound = true; } @@ -5485,8 +5532,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Cooling coil outlet node name = {}.", nodeID(coolCoilAirOutNode))); - ShowContinueError(state, format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Cooling coil outlet node name = {}.", nodeID(coolCoilAirOutNode))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); } ErrorsFound = true; } @@ -5497,8 +5544,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); - ShowContinueError(state, format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); } ErrorsFound = true; } @@ -5510,8 +5557,8 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & "... 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, format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); - ShowContinueError(state, format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); + ShowContinueError(state, EnergyPlus::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); + ShowContinueError(state, EnergyPlus::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); } ErrorsFound = true; } @@ -5662,7 +5709,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool errFlag); if (errFlag) { - ShowFatalError(state, format("{}: Program terminated for previous conditions.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}: Program terminated for previous conditions.", RoutineName)); } state.dataHVACVarRefFlow->VRFTU(VRFTUNum).SuppHeatCoilFluidMaxFlow = WaterCoils::GetCoilMaxWaterFlowRate( state, "Coil:Heating:Water", state.dataHVACVarRefFlow->VRFTU(VRFTUNum).SuppHeatCoilName, ErrorsFound); @@ -5693,7 +5740,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool _, _); if (errFlag) { - ShowFatalError(state, format("{}: Program terminated for previous conditions.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}: Program terminated for previous conditions.", RoutineName)); } state.dataHVACVarRefFlow->VRFTU(VRFTUNum).SuppHeatCoilFluidMaxFlow = SteamCoils::GetCoilMaxSteamFlowRate(state, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).SuppHeatCoilIndex, ErrorsFound); @@ -5782,18 +5829,21 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } } if (ZoneNodeNotFound) { - ShowSevereError(state, - format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow \"{}\" Zone terminal unit air inlet node name " + 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.", state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); ShowContinueError(state, "... Zone inlet and exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError(state, - format("... Zone terminal unit inlet node name = {}", - state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(TUIndex).VRFTUInletNodeNum))); - ShowContinueError(state, - format("... Zone terminal unit outlet node name = {}", - state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(TUIndex).VRFTUOutletNodeNum))); + ShowContinueError( + state, + EnergyPlus::format("... Zone terminal unit inlet node name = {}", + state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(TUIndex).VRFTUInletNodeNum))); + ShowContinueError( + state, + EnergyPlus::format("... Zone terminal unit outlet node name = {}", + state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(TUIndex).VRFTUOutletNodeNum))); } } goto EquipList_exit; @@ -5847,7 +5897,8 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool goto EquipList_exit; } if (!AirNodeFound && state.dataHVACVarRefFlow->VRFTU(TUIndex).ZoneNum > 0) { - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, + EnergyPlus::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)); @@ -5937,7 +5988,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } } } else { - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find ZoneHVAC:EquipmentList connected to this VRF terminal unit."); errorsFound = true; } @@ -6017,24 +6068,24 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(TUIndex).fanOpModeSched != nullptr) { if (state.dataHVACVarRefFlow->VRFTU(TUIndex).fanOpModeSched->getCurrentVal() == 0.0) { ShowSevereError(state, - format("{} = {}", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(TUIndex).type], - state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); + EnergyPlus::format("{} = {}", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(TUIndex).type], + state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); ShowContinueError(state, "When using set point control, fan operating mode must be continuous (fan " "operating mode schedule values > 0)."); ShowContinueError(state, - format("Error found in Supply Air Fan Operating Mode Schedule Name = {}", - state.dataHVACVarRefFlow->VRFTU(TUIndex).fanOpModeSched->Name)); + EnergyPlus::format("Error found in Supply Air Fan Operating Mode Schedule Name = {}", + state.dataHVACVarRefFlow->VRFTU(TUIndex).fanOpModeSched->Name)); ShowContinueError(state, "...schedule values must be (>0., <=1.)"); ErrorsFound = true; } } } else { ShowSevereError(state, - format("{} = {}", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(TUIndex).type], - state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); + EnergyPlus::format("{} = {}", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(TUIndex).type], + state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); ShowContinueError(state, " The Fraction of Supply Air Flow That Goes Through the Controlling Zone is set to 1."); state.dataHVACVarRefFlow->VRFTU(TUIndex).controlZoneMassFlowFrac = 1.0; BaseSizer::reportSizerOutput(state, @@ -6054,14 +6105,16 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(TUIndex).isInZone && state.dataAirLoop->AirLoopInputsFilled) { if (state.dataHVACVarRefFlow->VRFTU(TUIndex).fanPlace == HVAC::FanPlace::Invalid) { - ShowSevereError(state, - format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = {}", state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); + ShowSevereError( + state, + EnergyPlus::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = {}", state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); ShowContinueError(state, "Illegal Supply Air Fan Placement."); ErrorsFound = true; } if (state.dataHVACVarRefFlow->VRFTU(TUIndex).FanIndex == 0) { - ShowSevereError(state, - format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = {}", state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); + ShowSevereError( + state, + EnergyPlus::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = {}", state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); ShowContinueError(state, "VRF Terminal Unit fan is required when used as zone equipment."); ErrorsFound = true; } @@ -6101,8 +6154,8 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (missingSetPoint) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for {}", - state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); + EnergyPlus::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for {}", + state.dataHVACVarRefFlow->VRFTU(TUIndex).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) { @@ -6130,8 +6183,9 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (SPNotFound && state.dataAirLoop->AirLoopInputsFilled) { ShowSevereError( state, - format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for unitary system = {}", - state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); + EnergyPlus::format( + "ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for unitary system = {}", + state.dataHVACVarRefFlow->VRFTU(TUIndex).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; @@ -6148,10 +6202,10 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool continue; } ShowSevereError(state, - format("InitVRF: VRF Terminal Unit = [{},{}] is not on any ZoneHVAC:EquipmentList, AirloopHVAC or " - "AirLoopHVAC:OutdoorAirSystem:EquipmentList. It will not be simulated.", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(TUIndex).type], - state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); + EnergyPlus::format("InitVRF: VRF Terminal Unit = [{},{}] is not on any ZoneHVAC:EquipmentList, AirloopHVAC or " + "AirLoopHVAC:OutdoorAirSystem:EquipmentList. It will not be simulated.", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(TUIndex).type], + state.dataHVACVarRefFlow->VRFTU(TUIndex).Name)); ShowContinueError(state, "...The VRF AC System associated with this terminal unit may also not be simulated."); } } @@ -6180,13 +6234,13 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (ZoneNodeNotFound && !state.dataHVACVarRefFlow->VRFTU(VRFTUNum).isInAirLoop) { ShowSevereError(state, - format("{} \"{}\" Zone terminal unit air inlet node name must be the same as a zone exhaust node name.", - cCurrentModuleObject, - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("{} \"{}\" Zone terminal unit air inlet node name must be the same as a zone exhaust node name.", + cCurrentModuleObject, + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); ShowContinueError(state, "... Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, - format("... Zone terminal unit inlet node name = {}", - state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFTUInletNodeNum))); + EnergyPlus::format("... Zone terminal unit inlet node name = {}", + state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFTUInletNodeNum))); ErrorsFound = true; } } @@ -6195,15 +6249,16 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool state.dataHVACVarRefFlow->VRFTU(VRFTUNum).OAMixerUsed) { Array1D_int OANodeNums = MixedAir::GetOAMixerNodeNumbers(state, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).OAMixerName, errFlag); if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFTUInletNodeNum != OANodeNums(3)) { - ShowSevereError( - state, - format("{} \"{}\" Zone terminal unit air inlet node name must be the same as the OutdoorAir:Mixer return air node name.", - cCurrentModuleObject, - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowSevereError(state, + EnergyPlus::format( + "{} \"{}\" Zone terminal unit air inlet node name must be the same as the OutdoorAir:Mixer return air node name.", + cCurrentModuleObject, + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowContinueError(state, + EnergyPlus::format("... Zone terminal unit air inlet node name = {}", + state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFTUInletNodeNum))); ShowContinueError(state, - format("... Zone terminal unit air inlet node name = {}", - state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFTUInletNodeNum))); - ShowContinueError(state, format("... OutdoorAir:Mixer return air node name = {}", state.dataLoopNodes->NodeID(OANodeNums(3)))); + EnergyPlus::format("... OutdoorAir:Mixer return air node name = {}", state.dataLoopNodes->NodeID(OANodeNums(3)))); ErrorsFound = true; } } @@ -6230,13 +6285,13 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (ZoneNodeNotFound) { ShowSevereError(state, - format("{} \"{}\" Zone terminal unit air outlet node name must be the same as a zone inlet node name.", - cCurrentModuleObject, - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("{} \"{}\" Zone terminal unit air outlet node name must be the same as a zone inlet node name.", + cCurrentModuleObject, + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); ShowContinueError(state, "... Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, - format("... Zone terminal unit outlet node name = {}", - state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFTUOutletNodeNum))); + EnergyPlus::format("... Zone terminal unit outlet node name = {}", + state.dataLoopNodes->NodeID(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFTUOutletNodeNum))); ErrorsFound = true; } } @@ -6244,24 +6299,24 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).isInZone && state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ATMixerExists) { // check that OA flow in cooling must be set to zero when connected to DOAS if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolOutAirVolFlow != 0) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); - ShowContinueError(state, format(".. Cooling Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowContinueError(state, EnergyPlus::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."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolOutAirVolFlow = 0; } // check that OA flow in heating must be set to zero when connected to DOAS if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatOutAirVolFlow != 0) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); - ShowContinueError(state, format(".. Heating Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowContinueError(state, EnergyPlus::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."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatOutAirVolFlow = 0; } // check that OA flow in no cooling and no heating must be set to zero when connected to DOAS if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow != 0) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); - ShowContinueError(state, format(".. No Load Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowContinueError(state, EnergyPlus::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."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow = 0; @@ -6503,16 +6558,16 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow > state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate) { ShowWarningError(state, - format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); ShowContinueError(state, "... has Supply Air Flow Rate During Cooling Operation > Max Fan Volume Flow Rate, should be <="); ShowContinueError(state, - format("... Supply Air Flow Rate During Cooling Operation = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow)); + EnergyPlus::format("... Supply Air Flow Rate During Cooling Operation = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow)); ShowContinueError(state, - format("... Max Fan Volume Flow Rate = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); + EnergyPlus::format("... Max Fan Volume Flow Rate = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); ShowContinueError( state, "...the supply air flow rate during cooling operation will be reduced to match and the simulation continues."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate; @@ -6521,16 +6576,16 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxNoCoolAirVolFlow > state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate) { ShowWarningError(state, - format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); ShowContinueError(state, "... has Supply Air Flow Rate When No Cooling is Needed > Max Fan Volume Flow Rate, should be <="); ShowContinueError(state, - format("... Supply Air Flow Rate When No Cooling is Needed = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxNoCoolAirVolFlow)); + EnergyPlus::format("... Supply Air Flow Rate When No Cooling is Needed = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxNoCoolAirVolFlow)); ShowContinueError(state, - format("... Max Fan Volume Flow Rate = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); + EnergyPlus::format("... Max Fan Volume Flow Rate = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); ShowContinueError( state, "...the supply air flow rate when no cooling is needed will be reduced to match and the simulation continues."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxNoCoolAirVolFlow = @@ -6539,18 +6594,18 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolOutAirVolFlow > state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow) { ShowWarningError(state, - format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); ShowContinueError( state, "...The Outdoor Air Flow Rate During Cooling Operation exceeds the Supply Air Flow Rate During Cooling Operation."); ShowContinueError(state, - format("...Outdoor Air Flow Rate During Cooling Operation = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolOutAirVolFlow)); + EnergyPlus::format("...Outdoor Air Flow Rate During Cooling Operation = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolOutAirVolFlow)); ShowContinueError(state, - format("... Supply Air Flow Rate During Cooling Operation = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow)); + EnergyPlus::format("... Supply Air Flow Rate During Cooling Operation = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow)); ShowContinueError(state, "...the outdoor air flow rate will be reduced to match and the simulation continues."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolOutAirVolFlow = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow; } @@ -6558,16 +6613,16 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow > state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate) { ShowWarningError(state, - format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); ShowContinueError(state, "... has Supply Air Flow Rate During Heating Operation > Max Fan Volume Flow Rate, should be <="); ShowContinueError(state, - format("... Supply Air Flow Rate During Heating Operation = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow)); + EnergyPlus::format("... Supply Air Flow Rate During Heating Operation = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow)); ShowContinueError(state, - format("... Max Fan Volume Flow Rate = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); + EnergyPlus::format("... Max Fan Volume Flow Rate = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); ShowContinueError( state, "...the supply air flow rate during cooling operation will be reduced to match and the simulation continues."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate; @@ -6576,16 +6631,16 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxNoHeatAirVolFlow > state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate) { ShowWarningError(state, - format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); ShowContinueError(state, "... has Supply Air Flow Rate When No Heating is Needed > Max Fan Volume Flow Rate, should be <="); ShowContinueError(state, - format("... Supply Air Flow Rate When No Heating is Needed = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxNoHeatAirVolFlow)); + EnergyPlus::format("... Supply Air Flow Rate When No Heating is Needed = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxNoHeatAirVolFlow)); ShowContinueError(state, - format("... Max Fan Volume Flow Rate = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); + EnergyPlus::format("... Max Fan Volume Flow Rate = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); ShowContinueError( state, "...the supply air flow rate when no cooling is needed will be reduced to match and the simulation continues."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxNoHeatAirVolFlow = @@ -6594,18 +6649,18 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatOutAirVolFlow > state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow) { ShowWarningError(state, - format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); ShowContinueError( state, "...The Outdoor Air Flow Rate During Heating Operation exceeds the Supply Air Flow Rate During Heating Operation."); ShowContinueError(state, - format("...Outdoor Air Flow Rate During Heating Operation = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatOutAirVolFlow)); + EnergyPlus::format("...Outdoor Air Flow Rate During Heating Operation = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatOutAirVolFlow)); ShowContinueError(state, - format("... Supply Air Flow Rate During Heating Operation = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow)); + EnergyPlus::format("... Supply Air Flow Rate During Heating Operation = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow)); ShowContinueError(state, "...the outdoor air flow rate will be reduced to match and the simulation continues."); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatOutAirVolFlow = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow; } @@ -6613,17 +6668,17 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow > state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate) { ShowWarningError(state, - format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).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, - format("... Outdoor Air Flow Rate When No Cooling or Heating is Needed = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow)); + EnergyPlus::format("... Outdoor Air Flow Rate When No Cooling or Heating is Needed = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow)); ShowContinueError(state, - format("... Max Fan Volume Flow Rate = {:.4R} m3/s", - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); + EnergyPlus::format("... Max Fan Volume Flow Rate = {:.4R} m3/s", + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).ActualFanVolFlowRate)); ShowContinueError(state, "...the outdoor air flow rate when no cooling or heating is needed will be reduced to match and the " "simulation continues."); @@ -6742,25 +6797,26 @@ 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, - format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + EnergyPlus::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, - format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError( + state, EnergyPlus::format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); } else { - ShowContinueError(state, - format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError( + state, + EnergyPlus::format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); } ShowContinueError(state, - format("... Cooling Minimum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATCooling)); + EnergyPlus::format("... Cooling Minimum Outdoor Unit Inlet Temperature = {:.3T}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATCooling)); ShowContinueError(state, - format("... Cooling Maximum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATCooling)); + EnergyPlus::format("... Cooling Maximum Outdoor Unit Inlet Temperature = {:.3T}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATCooling)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Cooling Mode limits."); } ShowRecurringWarningErrorAtEnd(state, @@ -6776,24 +6832,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, - format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + EnergyPlus::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, format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError( + state, EnergyPlus::format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); } else { - ShowContinueError(state, - format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError( + state, EnergyPlus::format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); } ShowContinueError(state, - format("... Cooling Minimum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATCooling)); + EnergyPlus::format("... Cooling Minimum Outdoor Unit Inlet Temperature = {:.3T}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATCooling)); ShowContinueError(state, - format("... Cooling Maximum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATCooling)); + EnergyPlus::format("... Cooling Maximum Outdoor Unit Inlet Temperature = {:.3T}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATCooling)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Cooling Mode limits."); } ShowRecurringWarningErrorAtEnd(state, @@ -6839,25 +6896,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, - format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + EnergyPlus::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, - format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError( + state, EnergyPlus::format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); } else { - ShowContinueError(state, - format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError( + state, EnergyPlus::format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); } ShowContinueError(state, - format("... Heating Minimum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeating)); + EnergyPlus::format("... Heating Minimum Outdoor Unit Inlet Temperature = {:.3T}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeating)); ShowContinueError(state, - format("... Heating Maximum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeating)); + EnergyPlus::format("... Heating Maximum Outdoor Unit Inlet Temperature = {:.3T}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeating)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Heating Mode limits."); } ShowRecurringWarningErrorAtEnd(state, @@ -6873,23 +6930,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, - format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + EnergyPlus::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, format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError( + state, EnergyPlus::format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); } else { - ShowContinueError(state, format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError( + state, EnergyPlus::format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); } ShowContinueError(state, - format("... Heating Minimum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeating)); + EnergyPlus::format("... Heating Minimum Outdoor Unit Inlet Temperature = {:.3T}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeating)); ShowContinueError(state, - format("... Heating Maximum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeating)); + EnergyPlus::format("... Heating Maximum Outdoor Unit Inlet Temperature = {:.3T}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeating)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Heating Mode limits."); } ShowRecurringWarningErrorAtEnd(state, @@ -7293,19 +7352,20 @@ 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, - format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + EnergyPlus::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, format("... Outdoor Dry-Bulb Temperature = {:.3T}", OutsideDryBulbTemp)); ShowContinueError(state, - format("... Heat Recovery Minimum Outdoor Dry-Bulb Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeatRecovery)); + EnergyPlus::format("... Outdoor Dry-Bulb Temperature = {:.3T}", OutsideDryBulbTemp)); ShowContinueError(state, - format("... Heat Recovery Maximum Outdoor Dry-Bulb Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeatRecovery)); + 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)); 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."); } @@ -7361,12 +7421,12 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } else { if (state.dataHVACVarRefFlow->VRF(VRFCond).HPOperatingModeErrorIndex == 0) { ShowWarningMessage(state, - format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); - ShowContinueError( - state, - format("...InitVRF: Illegal HP operating mode = {:.0T}", state.dataHVACVarRefFlow->VRF(VRFCond).EMSValueForHPOperatingMode)); + 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)); ShowContinueError(state, "...InitVRF: VRF HP operating mode will not be controlled by EMS."); } ShowRecurringWarningErrorAtEnd(state, @@ -7440,10 +7500,11 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool SetAverageAirFlow(state, VRFTUNum, 0.0, OnOffAirFlowRatio); if (ErrorsFound) { - ShowFatalError(state, - format("{}: Errors found in getting ZoneHVAC:TerminalUnit:VariableRefrigerantFlow system input. Preceding condition(s) " - "causes termination.", - RoutineName)); + ShowFatalError( + state, + EnergyPlus::format("{}: Errors found in getting ZoneHVAC:TerminalUnit:VariableRefrigerantFlow system input. Preceding condition(s) " + "causes termination.", + RoutineName)); } } @@ -8196,15 +8257,16 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if ((std::abs(CoolOutAirVolFlowDes - CoolOutAirVolFlowUser) / CoolOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", + CoolOutAirVolFlowUser)); ShowContinueError( state, - format("User-Specified Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", CoolOutAirVolFlowUser)); - ShowContinueError(state, - format("differs from Design Size Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", - CoolOutAirVolFlowDes)); + EnergyPlus::format("differs from Design Size Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", + CoolOutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8271,15 +8333,16 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if ((std::abs(HeatOutAirVolFlowDes - HeatOutAirVolFlowUser) / HeatOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", + HeatOutAirVolFlowUser)); ShowContinueError( state, - format("User-Specified Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", HeatOutAirVolFlowUser)); - ShowContinueError(state, - format("differs from Design Size Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", - HeatOutAirVolFlowDes)); + EnergyPlus::format("differs from Design Size Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", + HeatOutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8358,16 +8421,18 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if ((std::abs(NoCoolHeatOutAirVolFlowDes - NoCoolHeatOutAirVolFlowUser) / NoCoolHeatOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], - state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); - ShowContinueError(state, - format("User-Specified Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", - NoCoolHeatOutAirVolFlowUser)); + EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", + tuTypeNames[(int)state.dataHVACVarRefFlow->VRFTU(VRFTUNum).type], + state.dataHVACVarRefFlow->VRFTU(VRFTUNum).Name)); + ShowContinueError( + state, + EnergyPlus::format("User-Specified Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", + NoCoolHeatOutAirVolFlowUser)); ShowContinueError( state, - format("differs from Design Size Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", - NoCoolHeatOutAirVolFlowDes)); + EnergyPlus::format( + "differs from Design Size Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", + NoCoolHeatOutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8547,13 +8612,14 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(CoolingCapacityDes - CoolingCapacityUser) / CoolingCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); - ShowContinueError(state, - format("User-Specified Rated Total Cooling Capacity (gross) of {:.2R} [W]", CoolingCapacityUser)); + EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError( - state, format("differs from Design Size Rated Total Cooling Capacity (gross) of {:.2R} [W]", CoolingCapacityDes)); + state, EnergyPlus::format("User-Specified Rated Total Cooling Capacity (gross) of {:.2R} [W]", CoolingCapacityUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Rated Total Cooling Capacity (gross) of {:.2R} [W]", + CoolingCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8597,12 +8663,13 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(HeatingCapacityDes - HeatingCapacityUser) / HeatingCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); - ShowContinueError(state, format("User-Specified Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityUser)); + EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError(state, - format("differs from Design Size Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityDes)); + EnergyPlus::format("User-Specified Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8755,23 +8822,27 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(CoolingCapacityDes - CoolingCapacityUser) / CoolingCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); - ShowContinueError(state, format("User-Specified Rated Total Cooling Capacity (gross) of {:.2R} [W]", CoolingCapacityUser)); - ShowContinueError(state, - format("differs from Design Size Rated Total Cooling Capacity (gross) of {:.2R} [W]", CoolingCapacityDes)); + EnergyPlus::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, + EnergyPlus::format("differs from Design Size Rated Total Cooling Capacity (gross) of {:.2R} [W]", CoolingCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } if ((std::abs(HeatingCapacityDes - HeatingCapacityUser) / HeatingCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); - ShowContinueError(state, format("User-Specified Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityUser)); - ShowContinueError(state, format("differs from Design Size Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityDes)); + EnergyPlus::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( + state, EnergyPlus::format("differs from Design Size Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8810,12 +8881,14 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DefrostCapacityDes - DefrostCapacityUser) / DefrostCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); - ShowContinueError(state, format("User-Specified Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityUser)); - ShowContinueError(state, - format("differs from Design Size Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityDes)); + EnergyPlus::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( + state, + EnergyPlus::format("differs from Design Size Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8850,14 +8923,15 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if ((std::abs(EvapCondAirVolFlowRateDes - EvapCondAirVolFlowRateUser) / EvapCondAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); - ShowContinueError( - state, format("User-Specified Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", EvapCondAirVolFlowRateUser)); - ShowContinueError( - state, - format("differs from Design Size Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", EvapCondAirVolFlowRateDes)); + EnergyPlus::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)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", + EvapCondAirVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -8893,15 +8967,16 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if ((std::abs(EvapCondPumpPowerDes - EvapCondPumpPowerUser) / EvapCondPumpPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); + EnergyPlus::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)); ShowContinueError( state, - format("User-Specified Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", EvapCondPumpPowerUser)); - ShowContinueError(state, - format("differs from Design Size Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", - EvapCondPumpPowerDes)); + EnergyPlus::format("differs from Design Size Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", + EvapCondPumpPowerDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -9024,7 +9099,7 @@ void VRFCondenserEquipment::SizeVRFCondenser(EnergyPlusData &state) } else { ShowSevereError(state, "Autosizing of condenser water flow rate requires a condenser loop Sizing:Plant object"); - ShowContinueError(state, format("... occurs in AirConditioner:VariableRefrigerantFlow object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("... occurs in AirConditioner:VariableRefrigerantFlow object={}", this->Name)); ShowContinueError(state, "... plant loop name must be referenced in Sizing:Plant object"); ErrorsFound = true; } @@ -9451,11 +9526,12 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, if (SolFla == -1) { if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag) { if (this->IterLimitExceeded == 0) { - ShowWarningMessage(state, format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); ShowContinueError( state, - format(" Iteration limit exceeded calculating terminal unit part-load ratio, maximum iterations = {}", MaxIte)); - ShowContinueErrorTimeStamp(state, format(" Part-load ratio returned = {:.3R}", PartLoadRatio)); + EnergyPlus::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) { // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control @@ -9466,39 +9542,41 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, this->CalcVRF(state, VRFTUNum, FirstHVACIteration, PartLoadRatio, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); } - ShowContinueError(state, format(" Load requested = {:.5T}, Load delivered = {:.5T}", QZnReq, TempOutput)); - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), - this->IterLimitExceeded); + 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); } else { - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), - this->IterLimitExceeded); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::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, format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); + ShowWarningMessage(state, EnergyPlus::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, - format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + EnergyPlus::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, - format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + EnergyPlus::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), thisVRFTU.FirstIterfailed); } } @@ -9507,23 +9585,23 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, } else if (SolFla == -2) { if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag) { if (thisVRFTU.FirstIterfailed == 0) { - ShowWarningMessage(state, format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); + ShowWarningMessage(state, EnergyPlus::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, - format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", - tuTypeNames[(int)this->type], - " \"" + this->Name), + EnergyPlus::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, - format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + EnergyPlus::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), this->FirstIterfailed); } } @@ -9984,7 +10062,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, format("isVRFCoilPresent: Could not find VRF TU = \"{}\"", VRFTUName)); + ShowSevereError(state, EnergyPlus::format("isVRFCoilPresent: Could not find VRF TU = \"{}\"", VRFTUName)); } } @@ -10762,7 +10840,7 @@ int GetVRFTUOutAirNodeFromName(EnergyPlusData &state, std::string const &VRFTUNa if (WhichVRFTU != 0) { NodeNum = state.dataHVACVarRefFlow->VRFTU(WhichVRFTU).VRFTUOutletNodeNum; } else { - ShowSevereError(state, format("GetVRFTUOutAirNodeFromName: Could not find VRF TU = \"{}\"", VRFTUName)); + ShowSevereError(state, EnergyPlus::format("GetVRFTUOutAirNodeFromName: Could not find VRF TU = \"{}\"", VRFTUName)); errorsFound = true; NodeNum = 0; } @@ -10784,7 +10862,7 @@ int GetVRFTUInAirNodeFromName(EnergyPlusData &state, std::string const &VRFTUNam if (WhichVRFTU != 0) { NodeNum = state.dataHVACVarRefFlow->VRFTU(WhichVRFTU).VRFTUInletNodeNum; } else { - ShowSevereError(state, format("GetVRFTUInAirNodeFromName: Could not find VRF TU = \"{}\"", VRFTUName)); + ShowSevereError(state, EnergyPlus::format("GetVRFTUInAirNodeFromName: Could not find VRF TU = \"{}\"", VRFTUName)); errorsFound = true; NodeNum = 0; } @@ -11729,16 +11807,17 @@ 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, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), this->Name)); - ShowContinueErrorTimeStamp(state, - format(" Evaporative Capacity at max speed is smaller than evaporative capacity at min speed, " - "{:.3T} < {:.3T}", - CompEvaporatingCAPSpdMaxCurrentTsuc, - CompEvaporatingCAPSpdMin)); + 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)); } ShowRecurringSevereErrorAtEnd( state, - format("\"{}\" - Evaporative Capacity at max speed is smaller than evaporative capacity at min speed ", this->Name), + EnergyPlus::format("\"{}\" - Evaporative Capacity at max speed is smaller than evaporative capacity at min speed ", this->Name), this->CondenserCapErrIdx, CompEvaporatingCAPSpdMaxCurrentTsuc - CompEvaporatingCAPSpdMin, CompEvaporatingCAPSpdMaxCurrentTsuc - CompEvaporatingCAPSpdMin); @@ -12142,26 +12221,29 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c if (DefrostEIRTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag) { if (this->DefrostHeatErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), this->Name)); + ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), this->Name)); ShowContinueError( state, - format(" Defrost Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - DefrostEIRTempModFac)); - ShowContinueError(state, - 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)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + this->DefrostHeatErrorIndex, + DefrostEIRTempModFac, + DefrostEIRTempModFac); DefrostEIRTempModFac = 0.0; } } @@ -12760,24 +12842,26 @@ void VRFTerminalUnitEquipment::ControlVRF_FluidTCtrl(EnergyPlusData &state, if (SolFla == -1) { if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag) { if (this->IterLimitExceeded == 0) { - ShowWarningMessage(state, format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); + ShowWarningMessage(state, EnergyPlus::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); ShowContinueError( - state, format(" Iteration limit exceeded calculating terminal unit part-load ratio, maximum iterations = {}", MaxIte)); - ShowContinueErrorTimeStamp(state, format(" Part-load ratio returned = {:.3R}", PartLoadRatio)); + state, + EnergyPlus::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, format(" Load requested = {:.5T}, Load delivered = {:.5T}", QZnReq, TempOutput)); + ShowContinueError(state, EnergyPlus::format(" Load requested = {:.5T}, Load delivered = {:.5T}", QZnReq, TempOutput)); ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + EnergyPlus::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), this->IterLimitExceeded); } else { ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + EnergyPlus::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), this->IterLimitExceeded); } } @@ -13272,9 +13356,9 @@ void VRFCondenserEquipment::VRFOU_TeTc(EnergyPlusData &state, if (m_air <= 0) { TeTc = this->CondensingTemp; - ShowSevereMessage(state, format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit refrigerant temperature."); - ShowContinueError(state, format(" Default condensing temperature is used: {:.3T}", TeTc)); + ShowContinueError(state, EnergyPlus::format(" Default condensing temperature is used: {:.3T}", TeTc)); } BF = this->RateBFOUCond; // 0.219; @@ -13290,9 +13374,9 @@ void VRFCondenserEquipment::VRFOU_TeTc(EnergyPlusData &state, if (m_air <= 0) { TeTc = this->EvaporatingTemp; - ShowSevereMessage(state, format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit refrigerant temperature."); - ShowContinueError(state, format(" Default condensing temperature is used: {:.3T}", TeTc)); + ShowContinueError(state, EnergyPlus::format(" Default condensing temperature is used: {:.3T}", TeTc)); } BF = this->RateBFOUEvap; // 0.45581; @@ -13355,7 +13439,7 @@ Real64 VRFCondenserEquipment::VRFOU_Cap(EnergyPlusData &state, if (OperationMode == HXOpMode::CondMode) { // IU Cooling: OperationMode 0 if (m_air <= 0) { - ShowSevereMessage(state, format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit capacity."); } @@ -13368,7 +13452,7 @@ Real64 VRFCondenserEquipment::VRFOU_Cap(EnergyPlusData &state, } else if (OperationMode == HXOpMode::EvapMode) { // IU Heating: OperationMode 1 if (m_air <= 0) { - ShowSevereMessage(state, format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit capacity."); } @@ -13392,7 +13476,7 @@ Real64 VRFCondenserEquipment::VRFOU_Cap(EnergyPlusData &state, } else { // Should not come here - ShowSevereMessage(state, format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); ShowContinueError(state, " The operational mode is not correctly set in the function VRFOU_Cap."); } @@ -13466,7 +13550,7 @@ Real64 VRFCondenserEquipment::VRFOU_FlowRate(EnergyPlusData &state, } else { // Should not come here - ShowSevereMessage(state, format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); ShowContinueError(state, " The operational mode is not correctly set in the function VRFOU_Cap."); } @@ -13514,7 +13598,7 @@ Real64 VRFCondenserEquipment::VRFOU_SCSH(EnergyPlusData &state, if (OperationMode == HXOpMode::CondMode) { // Cooling: OperationMode 0 if (m_air <= 0) { - ShowSevereMessage(state, format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit subcooling."); } @@ -13533,7 +13617,7 @@ Real64 VRFCondenserEquipment::VRFOU_SCSH(EnergyPlusData &state, } else if (OperationMode == HXOpMode::EvapMode) { // Heating: OperationMode 1 if (m_air <= 0) { - ShowSevereMessage(state, format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit super heating."); } @@ -13564,7 +13648,7 @@ Real64 VRFCondenserEquipment::VRFOU_SCSH(EnergyPlusData &state, } else { // Should not come here - ShowSevereMessage(state, format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); + ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); ShowContinueError(state, " The operational mode is not correctly set in the function VRFOU_Cap."); } @@ -14221,9 +14305,10 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, if (SolFla == -1) { // show error not converging if (LowLoadTeIterError == 0) { - ShowWarningMessage(state, format("{}: low load Te adjustment failed for {}", RoutineName, this->Name)); + ShowWarningMessage(state, EnergyPlus::format("{}: low load Te adjustment failed for {}", RoutineName, this->Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Iteration limit [{}] exceeded in calculating OU evaporating temperature", MaxIter)); + ShowContinueError( + state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating OU evaporating temperature", MaxIter)); } ShowRecurringWarningErrorAtEnd(state, "Low load calculation Te solution iteration limit exceeded error continues.", @@ -14237,10 +14322,11 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, SmallLoadTe = MinOutdoorUnitTe; this->LowLoadTeError2Neg++; if (LowLoadTeError2Neg < 5) { - ShowWarningMessage(state, - format("{}: no Te solution was found for {}, as load < capacity for the whole range of Te", - RoutineName, - this->Name)); + ShowWarningMessage( + state, + EnergyPlus::format("{}: no Te solution was found for {}, as load < capacity for the whole range of Te", + RoutineName, + this->Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( @@ -14255,10 +14341,11 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, SmallLoadTe = T_suction; this->LowLoadTeError2PosTsuc++; if (LowLoadTeError2PosTsuc < 5) { - ShowWarningMessage(state, - format("{}: no Te solution was found for {}, as load > capacity for the full range of Te", - RoutineName, - this->Name)); + ShowWarningMessage( + state, + EnergyPlus::format("{}: no Te solution was found for {}, as load > capacity for the full range of Te", + RoutineName, + this->Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( @@ -14272,10 +14359,11 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, SmallLoadTe = MinOutdoorUnitTe; this->LowLoadTeError2PosOUTe++; if (LowLoadTeError2PosOUTe < 5) { - ShowWarningMessage(state, - format("{}: no Te solution was found for {}, as load > capacity for the full range of Te", - RoutineName, - this->Name)); + ShowWarningMessage( + state, + EnergyPlus::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 c96605d2e73..7bd79ab56fc 100644 --- a/src/EnergyPlus/HWBaseboardRadiator.cc +++ b/src/EnergyPlus/HWBaseboardRadiator.cc @@ -138,25 +138,25 @@ namespace HWBaseboardRadiator { if (CompIndex == 0) { BaseboardNum = Util::FindItemInList(EquipName, state.dataHWBaseboardRad->HWBaseboard, &HWBaseboardParams::Name); if (BaseboardNum == 0) { - ShowFatalError(state, format("SimHWBaseboard: Unit not found={}", EquipName)); + ShowFatalError(state, EnergyPlus::format("SimHWBaseboard: Unit not found={}", EquipName)); } CompIndex = BaseboardNum; } else { BaseboardNum = CompIndex; if (BaseboardNum > NumHWBaseboards || BaseboardNum < 1) { ShowFatalError(state, - format("SimHWBaseboard: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - BaseboardNum, - NumHWBaseboards, - EquipName)); + EnergyPlus::format("SimHWBaseboard: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + BaseboardNum, + NumHWBaseboards, + EquipName)); } if (state.dataHWBaseboardRad->CheckEquipName(BaseboardNum)) { if (EquipName != state.dataHWBaseboardRad->HWBaseboard(BaseboardNum).Name) { ShowFatalError(state, - format("SimHWBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - BaseboardNum, - EquipName, - state.dataHWBaseboardRad->HWBaseboard(BaseboardNum).Name)); + EnergyPlus::format("SimHWBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + BaseboardNum, + EquipName, + state.dataHWBaseboardRad->HWBaseboard(BaseboardNum).Name)); } state.dataHWBaseboardRad->CheckEquipName(BaseboardNum) = false; } @@ -204,8 +204,8 @@ namespace HWBaseboardRadiator { HWBaseboard.plantLoc); } break; default: { - ShowSevereError(state, format("SimBaseboard: Errors in Baseboard={}", HWBaseboard.Name)); - ShowContinueError(state, format("Invalid or unimplemented equipment type={}", HWBaseboard.EquipType)); + ShowSevereError(state, EnergyPlus::format("SimBaseboard: Errors in Baseboard={}", HWBaseboard.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid or unimplemented equipment type={}", HWBaseboard.EquipType)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -217,7 +217,7 @@ namespace HWBaseboardRadiator { ReportHWBaseboard(state, BaseboardNum); } else { - ShowFatalError(state, format("SimHWBaseboard: Unit not found={}", EquipName)); + ShowFatalError(state, EnergyPlus::format("SimHWBaseboard: Unit not found={}", EquipName)); } } @@ -310,57 +310,63 @@ namespace HWBaseboardRadiator { if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatCapacityPerFloorAreaNumericNum)) { thisHWBaseboardDesign.ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum); if (thisHWBaseboardDesign.ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); + ShowSevereError(state, + EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (thisHWBaseboardDesign.ScaledHeatingCapacity == DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); + ShowSevereError(state, + EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = Autosize", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); + ShowSevereError(state, + EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, - format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } } else if (thisHWBaseboardDesign.HeatingCapMethod == DataSizing::DesignSizingType::FractionOfAutosizedHeatingCapacity) { if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatFracOfAutosizedCapacityNumericNum)) { thisHWBaseboardDesign.ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum); if (thisHWBaseboardDesign.ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); + ShowSevereError(state, + EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); + ShowSevereError(state, + EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, - format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + 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))); ErrorsFound = true; } } @@ -369,56 +375,56 @@ namespace HWBaseboardRadiator { // Set default convergence tolerance if (thisHWBaseboardDesign.Offset <= 0.0) { ShowWarningError(state, - format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water_Design, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(3))); - ShowContinueError(state, format("...reset to a default value=[{:.2R}].", MaxFraction)); + EnergyPlus::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; } thisHWBaseboardDesign.FracRadiant = state.dataIPShortCut->rNumericArgs(4); if (thisHWBaseboardDesign.FracRadiant < MinFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxFraction)); + EnergyPlus::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; } thisHWBaseboardDesign.FracDistribPerson = state.dataIPShortCut->rNumericArgs(5); if (thisHWBaseboardDesign.FracDistribPerson < MinFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(5))); - ShowContinueError(state, format("...reset to minimum value=[{:.3R}].", MinFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(5))); - ShowContinueError(state, format("...reset to maximum value=[{:.3R}].", MaxFraction)); + EnergyPlus::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; } } @@ -506,21 +512,21 @@ namespace HWBaseboardRadiator { thisHWBaseboard.WaterTempAvg = state.dataIPShortCut->rNumericArgs(1); if (thisHWBaseboard.WaterTempAvg > MaxWaterTempAvg + 0.001) { ShowWarningError(state, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(1))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxWaterTempAvg)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(1))); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinWaterTempAvg)); + EnergyPlus::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; } @@ -528,12 +534,12 @@ namespace HWBaseboardRadiator { if (thisHWBaseboard.WaterMassFlowRateStd < LowWaterMassFlowRate - 0.0001 || thisHWBaseboard.WaterMassFlowRateStd > HighWaterMassFlowRate + 0.0001) { ShowWarningError(state, - format("{}{}=\"{}\", {} is an invalid Standard Water mass flow rate.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(2))); - ShowContinueError(state, format("...reset to a default value=[{:.1R}].", WaterMassFlowDefault)); + EnergyPlus::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; } @@ -543,21 +549,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, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Blank field not allowed for {}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (thisHWBaseboard.HeatingCapMethod == DataSizing::CapacityPerFloorArea) { @@ -567,42 +574,42 @@ namespace HWBaseboardRadiator { thisHWBaseboard.ScaledHeatingCapacity = HWBaseboardDesignDataObject.ScaledHeatingCapacity; } else { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); ShowContinueError(state, - format("Illegal {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + EnergyPlus::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, - format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinWaterFlowRate)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxWaterFlowRate)); + EnergyPlus::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; } // Remaining fraction is added to the zone as convective heat transfer if (HWBaseboardDesignDataObject.FracRadiant > MaxFraction) { ShowWarningError(state, - format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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 { @@ -621,7 +628,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, format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); + ShowContinueError(state, EnergyPlus::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); ErrorsFound = true; thisHWBaseboard.TotSurfToDistrib = 0; // error } @@ -646,22 +653,22 @@ namespace HWBaseboardRadiator { thisHWBaseboard.FracDistribToSurf(SurfNum) = state.dataIPShortCut->rNumericArgs(SurfNum + 4); if (thisHWBaseboard.FracDistribToSurf(SurfNum) > MaxFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {}was greater than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(SurfNum + 4))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {}was less than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(SurfNum + 4))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MinFraction)); + EnergyPlus::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; } if (thisHWBaseboard.SurfacePtr(SurfNum) != 0) { @@ -674,26 +681,26 @@ namespace HWBaseboardRadiator { if (AllFracsSummed > (MaxFraction + 0.01)) { ShowSevereError(state, - format("{}{}=\"{}\", Summed radiant fractions for people + surface groups > 1.0", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, format("{}{}Errors found getting input. Program terminates.", RoutineName, cCMO_BBRadiator_Water)); + ShowFatalError(state, EnergyPlus::format("{}{}Errors found getting input. Program terminates.", RoutineName, cCMO_BBRadiator_Water)); } // Setup Report variables for the Coils @@ -1091,13 +1098,15 @@ namespace HWBaseboardRadiator { if ((std::abs(WaterVolFlowRateMaxDes - WaterVolFlowRateMaxUser) / WaterVolFlowRateMaxUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHWBaseboard: Potential issue with equipment sizing for " - "ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", - hWBaseboard.Name)); - ShowContinueError(state, - format("User-Specified Maximum Water Flow Rate of {:.5R} [m3/s]", WaterVolFlowRateMaxUser)); + EnergyPlus::format("SizeHWBaseboard: Potential issue with equipment sizing for " + "ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", + hWBaseboard.Name)); ShowContinueError( - state, format("differs from Design Size Maximum Water Flow Rate of {:.5R} [m3/s]", WaterVolFlowRateMaxDes)); + state, + EnergyPlus::format("User-Specified Maximum Water Flow Rate of {:.5R} [m3/s]", WaterVolFlowRateMaxUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Water Flow Rate of {:.5R} [m3/s]", + WaterVolFlowRateMaxDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1127,23 +1136,27 @@ namespace HWBaseboardRadiator { hWBaseboard.AirMassFlowRateStd = AirMassFlowRate; // Check Ta,out < Tw,in if (AirOutletTempStd >= WaterInletTempStd) { - ShowSevereError(state, format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); + ShowSevereError(state, + EnergyPlus::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); ShowContinueError(state, "...Air Outlet temperature must be below the Water Inlet temperature"); - ShowContinueError( - state, - format("...Air Outlet Temperature=[{:.2R}], Water Inlet Temperature=[{:.2R}].", AirOutletTempStd, WaterInletTempStd)); + ShowContinueError(state, + EnergyPlus::format("...Air Outlet Temperature=[{:.2R}], Water Inlet Temperature=[{:.2R}].", + AirOutletTempStd, + WaterInletTempStd)); AirOutletTempStd = WaterInletTempStd - 0.01; - ShowContinueError(state, format("...Air Outlet Temperature set to [{:.2R}].", AirOutletTempStd)); + ShowContinueError(state, EnergyPlus::format("...Air Outlet Temperature set to [{:.2R}].", AirOutletTempStd)); } // Check Tw,out < Ta,in if (AirInletTempStd >= WaterOutletTempStd) { - ShowSevereError(state, format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); + ShowSevereError(state, + EnergyPlus::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); ShowContinueError(state, "...Water Outlet temperature must be below the Air Inlet temperature"); - ShowContinueError( - state, - format("...Air Inlet Temperature=[{:.2R}], Water Outlet Temperature=[{:.2R}].", AirInletTempStd, WaterOutletTempStd)); + ShowContinueError(state, + EnergyPlus::format("...Air Inlet Temperature=[{:.2R}], Water Outlet Temperature=[{:.2R}].", + AirInletTempStd, + WaterOutletTempStd)); WaterOutletTempStd = AirInletTempStd + 0.01; - ShowContinueError(state, format("...Water Outlet Temperature set to [{:.2R}].", WaterOutletTempStd)); + ShowContinueError(state, EnergyPlus::format("...Water Outlet Temperature set to [{:.2R}].", WaterOutletTempStd)); } // LMTD calculation DeltaT1 = WaterInletTempStd - AirOutletTempStd; @@ -1161,7 +1174,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, format("Occurs in Hot Water Baseboard Heater={}", hWBaseboard.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Hot Water Baseboard Heater={}", hWBaseboard.Name)); ErrorsFound = true; } // calculate UA from rated capacities @@ -1180,21 +1193,27 @@ namespace HWBaseboardRadiator { // Check Ta,out < Tw,in if (AirOutletTempStd >= WaterInletTempStd) { - ShowSevereError(state, format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); + ShowSevereError(state, + EnergyPlus::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); ShowContinueError(state, "...Air Outlet temperature must be below the Water Inlet temperature"); - ShowContinueError( - state, format("...Air Outlet Temperature=[{:.2R}], Water Inlet Temperature=[{:.2R}].", AirOutletTempStd, WaterInletTempStd)); + ShowContinueError(state, + EnergyPlus::format("...Air Outlet Temperature=[{:.2R}], Water Inlet Temperature=[{:.2R}].", + AirOutletTempStd, + WaterInletTempStd)); AirOutletTempStd = WaterInletTempStd - 0.01; - ShowContinueError(state, format("...Air Outlet Temperature set to [{:.2R}].", AirOutletTempStd)); + ShowContinueError(state, EnergyPlus::format("...Air Outlet Temperature set to [{:.2R}].", AirOutletTempStd)); } // Check Tw,out < Ta,in if (AirInletTempStd >= WaterOutletTempStd) { - ShowSevereError(state, format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); + ShowSevereError(state, + EnergyPlus::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); ShowContinueError(state, "...Water Outlet temperature must be below the Air Inlet temperature"); - ShowContinueError( - state, format("...Air Inlet Temperature=[{:.2R}], Water Outlet Temperature=[{:.2R}].", AirInletTempStd, WaterOutletTempStd)); + ShowContinueError(state, + EnergyPlus::format("...Air Inlet Temperature=[{:.2R}], Water Outlet Temperature=[{:.2R}].", + AirInletTempStd, + WaterOutletTempStd)); WaterOutletTempStd = AirInletTempStd + 0.01; - ShowContinueError(state, format("...Water Outlet Temperature set to [{:.2R}].", WaterOutletTempStd)); + ShowContinueError(state, EnergyPlus::format("...Water Outlet Temperature set to [{:.2R}].", WaterOutletTempStd)); } // LMTD calculation DeltaT1 = WaterInletTempStd - AirOutletTempStd; @@ -1494,19 +1513,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, format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_BBRadiator_Water, thisHWBB.Name)); - ShowContinueError(state, format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); - ShowContinueError(state, format("Assign a larger surface area or more surfaces in {}", cCMO_BBRadiator_Water)); + ShowContinueError(state, EnergyPlus::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("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); + ShowContinueError(state, EnergyPlus::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, format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); - ShowContinueError(state, format("Occurs in {} = {}", cCMO_BBRadiator_Water, thisHWBB.Name)); - ShowContinueError(state, format("Assign a larger surface area or more surfaces in {}", cCMO_BBRadiator_Water)); + ShowContinueError(state, EnergyPlus::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)); ShowFatalError(state, "DistributeBBRadGains: surface not large enough to receive thermal radiation heat flux"); } } @@ -1559,7 +1578,7 @@ namespace HWBaseboardRadiator { if (CompIndex == 0) { BaseboardNum = Util::FindItemInList(BaseboardName, state.dataHWBaseboardRad->HWBaseboard, &HWBaseboardParams::Name); if (BaseboardNum == 0) { - ShowFatalError(state, format("UpdateHWBaseboardPlantConnection: Specified baseboard not valid ={}", BaseboardName)); + ShowFatalError(state, EnergyPlus::format("UpdateHWBaseboardPlantConnection: Specified baseboard not valid ={}", BaseboardName)); } CompIndex = BaseboardNum; } else { @@ -1567,27 +1586,30 @@ namespace HWBaseboardRadiator { if (BaseboardNum > NumHWBaseboards || BaseboardNum < 1) { ShowFatalError( state, - format("UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, Number of baseboards={}, Entered baseboard name={}", - BaseboardNum, - NumHWBaseboards, - BaseboardName)); + EnergyPlus::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, - format("UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard Name " - "for that index={}", - BaseboardNum, - 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)); } if (BaseboardTypeNum != static_cast(DataPlant::PlantEquipmentType::Baseboard_Rad_Conv_Water)) { - ShowFatalError(state, - format("UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard Name " - "for that index={}", - BaseboardNum, - BaseboardName, - DataPlant::PlantEquipTypeNames[BaseboardTypeNum])); + ShowFatalError( + state, + EnergyPlus::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 2e832cfb1ef..17adb5fe11c 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.cc +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.cc @@ -179,8 +179,9 @@ namespace HeatBalFiniteDiffManager { s_hbfd->CondFDSchemeType = static_cast(getEnumValue(CondFDSchemeTypeNamesUC, Util::makeUPPER(s_ipsc->cAlphaArgs(1)))); if (s_hbfd->CondFDSchemeType == CondFDScheme::Invalid) { - ShowSevereError(state, - format("{}: invalid {} entered={}, must match CrankNicholsonSecondOrder or FullyImplicitFirstOrder.", + ShowSevereError( + state, + EnergyPlus::format("{}: invalid {} entered={}, must match CrankNicholsonSecondOrder or FullyImplicitFirstOrder.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); @@ -242,8 +243,9 @@ namespace HeatBalFiniteDiffManager { auto const *mat = state.dataMaterial->materials(matNum); if (mat->group != Material::Group::Regular) { - ShowSevereError(state, - format("{}: Reference Material is not appropriate type for CondFD properties, material={}, must have regular " + ShowSevereError( + state, + EnergyPlus::format("{}: Reference Material is not appropriate type for CondFD properties, material={}, must have regular " "properties (L,Cp,K,D)", s_ipsc->cCurrentModuleObject, mat->Name)); @@ -256,8 +258,10 @@ namespace HeatBalFiniteDiffManager { matFD.tk1 = MaterialProps(1); matFD.numTempEnth = (MaterialNumProp - 1) / 2; if (matFD.numTempEnth * 2 != (MaterialNumProp - 1)) { - ShowSevereError(state, format("GetCondFDInput: {}=\"{}\", mismatched pairs", s_ipsc->cCurrentModuleObject, MaterialNames(1))); - ShowContinueError(state, format("...expected {} pairs, but only entered {} numbers.", matFD.numTempEnth, MaterialNumProp - 1)); + ShowSevereError( + state, EnergyPlus::format("GetCondFDInput: {}=\"{}\", mismatched pairs", s_ipsc->cCurrentModuleObject, MaterialNames(1))); + ShowContinueError( + state, EnergyPlus::format("...expected {} pairs, but only entered {} numbers.", matFD.numTempEnth, MaterialNumProp - 1)); ErrorsFound = true; } matFD.TempEnth.dimension(2, matFD.numTempEnth, 0.0); @@ -284,12 +288,14 @@ namespace HeatBalFiniteDiffManager { break; } if (nonInc) { - ShowSevereError(state, - format("GetCondFDInput: {}=\"{}\", non increasing Temperatures. Temperatures must be strictly increasing.", + ShowSevereError( + state, + EnergyPlus::format("GetCondFDInput: {}=\"{}\", non increasing Temperatures. Temperatures must be strictly increasing.", s_ipsc->cCurrentModuleObject, MaterialNames(1))); - ShowContinueError(state, - format("...occurs first at item=[{}], value=[{:.2R}].", fmt::to_string(inegptr), matFD.TempEnth(1, inegptr))); + ShowContinueError( + state, + EnergyPlus::format("...occurs first at item=[{}], value=[{:.2R}].", fmt::to_string(inegptr), matFD.TempEnth(1, inegptr))); ErrorsFound = true; } nonInc = false; @@ -303,9 +309,11 @@ namespace HeatBalFiniteDiffManager { break; } if (nonInc) { - ShowSevereError(state, - format("GetCondFDInput: {}=\"{}\", non increasing Enthalpy.", s_ipsc->cCurrentModuleObject, MaterialNames(1))); - ShowContinueError(state, format("...occurs first at item=[{}], value=[{:.2R}].", inegptr, matFD.TempEnth(2, inegptr))); + ShowSevereError( + state, + EnergyPlus::format("GetCondFDInput: {}=\"{}\", non increasing Enthalpy.", s_ipsc->cCurrentModuleObject, MaterialNames(1))); + ShowContinueError(state, + EnergyPlus::format("...occurs first at item=[{}], value=[{:.2R}].", inegptr, matFD.TempEnth(2, inegptr))); ShowContinueError(state, "...These values may be Cp (Specific Heat) rather than Enthalpy. Please correct."); ErrorsFound = true; } @@ -344,8 +352,9 @@ namespace HeatBalFiniteDiffManager { auto *mat = s_mat->materials(matNum); if (mat->group != Material::Group::Regular) { - ShowSevereError(state, - format("{}: Reference Material is not appropriate type for CondFD properties, material={}, must have regular " + ShowSevereError( + state, + EnergyPlus::format("{}: Reference Material is not appropriate type for CondFD properties, material={}, must have regular " "properties (L,Cp,K,D)", s_ipsc->cCurrentModuleObject, mat->Name)); @@ -358,8 +367,10 @@ namespace HeatBalFiniteDiffManager { auto &matFD = s_hbfd->MaterialFD(matNum); matFD.numTempCond = MaterialNumProp / 2; if (matFD.numTempCond * 2 != MaterialNumProp) { - ShowSevereError(state, format("GetCondFDInput: {}=\"{}\", mismatched pairs", s_ipsc->cCurrentModuleObject, MaterialNames(1))); - ShowContinueError(state, format("...expected {} pairs, but only entered {} numbers.", matFD.numTempCond, MaterialNumProp)); + ShowSevereError( + state, EnergyPlus::format("GetCondFDInput: {}=\"{}\", mismatched pairs", s_ipsc->cCurrentModuleObject, MaterialNames(1))); + ShowContinueError(state, + EnergyPlus::format("...expected {} pairs, but only entered {} numbers.", matFD.numTempCond, MaterialNumProp)); ErrorsFound = true; } matFD.TempCond.dimension(2, matFD.numTempCond, 0.0); @@ -386,11 +397,13 @@ namespace HeatBalFiniteDiffManager { break; } if (nonInc) { - ShowSevereError(state, - format("GetCondFDInput: {}=\"{}\", non increasing Temperatures. Temperatures must be strictly increasing.", + ShowSevereError( + state, + EnergyPlus::format("GetCondFDInput: {}=\"{}\", non increasing Temperatures. Temperatures must be strictly increasing.", s_ipsc->cCurrentModuleObject, MaterialNames(1))); - ShowContinueError(state, format("...occurs first at item=[{}], value=[{:.2R}].", inegptr, matFD.TempCond(1, inegptr))); + ShowContinueError(state, + EnergyPlus::format("...occurs first at item=[{}], value=[{:.2R}].", inegptr, matFD.TempCond(1, inegptr))); ErrorsFound = true; } } @@ -710,8 +723,9 @@ namespace HeatBalFiniteDiffManager { Alpha = kt / (mat->Density * mat->SpecHeat); mAlpha = 0.0; } else if (thisConstruct.TypeIsIRT) { // make similar to air? (that didn't seem to work well) - ShowSevereError(state, - format("InitHeatBalFiniteDiff: Construction =\"{}\" uses Material:InfraredTransparent. Cannot be used currently " + ShowSevereError( + state, + EnergyPlus::format("InitHeatBalFiniteDiff: Construction =\"{}\" uses Material:InfraredTransparent. Cannot be used currently " "with finite difference calculations.", thisConstruct.Name)); if (thisConstruct.IsUsed) { @@ -743,22 +757,24 @@ namespace HeatBalFiniteDiffManager { if (mat->Thickness < ThicknessThreshold) { ShowSevereError( state, - format( + EnergyPlus::format( "InitialInitHeatBalFiniteDiff: Found Material that is too thin and/or too highly conductive, material name = {}", mat->Name)); - ShowContinueError(state, - format("High conductivity Material layers are not well supported by Conduction Finite Difference, " - "material conductivity = {:.3R} [W/m-K]", - mat->Conductivity)); - ShowContinueError(state, format("Material thermal diffusivity = {:.3R} [m2/s]", Alpha)); ShowContinueError( - state, format("Material with this thermal diffusivity should have thickness > {:.5R} [m]", ThicknessThreshold)); + state, + EnergyPlus::format("High conductivity Material layers are not well supported by Conduction Finite Difference, " + "material conductivity = {:.3R} [W/m-K]", + mat->Conductivity)); + ShowContinueError(state, EnergyPlus::format("Material thermal diffusivity = {:.3R} [m2/s]", Alpha)); + ShowContinueError( + state, + EnergyPlus::format("Material with this thermal diffusivity should have thickness > {:.5R} [m]", ThicknessThreshold)); if (mat->Thickness < DataHeatBalance::ThinMaterialLayerThreshold) { + ShowContinueError( + state, EnergyPlus::format("Material may be too thin to be modeled well, thickness = {:.5R} [m]", mat->Thickness)); ShowContinueError(state, - format("Material may be too thin to be modeled well, thickness = {:.5R} [m]", mat->Thickness)); - ShowContinueError(state, - format("Material with this thermal diffusivity should have thickness > {:.5R} [m]", - DataHeatBalance::ThinMaterialLayerThreshold)); + EnergyPlus::format("Material with this thermal diffusivity should have thickness > {:.5R} [m]", + DataHeatBalance::ThinMaterialLayerThreshold)); } ShowFatalError(state, "Preceding conditions cause termination."); } @@ -961,14 +977,14 @@ namespace HeatBalFiniteDiffManager { // Only setup for layers 1 to N-1 for (int lay = 1; lay < thisConstruct.TotLayers; ++lay) { SetupOutputVariable(state, - format("CondFD Internal Heat Source Power After Layer {}", lay), + EnergyPlus::format("CondFD Internal Heat Source Power After Layer {}", lay), Constant::Units::W, SurfaceFD(SurfNum).heatSourceInternalFluxLayerReport(lay), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - format("CondFD Internal Heat Source Energy After Layer {}", lay), + EnergyPlus::format("CondFD Internal Heat Source Energy After Layer {}", lay), Constant::Units::J, SurfaceFD(SurfNum).heatSourceInternalFluxEnergyLayerReport(lay), OutputProcessor::TimeStepType::Zone, @@ -1005,14 +1021,14 @@ namespace HeatBalFiniteDiffManager { SurfaceFD(SurfNum).heatSourceFluxMaterialActuators(lay).isActuated, SurfaceFD(SurfNum).heatSourceFluxMaterialActuators(lay).actuatedValue); SetupOutputVariable(state, - format("CondFD EMS Heat Source Power After Layer {}", lay), + EnergyPlus::format("CondFD EMS Heat Source Power After Layer {}", lay), Constant::Units::W, SurfaceFD(SurfNum).heatSourceEMSFluxLayerReport(lay), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - format("CondFD EMS Heat Source Energy After Layer {}", lay), + EnergyPlus::format("CondFD EMS Heat Source Energy After Layer {}", lay), Constant::Units::J, SurfaceFD(SurfNum).heatSourceEMSFluxEnergyLayerReport(lay), OutputProcessor::TimeStepType::Zone, @@ -1027,49 +1043,49 @@ namespace HeatBalFiniteDiffManager { int TotNodes = ConstructFD(state.dataSurface->Surface(SurfNum).Construction).TotNodes; // Full size nodes, start with outside face. for (int node = 1; node <= TotNodes + 1; ++node) { // include inside face node SetupOutputVariable(state, - format("CondFD Surface Temperature Node {}", node), + EnergyPlus::format("CondFD Surface Temperature Node {}", node), Constant::Units::C, SurfaceFD(SurfNum).TDreport(node), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - format("CondFD Surface Heat Flux Node {}", node), + EnergyPlus::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, - format("CondFD Phase Change State {}", node), + EnergyPlus::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, - format("CondFD Phase Change Previous State {}", node), + EnergyPlus::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, - format("CondFD Phase Change Node Temperature {}", node), + EnergyPlus::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, - format("CondFD Phase Change Node Conductivity {}", node), + EnergyPlus::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, - format("CondFD Phase Change Node Specific Heat {}", node), + EnergyPlus::format("CondFD Phase Change Node Specific Heat {}", node), Constant::Units::J_kgK, SurfaceFD(SurfNum).specHeatNodeReport(node), OutputProcessor::TimeStepType::Zone, @@ -1077,14 +1093,14 @@ namespace HeatBalFiniteDiffManager { state.dataSurface->Surface(SurfNum).Name); if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, - format("CondFD Surface Heat Capacitance Outer Half Node {}", node), + EnergyPlus::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, - format("CondFD Surface Heat Capacitance Inner Half Node {}", node), + EnergyPlus::format("CondFD Surface Heat Capacitance Inner Half Node {}", node), Constant::Units::W_m2K, SurfaceFD(SurfNum).CpDelXRhoS2(node), OutputProcessor::TimeStepType::Zone, @@ -1446,7 +1462,7 @@ namespace HeatBalFiniteDiffManager { if (Inodes == 1) { print(state.files.eio, Format_702, - format("Node #{}", Inodes), + EnergyPlus::format("Node #{}", Inodes), constructFD.NodeXlocation(Inodes), construct.Name, "Surface Outside Face", @@ -1457,7 +1473,7 @@ namespace HeatBalFiniteDiffManager { if (OutwardMatLayerNum > 0 && OutwardMatLayerNum <= construct.TotLayers) { print(state.files.eio, Format_702, - format("Node #{}", Inodes), + EnergyPlus::format("Node #{}", Inodes), constructFD.NodeXlocation(Inodes), construct.Name, constructFD.Name(OutwardMatLayerNum), @@ -1467,7 +1483,7 @@ namespace HeatBalFiniteDiffManager { OutwardMatLayerNum = Layer; print(state.files.eio, Format_702, - format("Node #{}", Inodes), + EnergyPlus::format("Node #{}", Inodes), constructFD.NodeXlocation(Inodes), construct.Name, constructFD.Name(OutwardMatLayerNum), @@ -1480,7 +1496,7 @@ namespace HeatBalFiniteDiffManager { ++Inodes; print(state.files.eio, Format_702, - format("Node #{}", Inodes), + EnergyPlus::format("Node #{}", Inodes), constructFD.NodeXlocation(Inodes), construct.Name, constructFD.Name(Layer), @@ -2541,26 +2557,29 @@ namespace HeatBalFiniteDiffManager { if (CheckTemperature < DataHeatBalSurface::MinSurfaceTempLimit) { if (state.dataSurface->SurfLowTempErrCount(SurfNum) == 0) { ShowSevereMessage(state, - format("Temperature (low) out of bounds [{:.2R}] for zone=\"{}\", for surface=\"{}\"", - CheckTemperature, - state.dataHeatBal->Zone(ZoneNum).Name, - state.dataSurface->Surface(SurfNum).Name)); + EnergyPlus::format("Temperature (low) out of bounds [{:.2R}] for zone=\"{}\", for surface=\"{}\"", + CheckTemperature, + state.dataHeatBal->Zone(ZoneNum).Name, + state.dataSurface->Surface(SurfNum).Name)); ShowContinueErrorTimeStamp(state, ""); if (!state.dataHeatBal->Zone(ZoneNum).TempOutOfBoundsReported) { - ShowContinueError(state, format("Zone=\"{}\", Diagnostic Details:", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", state.dataHeatBal->Zone(ZoneNum).Name)); if (state.dataHeatBal->Zone(ZoneNum).FloorArea > 0.0) { ShowContinueError( state, - format("...Internal Heat Gain [{:.3R}] W/m2", - state.dataHeatBal->Zone(ZoneNum).InternalHeatGains / state.dataHeatBal->Zone(ZoneNum).FloorArea)); + EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", + state.dataHeatBal->Zone(ZoneNum).InternalHeatGains / state.dataHeatBal->Zone(ZoneNum).FloorArea)); } else { - ShowContinueError( - state, format("...Internal Heat Gain (no floor) [{:.3R}] W", state.dataHeatBal->Zone(ZoneNum).InternalHeatGains)); + ShowContinueError(state, + EnergyPlus::format("...Internal Heat Gain (no floor) [{:.3R}] W", + state.dataHeatBal->Zone(ZoneNum).InternalHeatGains)); } if (state.afn->simulation_control.type == AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowContinueError(state, - format("...Infiltration/Ventilation [{:.3R}] m3/s", state.dataHeatBal->Zone(ZoneNum).NominalInfilVent)); - ShowContinueError(state, format("...Mixing/Cross Mixing [{:.3R}] m3/s", state.dataHeatBal->Zone(ZoneNum).NominalMixing)); + ShowContinueError( + state, + EnergyPlus::format("...Infiltration/Ventilation [{:.3R}] m3/s", state.dataHeatBal->Zone(ZoneNum).NominalInfilVent)); + ShowContinueError( + state, EnergyPlus::format("...Mixing/Cross Mixing [{:.3R}] m3/s", state.dataHeatBal->Zone(ZoneNum).NominalMixing)); } else { ShowContinueError(state, "...Airflow Network Simulation: Nominal Infiltration/Ventilation/Mixing not available."); } @@ -2594,26 +2613,29 @@ namespace HeatBalFiniteDiffManager { } else { if (state.dataSurface->SurfHighTempErrCount(SurfNum) == 0) { ShowSevereMessage(state, - format("Temperature (high) out of bounds ({:.2R}] for zone=\"{}\", for surface=\"{}\"", - CheckTemperature, - state.dataHeatBal->Zone(ZoneNum).Name, - state.dataSurface->Surface(SurfNum).Name)); + EnergyPlus::format("Temperature (high) out of bounds ({:.2R}] for zone=\"{}\", for surface=\"{}\"", + CheckTemperature, + state.dataHeatBal->Zone(ZoneNum).Name, + state.dataSurface->Surface(SurfNum).Name)); ShowContinueErrorTimeStamp(state, ""); if (!state.dataHeatBal->Zone(ZoneNum).TempOutOfBoundsReported) { - ShowContinueError(state, format("Zone=\"{}\", Diagnostic Details:", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", state.dataHeatBal->Zone(ZoneNum).Name)); if (state.dataHeatBal->Zone(ZoneNum).FloorArea > 0.0) { ShowContinueError( state, - format("...Internal Heat Gain [{:.3R}] W/m2", - state.dataHeatBal->Zone(ZoneNum).InternalHeatGains / state.dataHeatBal->Zone(ZoneNum).FloorArea)); + EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", + state.dataHeatBal->Zone(ZoneNum).InternalHeatGains / state.dataHeatBal->Zone(ZoneNum).FloorArea)); } else { - ShowContinueError( - state, format("...Internal Heat Gain (no floor) [{:.3R}] W", state.dataHeatBal->Zone(ZoneNum).InternalHeatGains)); + ShowContinueError(state, + EnergyPlus::format("...Internal Heat Gain (no floor) [{:.3R}] W", + state.dataHeatBal->Zone(ZoneNum).InternalHeatGains)); } if (state.afn->simulation_control.type == AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowContinueError(state, - format("...Infiltration/Ventilation [{:.3R}] m3/s", state.dataHeatBal->Zone(ZoneNum).NominalInfilVent)); - ShowContinueError(state, format("...Mixing/Cross Mixing [{:.3R}] m3/s", state.dataHeatBal->Zone(ZoneNum).NominalMixing)); + ShowContinueError( + state, + EnergyPlus::format("...Infiltration/Ventilation [{:.3R}] m3/s", state.dataHeatBal->Zone(ZoneNum).NominalInfilVent)); + ShowContinueError( + state, EnergyPlus::format("...Mixing/Cross Mixing [{:.3R}] m3/s", state.dataHeatBal->Zone(ZoneNum).NominalMixing)); } else { ShowContinueError(state, "...Airflow Network Simulation: Nominal Infiltration/Ventilation/Mixing not available."); } @@ -2662,20 +2684,20 @@ namespace HeatBalFiniteDiffManager { auto &maxTempLimit = state.dataHeatBalSurf->MaxSurfaceTempLimit; if (nodeTemp < minTempLimit) { if (surfFD.indexNodeMinTempLimit == 0) { - ShowSevereMessage(state, - format("Node temperature (low) out of bounds [{:.2R}] for surface={}, node={}", nodeTemp, surfName, nodeNum)); + ShowSevereMessage( + state, EnergyPlus::format("Node temperature (low) out of bounds [{:.2R}] for surface={}, node={}", nodeTemp, surfName, nodeNum)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Value has been reset to the lower limit value of {:.2R}.", minTempLimit)); + ShowContinueError(state, EnergyPlus::format("Value has been reset to the lower limit value of {:.2R}.", minTempLimit)); } ShowRecurringSevereErrorAtEnd( state, "Node temperature (low) out of bounds for surface=" + surfName, surfFD.indexNodeMinTempLimit, nodeTemp, nodeTemp, _, "C", "C"); nodeTemp = minTempLimit; } else if (nodeTemp > maxTempLimit) { if (surfFD.indexNodeMaxTempLimit == 0) { - ShowSevereMessage(state, - format("Node temperature (high) out of bounds [{:.2R}] for surface={}, node={}", nodeTemp, surfName, nodeNum)); + ShowSevereMessage( + state, EnergyPlus::format("Node temperature (high) out of bounds [{:.2R}] for surface={}, node={}", nodeTemp, surfName, nodeNum)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Value has been reset to the upper limit value of {:.2R}.", maxTempLimit)); + ShowContinueError(state, EnergyPlus::format("Value has been reset to the upper limit value of {:.2R}.", maxTempLimit)); } ShowRecurringSevereErrorAtEnd(state, "Node temperature (high) out of bounds for surface=" + surfName, diff --git a/src/EnergyPlus/HeatBalanceAirManager.cc b/src/EnergyPlus/HeatBalanceAirManager.cc index 278046e96fc..e3e002c695e 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.cc +++ b/src/EnergyPlus/HeatBalanceAirManager.cc @@ -453,12 +453,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisZoneAirBalance.ZonePtr = Util::FindItemInList(cAlphaArgs(2), state.dataHeatBal->Zone); if (thisZoneAirBalance.ZonePtr == 0) { ShowSevereError(state, - format(R"({}{}="{}", invalid (not found) {}="{}".)", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(2), - cAlphaArgs(2))); + EnergyPlus::format(R"({}{}="{}", invalid (not found) {}="{}".)", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(2), + cAlphaArgs(2))); ErrorsFound = true; } else { state.dataHeatBal->Zone(thisZoneAirBalance.ZonePtr).zoneOABalanceIndex = Loop; @@ -467,13 +467,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err state, cAlphaArgs(2), cCurrentModuleObject, cAlphaFieldNames(2), state.dataHeatBalAirMgr->UniqueZoneNames, IsNotOK); if (IsNotOK) { ShowSevereError(state, - format(R"({}{}="{}", a duplicated object {}="{}" is found.)", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(2), - cAlphaArgs(2))); - ShowContinueError(state, format("A zone can only have one {} object.", cCurrentModuleObject)); + EnergyPlus::format(R"({}{}="{}", a duplicated object {}="{}" is found.)", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(2), + cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("A zone can only have one {} object.", cCurrentModuleObject)); ErrorsFound = true; } @@ -484,12 +484,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisZoneAirBalance.BalanceMethod == DataHeatBalance::AirBalance::Invalid) { thisZoneAirBalance.BalanceMethod = DataHeatBalance::AirBalance::None; ShowWarningError(state, - format("{}{} = {} not valid choice for {}={}", - RoutineName, - cAlphaFieldNames(3), - cAlphaArgs(3), - cCurrentModuleObject, - cAlphaArgs(1))); + EnergyPlus::format("{}{} = {} not valid choice for {}={}", + RoutineName, + cAlphaFieldNames(3), + cAlphaArgs(3), + cCurrentModuleObject, + cAlphaArgs(1))); ShowContinueError(state, "The default choice \"NONE\" is assigned"); } } @@ -497,11 +497,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisZoneAirBalance.InducedAirRate = rNumericArgs(1); if (rNumericArgs(1) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid Induced Outdoor Air Due to Duct Leakage Unbalance specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - rNumericArgs(1))); + EnergyPlus::format("{}{}=\"{}\", invalid Induced Outdoor Air Due to Duct Leakage Unbalance specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + rNumericArgs(1))); ErrorsFound = true; } @@ -521,10 +521,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisZoneAirBalance.BalanceMethod = DataHeatBalance::AirBalance::None; ShowWarningError( state, - format("{} = {}: This Zone ({}) is controlled by AvailabilityManager:HybridVentilation with Simple Airflow Control Type option.", - cCurrentModuleObject, - thisZoneAirBalance.Name, - cAlphaArgs(2))); + EnergyPlus::format( + "{} = {}: This Zone ({}) is controlled by AvailabilityManager:HybridVentilation with Simple Airflow Control Type option.", + cCurrentModuleObject, + thisZoneAirBalance.Name, + cAlphaArgs(2))); ShowContinueError(state, "Air balance method type QUADRATURE and Simple Airflow Control Type cannot co-exist. The NONE method is assigned"); } @@ -724,12 +725,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err case AirflowSpec::FlowPerZone: if (lNumericFieldBlanks(1)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - cAlphaFieldNames(4), - cNumericFieldNames(1))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + cAlphaFieldNames(4), + cNumericFieldNames(1))); } else { Real64 spaceFrac = 1.0; if (!thisInfiltrationInput.spaceListActive && (thisInfiltrationInput.numOfSpaces > 1)) { @@ -737,10 +738,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneVolume > 0.0) { spaceFrac = thisSpace.Volume / zoneVolume; } else { - ShowSevereError(state, format("{}Zone volume is zero when allocating Infiltration to Spaces.", RoutineName)); + ShowSevereError(state, + EnergyPlus::format("{}Zone volume is zero when allocating Infiltration to Spaces.", RoutineName)); ShowContinueError( state, - format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); + EnergyPlus::format( + "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -755,33 +758,34 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisInfiltration.DesignLevel = rNumericArgs(2) * thisSpace.FloorArea; if (thisInfiltration.ZonePtr > 0) { if (thisSpace.FloorArea <= 0.0) { - ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid flow/area specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - rNumericArgs(2))); + EnergyPlus::format("{}{}=\"{}\", invalid flow/area specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + rNumericArgs(2))); ErrorsFound = true; } } if (lNumericFieldBlanks(2)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } break; @@ -790,32 +794,33 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (rNumericArgs(3) >= 0.0) { thisInfiltration.DesignLevel = rNumericArgs(3) * thisSpace.ExteriorTotalSurfArea; if (thisSpace.ExteriorTotalSurfArea <= 0.0) { - ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but Exterior Surface Area = 0. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Exterior Surface Area = 0. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } } else { ShowSevereError(state, - format("{}{} = \"{}\", invalid flow/exteriorarea specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - rNumericArgs(3))); + EnergyPlus::format("{}{} = \"{}\", invalid flow/exteriorarea specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + rNumericArgs(3))); ErrorsFound = true; } } if (lNumericFieldBlanks(3)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } break; @@ -824,32 +829,33 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (rNumericArgs(3) >= 0.0) { thisInfiltration.DesignLevel = rNumericArgs(3) * thisSpace.ExtGrossWallArea; if (thisSpace.ExtGrossWallArea <= 0.0) { - ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but Exterior Wall Area = 0. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Exterior Wall Area = 0. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } } else { ShowSevereError(state, - format("{}{} = \"{}\", invalid flow/exteriorwallarea specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - rNumericArgs(3))); + EnergyPlus::format("{}{} = \"{}\", invalid flow/exteriorwallarea specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + rNumericArgs(3))); ErrorsFound = true; } } if (lNumericFieldBlanks(3)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } break; @@ -858,32 +864,33 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (rNumericArgs(4) >= 0.0) { thisInfiltration.DesignLevel = rNumericArgs(4) * thisSpace.Volume / Constant::rSecsInHour; if (thisSpace.Volume <= 0.0) { - ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } } else { ShowSevereError(state, - format("{}In {} = \"{}\", invalid ACH (air changes per hour) specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisInfiltration.Name, - rNumericArgs(4))); + EnergyPlus::format("{}In {} = \"{}\", invalid ACH (air changes per hour) specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisInfiltration.Name, + rNumericArgs(4))); ErrorsFound = true; } } if (lNumericFieldBlanks(4)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltrationInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } break; @@ -891,7 +898,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { ShowSevereError( state, - format("{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); + EnergyPlus::format( + "{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); ErrorsFound = true; } } @@ -906,7 +914,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { ShowWarningError( state, - format( + EnergyPlus::format( R"({}{}="{}", in {}="{}".)", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Infiltration Coefficients are all zero. No Infiltration will be reported."); } @@ -959,11 +967,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lNumericFieldBlanks(1)) { ShowWarningError(state, - format("{}{}=\"{}\", field {} is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - cNumericFieldNames(1))); + EnergyPlus::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)) { @@ -971,11 +979,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneExteriorTotalSurfArea > 0.0) { spaceFrac = thisSpace.ExteriorTotalSurfArea / zoneExteriorTotalSurfArea; } else { - ShowSevereError(state, - format("{}Zone exterior surface area is zero when allocating Infiltration to Spaces.", RoutineName)); + ShowSevereError( + state, + EnergyPlus::format("{}Zone exterior surface area is zero when allocating Infiltration to Spaces.", RoutineName)); ShowContinueError( state, - format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); + EnergyPlus::format( + "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -986,11 +996,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisInfiltration.spaceIndex > 0) { if (thisSpace.ExteriorTotalSurfArea <= 0.0) { ShowWarningError(state, - format(R"({}{}="{}", Space="{}" does not have surfaces exposed to outdoors.)", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - thisSpace.Name)); + EnergyPlus::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."); } } @@ -1042,11 +1052,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lNumericFieldBlanks(1)) { ShowWarningError(state, - format("{}{}=\"{}\", field {} is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - cNumericFieldNames(1))); + EnergyPlus::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)) { @@ -1054,11 +1064,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneExteriorTotalSurfArea > 0.0) { spaceFrac = thisSpace.ExteriorTotalSurfArea / zoneExteriorTotalSurfArea; } else { - ShowSevereError(state, - format("{}Zone exterior surface area is zero when allocating Infiltration to Spaces.", RoutineName)); + ShowSevereError( + state, + EnergyPlus::format("{}Zone exterior surface area is zero when allocating Infiltration to Spaces.", RoutineName)); ShowContinueError( state, - format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); + EnergyPlus::format( + "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -1068,11 +1080,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisInfiltration.spaceIndex > 0) { if (thisSpace.ExteriorTotalSurfArea <= 0.0) { ShowWarningError(state, - format(R"({}{}="{}", Space="{}" does not have surfaces exposed to outdoors.)", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - thisSpace.Name)); + EnergyPlus::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."); } @@ -1400,12 +1412,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisVentilation.DesignLevel = rNumericArgs(1); if (lNumericFieldBlanks(1)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(1))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(1))); } break; @@ -1414,32 +1426,33 @@ 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, - format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid flow/area specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - rNumericArgs(2))); + EnergyPlus::format("{}{}=\"{}\", invalid flow/area specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + rNumericArgs(2))); ErrorsFound = true; } } if (lNumericFieldBlanks(2)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } break; @@ -1448,32 +1461,33 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (rNumericArgs(3) >= 0.0) { thisVentilation.DesignLevel = rNumericArgs(3) * thisSpace.TotOccupants; if (thisSpace.TotOccupants <= 0.0) { - ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but Zone Total Occupants = 0. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Zone Total Occupants = 0. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid flow/person specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - rNumericArgs(3))); + EnergyPlus::format("{}{}=\"{}\", invalid flow/person specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + rNumericArgs(3))); ErrorsFound = true; } } if (lNumericFieldBlanks(3)) { ShowWarningError(state, - format("{}{}=\"{}\", {}specifies {}, but that field is blank. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\", {}specifies {}, but that field is blank. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } break; @@ -1483,31 +1497,31 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisVentilation.DesignLevel = rNumericArgs(4) * thisSpace.Volume / Constant::rSecsInHour; if (thisSpace.Volume <= 0.0) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid ACH (air changes per hour) specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - rNumericArgs(5))); + EnergyPlus::format("{}{}=\"{}\", invalid ACH (air changes per hour) specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + rNumericArgs(5))); ErrorsFound = true; } } if (lNumericFieldBlanks(4)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } break; @@ -1515,7 +1529,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { ShowSevereError( state, - format("{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); + EnergyPlus::format( + "{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); ErrorsFound = true; } } @@ -1526,12 +1541,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, - format(R"({}{}="{}". invalid {}="{}".)", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(5), - cAlphaArgs(5))); + EnergyPlus::format(R"({}{}="{}". invalid {}="{}".)", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(5), + cAlphaArgs(5))); ErrorsFound = true; } } @@ -1541,7 +1556,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { ShowSevereError( state, - format("{}{}=\"{}\", {} must be >=0", RoutineName, cCurrentModuleObject, thisVentilation.Name, cNumericFieldNames(5))); + EnergyPlus::format( + "{}{}=\"{}\", {} must be >=0", RoutineName, cCurrentModuleObject, thisVentilation.Name, cNumericFieldNames(5))); ErrorsFound = true; } } @@ -1550,11 +1566,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if ((thisVentilation.FanEfficiency <= 0.0) || (thisVentilation.FanEfficiency > 1.0)) { if (Item1 == 1) { ShowSevereError(state, - format("{}{}=\"{}\",{} must be in range >0 and <= 1", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cNumericFieldNames(6))); + EnergyPlus::format("{}{}=\"{}\",{} must be in range >0 and <= 1", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cNumericFieldNames(6))); ErrorsFound = true; } } @@ -1575,7 +1591,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { ShowWarningError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", in {}=\"{}\".", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Ventilation Coefficients are all zero. No Ventilation will be reported."); } @@ -1591,12 +1607,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if ((thisVentilation.MinIndoorTemperature < -VentilTempLimit) || (thisVentilation.MinIndoorTemperature > VentilTempLimit)) { if (Item1 == 1) { ShowSevereError(state, - format("{}{}=\"{}\" must have {} between -100C and 100C.", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(11))); - ShowContinueError(state, format("...value entered=[{:.2R}].", rNumericArgs(11))); + EnergyPlus::format("{}{}=\"{}\" must have {} between -100C and 100C.", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(11))); + ShowContinueError(state, EnergyPlus::format("...value entered=[{:.2R}].", rNumericArgs(11))); ErrorsFound = true; } } @@ -1616,7 +1632,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(6), cAlphaArgs(6), - format("The default value will be used ({:.1R})", thisVentilation.MinIndoorTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.MinIndoorTemperature)); } else if (!thisVentilation.minIndoorTempSched->checkMinMaxVals( state, Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit)) { Sched::ShowSevereBadMinMax( @@ -1626,7 +1642,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(6), cAlphaFieldNames(11), cAlphaFieldNames(6))); + EnergyPlus::format( + "Both {} and {} provided, {} will be used.", cAlphaFieldNames(6), cAlphaFieldNames(11), cAlphaFieldNames(6))); } } @@ -1634,10 +1651,10 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if ((thisVentilation.MaxIndoorTemperature < -VentilTempLimit) || (thisVentilation.MaxIndoorTemperature > VentilTempLimit)) { if (Item1 == 1) { ShowSevereError(state, - format("{}{} = {} must have a maximum indoor temperature between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1))); + EnergyPlus::format("{}{} = {} must have a maximum indoor temperature between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1))); ErrorsFound = true; } } @@ -1657,7 +1674,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(7), cAlphaArgs(7), - format("The default value will be used ({:.1R})", thisVentilation.MaxIndoorTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.MaxIndoorTemperature)); } else if (!thisVentilation.maxIndoorTempSched->checkMinMaxVals( state, Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit)) { Sched::ShowSevereBadMinMax( @@ -1667,7 +1684,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(7), cAlphaFieldNames(12), cAlphaFieldNames(7))); + EnergyPlus::format( + "Both {} and {} provided, {} will be used.", cAlphaFieldNames(7), cAlphaFieldNames(12), cAlphaFieldNames(7))); } } @@ -1689,7 +1707,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(8), cAlphaArgs(8), - format("The default value will be used ({:.1R})", thisVentilation.DelTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.DelTemperature)); } else if (!thisVentilation.deltaTempSched->checkMinVal(state, Clusive::In, -VentilTempLimit)) { Sched::ShowSevereBadMin(state, eoh, cAlphaFieldNames(8), cAlphaArgs(8), Clusive::In, -100); ErrorsFound = true; @@ -1697,7 +1715,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(8), cAlphaFieldNames(13), cAlphaFieldNames(8))); + EnergyPlus::format( + "Both {} and {} provided, {} will be used.", cAlphaFieldNames(8), cAlphaFieldNames(13), cAlphaFieldNames(8))); } } @@ -1705,11 +1724,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if ((thisVentilation.MinOutdoorTemperature < -VentilTempLimit) || (thisVentilation.MinOutdoorTemperature > VentilTempLimit)) { if (Item1 == 1) { ShowSevereError(state, - format("{}{} statement = {} must have {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(14))); + EnergyPlus::format("{}{} statement = {} must have {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(14))); ErrorsFound = true; } } @@ -1729,7 +1748,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(9), cAlphaArgs(9), - format("The default value will be used ({:.1R})", thisVentilation.MinOutdoorTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.MinOutdoorTemperature)); } else if (!thisVentilation.minOutdoorTempSched->checkMinMaxVals( state, Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit)) { Sched::ShowSevereBadMinMax( @@ -1739,7 +1758,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(9), cNumericFieldNames(14), cAlphaFieldNames(9))); + EnergyPlus::format( + "Both {} and {} provided, {} will be used.", cAlphaFieldNames(9), cNumericFieldNames(14), cAlphaFieldNames(9))); } } @@ -1747,11 +1767,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { if ((thisVentilation.MaxOutdoorTemperature < -VentilTempLimit) || (thisVentilation.MaxOutdoorTemperature > VentilTempLimit)) { ShowSevereError(state, - format("{}{} statement = {} must have a {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(15))); + EnergyPlus::format("{}{} statement = {} must have a {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(15))); ErrorsFound = true; } } @@ -1771,7 +1791,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(10), cAlphaArgs(10), - format("The default value will be used ({:.1R})", thisVentilation.MaxOutdoorTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.MaxOutdoorTemperature)); } else if (!thisVentilation.maxOutdoorTempSched->checkMinMaxVals( state, Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit)) { Sched::ShowSevereBadMinMax( @@ -1781,7 +1801,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(10), cNumericFieldNames(15), cAlphaFieldNames(10))); + EnergyPlus::format( + "Both {} and {} provided, {} will be used.", cAlphaFieldNames(10), cNumericFieldNames(15), cAlphaFieldNames(10))); } } @@ -1789,10 +1810,10 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { if ((thisVentilation.MaxWindSpeed < -VentilWSLimit) || (thisVentilation.MaxWindSpeed > VentilWSLimit)) { ShowSevereError(state, - format("{}{} statement = {} must have a maximum wind speed between -40 m/s and 40 m/s", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1))); + EnergyPlus::format("{}{} statement = {} must have a maximum wind speed between -40 m/s and 40 m/s", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1))); ErrorsFound = true; } } @@ -1988,7 +2009,9 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisVentilation.OpenArea = rNumericArgs(1); if (thisVentilation.OpenArea < 0.0) { ShowSevereError( - state, format("{}{}=\"{}\", {} must be positive.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(1))); + state, + EnergyPlus::format( + "{}{}=\"{}\", {} must be positive.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(1))); ErrorsFound = true; } @@ -2004,7 +2027,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisVentilation.OpenEff != Constant::AutoCalculate && (thisVentilation.OpenEff < 0.0 || thisVentilation.OpenEff > 1.0)) { ShowSevereError( state, - format("{}{}=\"{}\", {} must be between 0 and 1.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(2))); + EnergyPlus::format( + "{}{}=\"{}\", {} must be between 0 and 1.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(2))); ErrorsFound = true; } @@ -2012,7 +2036,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisVentilation.EffAngle < 0.0 || thisVentilation.EffAngle >= 360.0) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", {} must be between 0 and 360.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(3))); ErrorsFound = true; } @@ -2020,7 +2044,9 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisVentilation.DH = rNumericArgs(4); if (thisVentilation.DH < 0.0) { ShowSevereError( - state, format("{}{}=\"{}\", {} must be positive.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(4))); + state, + EnergyPlus::format( + "{}{}=\"{}\", {} must be positive.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(4))); ErrorsFound = true; } @@ -2028,7 +2054,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisVentilation.DiscCoef != Constant::AutoCalculate && (thisVentilation.DiscCoef < 0.0 || thisVentilation.DiscCoef > 1.0)) { ShowSevereError( state, - format("{}{}=\"{}\", {} must be between 0 and 1.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(5))); + EnergyPlus::format( + "{}{}=\"{}\", {} must be between 0 and 1.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(5))); ErrorsFound = true; } @@ -2039,11 +2066,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if ((thisVentilation.MinIndoorTemperature < -VentilTempLimit) || (thisVentilation.MinIndoorTemperature > VentilTempLimit)) { ShowSevereError(state, - format("{}{} statement = {} must have {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(6))); + EnergyPlus::format("{}{} statement = {} must have {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(6))); ErrorsFound = true; } @@ -2061,7 +2088,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(4), cAlphaArgs(4), - format("The default value will be used ({:.1R})", thisVentilation.MinIndoorTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.MinIndoorTemperature)); } else if (!thisVentilation.minIndoorTempSched->checkMinMaxVals(state, Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit)) { Sched::ShowSevereBadMinMax( state, eoh, cAlphaFieldNames(4), cAlphaArgs(4), Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit); @@ -2070,7 +2097,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(4), cNumericFieldNames(6), cAlphaFieldNames(4))); + EnergyPlus::format( + "Both {} and {} provided, {} will be used.", cAlphaFieldNames(4), cNumericFieldNames(6), cAlphaFieldNames(4))); } // Max indoor temperature @@ -2080,7 +2108,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisVentilation.MaxIndoorTemperature = VentilTempLimit; } if ((thisVentilation.MaxIndoorTemperature < -VentilTempLimit) || (thisVentilation.MaxIndoorTemperature > VentilTempLimit)) { - ShowSevereCustom(state, eoh, format("{} must be between {}C and {}C", cNumericFieldNames(7), -VentilTempLimit, VentilTempLimit)); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} must be between {}C and {}C", cNumericFieldNames(7), -VentilTempLimit, VentilTempLimit)); ErrorsFound = true; } @@ -2098,7 +2127,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(5), cAlphaArgs(5), - format("The default value will be used ({:.1R})", thisVentilation.MaxIndoorTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.MaxIndoorTemperature)); } else if (!thisVentilation.maxIndoorTempSched->checkMinMaxVals(state, Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit)) { Sched::ShowSevereBadMinMax( state, eoh, cAlphaFieldNames(5), cAlphaArgs(5), Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit); @@ -2107,7 +2136,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(5), cNumericFieldNames(7), cAlphaFieldNames(5))); + EnergyPlus::format( + "Both {} and {} provided, {} will be used.", cAlphaFieldNames(5), cNumericFieldNames(7), cAlphaFieldNames(5))); } if (!lNumericFieldBlanks(8)) { @@ -2130,7 +2160,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(6), cAlphaArgs(6), - format("The default value will be used ({:.1R})", thisVentilation.DelTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.DelTemperature)); } else if (!thisVentilation.deltaTempSched->checkMinVal(state, Clusive::In, -VentilTempLimit)) { Sched::ShowSevereBadMin(state, eoh, cAlphaFieldNames(6), cAlphaArgs(6), Clusive::In, -VentilTempLimit); ErrorsFound = true; @@ -2138,18 +2168,19 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(8), cAlphaFieldNames(6))); + EnergyPlus::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, - format("{}{} statement = {} must have {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(9))); + EnergyPlus::format("{}{} statement = {} must have {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(9))); ErrorsFound = true; } @@ -2167,7 +2198,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(7), cAlphaArgs(7), - format("The default value will be used ({:.1R})", thisVentilation.MinOutdoorTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.MinOutdoorTemperature)); } else if (!thisVentilation.minOutdoorTempSched->checkMinMaxVals( state, Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit)) { Sched::ShowSevereBadMinMax( @@ -2177,18 +2208,19 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(7), cNumericFieldNames(9), cAlphaFieldNames(7))); + EnergyPlus::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, - format("{}{} statement = {} must have a {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(10))); + EnergyPlus::format("{}{} statement = {} must have a {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(10))); ErrorsFound = true; } @@ -2206,7 +2238,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err eoh, cAlphaFieldNames(8), cAlphaArgs(8), - format("The default value will be used ({:.1R})", thisVentilation.MaxOutdoorTemperature)); + EnergyPlus::format("The default value will be used ({:.1R})", thisVentilation.MaxOutdoorTemperature)); } else if (!thisVentilation.maxOutdoorTempSched->checkMinMaxVals( state, Clusive::In, -VentilTempLimit, Clusive::In, VentilTempLimit)) { Sched::ShowSevereBadMinMax( @@ -2216,17 +2248,18 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(8), cNumericFieldNames(10), cAlphaFieldNames(8))); + EnergyPlus::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, - format("{}{} statement = {} must have a maximum wind speed between 0 m/s and 40 m/s", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1))); + EnergyPlus::format("{}{} statement = {} must have a maximum wind speed between 0 m/s and 40 m/s", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1))); ErrorsFound = true; } @@ -2442,12 +2475,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisMixing.DesignLevel = rNumericArgs(1); if (lNumericFieldBlanks(1)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(1))); + EnergyPlus::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)) { @@ -2455,9 +2488,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneVolume > 0.0) { spaceFrac = thisSpace.Volume / zoneVolume; } else { - ShowSevereError(state, format("{}Zone volume is zero when allocating Mixing to Spaces.", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{}Zone volume is zero when allocating Mixing to Spaces.", RoutineName)); ShowContinueError( - state, format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisMixingInput.Name, thisZone.Name)); + state, + EnergyPlus::format( + "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisMixingInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -2472,33 +2507,34 @@ 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, - format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid flow/area specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - rNumericArgs(2))); + EnergyPlus::format("{}{}=\"{}\", invalid flow/area specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + rNumericArgs(2))); ErrorsFound = true; } } if (lNumericFieldBlanks(2)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } break; @@ -2507,32 +2543,33 @@ 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, - format("{}{}=\"{}\", {} specifies {}, but Space Total Occupants = 0. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Total Occupants = 0. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid flow/person specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - rNumericArgs(3))); + EnergyPlus::format("{}{}=\"{}\", invalid flow/person specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + rNumericArgs(3))); ErrorsFound = true; } } if (lNumericFieldBlanks(3)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } break; @@ -2542,37 +2579,39 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisMixing.DesignLevel = rNumericArgs(4) * thisSpace.Volume / Constant::rSecsInHour; if (thisSpace.Volume <= 0.0) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid ACH (air changes per hour) specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - rNumericArgs(4))); + EnergyPlus::format("{}{}=\"{}\", invalid ACH (air changes per hour) specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + rNumericArgs(4))); ErrorsFound = true; } } if (lNumericFieldBlanks(4)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } break; default: ShowSevereError( - state, format("{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); ErrorsFound = true; } @@ -2593,15 +2632,15 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lNumericFieldBlanks(5)) { ShowWarningCustom(state, eoh, - format("{} and {} are empty, a default temperature of {:.1R}C will be used.", - cAlphaFieldNames(6), - cNumericFieldNames(5), - -MixingTempLimit)); + EnergyPlus::format("{} and {} are empty, a default temperature of {:.1R}C will be used.", + cAlphaFieldNames(6), + cNumericFieldNames(5), + -MixingTempLimit)); } } else if ((thisMixing.deltaTempSched = Sched::GetSchedule(state, cAlphaArgs(6))) == nullptr) { ShowWarningItemNotFound(state, eoh, cAlphaFieldNames(6), cAlphaArgs(6), ""); if (lNumericFieldBlanks(5)) { - ShowContinueError(state, format("a default temperature of {:.1R}C will be used.", -MixingTempLimit)); + ShowContinueError(state, EnergyPlus::format("a default temperature of {:.1R}C will be used.", -MixingTempLimit)); } } else if (!thisMixing.deltaTempSched->checkMinVal(state, Clusive::In, -MixingTempLimit)) { Sched::ShowSevereBadMin(state, eoh, cAlphaFieldNames(6), cAlphaArgs(6), Clusive::In, -MixingTempLimit); @@ -2610,7 +2649,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("{} and {} are provided, {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(5), cAlphaFieldNames(6))); + EnergyPlus::format( + "{} and {} are provided, {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(5), cAlphaFieldNames(6))); } } @@ -2941,12 +2981,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisMixing.DesignLevel = rNumericArgs(1); if (lNumericFieldBlanks(1)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(1))); + EnergyPlus::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)) { @@ -2954,9 +2994,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneVolume > 0.0) { spaceFrac = thisSpace.Volume / zoneVolume; } else { - ShowSevereError(state, format("{}Zone volume is zero when allocating Cross Mixing to Spaces.", RoutineName)); + ShowSevereError(state, + EnergyPlus::format("{}Zone volume is zero when allocating Cross Mixing to Spaces.", RoutineName)); ShowContinueError( - state, format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisMixingInput.Name, thisZone.Name)); + state, + EnergyPlus::format( + "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisMixingInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -2971,33 +3014,34 @@ 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, - format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid flow/area specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - rNumericArgs(2))); + EnergyPlus::format("{}{}=\"{}\", invalid flow/area specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + rNumericArgs(2))); ErrorsFound = true; } } if (lNumericFieldBlanks(2)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } break; @@ -3006,32 +3050,33 @@ 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, - format("{}{}=\"{}\", {} specifies {}, but Space Total Occupants = 0. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Total Occupants = 0. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid flow/person specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - rNumericArgs(3))); + EnergyPlus::format("{}{}=\"{}\", invalid flow/person specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + rNumericArgs(3))); ErrorsFound = true; } } if (lNumericFieldBlanks(3)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } break; @@ -3040,38 +3085,41 @@ 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, - format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid ACH (air changes per hour) specification [<0.0]={:.3R}", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - rNumericArgs(4))); + EnergyPlus::format("{}{}=\"{}\", invalid ACH (air changes per hour) specification [<0.0]={:.3R}", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + rNumericArgs(4))); ErrorsFound = true; } } if (lNumericFieldBlanks(4)) { ShowWarningError(state, - format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } break; default: ShowSevereError( - state, format("{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); + state, + EnergyPlus::format( + "{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); ErrorsFound = true; } @@ -3083,12 +3131,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if ((thisMixing.FromZone == 0) && (thisMixing.fromSpaceIndex == 0)) { ShowSevereError(state, - format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + EnergyPlus::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); ErrorsFound = true; } thisMixing.DeltaTemperature = rNumericArgs(5); @@ -3098,17 +3146,17 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lNumericFieldBlanks(5)) { ShowWarningCustom(state, eoh, - format("{} and {} are empty, a default temperature of {:.1R}C will be used.", - cAlphaFieldNames(6), - cNumericFieldNames(5), - thisMixing.DeltaTemperature)); + EnergyPlus::format("{} and {} are empty, a default temperature of {:.1R}C will be used.", + cAlphaFieldNames(6), + cNumericFieldNames(5), + thisMixing.DeltaTemperature)); } } else if ((thisMixing.deltaTempSched = Sched::GetSchedule(state, cAlphaArgs(6))) == nullptr) { ShowWarningItemNotFound(state, eoh, cAlphaFieldNames(6), cAlphaArgs(6), - format("Fixed delta temperature {:.1R}C will be used", thisMixing.DeltaTemperature)); + EnergyPlus::format("Fixed delta temperature {:.1R}C will be used", thisMixing.DeltaTemperature)); } else if (!thisMixing.deltaTempSched->checkMinVal(state, Clusive::In, 0.0)) { Sched::ShowSevereBadMin(state, eoh, cAlphaFieldNames(6), cAlphaArgs(6), Clusive::In, 0.0); ErrorsFound = true; @@ -3116,7 +3164,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - format("{} and {} provided. {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(5), cAlphaFieldNames(6))); + EnergyPlus::format( + "{} and {} provided. {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(5), cAlphaFieldNames(6))); } } @@ -3432,12 +3481,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, - format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(AlphaNum), - cAlphaArgs(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(AlphaNum), + cAlphaArgs(AlphaNum))); ErrorsFound = true; } else if (Zone1Num == 0) { Zone1Num = state.dataHeatBal->space(space1Num).zoneNum; @@ -3448,12 +3497,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, - format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(AlphaNum), - cAlphaArgs(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(AlphaNum), + cAlphaArgs(AlphaNum))); ErrorsFound = true; } else if (Zone2Num == 0) { Zone2Num = state.dataHeatBal->space(space2Num).zoneNum; @@ -3462,8 +3511,9 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err int spaceNumA = 0; int spaceNumB = 0; if (Zone1Num == Zone2Num) { - ShowSevereError(state, - format("{}{}=\"{}\", The same zone name has been entered for both sides of a refrigerated door {}=\"{}\".", + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\", The same zone name has been entered for both sides of a refrigerated door {}=\"{}\".", RoutineName, cCurrentModuleObject, cAlphaArgs(1), @@ -3547,12 +3597,14 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } ShowSevereError( state, - format("{}{}=\"{}\", and {}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), zoneA.DoorMixingObjectName(ConnectTest))); - ShowContinueError(state, - 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)); + EnergyPlus::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)); ErrorsFound = true; } // ConnectTest } // NumRefDoorconnections > 1 @@ -3577,17 +3629,18 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lAlphaFieldBlanks(NumbNum)) { zoneA.DoorHeight(ConnectionNumber) = 3.0; // default height of 3 meters ShowWarningError(state, - format("{}{}=\"{}{} is blank and the default value of 3.0 will be used.", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(NumbNum))); + EnergyPlus::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, - format("{}{} = {} must have a door height between 0 and 50 meters. ", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + EnergyPlus::format( + "{}{} = {} must have a door height between 0 and 50 meters. ", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); ErrorsFound = true; } } @@ -3596,17 +3649,17 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lAlphaFieldBlanks(NumbNum)) { zoneA.DoorArea(ConnectionNumber) = 9.0; // default area of 9 m2 ShowWarningError(state, - format("{}{}=\"{}{} is blank and the default value of 9 m2 will be used.", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(NumbNum))); + EnergyPlus::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, - format( + EnergyPlus::format( "{}{} = {} must have a door height between 0 and 400 square meters. ", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); ErrorsFound = true; } @@ -3618,11 +3671,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err zoneA.Protection(ConnectionNumber) = RefDoorNone; // Default zoneA.DoorProtTypeName(ConnectionNumber) = "None"; // Default ShowWarningError(state, - format("{}{}=\"{}\" {} is blank. Default of no door protection will be used", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(AlphaNum))); + EnergyPlus::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; @@ -3635,12 +3688,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err zoneA.DoorProtTypeName(ConnectionNumber) = "StripCurtain"; } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid calculation method={} with alphanum of 5: {}", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaArgs(AlphaNum), - cAlphaArgs(5))); + EnergyPlus::format("{}{}=\"{}\", invalid calculation method={} with alphanum of 5: {}", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaArgs(AlphaNum), + cAlphaArgs(5))); ErrorsFound = true; } // =none, etc. } // Blank @@ -4112,8 +4165,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, format("{}: Infiltration object is not defined for zone = {}", RoutineName, state.dataHeatBal->Zone(ZoneNum).Name)); + ShowSevereError(state, + EnergyPlus::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"); } } @@ -4220,7 +4274,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, format("Too many {}. Cannot exceed the number of Zones.", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Too many {}. Cannot exceed the number of Zones.", cCurrentModuleObject)); ErrorsFound = true; } if (NumOfAirModels > 0) { @@ -4245,18 +4299,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, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::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, - format("Zone {} was already assigned a roomair model by {} = {}", - state.dataIPShortCut->cAlphaArgs(2), - cCurrentModuleObject, - roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); - ShowContinueError( - state, - format("Air Model Type for zone already set to {}", roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); - ShowContinueError(state, format("Trying to overwrite with model type = {}", state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::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))); ErrorsFound = true; } state.dataRoomAir->AirModel(ZoneNum).ZoneName = state.dataIPShortCut->cAlphaArgs(2); @@ -4280,7 +4335,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4296,7 +4351,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4312,7 +4367,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4327,7 +4382,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4342,7 +4397,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4356,10 +4411,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, - format("In {} = {}: {} = AIRFLOWNETWORK.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(3))); + EnergyPlus::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."); @@ -4369,24 +4424,27 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if break; default: - ShowWarningError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("The mixing air model will be used for Zone ={}", state.dataIPShortCut->cAlphaArgs(2))); + 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))); 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, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("The direct coupling scheme will be used for Zone ={}", state.dataIPShortCut->cAlphaArgs(2))); + 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))); state.dataRoomAir->AirModel(ZoneNum).TempCoupleScheme = RoomAir::CouplingScheme::Direct; } } else { // Zone Not Found - ShowSevereError(state, format("{}, Zone not found={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("occurs in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}, Zone not found={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("occurs in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } // AirModel_Param_Loop @@ -4428,7 +4486,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if } if (ErrorsFound) { - ShowSevereError(state, format("Errors found in processing input for {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Errors found in processing input for {}", cCurrentModuleObject)); errFlag = true; } } diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.cc b/src/EnergyPlus/HeatBalanceHAMTManager.cc index b3e3cca5796..23f11877a5d 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.cc +++ b/src/EnergyPlus/HeatBalanceHAMTManager.cc @@ -284,14 +284,15 @@ namespace HeatBalanceHAMTManager { auto *mat = s_mat->materials(matNum); if (mat->group != Material::Group::Regular) { - ShowSevereCustom(state, eoh, format("{} = \"{}\" is not a regular material.", cAlphaFieldNames(1), AlphaArray(1))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} = \"{}\" is not a regular material.", cAlphaFieldNames(1), AlphaArray(1))); ErrorsFound = true; continue; } if (mat->ROnly) { - ShowWarningError(state, - format("{} {}=\"{}\" is defined as an R-only value material.", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); + ShowWarningError( + state, + EnergyPlus::format("{} {}=\"{}\" is defined as an R-only value material.", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); continue; } @@ -333,7 +334,8 @@ namespace HeatBalanceHAMTManager { auto *mat = s_mat->materials(matNum); if (!mat->hasHAMT) { - ShowSevereCustom(state, eoh, format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); ErrorsFound = true; continue; } @@ -395,7 +397,7 @@ namespace HeatBalanceHAMTManager { } } if (isoerrrise) { - ShowWarningError(state, format("{}: data not rising - Check material {}", cHAMTObject2, matHAMT->Name)); + ShowWarningError(state, EnergyPlus::format("{}: data not rising - Check material {}", cHAMTObject2, matHAMT->Name)); ShowContinueError(state, "Isotherm data has been fixed, and the simulation continues."); } } @@ -427,7 +429,8 @@ namespace HeatBalanceHAMTManager { auto *mat = s_mat->materials(matNum); if (!mat->hasHAMT) { - ShowSevereCustom(state, eoh, format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); ErrorsFound = true; continue; } @@ -474,7 +477,8 @@ namespace HeatBalanceHAMTManager { auto *mat = s_mat->materials(matNum); if (!mat->hasHAMT) { - ShowSevereCustom(state, eoh, format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); ErrorsFound = true; continue; } @@ -521,7 +525,8 @@ namespace HeatBalanceHAMTManager { auto *mat = s_mat->materials(matNum); if (!mat->hasHAMT) { - ShowSevereCustom(state, eoh, format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); ErrorsFound = true; continue; } @@ -570,7 +575,8 @@ namespace HeatBalanceHAMTManager { auto *mat = s_mat->materials(matNum); if (!mat->hasHAMT) { - ShowSevereCustom(state, eoh, format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} is not defined for {} = \"{}\"", cHAMTObject1, cAlphaFieldNames(1), AlphaArray(1))); ErrorsFound = true; continue; } @@ -693,8 +699,8 @@ namespace HeatBalanceHAMTManager { for (int lid = 1; lid <= constr.TotLayers; ++lid) { auto *mat = s_mat->materials(constr.LayerPoint(lid)); if (mat->ROnly) { - ShowSevereError(state, format("{}Construction={} cannot contain R-only value materials.", RoutineName, constr.Name)); - ShowContinueError(state, format("Reference Material=\"{}\".", mat->Name)); + ShowSevereError(state, EnergyPlus::format("{}Construction={} cannot contain R-only value materials.", RoutineName, constr.Name)); + ShowContinueError(state, EnergyPlus::format("Reference Material=\"{}\".", mat->Name)); ++errorCount; continue; } @@ -703,45 +709,50 @@ namespace HeatBalanceHAMTManager { assert(matHAMT != nullptr); if (matHAMT->nmu < 0) { - ShowSevereError(state, format("{}Construction={}", RoutineName, constr.Name)); + ShowSevereError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); ShowContinueError( state, - format("Reference Material=\"{}\" does not have required Water Vapor Diffusion Resistance Factor (mu) data.", matHAMT->Name)); + EnergyPlus::format("Reference Material=\"{}\" does not have required Water Vapor Diffusion Resistance Factor (mu) data.", + matHAMT->Name)); ++errorCount; } if (matHAMT->niso < 0) { - ShowSevereError(state, format("{}Construction={}", RoutineName, constr.Name)); - ShowContinueError(state, format("Reference Material=\"{}\" does not have required isotherm data.", matHAMT->Name)); + ShowSevereError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); + ShowContinueError(state, EnergyPlus::format("Reference Material=\"{}\" does not have required isotherm data.", matHAMT->Name)); ++errorCount; } if (matHAMT->nsuc < 0) { - ShowSevereError(state, format("{}Construction={}", RoutineName, constr.Name)); + ShowSevereError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); ShowContinueError( - state, format("Reference Material=\"{}\" does not have required liquid transport coefficient (suction) data.", mat->Name)); + state, + EnergyPlus::format("Reference Material=\"{}\" does not have required liquid transport coefficient (suction) data.", + mat->Name)); ++errorCount; } if (matHAMT->nred < 0) { - ShowSevereError(state, format("{}Construction={}", RoutineName, constr.Name)); + ShowSevereError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); ShowContinueError( state, - format("Reference Material=\"{}\" does not have required liquid transport coefficient (redistribution) data.", mat->Name)); + EnergyPlus::format("Reference Material=\"{}\" does not have required liquid transport coefficient (redistribution) data.", + mat->Name)); ++errorCount; } if (matHAMT->ntc < 0) { if (mat->Conductivity > 0) { - ShowWarningError(state, format("{}Construction={}", RoutineName, constr.Name)); - ShowContinueError( - state, format("Reference Material=\"{}\" does not have thermal conductivity data. Using fixed value.", matHAMT->Name)); + 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)); 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, format("{}Construction={}", RoutineName, constr.Name)); - ShowContinueError(state, - format("Reference Material=\"{}\" does not have required thermal conductivity data.", matHAMT->Name)); + ShowSevereError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); + ShowContinueError( + state, EnergyPlus::format("Reference Material=\"{}\" does not have required thermal conductivity data.", matHAMT->Name)); ++errorCount; } } @@ -765,8 +776,8 @@ namespace HeatBalanceHAMTManager { } --matHAMT->divs; if (matHAMT->divs < 1) { - ShowSevereError(state, format("{}Construction={}", RoutineName, constr.Name)); - ShowContinueError(state, format("Reference Material=\"{}\" is too thin.", matHAMT->Name)); + ShowSevereError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); + ShowContinueError(state, EnergyPlus::format("Reference Material=\"{}\" is too thin.", matHAMT->Name)); ++errorCount; break; } @@ -1038,7 +1049,7 @@ namespace HeatBalanceHAMTManager { for (int cellid = s_hbh->Extcell(sid), concell = 1; cellid <= s_hbh->Intcell(sid); ++cellid, ++concell) { SetupOutputVariable(state, - format("HAMT Surface Temperature Cell {}", concell), + EnergyPlus::format("HAMT Surface Temperature Cell {}", concell), Constant::Units::C, s_hbh->cells(cellid).temp, OutputProcessor::TimeStepType::Zone, @@ -1047,7 +1058,7 @@ namespace HeatBalanceHAMTManager { } for (int cellid = s_hbh->Extcell(sid), concell = 1; cellid <= s_hbh->Intcell(sid); ++cellid, ++concell) { SetupOutputVariable(state, - format("HAMT Surface Water Content Cell {}", concell), + EnergyPlus::format("HAMT Surface Water Content Cell {}", concell), Constant::Units::kg_kg, s_hbh->cells(cellid).wreport, OutputProcessor::TimeStepType::Zone, @@ -1056,7 +1067,7 @@ namespace HeatBalanceHAMTManager { } for (int cellid = s_hbh->Extcell(sid), concell = 1; cellid <= s_hbh->Intcell(sid); ++cellid, ++concell) { SetupOutputVariable(state, - format("HAMT Surface Relative Humidity Cell {}", concell), + EnergyPlus::format("HAMT Surface Relative Humidity Cell {}", concell), Constant::Units::Perc, s_hbh->cells(cellid).rhp, OutputProcessor::TimeStepType::Zone, @@ -1354,8 +1365,9 @@ namespace HeatBalanceHAMTManager { if (!state.dataGlobal->WarmupFlag) { ++s_hbh->qvpErrCount; if (s_hbh->qvpErrCount < 16) { - ShowWarningError( - state, format("HeatAndMoistureTransfer: Large Latent Heat for Surface {}", state.dataSurface->Surface(sid).Name)); + ShowWarningError(state, + EnergyPlus::format("HeatAndMoistureTransfer: Large Latent Heat for Surface {}", + state.dataSurface->Surface(sid).Name)); } else { ShowRecurringWarningErrorAtEnd(state, "HeatAndMoistureTransfer: Large Latent Heat Errors ", s_hbh->qvpErrReport); } @@ -1373,9 +1385,10 @@ namespace HeatBalanceHAMTManager { if (tempmax > state.dataHeatBalSurf->MaxSurfaceTempLimit) { if (!state.dataGlobal->WarmupFlag) { if (state.dataSurface->SurfHighTempErrCount(sid) == 0) { - ShowSevereMessage( - state, - format("HAMT: Temperature (high) out of bounds ({:.2R}) for surface={}", tempmax, state.dataSurface->Surface(sid).Name)); + ShowSevereMessage(state, + EnergyPlus::format("HAMT: Temperature (high) out of bounds ({:.2R}) for surface={}", + tempmax, + state.dataSurface->Surface(sid).Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -1392,9 +1405,9 @@ namespace HeatBalanceHAMTManager { if (tempmax > state.dataHeatBalSurf->MaxSurfaceTempLimitBeforeFatal) { if (!state.dataGlobal->WarmupFlag) { ShowSevereError(state, - format("HAMT: HAMT: Temperature (high) out of bounds ( {:.2R}) for surface={}", - tempmax, - state.dataSurface->Surface(sid).Name)); + EnergyPlus::format("HAMT: HAMT: Temperature (high) out of bounds ( {:.2R}) for surface={}", + tempmax, + state.dataSurface->Surface(sid).Name)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -1402,9 +1415,10 @@ namespace HeatBalanceHAMTManager { if (tempmin < MinSurfaceTempLimit) { if (!state.dataGlobal->WarmupFlag) { if (state.dataSurface->SurfHighTempErrCount(sid) == 0) { - ShowSevereMessage( - state, - format("HAMT: Temperature (low) out of bounds ({:.2R}) for surface={}", tempmin, state.dataSurface->Surface(sid).Name)); + ShowSevereMessage(state, + EnergyPlus::format("HAMT: Temperature (low) out of bounds ({:.2R}) for surface={}", + tempmin, + state.dataSurface->Surface(sid).Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -1421,9 +1435,9 @@ namespace HeatBalanceHAMTManager { if (tempmin < MinSurfaceTempLimitBeforeFatal) { if (!state.dataGlobal->WarmupFlag) { ShowSevereError(state, - format("HAMT: HAMT: Temperature (low) out of bounds ( {:.2R}) for surface={}", - tempmin, - state.dataSurface->Surface(sid).Name)); + EnergyPlus::format("HAMT: HAMT: Temperature (low) out of bounds ( {:.2R}) for surface={}", + tempmin, + state.dataSurface->Surface(sid).Name)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -1496,7 +1510,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, format("...Problem occurs in Material=\"{}\".", s_mat->materials(cell.matid)->Name)); + ShowContinueError(state, EnergyPlus::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 be95284bda0..9eb81adb654 100644 --- a/src/EnergyPlus/HeatBalanceIntRadExchange.cc +++ b/src/EnergyPlus/HeatBalanceIntRadExchange.cc @@ -511,7 +511,7 @@ namespace HeatBalanceIntRadExchange { state.dataHeatBalIntRadExchg->MaxNumOfRadEnclosureSurfs = max(state.dataHeatBalIntRadExchg->MaxNumOfRadEnclosureSurfs, numEnclosureSurfaces); if (numEnclosureSurfaces < 1) { - ShowSevereError(state, format("{}No surfaces in enclosure={}.", RoutineName, thisEnclosure.Name)); + ShowSevereError(state, EnergyPlus::format("{}No surfaces in enclosure={}.", RoutineName, thisEnclosure.Name)); ErrorsFound = true; } @@ -804,7 +804,7 @@ namespace HeatBalanceIntRadExchange { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found during initialization of radiant exchange. Program terminated.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found during initialization of radiant exchange. Program terminated.", RoutineName)); } } @@ -861,7 +861,7 @@ namespace HeatBalanceIntRadExchange { } thisEnclosure.NumOfSurfaces = numEnclosureSurfaces; if (numEnclosureSurfaces < 1) { - ShowSevereError(state, format("{}No surfaces in enclosure={}.", RoutineName, thisEnclosure.Name)); + ShowSevereError(state, EnergyPlus::format("{}No surfaces in enclosure={}.", RoutineName, thisEnclosure.Name)); ErrorsFound = true; } @@ -1097,7 +1097,8 @@ namespace HeatBalanceIntRadExchange { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found during initialization of diffuse solar distribution. Program terminated.", RoutineName)); + ShowFatalError( + state, EnergyPlus::format("{}Errors found during initialization of diffuse solar distribution. Program terminated.", RoutineName)); } } @@ -1146,8 +1147,9 @@ namespace HeatBalanceIntRadExchange { if (NumNums < 3 * pow_2(N)) { std::string_view cCurrentModuleObject = "ZoneProperty:UserViewFactors"; - ShowSevereError(state, format("GetInputViewFactors: {}=\"{}\", not enough values.", cCurrentModuleObject, ZoneName)); - ShowContinueError(state, format("...Number of input values [{}] is less than the required number=[{}].", NumNums, 3 * pow_2(N))); + ShowSevereError(state, EnergyPlus::format("GetInputViewFactors: {}=\"{}\", not enough values.", cCurrentModuleObject, ZoneName)); + ShowContinueError(state, + EnergyPlus::format("...Number of input values [{}] is less than the required number=[{}].", NumNums, 3 * pow_2(N))); ErrorsFound = true; NumNums = 0; } @@ -1279,16 +1281,18 @@ namespace HeatBalanceIntRadExchange { } if (!enclMatchFound) { if (spaceListNum > 0) { - ShowSevereError(state, - format("AlignInputViewFactors: {}=\"{}\" found a matching SpaceList, but did not find a matching radiant or " + ShowSevereError( + state, + EnergyPlus::format("AlignInputViewFactors: {}=\"{}\" found a matching SpaceList, but did not find a matching radiant or " "solar enclosure with the same spaces.", cCurrentModuleObject, thisSpaceOrSpaceListName)); ErrorsFound = true; } else if (zoneListNum > 0) { - ShowSevereError(state, - format("AlignInputViewFactors: {}=\"{}\" found a matching ZoneList, but did not find a matching radiant or solar " + ShowSevereError( + state, + EnergyPlus::format("AlignInputViewFactors: {}=\"{}\" found a matching ZoneList, but did not find a matching radiant or solar " "enclosure with the same spaces.", cCurrentModuleObject, thisSpaceOrSpaceListName)); @@ -1296,9 +1300,9 @@ namespace HeatBalanceIntRadExchange { } else { ShowSevereError(state, - format("AlignInputViewFactors: {}=\"{}\" did not find a matching radiant or solar enclosure name.", - cCurrentModuleObject, - thisSpaceOrSpaceListName)); + EnergyPlus::format("AlignInputViewFactors: {}=\"{}\" did not find a matching radiant or solar enclosure name.", + cCurrentModuleObject, + thisSpaceOrSpaceListName)); ErrorsFound = true; } } @@ -1361,27 +1365,32 @@ namespace HeatBalanceIntRadExchange { F = 0.0; int numinx1 = 0; if (NumNums < pow_2(N)) { - ShowWarningError(state, format("GetInputViewFactors: {}=\"{}\", not enough values.", cCurrentModuleObject, EnclosureName)); - ShowContinueError(state, - format("...Number of input values [{}] is less than the required number=[{}] Missing surface pairs will have a " - "zero view factor.", - NumNums, - pow_2(N))); + ShowWarningError(state, + EnergyPlus::format("GetInputViewFactors: {}=\"{}\", not enough values.", cCurrentModuleObject, EnclosureName)); + ShowContinueError( + state, + EnergyPlus::format("...Number of input values [{}] is less than the required number=[{}] Missing surface pairs will have a " + "zero view factor.", + NumNums, + pow_2(N))); } for (int index = 2; index <= NumAlphas; index += 2) { int inx1 = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(index), enclosureSurfaceNames, N); int inx2 = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(index + 1), enclosureSurfaceNames, N); if (inx1 == 0) { - ShowSevereError(state, format("GetInputViewFactors: {}=\"{}\", invalid surface name.", cCurrentModuleObject, EnclosureName)); - ShowContinueError(state, - format("...Surface name=\"{}\", not in this zone or enclosure.", state.dataIPShortCut->cAlphaArgs(index))); + ShowSevereError(state, + EnergyPlus::format("GetInputViewFactors: {}=\"{}\", invalid surface name.", cCurrentModuleObject, EnclosureName)); + ShowContinueError( + state, EnergyPlus::format("...Surface name=\"{}\", not in this zone or enclosure.", state.dataIPShortCut->cAlphaArgs(index))); ErrorsFound = true; } if (inx2 == 0) { - ShowSevereError(state, format("GetInputViewFactors: {}=\"{}\", invalid surface name.", cCurrentModuleObject, EnclosureName)); - ShowContinueError(state, - format("...Surface name=\"{}\", not in this zone or enclosure.", state.dataIPShortCut->cAlphaArgs(index + 2))); + ShowSevereError(state, + EnergyPlus::format("GetInputViewFactors: {}=\"{}\", invalid surface name.", cCurrentModuleObject, EnclosureName)); + ShowContinueError( + state, + EnergyPlus::format("...Surface name=\"{}\", not in this zone or enclosure.", state.dataIPShortCut->cAlphaArgs(index + 2))); ErrorsFound = true; } ++numinx1; @@ -1466,9 +1475,9 @@ namespace HeatBalanceIntRadExchange { if (ZoneArea(i) <= 0.0) { ShowWarningError(state, "CalcApproximateViewFactors: Zero area for all other zone surfaces."); ShowContinueError(state, - format("Happens for Surface=\"{}\" in Zone={}", - state.dataSurface->Surface(SPtr(i)).Name, - state.dataHeatBal->Zone(state.dataSurface->Surface(SPtr(i)).Zone).Name)); + EnergyPlus::format("Happens for Surface=\"{}\" in Zone={}", + state.dataSurface->Surface(SPtr(i)).Name, + state.dataHeatBal->Zone(state.dataSurface->Surface(SPtr(i)).Zone).Name)); } } @@ -1622,7 +1631,7 @@ namespace HeatBalanceIntRadExchange { } } - ShowWarningError(state, format("Surfaces in Zone/Enclosure=\"{}\" do not define an enclosure.", enclName)); + ShowWarningError(state, EnergyPlus::format("Surfaces in Zone/Enclosure=\"{}\" do not define an enclosure.", enclName)); ShowContinueError(state, "Number of surfaces <= 3, view factors are set to force reciprocity but may not fulfill completeness."); ShowContinueError(state, "Reciprocity means that radiant exchange between two surfaces will match and not lead to an energy loss."); ShowContinueError(state, @@ -1724,18 +1733,20 @@ namespace HeatBalanceIntRadExchange { if (CheckConvergeTolerance > 0.1) { ShowSevereError( state, - format("FixViewFactors: View factors convergence has failed and will lead to heat balance errors in zone=\"{}\".", - enclName)); + EnergyPlus::format( + "FixViewFactors: View factors convergence has failed and will lead to heat balance errors in zone=\"{}\".", + enclName)); } ShowWarningError( state, - format("FixViewFactors: View factors not complete. Check for bad surface descriptions or unenclosed zone=\"{}\".", enclName)); + EnergyPlus::format("FixViewFactors: View factors not complete. Check for bad surface descriptions or unenclosed zone=\"{}\".", + enclName)); ShowContinueError(state, - format("Enforced reciprocity has tolerance (ideal is " - "0)=[{:.6R}], Row Sum (ideal is {})=[{:.2R}].", - CheckConvergeTolerance, - N, - RowSum)); + EnergyPlus::format("Enforced reciprocity has tolerance (ideal is " + "0)=[{:.6R}], Row Sum (ideal is {})=[{:.2R}].", + CheckConvergeTolerance, + N, + RowSum)); ShowContinueError(state, "If zone is unusual or tolerance is on the order of 0.001, view " "factors might be OK but results should be checked carefully."); @@ -1771,7 +1782,8 @@ namespace HeatBalanceIntRadExchange { } else { ShowWarningError( state, - format("FixViewFactors: View factors not complete. Check for bad surface descriptions or unenclosed zone=\"{}\".", enclName)); + EnergyPlus::format("FixViewFactors: View factors not complete. Check for bad surface descriptions or unenclosed zone=\"{}\".", + enclName)); } } if (severeErrorPresent) { @@ -2068,14 +2080,14 @@ namespace HeatBalanceIntRadExchange { // Trap for surfaces that do not exist if (surfNum == 0) { - ShowSevereError(state, format("{}Invalid Surface name = {}", routineName, SurfaceName)); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, RadSysName)); + ShowSevereError(state, EnergyPlus::format("{}Invalid Surface name = {}", routineName, SurfaceName)); + ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, RadSysName)); ErrorsFound = true; return surfNum; } if (RadSysZoneNum == 0) { - ShowSevereError(state, format("{}Invalid Zone number passed by {} = {}", routineName, cCurrentModuleObject, RadSysName)); + ShowSevereError(state, EnergyPlus::format("{}Invalid Zone number passed by {} = {}", routineName, cCurrentModuleObject, RadSysName)); ErrorsFound = true; return surfNum; } @@ -2085,17 +2097,17 @@ namespace HeatBalanceIntRadExchange { if (surfZoneNum == 0) { // This should never happen ShowSevereError(state, - format("{}Somehow the surface zone number is zero for{} = {} and Surface = {}", - routineName, - cCurrentModuleObject, - RadSysName, - SurfaceName)); // LCOV_EXCL_LINE - ErrorsFound = true; // LCOV_EXCL_LINE + EnergyPlus::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, format("{}Surface = {} is not in the same zone as the radiant equipment.", routineName, SurfaceName)); - ShowContinueError(state, format("Surface zone or enclosure = {}", state.dataHeatBal->Zone(surfZoneNum).Name)); - ShowContinueError(state, format("Radiant equipment zone or enclosure = {}", state.dataHeatBal->Zone(RadSysZoneNum).Name)); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, RadSysName)); + 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)); ErrorsFound = true; } return surfNum; diff --git a/src/EnergyPlus/HeatBalanceInternalHeatGains.cc b/src/EnergyPlus/HeatBalanceInternalHeatGains.cc index 94f4b05f056..9699bff788f 100644 --- a/src/EnergyPlus/HeatBalanceInternalHeatGains.cc +++ b/src/EnergyPlus/HeatBalanceInternalHeatGains.cc @@ -135,9 +135,10 @@ void SetupSpaceInternalGain(EnergyPlusData &state, if (FoundDuplicate) { ShowSevereError(state, "SetupZoneInternalGain: developer error, trapped duplicate internal gains sent to SetupZoneInternalGain"); - ShowContinueError(state, format("The duplicate object user name ={}", format(cComponentName))); + ShowContinueError(state, EnergyPlus::format("The duplicate object user name ={}", EnergyPlus::format(cComponentName))); ShowContinueError(state, - format("The duplicate object type = {}", format(DataHeatBalance::IntGainTypeNamesCC[static_cast(IntGainCompType)]))); + EnergyPlus::format("The duplicate object type = {}", + EnergyPlus::format(DataHeatBalance::IntGainTypeNamesCC[static_cast(IntGainCompType)]))); ShowContinueError(state, "This internal gain will not be modeled, and the simulation continues"); return; } diff --git a/src/EnergyPlus/HeatBalanceKivaManager.cc b/src/EnergyPlus/HeatBalanceKivaManager.cc index 67068917e01..2c7c21f6ade 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.cc +++ b/src/EnergyPlus/HeatBalanceKivaManager.cc @@ -85,9 +85,9 @@ void kivaErrorCallback(const int messageType, const std::string message, void *c std::string fullMessage; std::pair contextPair = *(std::pair *)contextPtr; if (!contextPair.second.empty()) { - fullMessage = format("{}: {}", contextPair.second, message); + fullMessage = EnergyPlus::format("{}: {}", contextPair.second, message); } else { - fullMessage = format("Kiva: {}", message); + fullMessage = EnergyPlus::format("Kiva: {}", message); } if (messageType == Kiva::MSG_INFO) { ShowMessage(*contextPair.first, fullMessage); @@ -146,11 +146,11 @@ void KivaInstanceMap::initGround(EnergyPlusData &state, const KivaWeatherData &k constructionName = state.dataConstruction->Construct(constructionNum).Name; } - ss.dir = format("{}/{} {:.2R} {}", - FileSystem::getAbsolutePath(state.dataStrGlobals->outDirPath), - state.dataSurface->Surface(floorSurface).Name, - instance.ground->foundation.foundationDepth, - constructionName); + ss.dir = EnergyPlus::format("{}/{} {:.2R} {}", + FileSystem::getAbsolutePath(state.dataStrGlobals->outDirPath), + state.dataSurface->Surface(floorSurface).Name, + instance.ground->foundation.foundationDepth, + constructionName); debugDir = ss.dir; plotNum = 0; @@ -315,10 +315,10 @@ void KivaInstanceMap::setInitialBoundaryConditions( default: { Tin = 0.0; ShowSevereError(state, - format("Illegal control type for Zone={}, Found value={}, in Schedule={}", - state.dataHeatBal->Zone(zoneNum).Name, - controlType, - state.dataZoneCtrls->TempControlledZone(zoneControlNum).setptTypeSched->Name)); + EnergyPlus::format("Illegal control type for Zone={}, Found value={}, in Schedule={}", + state.dataHeatBal->Zone(zoneNum).Name, + controlType, + state.dataZoneCtrls->TempControlledZone(zoneControlNum).setptTypeSched->Name)); } break; } // switch (tstatType) @@ -477,8 +477,9 @@ void KivaManager::readWeatherData(EnergyPlusData &state) if (LineResult.eof) { ShowFatalError( state, - format("Kiva::ReadWeatherFile: Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", - Header(HdLine))); + EnergyPlus::format( + "Kiva::ReadWeatherFile: Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", + Header(HdLine))); } // Use headers to know how to read data to memory (e.g., number of periods, number of intervals) @@ -501,7 +502,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, format("Line={}", LineResult.data)); + ShowContinueError(state, EnergyPlus::format("Line={}", LineResult.data)); ShowFatalError(state, "Previous conditions cause termination."); } if (Pos != std::string::npos) { @@ -694,15 +695,16 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) if (Surfaces(wl).Class == DataSurfaces::SurfaceClass::Floor) { ErrorsFound = true; ShowSevereError(state, - format("Foundation:Kiva=\"{}\", only one floor per Foundation:Kiva Object allowed.", - foundationInputs[surface.OSCPtr].name)); + EnergyPlus::format("Foundation:Kiva=\"{}\", only one floor per Foundation:Kiva Object allowed.", + foundationInputs[surface.OSCPtr].name)); } else { ErrorsFound = true; - ShowSevereError(state, - format("Foundation:Kiva=\"{}\", only floor and wall surfaces are allowed to reference Foundation Outside " + 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, format("Surface=\"{}\", is not a floor or wall.", Surfaces(wl).Name)); + ShowContinueError(state, EnergyPlus::format("Surface=\"{}\", is not a floor or wall.", Surfaces(wl).Name)); } } else { wallSurfaces.push_back(wl); @@ -731,9 +733,9 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) } else { ErrorsFound = true; ShowSevereError(state, - format("Surface=\"{}\", references a Foundation Outside Boundary Condition but there is no corresponding " - "SURFACEPROPERTY:EXPOSEDFOUNDATIONPERIMETER object defined.", - Surfaces(surfNum).Name)); + EnergyPlus::format("Surface=\"{}\", references a Foundation Outside Boundary Condition but there is no corresponding " + "SURFACEPROPERTY:EXPOSEDFOUNDATIONPERIMETER object defined.", + Surfaces(surfNum).Name)); } Kiva::Polygon floorPolygon; @@ -799,11 +801,11 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) // Enforce quadrilateralism if (numVs > 4) { ShowWarningError(state, - format("Foundation:Kiva=\"{}\", wall surfaces with more than four vertices referencing", - foundationInputs[surface.OSCPtr].name)); + EnergyPlus::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, format("Surface=\"{}\", has {} vertices.", Surfaces(wl).Name, numVs)); + ShowContinueError(state, EnergyPlus::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."); @@ -828,9 +830,11 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) } if (perimeter == 0.0) { - ShowWarningError(state, format("Foundation:Kiva=\"{}\".", foundationInputs[surface.OSCPtr].name)); - ShowContinueError(state, format(" Wall Surface=\"{}\", does not have any vertices that are", Surfaces(wl).Name)); - ShowContinueError(state, format(" coplanar with the corresponding Floor Surface=\"{}\".", Surfaces(surfNum).Name)); + 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)); ShowContinueError(state, " Simulation will continue using the distance between the two lowest points in the wall for the " "interface distance."); @@ -911,9 +915,9 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) auto const *mat = materials(c.LayerPoint(layer)); if (mat->ROnly) { ErrorsFound = true; - ShowSevereError(state, format("Construction=\"{}\", constructions referenced by surfaces with a", c.Name)); + ShowSevereError(state, EnergyPlus::format("Construction=\"{}\", constructions referenced by surfaces with a", c.Name)); ShowContinueError(state, "\"Foundation\" Outside Boundary Condition must use only regular material objects"); - ShowContinueError(state, format("Material=\"{}\", is not a regular material object", mat->Name)); + ShowContinueError(state, EnergyPlus::format("Material=\"{}\", is not a regular material object", mat->Name)); return ErrorsFound; } @@ -935,10 +939,11 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) auto const *mat = materials(Constructs(surface.Construction).LayerPoint[i]); if (mat->ROnly) { ErrorsFound = true; - ShowSevereError( - state, format("Construction=\"{}\", constructions referenced by surfaces with a", Constructs(surface.Construction).Name)); + ShowSevereError(state, + EnergyPlus::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, format("Material=\"{}\", is not a regular material object", mat->Name)); + ShowContinueError(state, EnergyPlus::format("Material=\"{}\", is not a regular material object", mat->Name)); return ErrorsFound; } @@ -992,20 +997,22 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) if (fnd.deepGroundDepth > initDeepGroundDepth) { ShowWarningError(state, - 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)); - ShowContinueError(state, - format("The deep ground depth will be set one meter below the lowest element ({:.3T} m)", fnd.deepGroundDepth)); + 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)); + ShowContinueError( + state, + EnergyPlus::format("The deep ground depth will be set one meter below the lowest element ({:.3T} m)", fnd.deepGroundDepth)); } // polygon fnd.polygon = floorPolygon; - std::pair contexPair2{&state, format("Foundation:Kiva=\"{}\"", foundationInputs[surface.OSCPtr].name)}; + std::pair contexPair2{ + &state, EnergyPlus::format("Foundation:Kiva=\"{}\"", foundationInputs[surface.OSCPtr].name)}; Kiva::setMessageCallback(kivaErrorCallback, &contexPair2); // point surface to associated ground instance(s) @@ -1042,8 +1049,9 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) assignKivaInstances = false; if (remainingExposedPerimeter < -0.1) { ErrorsFound = true; - ShowSevereError(state, format("For Floor Surface=\"{}\", the Wall surfaces referencing", Surfaces(surfNum).Name)); - ShowContinueError(state, format(" the same Foundation:Kiva=\"{}\" have", foundationInputs[Surfaces(surfNum).OSCPtr].name)); + 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)); 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."); @@ -1061,18 +1069,20 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) for (int surfNum2 : state.dataSurface->AllHTKivaSurfaceList) { if (surfaceMap[surfNum2].size() == 0) { ErrorsFound = true; - ShowSevereError(state, format("Surface=\"{}\" has a 'Foundation' Outside Boundary Condition", Surfaces(surfNum).Name)); - ShowContinueError(state, format(" referencing Foundation:Kiva=\"{}\".", foundationInputs[Surfaces(surfNum).OSCPtr].name)); + 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)); if (Surfaces(surfNum2).Class == DataSurfaces::SurfaceClass::Wall) { - ShowContinueError(state, format(" You must also reference Foundation:Kiva=\"{}\"", foundationInputs[Surfaces(surfNum).OSCPtr].name)); - ShowContinueError(state, - format(" in a floor surface within the same Zone=\"{}\".", state.dataHeatBal->Zone(Surfaces(surfNum).Zone).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)); } 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, format(" Surface=\"{}\", is not a floor or wall.", Surfaces(surfNum).Name)); + ShowContinueError(state, EnergyPlus::format(" Surface=\"{}\", is not a floor or wall.", Surfaces(surfNum).Name)); } } } @@ -1167,7 +1177,8 @@ void KivaManager::calcKivaInstances(EnergyPlusData &state) #ifdef GROUND_PLOT void KivaInstanceMap::plotDomain(EnergyPlusData &state) { - gp.createFrame(*instance.ground, format("{}/{} {}:00", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay)); + gp.createFrame(*instance.ground, + EnergyPlus::format("{}/{} {}:00", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay)); instance.ground->writeCSV(format("{}/{}.csv", debugDir, plotNum)); @@ -1178,7 +1189,7 @@ void KivaInstanceMap::plotDomain(EnergyPlusData &state) void KivaManager::calcKivaSurfaceResults(EnergyPlusData &state) { for (int surfNum : state.dataSurface->AllHTKivaSurfaceList) { - std::pair contextPair{&state, format("Surface=\"{}\"", state.dataSurface->Surface(surfNum).Name)}; + std::pair contextPair{&state, EnergyPlus::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; @@ -1211,8 +1222,8 @@ void KivaManager::defineDefaultFoundation(EnergyPlusData &state) if (!settings.autocalculateDeepGroundDepth) { if (defFnd.deepGroundDepth != settings.deepGroundDepth) { ShowWarningError(state, "Foundation:Kiva:Settings, when Deep-Ground Boundary Condition is Autoselect,"); - ShowContinueError(state, format("the user-specified Deep-Ground Depth ({:.1R} m)", settings.deepGroundDepth)); - ShowContinueError(state, format("will be overridden with the Autoselected depth ({:.1R} m)", defFnd.deepGroundDepth)); + ShowContinueError(state, EnergyPlus::format("the user-specified Deep-Ground Depth ({:.1R} m)", settings.deepGroundDepth)); + ShowContinueError(state, EnergyPlus::format("will be overridden with the Autoselected depth ({:.1R} m)", defFnd.deepGroundDepth)); } } } else if (settings.deepGroundBoundary == Settings::ZERO_FLUX) { diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index 6d2ec8c791e..2e1ca451c5d 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -387,16 +387,16 @@ namespace HeatBalanceManager { [](Construction::ConstructionProps const &e) { return e.IsUsed; }); if (Unused > 0) { if (!state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, format("CheckUsedConstructions: There are {} nominally unused constructions in input.", Unused)); + ShowWarningError(state, EnergyPlus::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, format("CheckUsedConstructions: There are {} nominally unused constructions in input.", Unused)); + ShowWarningError(state, EnergyPlus::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, format("Construction={}", state.dataConstruction->Construct(Loop).Name)); + ShowMessage(state, EnergyPlus::format("Construction={}", state.dataConstruction->Construct(Loop).Name)); } } } @@ -588,11 +588,11 @@ namespace HeatBalanceManager { AlphaName(2) = "Urban"; } else { ShowSevereError(state, - format("{}{}: {} invalid={}", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + EnergyPlus::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"; @@ -602,22 +602,22 @@ namespace HeatBalanceManager { state.dataHeatBal->LoadsConvergTol = BuildingNumbers(2); if (state.dataHeatBal->LoadsConvergTol <= 0.0) { ShowSevereError(state, - format("{}{}: {} value invalid, [{:.3R}]", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(2), - state.dataHeatBal->LoadsConvergTol)); + EnergyPlus::format("{}{}: {} value invalid, [{:.3R}]", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(2), + state.dataHeatBal->LoadsConvergTol)); ErrorsFound = true; } // Temperature Convergence Tolerance Value state.dataHeatBal->TempConvergTol = BuildingNumbers(3); if (state.dataHeatBal->TempConvergTol <= 0.0) { ShowSevereError(state, - format("{}{}: {} value invalid, [{:.3R}]", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3), - state.dataHeatBal->TempConvergTol)); + EnergyPlus::format("{}{}: {} value invalid, [{:.3R}]", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(3), + state.dataHeatBal->TempConvergTol)); ErrorsFound = true; } // Solar Distribution @@ -643,11 +643,11 @@ namespace HeatBalanceManager { state.dataSurface->CalcSolRefl = true; } else { ShowSevereError(state, - format("{}{}: {} invalid={}", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaName(3))); + EnergyPlus::format("{}{}: {} invalid={}", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3), + AlphaName(3))); ErrorsFound = true; AlphaName(3) = AlphaName(3) + "-invalid"; } @@ -656,12 +656,12 @@ namespace HeatBalanceManager { state.dataHeatBal->MaxNumberOfWarmupDays = BuildingNumbers(4); if (state.dataHeatBal->MaxNumberOfWarmupDays <= 0) { ShowSevereError(state, - format("{}{}: {} invalid, [{}], {} will be used", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(4), - state.dataHeatBal->MaxNumberOfWarmupDays, - DataHeatBalance::DefaultMaxNumberOfWarmupDays)); + EnergyPlus::format("{}{}: {} invalid, [{}], {} will be used", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(4), + state.dataHeatBal->MaxNumberOfWarmupDays, + DataHeatBalance::DefaultMaxNumberOfWarmupDays)); state.dataHeatBal->MaxNumberOfWarmupDays = DataHeatBalance::DefaultMaxNumberOfWarmupDays; } } else { @@ -672,12 +672,12 @@ namespace HeatBalanceManager { state.dataHeatBal->MinNumberOfWarmupDays = BuildingNumbers(5); if (state.dataHeatBal->MinNumberOfWarmupDays <= 0) { ShowWarningError(state, - format("{}{}: {} invalid, [{}], {} will be used", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5), - state.dataHeatBal->MinNumberOfWarmupDays, - DataHeatBalance::DefaultMinNumberOfWarmupDays)); + EnergyPlus::format("{}{}: {} invalid, [{}], {} will be used", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(5), + state.dataHeatBal->MinNumberOfWarmupDays, + DataHeatBalance::DefaultMinNumberOfWarmupDays)); state.dataHeatBal->MinNumberOfWarmupDays = DataHeatBalance::DefaultMinNumberOfWarmupDays; } } else { @@ -685,19 +685,19 @@ namespace HeatBalanceManager { } if (state.dataHeatBal->MinNumberOfWarmupDays > state.dataHeatBal->MaxNumberOfWarmupDays) { ShowWarningError(state, - 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)); + 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)); state.dataHeatBal->MaxNumberOfWarmupDays = state.dataHeatBal->MinNumberOfWarmupDays; } } else { - ShowSevereError(state, format("{} A {} Object must be entered.", RoutineName, state.dataHeatBalMgr->CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{} A {} Object must be entered.", RoutineName, state.dataHeatBalMgr->CurrentModuleObject)); ErrorsFound = true; state.dataHeatBal->BuildingName = "NOT ENTERED"; AlphaName(2) = "NOT ENTERED"; @@ -749,9 +749,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, - format("GetInsideConvectionAlgorithm: Invalid value for {}, defaulting to TARP, invalid value={}", - state.dataHeatBalMgr->CurrentModuleObject, - AlphaName(1))); + EnergyPlus::format("GetInsideConvectionAlgorithm: Invalid value for {}, defaulting to TARP, invalid value={}", + state.dataHeatBalMgr->CurrentModuleObject, + AlphaName(1))); hcIn = Convect::HcInt::ASHRAETARP; } state.dataHeatBal->DefaultIntConvAlgo = hcIn; @@ -785,9 +785,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, - format("GetOutsideConvectionAlgorithm: Invalid value for {}, defaulting to DOE-2, invalid value={}", - state.dataHeatBalMgr->CurrentModuleObject, - AlphaName(1))); + EnergyPlus::format("GetOutsideConvectionAlgorithm: Invalid value for {}, defaulting to DOE-2, invalid value={}", + state.dataHeatBalMgr->CurrentModuleObject, + AlphaName(1))); hcOut = Convect::HcExt::DOE2HcOutside; } state.dataHeatBal->DefaultExtConvAlgo = hcOut; @@ -834,10 +834,11 @@ namespace HeatBalanceManager { if (state.dataGlobal->TimeStepsInHour < 20) { ShowSevereError( state, - format("GetSolutionAlgorithm: {} {} is Conduction Finite Difference but Number of TimeSteps in Hour < 20, Value is {}.", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataGlobal->TimeStepsInHour)); + EnergyPlus::format( + "GetSolutionAlgorithm: {} {} is Conduction Finite Difference 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 Conduction Finite Difference solutions is 20. " "Errors or inaccurate calculations may occur."); @@ -848,8 +849,9 @@ namespace HeatBalanceManager { state.dataHeatBal->AnyHAMT = true; state.dataHeatBal->AllCTF = false; if (state.dataGlobal->TimeStepsInHour < 20) { - ShowSevereError(state, - format("GetSolutionAlgorithm: {} {} is Combined Heat and Moisture Finite Element but Number of TimeSteps in " + 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), @@ -950,10 +952,10 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneAirSolutionAlgo = DataHeatBalance::SolutionAlgo::ThirdOrder; AlphaName(1) = "ThirdOrderBackwardDifference"; ShowWarningError(state, - format("{}: Invalid input of {}. The default choice is assigned = {}", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - AlphaName(1))); + EnergyPlus::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."); } } @@ -1015,9 +1017,9 @@ namespace HeatBalanceManager { state.dataContaminantBalance->Contaminant.CO2Simulation = false; AlphaName(1) = "NO"; ShowWarningError(state, - format("{}: Invalid input of {}. The default choice is assigned = NO", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1))); + EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = NO", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(1))); } } } @@ -1046,25 +1048,25 @@ namespace HeatBalanceManager { state.dataContaminantBalance->Contaminant.GenericContamSimulation = false; AlphaName(3) = "NO"; ShowWarningError(state, - format("{}: Invalid input of {}. The default choice is assigned = NO", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3))); + EnergyPlus::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, - format("{}, {} is required and not given.", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(4))); + EnergyPlus::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, - format("{}, {} not found: {}", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(4), - AlphaName(4))); + EnergyPlus::format("{}, {} not found: {}", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(4), + AlphaName(4))); ErrorsFound = true; } } @@ -1132,9 +1134,9 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing; AlphaName(1) = "None"; ShowWarningError(state, - format("{}: Invalid input of {}. The default choice is assigned = None", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1))); + EnergyPlus::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) { @@ -1154,9 +1156,9 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance = true; AlphaName(2) = "AddInfiltrationFlow"; ShowWarningError(state, - format("{}: Invalid input of {}. The default choice is assigned = AddInfiltrationFlow", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2))); + EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = AddInfiltrationFlow", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(2))); } } } else { @@ -1176,9 +1178,9 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneAirMassFlow.InfiltrationForZones = DataHeatBalance::InfiltrationZoneType::MixingSourceZonesOnly; AlphaName(3) = "MixingSourceZonesOnly"; ShowWarningError(state, - format("{}: Invalid input of {}. The default choice is assigned = MixingSourceZonesOnly", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3))); + EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = MixingSourceZonesOnly", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3))); } } } else { @@ -1299,7 +1301,7 @@ namespace HeatBalanceManager { } } else if (NumObjects > 1) { - ShowSevereError(state, format("Too many {} objects, only 1 allowed.", state.dataHeatBalMgr->CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Too many {} objects, only 1 allowed.", state.dataHeatBalMgr->CurrentModuleObject)); ErrorsFound = true; } else { // None entered // IDD defaults would have this: @@ -1479,11 +1481,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, format("Invalid material layer type in window {} = {}", s_ipsc->cCurrentModuleObject, thisConstruct.Name)); + ShowSevereError( + state, EnergyPlus::format("Invalid material layer type in window {} = {}", s_ipsc->cCurrentModuleObject, thisConstruct.Name)); ShowContinueError( state, - format("Equivalent Layer material type = {} is allowed only in Construction:WindowEquivalentLayer window object.", - ConstructAlphas(Layer))); + EnergyPlus::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) { @@ -1555,7 +1558,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, format("Construction={} is affected.", construction_name)); + ShowContinueError(state, EnergyPlus::format("Construction={} is affected.", construction_name)); ctf_dimensions = 1; } Real64 tube_spacing = fields.at("tube_spacing").get(); @@ -1570,10 +1573,10 @@ namespace HeatBalanceManager { if (construction_index == 0) { ShowSevereError(state, - format("Did not find matching construction for {} {}, missing construction = {}", - state.dataHeatBalMgr->CurrentModuleObject, - thisObjectName, - construction_name)); + EnergyPlus::format("Did not find matching construction for {} {}, missing construction = {}", + state.dataHeatBalMgr->CurrentModuleObject, + thisObjectName, + construction_name)); ErrorsFound = true; continue; } @@ -1585,9 +1588,9 @@ namespace HeatBalanceManager { // May need some additional validation of the construction here if (thisConstruct.SourceSinkPresent) { // Emulate old behavior by disallowing two sources in a single material - ShowSevereError( - state, - format("Construction {} has more than one internal heat source referencing it, which is not allowed", construction_name)); + ShowSevereError(state, + EnergyPlus::format("Construction {} has more than one internal heat source referencing it, which is not allowed", + construction_name)); ErrorsFound = true; continue; } @@ -1602,13 +1605,14 @@ namespace HeatBalanceManager { // Set the total number of layers for the construction if ((thisConstruct.SourceAfterLayer >= thisConstruct.TotLayers) || (thisConstruct.SourceAfterLayer <= 0)) { - ShowWarningError(state, format("Construction {} must have a source that is between two layers", thisConstruct.Name)); + ShowWarningError(state, EnergyPlus::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, - format("Construction {} must have a temperature calculation that is between two layers", thisConstruct.Name)); + ShowWarningError( + state, + EnergyPlus::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 +1663,8 @@ namespace HeatBalanceManager { state.dataConstruction->Construct(TotRegConstructs + ConstrNum).TotLayers = ConstructNumAlpha - 1; if (state.dataConstruction->Construct(TotRegConstructs + ConstrNum).TotLayers < 1) { ShowSevereError(state, - format("Construction {} must have at least a single layer", - state.dataConstruction->Construct(TotRegConstructs + ConstrNum).Name)); + EnergyPlus::format("Construction {} must have at least a single layer", + state.dataConstruction->Construct(TotRegConstructs + ConstrNum).Name)); ErrorsFound = true; } @@ -1674,10 +1678,10 @@ namespace HeatBalanceManager { if (state.dataConstruction->Construct(TotRegConstructs + ConstrNum).LayerPoint(Layer) == 0) { ShowSevereError(state, - format("Did not find matching material for {} {}, missing material = {}", - state.dataHeatBalMgr->CurrentModuleObject, - thisConstruct.Name, - ConstructAlphas(Layer))); + EnergyPlus::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,12 +1689,13 @@ namespace HeatBalanceManager { (mat->group == Material::Group::DrapeEQL) || (mat->group == Material::Group::BlindEQL) || (mat->group == Material::Group::ScreenEQL) || (mat->group == Material::Group::WindowGapEQL))) { ShowSevereError(state, - format("Invalid material layer type in window {} = {}", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataConstruction->Construct(TotRegConstructs + ConstrNum).Name)); - ShowContinueError(state, - format("...Window layer = {} is not allowed in Construction:WindowEquivalentLayer window object.", - ConstructAlphas(Layer))); + 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))); ShowContinueError(state, "Only materials of type Material:*:EquivalentLayer are allowed"); ErrorsFound = true; } @@ -1736,7 +1741,8 @@ namespace HeatBalanceManager { // Obtain the data if (DummyNumProp != 0) { - ShowSevereError(state, format("Construction From Window5 Data File: there should be no numerical inputs for {}", ConstructAlphas(0))); + ShowSevereError( + state, EnergyPlus::format("Construction From Window5 Data File: there should be no numerical inputs for {}", ConstructAlphas(0))); ErrorsFound = true; continue; } @@ -1763,8 +1769,9 @@ namespace HeatBalanceManager { if (EOFonW5File || !ConstructionFound) { DisplayString(state, "--Construction not found"); ErrorsFound = true; - ShowSevereError(state, format("No match on WINDOW5 data file for Construction={}, or error in data file.", ConstructAlphas(0))); - ShowContinueError(state, format("...Looking on file={}", window5DataFilePath)); // TODO: call getAbsolutePath maybe? + 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? continue; } @@ -1784,7 +1791,7 @@ namespace HeatBalanceManager { state.dataHeatBal->NominalU(ConstrIndex) = 1.0 / state.dataHeatBal->NominalRforNominalUCalculation(ConstrIndex); } else { if (!thisConstruct.WindowTypeEQL) { - ShowSevereError(state, format("Nominal U is zero, for construction={}", thisConstruct.Name)); + ShowSevereError(state, EnergyPlus::format("Nominal U is zero, for construction={}", thisConstruct.Name)); ErrorsFound = true; } } @@ -1937,7 +1944,7 @@ namespace HeatBalanceManager { if (Util::FindItemInList(state.dataHeatBal->ZoneList(ListNum).Name, state.dataHeatBal->Zone) > 0) { ShowWarningError( state, - format( + EnergyPlus::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."); } @@ -1946,8 +1953,9 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneList(ListNum).NumOfZones = NumAlphas - 1; if (state.dataHeatBal->ZoneList(ListNum).NumOfZones < 1) { - ShowSevereError( - state, format("{}{}=\"{}\": No zones specified.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format( + "{}{}=\"{}\": No zones specified.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { state.dataHeatBal->ZoneList(ListNum).Zone.allocate(state.dataHeatBal->ZoneList(ListNum).NumOfZones); @@ -1960,12 +1968,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, - format("{}{}=\"{}\": {} {} not found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(ZoneNum + 1), - ZoneName)); + EnergyPlus::format("{}{}=\"{}\": {} {} not found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(ZoneNum + 1), + ZoneName)); ErrorsFound = true; } @@ -1973,12 +1981,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, - format("{}{}=\"{}\": {} {} appears more than once in list.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(ZoneNum + 1), - ZoneName)); + EnergyPlus::format("{}{}=\"{}\": {} {} appears more than once in list.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(ZoneNum + 1), + ZoneName)); ErrorsFound = true; } } // Loop @@ -2020,25 +2028,25 @@ namespace HeatBalanceManager { if (ListNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\": {} named {} not found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::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, - format("{}{}=\"{}\": {} already used by {} named {}.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - cCurrentModuleObject, - state.dataHeatBal->ZoneGroup(Loop).Name)); + EnergyPlus::format("{}{}=\"{}\": {} already used by {} named {}.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + cCurrentModuleObject, + state.dataHeatBal->ZoneGroup(Loop).Name)); ErrorsFound = true; } } // Loop @@ -2053,15 +2061,16 @@ namespace HeatBalanceManager { state.dataHeatBal->Zone(ZoneNum).ListMultiplier = state.dataHeatBal->ZoneGroup(GroupNum).Multiplier; state.dataHeatBal->Zone(ZoneNum).ListGroup = ListNum; } else { - ShowSevereError(state, - format("{}{}=\"{}\": Zone {} in ZoneList already exists in ZoneList of another ZoneGroup.", + 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)); - ShowContinueError( - state, - format("Previous ZoneList={}", state.dataHeatBal->ZoneList(state.dataHeatBal->Zone(ZoneNum).ListGroup).Name)); + ShowContinueError(state, + EnergyPlus::format("Previous ZoneList={}", + state.dataHeatBal->ZoneList(state.dataHeatBal->Zone(ZoneNum).ListGroup).Name)); ErrorsFound = true; } } @@ -2123,16 +2132,17 @@ namespace HeatBalanceManager { int SurfNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(1), state.dataSurface->Surface); if (SurfNum == 0) { ShowSevereError(state, - format("{}{}=\"{}, object. Illegal value for {} has been found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(1))); + EnergyPlus::format("{}{}=\"{}, object. Illegal value for {} has been found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(1))); ShowContinueError( state, - format("{} entered value = \"{}\" no corresponding surface (ref BuildingSurface:Detailed) has been found in the input file.", - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; continue; } @@ -2227,15 +2237,15 @@ namespace HeatBalanceManager { int ZoneNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->Zone); if (ZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}, object. Illegal value for {} has been found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2))); + EnergyPlus::format("{}{}=\"{}, object. Illegal value for {} has been found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2))); ShowContinueError(state, - format("{} entered value = \"{}\" no corresponding zone has been found in the input file.", - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::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; @@ -2253,15 +2263,15 @@ namespace HeatBalanceManager { ObjectIsParent); if (NodeNum == 0 && CheckOutAirNodeNumber(state, NodeNum)) { ShowSevereError(state, - format("{}{}=\"{}, object. Illegal value for {} has been found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(3))); + EnergyPlus::format("{}{}=\"{}, object. Illegal value for {} has been found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(3))); ShowContinueError(state, - format("{} entered value = \"{}\" no corresponding schedule has been found in the input file.", - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::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; @@ -2344,8 +2354,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, format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); - ShowContinueError(state, format("Invalid value for {}=\"{}\".", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); + ShowContinueError(state, EnergyPlus::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(2), cAlphaArgs(2))); ErrorsFound = true; } state.dataHeatBal->Zone(ZoneLoop).IntConvAlgo = hcIn; @@ -2361,8 +2371,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, format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); - ShowContinueError(state, format("Invalid value for {}=\"{}\".", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); + ShowContinueError(state, EnergyPlus::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(3), cAlphaArgs(3))); ErrorsFound = true; } state.dataHeatBal->Zone(ZoneLoop).ExtConvAlgo = hcOut; @@ -2380,8 +2390,8 @@ namespace HeatBalanceManager { } else if (Util::SameString("Yes", cAlphaArgs(4)) || lAlphaFieldBlanks(4)) { state.dataHeatBal->Zone(ZoneLoop).isPartOfTotalArea = true; } else { - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); - ShowContinueError(state, format("Invalid value for {}=\"{}\".", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); + ShowContinueError(state, EnergyPlus::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(4), cAlphaArgs(4))); ErrorsFound = true; } } @@ -2449,8 +2459,8 @@ namespace HeatBalanceManager { state.dataHeatBal->Zone(zoneNum).spaceIndexes.emplace_back(spaceNum); ++state.dataHeatBal->Zone(zoneNum).numSpaces; } else { - ShowSevereError(state, format("{}{}={}", RoutineName, cCurrentModuleObject, thisSpace.Name)); - ShowContinueError(state, format("Zone Name ={}not found.", zoneName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisSpace.Name)); + ShowContinueError(state, EnergyPlus::format("Zone Name ={}not found.", zoneName)); ErrorsFound = true; } thisSpace.spaceType = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "space_type"); @@ -2500,13 +2510,15 @@ namespace HeatBalanceManager { ip->markObjectAsUsed(cCurrentModuleObject, instance.key()); if (Util::FindItemInList(thisSpaceList.Name, state.dataHeatBal->Zone) > 0) { - ShowSevereError(state, - format("{}{}=\"{}\": is a duplicate of a zone name.", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); + ShowSevereError( + state, + EnergyPlus::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, - format("{}{}=\"{}\": is a duplicate of a space name.", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\": is a duplicate of a space name.", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); ErrorsFound = true; } @@ -2523,8 +2535,8 @@ namespace HeatBalanceManager { thisSpaceList.spaces.emplace_back(thisSpaceNum); ++thisSpaceList.numListSpaces; } else { - ShowSevereError(state, format("{}{}={}", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); - ShowContinueError(state, format("Space Name={} not found.", thisSpaceName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); + ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", thisSpaceName)); ErrorsFound = true; } thisSpaceList.maxSpaceNameLength = max(thisSpaceList.maxSpaceNameLength, len(thisSpaceName)); @@ -2532,11 +2544,11 @@ namespace HeatBalanceManager { for (int loop = 1; loop <= int(thisSpaceList.spaces.size()) - 1; ++loop) { if (thisSpaceNum == thisSpaceList.spaces(loop)) { ShowSevereError(state, - format("{}{}=\"{}\": Space Name {} appears more than once in list.", - RoutineName, - cCurrentModuleObject, - thisSpaceList.Name, - thisSpaceName)); + EnergyPlus::format("{}{}=\"{}\": Space Name {} appears more than once in list.", + RoutineName, + cCurrentModuleObject, + thisSpaceList.Name, + thisSpaceName)); ErrorsFound = true; } } @@ -3131,8 +3143,9 @@ namespace HeatBalanceManager { if (state.dataGlobal->DayOfSim >= state.dataHeatBal->MaxNumberOfWarmupDays && state.dataGlobal->WarmupFlag) { // Check convergence for individual zone if (sum(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag) != 8) { // pass=2 * 4 values for convergence - ShowSevereError(state, - format("CheckWarmupConvergence: Loads Initialization, Zone=\"{}\" did not converge after {} warmup days.", + ShowSevereError( + state, + EnergyPlus::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) { @@ -3143,31 +3156,35 @@ namespace HeatBalanceManager { state.dataHeatBalMgr->SizingWarmupConvergenceWarning = true; } if (state.dataEnvrn->RunPeriodEnvironment) { - ShowContinueError(state, format("...Environment(RunPeriod)=\"{}\"", state.dataEnvrn->EnvironmentName)); + ShowContinueError(state, EnergyPlus::format("...Environment(RunPeriod)=\"{}\"", state.dataEnvrn->EnvironmentName)); } else { - ShowContinueError(state, format("...Environment(SizingPeriod)=\"{}\"", state.dataEnvrn->EnvironmentName)); + ShowContinueError(state, EnergyPlus::format("...Environment(SizingPeriod)=\"{}\"", state.dataEnvrn->EnvironmentName)); } - ShowContinueError(state, - format("..Max Temp Comparison = {:.2R} vs Temperature Convergence Tolerance={:.2R} - {} Convergence", - state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).TestMaxTempValue, - state.dataHeatBal->TempConvergTol, - PassFail(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag(1)))); - ShowContinueError(state, - format("..Min Temp Comparison = {:.2R} vs Temperature Convergence Tolerance={:.2R} - {} Convergence", - state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).TestMinTempValue, - state.dataHeatBal->TempConvergTol, - PassFail(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag(2)))); - ShowContinueError(state, - format("..Max Heat Load Comparison = {:.4R} vs Loads Convergence Tolerance={:.2R} - {} Convergence", - state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).TestMaxHeatLoadValue, - state.dataHeatBal->LoadsConvergTol, - PassFail(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag(3)))); - ShowContinueError(state, - format("..Max Cool Load Comparison = {:.4R} vs Loads Convergence Tolerance={:.2R} - {} Convergence", - state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).TestMaxCoolLoadValue, - state.dataHeatBal->LoadsConvergTol, - PassFail(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag(4)))); + ShowContinueError( + state, + EnergyPlus::format("..Max Temp Comparison = {:.2R} vs Temperature Convergence Tolerance={:.2R} - {} Convergence", + state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).TestMaxTempValue, + state.dataHeatBal->TempConvergTol, + PassFail(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag(1)))); + ShowContinueError( + state, + EnergyPlus::format("..Min Temp Comparison = {:.2R} vs Temperature Convergence Tolerance={:.2R} - {} Convergence", + state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).TestMinTempValue, + state.dataHeatBal->TempConvergTol, + PassFail(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag(2)))); + ShowContinueError( + state, + EnergyPlus::format("..Max Heat Load Comparison = {:.4R} vs Loads Convergence Tolerance={:.2R} - {} Convergence", + state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).TestMaxHeatLoadValue, + state.dataHeatBal->LoadsConvergTol, + PassFail(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag(3)))); + ShowContinueError( + state, + EnergyPlus::format("..Max Cool Load Comparison = {:.4R} vs Loads Convergence Tolerance={:.2R} - {} Convergence", + state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).TestMaxCoolLoadValue, + state.dataHeatBal->LoadsConvergTol, + PassFail(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag(4)))); } } @@ -3192,11 +3209,11 @@ namespace HeatBalanceManager { if ((state.dataGlobal->DayOfSim >= state.dataHeatBal->MaxNumberOfWarmupDays) && state.dataGlobal->WarmupFlag && ConvergenceChecksFailed) { if (state.dataHeatBal->MaxNumberOfWarmupDays < DataHeatBalance::DefaultMaxNumberOfWarmupDays) { ShowSevereError(state, - format("CheckWarmupConvergence: User supplied maximum warmup days={} is insufficient.", - state.dataHeatBal->MaxNumberOfWarmupDays)); - ShowContinueError( - state, - format("Suggest setting maximum number of warmup days to at least {}.", DataHeatBalance::DefaultMaxNumberOfWarmupDays)); + 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)); } } @@ -3551,25 +3568,26 @@ namespace HeatBalanceManager { if (frameDivider.DividerWidth > 0.0 && (frameDivider.HorDividers == 0 && frameDivider.VertDividers == 0)) { ShowWarningError(state, - format("{}: In FrameAndDivider {} {} > 0 ", - state.dataHeatBalMgr->CurrentModuleObject, - frameDivider.Name, - state.dataIPShortCut->cNumericFieldNames(9))); - ShowContinueError( - state, - format("...but {} = 0 and {} = 0.", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->cNumericFieldNames(11))); - ShowContinueError(state, format("...{} set to 0.", state.dataIPShortCut->cNumericFieldNames(9))); + EnergyPlus::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))); frameDivider.DividerWidth = 0.0; } // Prevent InsideSillDepth < InsideReveal if (frameDivider.InsideSillDepth < state.dataSurface->FrameDivider(FrameDividerNum).InsideReveal) { ShowWarningError(state, - 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))); + 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))); frameDivider.InsideSillDepth = state.dataSurface->FrameDivider(FrameDividerNum).InsideReveal; } @@ -3733,9 +3751,9 @@ namespace HeatBalanceManager { if (endcol > 0) { if (int(NextLine.data[endcol - 1]) == DataSystemVariables::iUnicode_end) { ShowSevereError(state, - format("SearchWindow5DataFile: For \"{}\" in {} file, appears to be a Unicode or binary file.", - DesiredConstructionName, - DesiredFilePath)); + EnergyPlus::format("SearchWindow5DataFile: For \"{}\" in {} file, appears to be a Unicode or binary file.", + DesiredConstructionName, + DesiredFilePath)); 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."); } @@ -3749,10 +3767,10 @@ namespace HeatBalanceManager { } ++FileLineCount; if (!has_prefixi(NextLine.data, "WINDOW5")) { - ShowSevereError(state, format("HeatBalanceManager: SearchWindow5DataFile: Error in Data File={}", DesiredFilePath)); - ShowFatalError( - state, - format("Error reading Window5 Data File: first word of window entry is \"{}\", should be Window5.", NextLine.data.substr(0, 7))); + 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))); } Label10:; @@ -3806,11 +3824,11 @@ namespace HeatBalanceManager { bool error = false; NGlSys = static_cast(Util::ProcessNumber(NextLine.data.substr(19), error)); if (NGlSys <= 0 || NGlSys > 2 || error) { - ShowFatalError( - state, - format("Construction={} from the Window5 data file cannot be used: it has {} glazing systems; only 1 or 2 are allowed.", - DesiredConstructionName, - NGlSys)); + 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)); } NextLine = W5DataFile.readLine(); if (NextLine.eof) { @@ -3835,49 +3853,54 @@ namespace HeatBalanceManager { if (!succeeded) { ShowSevereError( state, - format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of glazing system values. For glazing system={}", IGlSys)); - ShowContinueError(state, format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + 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))); ErrorsFound = true; } if (WinHeight(IGlSys) == 0.0 || WinWidth(IGlSys) == 0.0) { - ShowSevereError(state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " + 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)); ErrorsFound = true; } if (NGlass(IGlSys) <= 0 || NGlass(IGlSys) > 4) { - ShowSevereError(state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " + 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)); ErrorsFound = true; } if (UValCenter(IGlSys) <= 0.0) { - ShowSevereError(state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " + 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)); ErrorsFound = true; } if (SCCenter(IGlSys) <= 0.0) { - ShowWarningError( - state, - 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, + EnergyPlus::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, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file has flawed data: it " - "has a SHGC <= 0 in glazing system {}", - DesiredConstructionName, - IGlSys)); + 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)); } WinHeight(IGlSys) *= 0.001; WinWidth(IGlSys) *= 0.001; @@ -3898,16 +3921,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, - format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 10, DataLine(10).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, - format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 10, DataLine(10).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 10, DataLine(10).substr(0, 100))); ErrorsFound = true; } } @@ -3933,13 +3956,15 @@ namespace HeatBalanceManager { FrameEmis); if (!succeeded) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of frame data values."); - ShowContinueError(state, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 11, DataLine(11).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " + ShowSevereError( + state, + EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " "has Frame Conductance <= 0.0", DesiredConstructionName)); ErrorsFound = true; @@ -3959,9 +3984,10 @@ namespace HeatBalanceManager { if (FrameEmis <= 0.0 || FrameEmis >= 1.0) { ShowSevereError( state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it has " - "Frame Emissivity <= 0.0 or >= 1.0", - DesiredConstructionName)); + EnergyPlus::format( + "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it has " + "Frame Emissivity <= 0.0 or >= 1.0", + DesiredConstructionName)); ErrorsFound = true; } } @@ -3999,62 +4025,65 @@ namespace HeatBalanceManager { if (!dividerReadSucceeded) { ShowSevereError( state, - format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of divider data values. For Glazing System={}", IGlSys)); - ShowContinueError(state, - format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 11, NextLine.data.substr(0, 100))); + 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))); ErrorsFound = true; } uppercase(DividerType(IGlSys)); if (DividerWidth(IGlSys) > 0.0) { if (HorDividers(IGlSys) == 0 && VertDividers(IGlSys) == 0) { - ShowSevereError( - state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); + ShowSevereError(state, + EnergyPlus::format( + "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", + DesiredConstructionName)); ShowContinueError( - state, format("glazing system {} has a divider but number of horizontal and vertical divider elements = 0", IGlSys)); + state, + EnergyPlus::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, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError(state, format("glazing system {} has Divider Conductance <= 0.0", IGlSys)); + 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)); ErrorsFound = true; } if (DivEdgeToCenterGlCondRatio(IGlSys) < 1.0) { - ShowSevereError( - state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError(state, format("glazing system {} has Divider Edge-Of-Glass Conduction Ratio < 1.0", IGlSys)); + 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)); ErrorsFound = true; } if (DividerSolAbsorp(IGlSys) < 0.0 || DividerSolAbsorp(IGlSys) > 1.0) { - ShowSevereError( - state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError(state, format("glazing system {} has Divider Solar Absorptance < 0.0 or > 1.0", IGlSys)); + 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)); ErrorsFound = true; } if (DividerEmis(IGlSys) <= 0.0 || DividerEmis(IGlSys) >= 1.0) { - ShowSevereError( - state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError(state, format("glazing system {} has Divider Emissivity <= 0.0 or >= 1.0", IGlSys)); + 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)); ErrorsFound = true; } if (DividerType(IGlSys) != "DIVIDEDLITE" && DividerType(IGlSys) != "SUSPENDED") { - ShowSevereError( - state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError( - state, - format("glazing system {} has Divider Type = {}; it should be DIVIDEDLITE or SUSPENDED.", IGlSys, DividerType(IGlSys))); + ShowSevereError(state, + EnergyPlus::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))); ErrorsFound = true; } } @@ -4069,10 +4098,11 @@ namespace HeatBalanceManager { } if (ErrorsFound) { - ShowFatalError(state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used because " - "of above errors", - DesiredConstructionName)); + ShowFatalError( + state, + EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used because " + "of above errors", + DesiredConstructionName)); } for (IGlSys = 1; IGlSys <= NGlSys; ++IGlSys) { @@ -4089,8 +4119,8 @@ namespace HeatBalanceManager { for (IGlass = 1; IGlass <= NGlass(IGlSys); ++IGlass) { auto *mat = new Material::MaterialGlass; mat->group = Material::Group::Glass; - mat->Name = (NGlSys == 1) ? format("W5:{}:GLASS{}", DesiredConstructionName, NumName(IGlass)) - : format("W5:{}:{}:GLASS{}", DesiredConstructionName, NumName(IGlSys), NumName(IGlass)); + mat->Name = (NGlSys == 1) ? EnergyPlus::format("W5:{}:GLASS{}", DesiredConstructionName, NumName(IGlass)) + : EnergyPlus::format("W5:{}:{}:GLASS{}", DesiredConstructionName, NumName(IGlSys), NumName(IGlass)); s_mat->materials.push_back(mat); mat->Num = s_mat->materials.isize(); @@ -4121,12 +4151,13 @@ namespace HeatBalanceManager { mat->Roughness = Material::SurfaceRoughness::VerySmooth; mat->AbsorpThermal = mat->AbsorpThermalBack; if (mat->Thickness <= 0.0) { - ShowSevereError(state, - format("SearchWindow5DataFile: Material=\"{}\" has thickness of 0.0. Will be set to thickness = .001 but " + 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, format("Line being read={}", NextLine.data)); - ShowContinueError(state, format("Thickness field starts at column 26={}", NextLine.data.substr(25))); + ShowContinueError(state, EnergyPlus::format("Line being read={}", NextLine.data)); + ShowContinueError(state, EnergyPlus::format("Thickness field starts at column 26={}", NextLine.data.substr(25))); mat->Thickness = 0.001; } } @@ -4141,8 +4172,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) ? format("W5:{}:GAP{}", DesiredConstructionName, NumName(IGap)) - : format("W5:{}:{}:GAP{}", DesiredConstructionName, NumName(IGlSys), NumName(IGap)); + matGas->Name = (NGlSys == 1) ? EnergyPlus::format("W5:{}:GAP{}", DesiredConstructionName, NumName(IGap)) + : EnergyPlus::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); @@ -4332,11 +4363,13 @@ namespace HeatBalanceManager { ++FileLineCount; if (!readItem(NextLine.data.substr(5), TsolTemp)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of TSol values."); - ShowContinueError(state, format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + ShowContinueError( + state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); ErrorsFound = true; } @@ -4344,18 +4377,20 @@ namespace HeatBalanceManager { NextLine = W5DataFile.readLine(); ++FileLineCount; if (!readItem(NextLine.data.substr(5), AbsSolTemp(IGlass, _))) { - ShowSevereError(state, - format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of AbsSol values. For Glass={}", IGlass)); - ShowContinueError(state, - format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + 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))); ErrorsFound = true; } else if (any_lt(AbsSolTemp(IGlass, _), 0.0) || any_gt(AbsSolTemp(IGlass, _), 1.0)) { ShowSevereError( state, - format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of AbsSol values. (out of range [0,1]) For Glass={}", - IGlass)); - ShowContinueError(state, - format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + EnergyPlus::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))); ErrorsFound = true; } } @@ -4366,58 +4401,68 @@ namespace HeatBalanceManager { if (!readItem(DataLine(1).substr(5), RfsolTemp)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of RfSol values."); - ShowContinueError(state, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 1, DataLine(1).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 1, DataLine(1).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 2, DataLine(2).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 2, DataLine(2).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 3, DataLine(3).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 3, DataLine(3).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 4, DataLine(4).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 4, DataLine(4).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 5, DataLine(5).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::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, format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 5, DataLine(5).substr(0, 100))); + ShowContinueError( + state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 5, DataLine(5).substr(0, 100))); ErrorsFound = true; } FileLineCount += 5; if (ErrorsFound) { - ShowFatalError( - state, - format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used because " - "of above errors", - DesiredConstructionName)); + ShowFatalError(state, + EnergyPlus::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) { @@ -4710,31 +4755,31 @@ namespace HeatBalanceManager { if (Ffactor <= 0.0) { ShowSevereError(state, - format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(1))); - ShowContinueError(state, format("Entered value=[{:.2R}]", Ffactor)); + EnergyPlus::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, - format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(2))); - ShowContinueError(state, format("Entered value=[{:.2R}]", Area)); + EnergyPlus::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, - format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(3))); - ShowContinueError(state, format("Entered value=[{:.2R}]", PerimeterExposed)); + EnergyPlus::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; } @@ -4745,7 +4790,7 @@ namespace HeatBalanceManager { thisConstruct.LayerPoint(2) = iFCConcreteLayer; // The fictitious insulation is the outside layer - thisConstruct.LayerPoint(1) = Material::GetMaterialNum(state, format("~FC_INSULATION_{}", Loop)); + thisConstruct.LayerPoint(1) = Material::GetMaterialNum(state, EnergyPlus::format("~FC_INSULATION_{}", Loop)); // Calculate the thermal resistance of the fictitious insulation layer // effective thermal resistance excludes inside and outside air films @@ -4757,10 +4802,11 @@ namespace HeatBalanceManager { Rfic = Reff - Rcon; if (Rfic <= 0.0) { - ShowSevereError( - state, - format("{}=\"{}\" has calculated R value <= 0.0, must be > 0.0.", state.dataHeatBalMgr->CurrentModuleObject, ConstructAlphas(1))); - ShowContinueError(state, format("Calculated value=[{:.2R}] Check definition.", Rfic)); + ShowSevereError(state, + EnergyPlus::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; } @@ -4813,21 +4859,21 @@ namespace HeatBalanceManager { if (Cfactor <= 0.0) { ShowSevereError(state, - format("{} {} has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(1))); - ShowContinueError(state, format("Entered value=[{:.2R}]", Cfactor)); + EnergyPlus::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, - format("{} {} has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(2))); - ShowContinueError(state, format("Entered value=[{:.2R}]", Height)); + EnergyPlus::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; } @@ -4838,7 +4884,7 @@ namespace HeatBalanceManager { thisConstruct.LayerPoint(2) = iFCConcreteLayer; // The fictitious insulation is the outside layer - thisConstruct.LayerPoint(1) = Material::GetMaterialNum(state, format("~FC_INSULATION_{}", Loop + TotFfactorConstructs)); + thisConstruct.LayerPoint(1) = Material::GetMaterialNum(state, EnergyPlus::format("~FC_INSULATION_{}", Loop + TotFfactorConstructs)); // CR 8886 Rsoil should be in SI unit. From ASHRAE 90.1-2010 SI if (Height <= 0.25) { @@ -4854,10 +4900,11 @@ namespace HeatBalanceManager { Rfic = Reff - Rcon; if (Rfic <= 0) { - ShowSevereError( - state, - format("{}=\"{}\" has calculated R value <= 0.0, must be > 0.0.", state.dataHeatBalMgr->CurrentModuleObject, ConstructAlphas(1))); - ShowContinueError(state, format("Calculated value=[{:.2R}] Check definition.", Rfic)); + ShowSevereError(state, + EnergyPlus::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; } @@ -4886,8 +4933,9 @@ namespace HeatBalanceManager { // Cannot imagine how you would have numAirBoundaryConstructs > 0 and yet the instances is empty // 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, - format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", cCurrentModuleObject)); // LCOV_EXCL_LINE + ShowSevereError( + state, + EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", cCurrentModuleObject)); // LCOV_EXCL_LINE errorsFound = true; // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); @@ -4976,7 +5024,8 @@ namespace HeatBalanceManager { if (NumAlpha != 4) { ShowSevereError( state, - format("{}{}: Object Definition indicates not = 4 Alpha Objects, Number Indicated={}", RoutineName, cCurrentModuleObject, NumAlpha)); + EnergyPlus::format( + "{}{}: Object Definition indicates not = 4 Alpha Objects, Number Indicated={}", RoutineName, cCurrentModuleObject, NumAlpha)); ErrorsFound = true; } @@ -5096,19 +5145,19 @@ namespace HeatBalanceManager { } if (!NumOfLayersMatch) { - ShowSevereError( - state, - 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, + 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))); ShowContinueError(state, - format("{} have {} schedule layers and {} have {} layers.", - state.dataIPShortCut->cAlphaArgs(1), - NumOfScheduledLayers, - state.dataIPShortCut->cAlphaArgs(3), - thisConstruct.TotSolidLayers)); + EnergyPlus::format("{} have {} schedule layers and {} have {} layers.", + state.dataIPShortCut->cAlphaArgs(1), + NumOfScheduledLayers, + state.dataIPShortCut->cAlphaArgs(3), + thisConstruct.TotSolidLayers)); ErrorsFound = true; } @@ -5188,8 +5237,8 @@ namespace HeatBalanceManager { } if ((!ZoneScheduled) && (!ZoneUnscheduled)) { // zone is not scheduled nor unscheduled - ShowWarningError(state, - format("Zone {} does not have all surfaces scheduled with surface gains.", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowWarningError( + state, EnergyPlus::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."); @@ -5204,7 +5253,8 @@ namespace HeatBalanceManager { } if (SchedPtr == 0) { - ShowContinueError(state, format("Surface {} does not have scheduled surface gains.", state.dataSurface->Surface(iSurf).Name)); + ShowContinueError( + state, EnergyPlus::format("Surface {} does not have scheduled surface gains.", state.dataSurface->Surface(iSurf).Name)); } } } @@ -5271,7 +5321,7 @@ namespace HeatBalanceManager { auto &constrNew = state.dataConstruction->Construct(NumNewConst); constrNew = constr; // This should be a deep copy - constrNew.Name = format("{}_TC_{:.0R}", constr.Name, matGlassTC->matRefs(iTC).specTemp); + constrNew.Name = EnergyPlus::format("{}_TC_{:.0R}", constr.Name, matGlassTC->matRefs(iTC).specTemp); constrNew.LayerPoint(constrNew.TCLayerNum) = matGlassTC->matRefs(iTC).matNum; constrNew.specTemp = matGlassTC->matRefs(iTC).specTemp; @@ -5360,10 +5410,11 @@ namespace HeatBalanceManager { windowThermalModel.SDScalar = s_ipsc->rNumericArgs(1); if ((s_ipsc->rNumericArgs(1) < 0.0) || (s_ipsc->rNumericArgs(1) > 1.0)) { - ShowSevereCustom( - state, - eoh, - format("{} should be >= 0.0 and <= 1.0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); + ShowSevereCustom(state, + eoh, + EnergyPlus::format("{} should be >= 0.0 and <= 1.0, entered value = {:.2R}", + s_ipsc->cNumericFieldNames(1), + s_ipsc->rNumericArgs(1))); ErrorsFound = true; } @@ -5379,21 +5430,27 @@ namespace HeatBalanceManager { if (s_ipsc->rNumericArgs(2) <= 0.0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); + state, + eoh, + EnergyPlus::format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); } windowThermalModel.InitialTemperature = s_ipsc->rNumericArgs(3); if (s_ipsc->rNumericArgs(3) <= 0.0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(3), s_ipsc->rNumericArgs(3))); + state, + eoh, + EnergyPlus::format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(3), s_ipsc->rNumericArgs(3))); } windowThermalModel.InitialPressure = s_ipsc->rNumericArgs(4); if (s_ipsc->rNumericArgs(4) <= 0.0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(4), s_ipsc->rNumericArgs(4))); + state, + eoh, + EnergyPlus::format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(4), s_ipsc->rNumericArgs(4))); } } @@ -5486,9 +5543,9 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - format("{} entered value=\"{}\" invalid matrix dimensions. Basis matrix dimension can only be 2 x 1.", - locAlphaFieldNames(5), - locAlphaArgs(5))); + EnergyPlus::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); @@ -5509,7 +5566,7 @@ namespace HeatBalanceManager { if (mod((NumAlphas - 9), 3) != 0) { // throw warning if incomplete field set ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} is missing some of the layers or/and gaps.", locAlphaArgs(1))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} is missing some of the layers or/and gaps.", locAlphaArgs(1))); } if (thisConstruct.BSDFInput.BasisSymmetryType == DataBSDFWindow::BasisSymmetry::None) { @@ -5530,18 +5587,18 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - 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))); + 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))); } if (NumRows != NumCols) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - format("Solar front transmittance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(6))); + ShowSevereCustom(state, + eoh, + EnergyPlus::format("Solar front transmittance matrix \"{}\" must have the same number of rows and columns.", + locAlphaArgs(6))); } if (thisConstruct.BSDFInput.BasisType == DataBSDFWindow::Basis::Custom) { @@ -5552,10 +5609,10 @@ namespace HeatBalanceManager { thisConstruct.BSDFInput.SolFrtTrans.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.SolFrtTransIndex == 0) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - format("Solar front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(6))); + ShowSevereCustom(state, + eoh, + EnergyPlus::format("Solar front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", + locAlphaArgs(6))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.SolFrtTransIndex, thisConstruct.BSDFInput.SolFrtTrans); } @@ -5570,26 +5627,30 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - 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, + 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))); } if (NumRows != NumCols) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("Solar back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(7))); + state, + eoh, + EnergyPlus::format("Solar back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(7))); } thisConstruct.BSDFInput.SolBkRefl.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.SolBkReflIndex == 0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("Solar back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(7))); + state, + eoh, + EnergyPlus::format("Solar back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(7))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.SolBkReflIndex, thisConstruct.BSDFInput.SolBkRefl); } @@ -5604,30 +5665,30 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - 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, + 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))); } if (NumRows != NumCols) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - format("Visible front transmittance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(8))); + ShowSevereCustom(state, + eoh, + EnergyPlus::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, - format("Visible front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(8))); + ShowSevereCustom(state, + eoh, + EnergyPlus::format("Visible front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", + locAlphaArgs(8))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.VisFrtTransIndex, thisConstruct.BSDFInput.VisFrtTrans); } @@ -5642,25 +5703,30 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - 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))); + 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))); } if (NumRows != NumCols) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("Visible back reflectance \"{}\" must have the same number of rows and columns.", locAlphaArgs(9))); + state, + eoh, + EnergyPlus::format("Visible back reflectance \"{}\" must have the same number of rows and columns.", locAlphaArgs(9))); } thisConstruct.BSDFInput.VisBkRefl.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.VisBkReflIndex == 0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("Visible back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(9))); + state, + eoh, + EnergyPlus::format("Visible back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(9))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.VisBkReflIndex, thisConstruct.BSDFInput.VisBkRefl); } @@ -5689,33 +5755,35 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + EnergyPlus::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } if (NumCols != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - 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)); + 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)); } thisConstruct.BSDFInput.Layer(currentOpticalLayer).AbsNcols = NumCols; thisConstruct.BSDFInput.Layer(currentOpticalLayer).FrtAbs.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.Layer(currentOpticalLayer).FrtAbsIndex == 0) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + ShowSevereCustom( + state, + eoh, + EnergyPlus::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, @@ -5735,32 +5803,34 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + EnergyPlus::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } if (NumCols != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - 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)); + 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)); } thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbs.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbsIndex == 0) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + ShowSevereCustom( + state, + eoh, + EnergyPlus::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, @@ -5786,27 +5856,27 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - 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))); + 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))); } if (NumRows != NumCols) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - format("Solar front transmittance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(6))); + ShowSevereCustom(state, + eoh, + EnergyPlus::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, - format("Solar front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(6))); + ShowSevereCustom(state, + eoh, + EnergyPlus::format("Solar front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", + locAlphaArgs(6))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.SolFrtTransIndex, state.dataBSDFWindow->BSDFTempMtrx); @@ -5826,26 +5896,30 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - 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, + 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))); } if (NumRows != NumCols) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("Solar back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(7))); + state, + eoh, + EnergyPlus::format("Solar back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(7))); } thisConstruct.BSDFInput.SolBkRefl.allocate(NBasis, NBasis); if (thisConstruct.BSDFInput.SolBkReflIndex == 0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("Solar back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(7))); + state, + eoh, + EnergyPlus::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; @@ -5864,30 +5938,30 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - 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, + 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))); } if (NumRows != NumCols) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - format("Visible front transmittance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(8))); + ShowSevereCustom(state, + eoh, + EnergyPlus::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, - format("Visible front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(8))); + ShowSevereCustom(state, + eoh, + EnergyPlus::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; @@ -5906,25 +5980,30 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - 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))); + 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))); } if (NumRows != NumCols) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("Visible back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(9))); + state, + eoh, + EnergyPlus::format("Visible back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(9))); } thisConstruct.BSDFInput.VisBkRefl.allocate(NBasis, NBasis); if (thisConstruct.BSDFInput.VisBkReflIndex == 0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("Visible back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(9))); + state, + eoh, + EnergyPlus::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; @@ -5962,22 +6041,23 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + EnergyPlus::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } if (NumCols != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - 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)); + 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)); } thisConstruct.BSDFInput.Layer(currentOpticalLayer).AbsNcols = NumCols; @@ -5985,11 +6065,12 @@ namespace HeatBalanceManager { if (thisConstruct.BSDFInput.Layer(currentOpticalLayer).FrtAbsIndex == 0) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + ShowSevereCustom( + state, + eoh, + EnergyPlus::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, @@ -6009,33 +6090,35 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + EnergyPlus::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } if (NumCols != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - 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)); + 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)); } thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbs.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbsIndex == 0) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + ShowSevereCustom( + state, + eoh, + EnergyPlus::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 918f8b3e335..11c8870535b 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -4459,10 +4459,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, - format("ComputeIntSWAbsorbFactors: Sum of area times inside solar absorption for all surfaces is zero in Enclosure: {}", - thisSolEnclosure.Name)); + ShowWarningError(state, + EnergyPlus::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,18 +4777,20 @@ void InitEMSControlledConstructions(EnergyPlusData &state) "InitEMSControlledConstructions: EMS Construction State Actuator may be unrealistic, incompatible " "CTF timescales are being used."); ShowContinueError(state, - format("Construction named = {} has CTF timesteps = {}", - state.dataConstruction->Construct(surface.Construction).Name, - state.dataConstruction->Construct(surface.Construction).NumHistories)); + EnergyPlus::format("Construction named = {} has CTF timesteps = {}", + state.dataConstruction->Construct(surface.Construction).Name, + state.dataConstruction->Construct(surface.Construction).NumHistories)); ShowContinueError( state, - format("While construction named = {} has CTF timesteps = {}", - state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name, - state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).NumHistories)); + EnergyPlus::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, - format("Transient heat transfer modeling may not be valid for surface name = {}, and the simulation continues", - surface.Name)); + EnergyPlus::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) { @@ -4797,18 +4799,20 @@ void InitEMSControlledConstructions(EnergyPlusData &state) "InitEMSControlledConstructions: EMS Construction State Actuator may be unrealistic, incompatible " "CTF terms are being used."); ShowContinueError(state, - format("Construction named = {} has number of CTF terms = {}", - state.dataConstruction->Construct(surface.Construction).Name, - state.dataConstruction->Construct(surface.Construction).NumCTFTerms)); + EnergyPlus::format("Construction named = {} has number of CTF terms = {}", + state.dataConstruction->Construct(surface.Construction).Name, + state.dataConstruction->Construct(surface.Construction).NumCTFTerms)); ShowContinueError( state, - 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, - format("The actuator is allowed but the transient heat transfer modeling may not be valid for surface " - "name = {}, and the simulation continues", - surface.Name)); + EnergyPlus::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)); } if (state.dataConstruction->Construct(surface.Construction).SourceSinkPresent) { @@ -4816,16 +4820,18 @@ void InitEMSControlledConstructions(EnergyPlusData &state) // throw warning, and do not allow ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not valid."); ShowContinueError(state, - format("Construction named = {} has internal source/sink", - state.dataConstruction->Construct(surface.Construction).Name)); + EnergyPlus::format("Construction named = {} has internal source/sink", + state.dataConstruction->Construct(surface.Construction).Name)); ShowContinueError( state, - format("While construction named = {} is not an internal source/sink construction", - state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name)); + EnergyPlus::format( + "While construction named = {} is not an internal source/sink construction", + state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name)); ShowContinueError( state, - format("This actuator is not allowed for surface name = {}, and the simulation continues without the override", - surface.Name)); + EnergyPlus::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; @@ -4847,19 +4853,21 @@ void InitEMSControlledConstructions(EnergyPlusData &state) // throw warning, and do not allow ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not valid."); ShowContinueError(state, - format("Construction named = {} has number of finite difference nodes ={}", - state.dataConstruction->Construct(surface.Construction).Name, - state.dataHeatBalFiniteDiffMgr->ConstructFD(surface.Construction).TotNodes)); + EnergyPlus::format("Construction named = {} has number of finite difference nodes ={}", + state.dataConstruction->Construct(surface.Construction).Name, + state.dataHeatBalFiniteDiffMgr->ConstructFD(surface.Construction).TotNodes)); ShowContinueError( state, - 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)); + 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)); ShowContinueError( state, - format("This actuator is not allowed for surface name = {}, and the simulation continues without the override", - surface.Name)); + EnergyPlus::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; @@ -4870,16 +4878,18 @@ void InitEMSControlledConstructions(EnergyPlusData &state) // throw warning, and do not allow ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not valid."); ShowContinueError(state, - format("Construction named = {} has internal source/sink", - state.dataConstruction->Construct(surface.Construction).Name)); + EnergyPlus::format("Construction named = {} has internal source/sink", + state.dataConstruction->Construct(surface.Construction).Name)); ShowContinueError( state, - format("While construction named = {} is not an internal source/sink construction", - state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name)); + EnergyPlus::format( + "While construction named = {} is not an internal source/sink construction", + state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name)); ShowContinueError( state, - format("This actuator is not allowed for surface name = {}, and the simulation continues without the override", - surface.Name)); + EnergyPlus::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; @@ -4895,10 +4905,10 @@ void InitEMSControlledConstructions(EnergyPlusData &state) ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not available with Heat transfer " "algorithm CombinedHeatAndMoistureFiniteElement."); - ShowContinueError( - state, - format("This actuator is not allowed for surface name = {}, and the simulation continues without the override", - surface.Name)); + ShowContinueError(state, + EnergyPlus::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) = @@ -4908,10 +4918,10 @@ void InitEMSControlledConstructions(EnergyPlusData &state) ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not available for Surfaces with " "Foundation Outside Boundary Condition."); - ShowContinueError( - state, - format("This actuator is not allowed for surface name = {}, and the simulation continues without the override", - surface.Name)); + ShowContinueError(state, + EnergyPlus::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) = @@ -5038,29 +5048,29 @@ void UpdateNonRepresentativeSurfaceResults(EnergyPlusData &state, ObjexxFCL::Opt (state.dataHeatBalSurf->SurfTempIn(repSurfNum) - state.dataHeatBalSurfMgr->RefAirTemp(repSurfNum)); Real64 diff = surfConv - repSurfConv; if (std::abs(diff) > 3.0 && state.dataSurface->Surface(repSurfNum).ConstituentSurfaceNums.size() == 2) { - ShowWarningError(state, format("Difference in representative surface convection {:.3R} W/m2", diff)); + ShowWarningError(state, EnergyPlus::format("Difference in representative surface convection {:.3R} W/m2", diff)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format(" Original Surface: {}", surface.Name)); - ShowContinueError(state, format(" Inside surface temperature: {:.3R} C", state.dataHeatBalSurf->SurfTempIn(surfNum))); + ShowContinueError(state, EnergyPlus::format(" Original Surface: {}", surface.Name)); + ShowContinueError(state, EnergyPlus::format(" Inside surface temperature: {:.3R} C", state.dataHeatBalSurf->SurfTempIn(surfNum))); ShowContinueError(state, - format(" Inside convection coefficient: {:.3R} W/m2-K", state.dataHeatBalSurf->SurfHConvInt(surfNum))); + EnergyPlus::format(" Inside convection coefficient: {:.3R} W/m2-K", state.dataHeatBalSurf->SurfHConvInt(surfNum))); ShowContinueError(state, - format(" Sunlit fraction: {:.3R}", + EnergyPlus::format(" Sunlit fraction: {:.3R}", state.dataHeatBal->SurfSunlitFrac(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, surfNum))); - ShowContinueError(state, format(" Outside absorbed solar: {:.3R} W/m2", state.dataHeatBalSurf->SurfOpaqQRadSWOutAbs(surfNum))); + ShowContinueError(state, EnergyPlus::format(" Outside absorbed solar: {:.3R} W/m2", state.dataHeatBalSurf->SurfOpaqQRadSWOutAbs(surfNum))); ShowContinueError(state, - format(" Outside long wave radiation: {:.3R} W/m2", state.dataHeatBalSurf->QdotRadOutRepPerArea(surfNum))); - ShowContinueError(state, format(" Representative Surface: {}", state.dataSurface->Surface(repSurfNum).Name)); - ShowContinueError(state, format(" Inside surface temperature: {:.3R} C", state.dataHeatBalSurf->SurfTempIn(repSurfNum))); + 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, EnergyPlus::format(" Inside surface temperature: {:.3R} C", state.dataHeatBalSurf->SurfTempIn(repSurfNum))); ShowContinueError(state, - format(" Inside convection coefficient: {:.3R} W/m2-K", state.dataHeatBalSurf->SurfHConvInt(repSurfNum))); + EnergyPlus::format(" Inside convection coefficient: {:.3R} W/m2-K", state.dataHeatBalSurf->SurfHConvInt(repSurfNum))); ShowContinueError(state, - format(" Sunlit fraction: {:.3R}", + EnergyPlus::format(" Sunlit fraction: {:.3R}", state.dataHeatBal->SurfSunlitFrac(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, repSurfNum))); ShowContinueError(state, - format(" Outside absorbed solar: {:.3R} W/m2", state.dataHeatBalSurf->SurfOpaqQRadSWOutAbs(repSurfNum))); + EnergyPlus::format(" Outside absorbed solar: {:.3R} W/m2", state.dataHeatBalSurf->SurfOpaqQRadSWOutAbs(repSurfNum))); ShowContinueError( - state, format(" Outside long wave radiation: {:.3R} W/m2", state.dataHeatBalSurf->QdotRadOutRepPerArea(repSurfNum))); + state, EnergyPlus::format(" Outside long wave radiation: {:.3R} W/m2", state.dataHeatBalSurf->QdotRadOutRepPerArea(repSurfNum))); } #endif @@ -5636,9 +5646,9 @@ void CalculateZoneMRT(EnergyPlusData &state, thisZoneHB.MRT = zoneSumAET / state.dataHeatBalSurfMgr->ZoneAESum(ZoneNum); } else { if (state.dataHeatBalSurfMgr->CalculateZoneMRTfirstTime) { - ShowWarningError( - state, - format("Zone areas*inside surface emissivities are summing to zero, for Zone=\"{}\"", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowWarningError(state, + EnergyPlus::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; @@ -5658,8 +5668,9 @@ void CalculateZoneMRT(EnergyPlusData &state, thisEnclosure.MRT = thisEnclosure.sumAET / thisEnclosure.sumAE; } else { if (state.dataHeatBalSurfMgr->CalculateZoneMRTfirstTime) { - ShowWarningError(state, - format("Enclosure areas*inside surface emissivities are summing to zero, for Enclosure=\"{}\"", thisEnclosure.Name)); + ShowWarningError( + state, + EnergyPlus::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; @@ -8256,10 +8267,11 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, if (construct.SourceSinkPresent) { ShowSevereError(state, "Interior movable insulation is not valid with embedded sources/sinks"); - ShowContinueError(state, format("Construction {} contains an internal source or sink but also uses", construct.Name)); ShowContinueError(state, - format("interior movable insulation {} for a surface with that construction.", - s_mat->materials(state.dataSurface->intMovInsuls(SurfNum).matNum)->Name)); + 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)); ShowContinueError(state, "This is not currently allowed because the heat balance equations do not currently accommodate " "this combination."); @@ -8536,18 +8548,20 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, ++state.dataHeatBalSurfMgr->calcHeatBalInsideSurfErrCount; if (state.dataHeatBalSurfMgr->calcHeatBalInsideSurfErrCount < 16) { if (!state.dataHeatBal->AnyCondFD) { - ShowWarningError(state, - format("Inside surface heat balance did not converge with Max Temp Difference [C] ={:.3R} vs Max " - "Allowed Temp Diff [C] ={:.3R}", - MaxDelTemp, - state.dataHeatBal->MaxAllowedDelTemp)); + ShowWarningError( + state, + EnergyPlus::format("Inside surface heat balance did not converge with Max Temp Difference [C] ={:.3R} vs Max " + "Allowed Temp Diff [C] ={:.3R}", + MaxDelTemp, + state.dataHeatBal->MaxAllowedDelTemp)); ShowContinueErrorTimeStamp(state, ""); } else { - ShowWarningError(state, - format("Inside surface heat balance did not converge with Max Temp Difference [C] ={:.3R} vs Max " - "Allowed Temp Diff [C] ={:.6R}", - MaxDelTemp, - state.dataHeatBal->MaxAllowedDelTempCondFD)); + ShowWarningError( + state, + EnergyPlus::format("Inside surface heat balance did not converge with Max Temp Difference [C] ={:.3R} vs Max " + "Allowed Temp Diff [C] ={:.6R}", + MaxDelTemp, + state.dataHeatBal->MaxAllowedDelTempCondFD)); ShowContinueErrorTimeStamp(state, ""); } } else { @@ -9236,11 +9250,12 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state, if (!state.dataGlobal->WarmupFlag) { ++state.dataHeatBalSurfMgr->calcHeatBalInsideSurfErrCount; if (state.dataHeatBalSurfMgr->calcHeatBalInsideSurfErrCount < 16) { - ShowWarningError(state, - format("Inside surface heat balance did not converge with Max Temp Difference [C] ={:.3R} vs Max Allowed " - "Temp Diff [C] ={:.6R}", - MaxDelTemp, - state.dataHeatBal->MaxAllowedDelTempCondFD)); + ShowWarningError( + state, + EnergyPlus::format("Inside surface heat balance did not converge with Max Temp Difference [C] ={:.3R} vs Max Allowed " + "Temp Diff [C] ={:.6R}", + MaxDelTemp, + state.dataHeatBal->MaxAllowedDelTempCondFD)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd(state, @@ -9281,18 +9296,20 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i if (TH12 < DataHeatBalSurface::MinSurfaceTempLimit) { if (state.dataSurface->SurfLowTempErrCount(SurfNum) == 0) { ShowSevereMessage( - state, format(R"(Temperature (low) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); + state, + EnergyPlus::format(R"(Temperature (low) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueErrorTimeStamp(state, ""); if (!zone.TempOutOfBoundsReported) { - ShowContinueError(state, format("Zone=\"{}\", Diagnostic Details:", zone.Name)); + ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); if (zone.FloorArea > 0.0) { - ShowContinueError(state, format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); + ShowContinueError(state, + EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); } else { - ShowContinueError(state, format("...Internal Heat Gain (no floor) [{:.3R}] W", zone.InternalHeatGains)); + ShowContinueError(state, EnergyPlus::format("...Internal Heat Gain (no floor) [{:.3R}] W", zone.InternalHeatGains)); } if (state.afn->simulation_control.type == AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowContinueError(state, format("...Infiltration/Ventilation [{:.3R}] m3/s", zone.NominalInfilVent)); - ShowContinueError(state, format("...Mixing/Cross Mixing [{:.3R}] m3/s", zone.NominalMixing)); + ShowContinueError(state, EnergyPlus::format("...Infiltration/Ventilation [{:.3R}] m3/s", zone.NominalInfilVent)); + ShowContinueError(state, EnergyPlus::format("...Mixing/Cross Mixing [{:.3R}] m3/s", zone.NominalMixing)); } else { ShowContinueError(state, "...Airflow Network Simulation: Nominal Infiltration/Ventilation/Mixing not available."); } @@ -9323,19 +9340,21 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i } } else { if (state.dataSurface->SurfHighTempErrCount(SurfNum) == 0) { - ShowSevereMessage( - state, format(R"(Temperature (high) out of bounds ({:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); + ShowSevereMessage(state, + EnergyPlus::format( + R"(Temperature (high) out of bounds ({:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueErrorTimeStamp(state, ""); if (!zone.TempOutOfBoundsReported) { - ShowContinueError(state, format("Zone=\"{}\", Diagnostic Details:", zone.Name)); + ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); if (zone.FloorArea > 0.0) { - ShowContinueError(state, format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); + ShowContinueError(state, + EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); } else { - ShowContinueError(state, format("...Internal Heat Gain (no floor) [{:.3R}] W", zone.InternalHeatGains)); + ShowContinueError(state, EnergyPlus::format("...Internal Heat Gain (no floor) [{:.3R}] W", zone.InternalHeatGains)); } if (state.afn->simulation_control.type == AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowContinueError(state, format("...Infiltration/Ventilation [{:.3R}] m3/s", zone.NominalInfilVent)); - ShowContinueError(state, format("...Mixing/Cross Mixing [{:.3R}] m3/s", zone.NominalMixing)); + ShowContinueError(state, EnergyPlus::format("...Infiltration/Ventilation [{:.3R}] m3/s", zone.NominalInfilVent)); + ShowContinueError(state, EnergyPlus::format("...Mixing/Cross Mixing [{:.3R}] m3/s", zone.NominalMixing)); } else { ShowContinueError(state, "...Airflow Network Simulation: Nominal Infiltration/Ventilation/Mixing not available."); } @@ -9367,7 +9386,8 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i } if (zone.EnforcedReciprocity) { if (WarmupSurfTemp > 3) { - ShowSevereError(state, format("CalcHeatBalanceInsideSurf: Zone=\"{}\" has view factor enforced reciprocity", zone.Name)); + ShowSevereError(state, + EnergyPlus::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."); } @@ -9379,19 +9399,21 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i if ((TH12 > state.dataHeatBalSurf->MaxSurfaceTempLimitBeforeFatal) || (TH12 < DataHeatBalSurface::MinSurfaceTempLimitBeforeFatal)) { if (!state.dataGlobal->WarmupFlag) { if (TH12 < DataHeatBalSurface::MinSurfaceTempLimitBeforeFatal) { - ShowSevereError(state, - format(R"(Temperature (low) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); + ShowSevereError( + state, + EnergyPlus::format(R"(Temperature (low) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueErrorTimeStamp(state, ""); if (!zone.TempOutOfBoundsReported) { - ShowContinueError(state, format("Zone=\"{}\", Diagnostic Details:", zone.Name)); + ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); if (zone.FloorArea > 0.0) { - ShowContinueError(state, format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); + ShowContinueError(state, EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); } else { - ShowContinueError(state, format("...Internal Heat Gain (no floor) [{:.3R}] W", zone.InternalHeatGains / zone.FloorArea)); + ShowContinueError(state, + EnergyPlus::format("...Internal Heat Gain (no floor) [{:.3R}] W", zone.InternalHeatGains / zone.FloorArea)); } if (state.afn->simulation_control.type == AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowContinueError(state, format("...Infiltration/Ventilation [{:.3R}] m3/s", zone.NominalInfilVent)); - ShowContinueError(state, format("...Mixing/Cross Mixing [{:.3R}] m3/s", zone.NominalMixing)); + ShowContinueError(state, EnergyPlus::format("...Infiltration/Ventilation [{:.3R}] m3/s", zone.NominalInfilVent)); + ShowContinueError(state, EnergyPlus::format("...Mixing/Cross Mixing [{:.3R}] m3/s", zone.NominalMixing)); } else { ShowContinueError(state, "...Airflow Network Simulation: Nominal Infiltration/Ventilation/Mixing not available."); } @@ -9404,19 +9426,21 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i } ShowFatalError(state, "Program terminates due to preceding condition."); } else { - ShowSevereError(state, - format(R"(Temperature (high) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); + ShowSevereError( + state, + EnergyPlus::format(R"(Temperature (high) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueErrorTimeStamp(state, ""); if (!zone.TempOutOfBoundsReported) { - ShowContinueError(state, format("Zone=\"{}\", Diagnostic Details:", zone.Name)); + ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); if (zone.FloorArea > 0.0) { - ShowContinueError(state, format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); + ShowContinueError(state, EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); } else { - ShowContinueError(state, format("...Internal Heat Gain (no floor) [{:.3R}] W", zone.InternalHeatGains / zone.FloorArea)); + ShowContinueError(state, + EnergyPlus::format("...Internal Heat Gain (no floor) [{:.3R}] W", zone.InternalHeatGains / zone.FloorArea)); } if (state.afn->simulation_control.type == AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowContinueError(state, format("...Infiltration/Ventilation [{:.3R}] m3/s", zone.NominalInfilVent)); - ShowContinueError(state, format("...Mixing/Cross Mixing [{:.3R}] m3/s", zone.NominalMixing)); + ShowContinueError(state, EnergyPlus::format("...Infiltration/Ventilation [{:.3R}] m3/s", zone.NominalInfilVent)); + ShowContinueError(state, EnergyPlus::format("...Mixing/Cross Mixing [{:.3R}] m3/s", zone.NominalMixing)); } else { ShowContinueError(state, "...Airflow Network Simulation: Nominal Infiltration/Ventilation/Mixing not available."); } @@ -9433,7 +9457,8 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i if (TH12 < -10000. || TH12 > 10000.) { ShowSevereError( state, - format(R"(CalcHeatBalanceInsideSurf: The temperature of {:.2R} C for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); + EnergyPlus::format( + R"(CalcHeatBalanceInsideSurf: The temperature of {:.2R} C for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueError(state, "..is very far out of bounds during warmup. This may be an indication of a malformed zone."); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Program terminates due to preceding condition."); @@ -9710,10 +9735,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, 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, - format("exterior movable insulation {} for a surface with that construction.", - s_mat->materials(state.dataSurface->extMovInsuls(SurfNum).matNum)->Name)); + EnergyPlus::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; @@ -9918,7 +9943,7 @@ void InitSurfacePropertyViewFactors(EnergyPlusData &state) // Check if the sum of all defined view factors > 1.0 if (SrdSurfsViewFactor > 1.0) { - ShowSevereError(state, format("Illegal surrounding surfaces view factors for {}.", Surface.Name)); + ShowSevereError(state, EnergyPlus::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 0cbc3bc1b85..5ce85cb7ff4 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc @@ -104,7 +104,7 @@ GshpPeCoolingSpecs *GshpPeCoolingSpecs::factory(EnergyPlusData &state, const std return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("WWHPCoolingFactory: Error getting inputs for heat pump named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("WWHPCoolingFactory: Error getting inputs for heat pump named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -130,7 +130,8 @@ void GshpPeCoolingSpecs::simulate( this->SourceSideWaterMassFlowRate, FirstHVACIteration); } else { - ShowFatalError(state, format("SimHPWatertoWaterCOOLING:: Invalid loop connection {}, Requested Unit={}", ModuleCompName, this->Name)); + ShowFatalError(state, + EnergyPlus::format("SimHPWatertoWaterCOOLING:: Invalid loop connection {}, Requested Unit={}", ModuleCompName, this->Name)); } } @@ -217,7 +218,7 @@ void GetGshpInput(EnergyPlusData &state) thisGSHP.COP = NumArray(1); if (NumArray(1) == 0.0) { - ShowSevereError(state, format("{}:COP = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:COP = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } @@ -233,60 +234,60 @@ void GetGshpInput(EnergyPlusData &state) thisGSHP.LoadSideVolFlowRate = NumArray(6); if (NumArray(6) == 0.0) { - ShowSevereError(state, format("{}:Load Side Vol Flow Rate = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Load Side Vol Flow Rate = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.SourceSideVolFlowRate = NumArray(7); if (NumArray(7) == 0.0) { - ShowSevereError(state, format("{}:Source Side Vol Flow Rate = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Source Side Vol Flow Rate = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.LoadSideUACoeff = NumArray(8); if (NumArray(9) == 0.0) { - ShowSevereError(state, format("{}:Load Side Heat Transfer Coefficient = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Load Side Heat Transfer Coefficient = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.SourceSideUACoeff = NumArray(9); if (NumArray(8) == 0.0) { - ShowSevereError(state, format("{}:Source Side Heat Transfer Coefficient = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Source Side Heat Transfer Coefficient = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.CompPistonDisp = NumArray(10); if (NumArray(10) == 0.0) { - ShowSevereError(state, format("{}:Compressor Piston displacement/Stroke = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Compressor Piston displacement/Stroke = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.CompClearanceFactor = NumArray(11); if (NumArray(11) == 0.0) { - ShowSevereError(state, format("{}:Compressor Clearance Factor = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Compressor Clearance Factor = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.CompSucPressDrop = NumArray(12); if (NumArray(12) == 0.0) { - ShowSevereError(state, format("{}: Pressure Drop = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}: Pressure Drop = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.SuperheatTemp = NumArray(13); if (NumArray(13) == 0.0) { - ShowSevereError(state, format("{}:Source Side SuperHeat = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Source Side SuperHeat = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.PowerLosses = NumArray(14); if (NumArray(14) == 0.0) { - ShowSevereError(state, format("{}:Compressor Power Loss = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Compressor Power Loss = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.LossFactor = NumArray(15); if (NumArray(15) == 0.0) { - ShowSevereError(state, format("{}:Efficiency = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Efficiency = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } @@ -683,21 +684,23 @@ void GshpPeCoolingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) LoadSidePressure = this->refrig->getSatPressure(state, LoadSideRefridgTemp, RoutineName); if (SourceSidePressure < this->LowPressCutoff) { - ShowSevereError(state, format("{}=\"{}\" Cooling Source Side Pressure Less than the Design Minimum", ModuleCompName, this->Name)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" Cooling Source Side Pressure Less than the Design Minimum", ModuleCompName, this->Name)); ShowContinueError(state, - format("Cooling Source Side Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", - SourceSidePressure, - this->LowPressCutoff)); + EnergyPlus::format("Cooling Source Side Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", + SourceSidePressure, + this->LowPressCutoff)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Preceding Conditions cause termination."); } if (LoadSidePressure > this->HighPressCutoff) { - ShowSevereError(state, format("{}=\"{}\" Cooling Load Side Pressure greater than the Design Maximum", ModuleCompName, this->Name)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" Cooling Load Side Pressure greater than the Design Maximum", ModuleCompName, this->Name)); ShowContinueError(state, - format("Cooling Load Side Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", - LoadSidePressure, - this->HighPressCutoff)); + EnergyPlus::format("Cooling Load Side Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", + LoadSidePressure, + this->HighPressCutoff)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Preceding Conditions cause termination."); } @@ -707,18 +710,22 @@ void GshpPeCoolingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) DischargePr = SourceSidePressure + this->CompSucPressDrop; if (SuctionPr < this->LowPressCutoff) { - ShowSevereError(state, format("{}=\"{}\" Cooling Suction Pressure Less than the Design Minimum", ModuleCompName, this->Name)); - ShowContinueError( - state, format("Cooling Suction Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", 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)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Preceding Conditions cause termination."); } if (DischargePr > this->HighPressCutoff) { - ShowSevereError(state, format("{}=\"{}\" Cooling Discharge Pressure greater than the Design Maximum", ModuleCompName, this->Name)); - ShowContinueError( - state, - format("Cooling Discharge Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", DischargePr, this->HighPressCutoff)); + ShowSevereError(state, + EnergyPlus::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)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Preceding Conditions cause termination."); } @@ -787,16 +794,16 @@ void GshpPeCoolingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) if (IterationCount > IterationLimit) { ShowWarningError(state, "HeatPump:WaterToWater:ParameterEstimation, Cooling did not converge"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Heatpump Name = {}", this->Name)); - ShowContinueError( - state, - format("Heat Imbalance (%) = {}", std::abs(100.0 * (this->QSource - initialQSource) / (initialQSource + SmallNum)))); - ShowContinueError(state, format("Load-side heat transfer rate = {}", this->QLoad)); - ShowContinueError(state, format("Source-side heat transfer rate = {}", this->QSource)); - ShowContinueError(state, format("Source-side mass flow rate = {}", this->SourceSideWaterMassFlowRate)); - ShowContinueError(state, format("Load-side mass flow rate = {}", this->LoadSideWaterMassFlowRate)); - ShowContinueError(state, format("Source-side inlet temperature = {}", this->SourceSideWaterInletTemp)); - ShowContinueError(state, format("Load-side inlet temperature = {}", this->LoadSideWaterInletTemp)); + ShowContinueError(state, EnergyPlus::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)); } goto LOOPSourceEnth_exit; diff --git a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc index 4977043350e..34e38e87925 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc @@ -105,7 +105,7 @@ GshpPeHeatingSpecs *GshpPeHeatingSpecs::factory(EnergyPlusData &state, const std return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("WWHPHeatingFactory: Error getting inputs for heat pump named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("WWHPHeatingFactory: Error getting inputs for heat pump named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -132,7 +132,8 @@ void GshpPeHeatingSpecs::simulate( this->SourceSideWaterMassFlowRate, FirstHVACIteration); } else { - ShowFatalError(state, format("SimHPWatertoWaterHEATING:: Invalid loop connection {}, Requested Unit={}", ModuleCompName, this->Name)); + ShowFatalError(state, + EnergyPlus::format("SimHPWatertoWaterHEATING:: Invalid loop connection {}, Requested Unit={}", ModuleCompName, this->Name)); } } @@ -201,7 +202,7 @@ void GetGshpInput(EnergyPlusData &state) state.dataHPWaterToWaterHtg->NumGSHPs = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ModuleCompName); if (state.dataHPWaterToWaterHtg->NumGSHPs <= 0) { - ShowSevereError(state, format("{}: No Equipment found", ModuleCompName)); + ShowSevereError(state, EnergyPlus::format("{}: No Equipment found", ModuleCompName)); ErrorsFound = true; } @@ -220,7 +221,7 @@ void GetGshpInput(EnergyPlusData &state) thisGSHP.COP = NumArray(1); if (NumArray(1) == 0.0) { - ShowSevereError(state, format("{}:COP = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:COP = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } @@ -235,60 +236,60 @@ void GetGshpInput(EnergyPlusData &state) thisGSHP.LoadSideVolFlowRate = NumArray(6); if (NumArray(6) == 0.0) { - ShowSevereError(state, format("{}:Load Side Flow Rate = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Load Side Flow Rate = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.SourceSideVolFlowRate = NumArray(7); if (NumArray(7) == 0.0) { - ShowSevereError(state, format("{}:Source Side Flow Rate = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Source Side Flow Rate = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.LoadSideUACoeff = NumArray(8); if (NumArray(8) == 0.0) { - ShowSevereError(state, format("{}:Load Side Heat Transfer Coefficient = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Load Side Heat Transfer Coefficient = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.SourceSideUACoeff = NumArray(9); if (NumArray(9) == 0.0) { - ShowSevereError(state, format("{}:Source Side Heat Transfer Coefficient = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Source Side Heat Transfer Coefficient = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.CompPistonDisp = NumArray(10); if (NumArray(10) == 0.0) { - ShowSevereError(state, format("{}:Compressor Piston displacement/Storke = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Compressor Piston displacement/Storke = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.CompClearanceFactor = NumArray(11); if (NumArray(11) == 0.0) { - ShowSevereError(state, format("{}:Compressor Clearance Factor = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Compressor Clearance Factor = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.CompSucPressDrop = NumArray(12); if (NumArray(12) == 0.0) { - ShowSevereError(state, format("{}: Pressure Drop = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}: Pressure Drop = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.SuperheatTemp = NumArray(13); if (NumArray(13) == 0.0) { - ShowSevereError(state, format("{}:Source Side SuperHeat = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Source Side SuperHeat = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.PowerLosses = NumArray(14); if (NumArray(14) == 0.0) { - ShowSevereError(state, format("{}:Compressor Power Loss = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Compressor Power Loss = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } thisGSHP.LossFactor = NumArray(15); if (NumArray(15) == 0.0) { - ShowSevereError(state, format("{}:Efficiency = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); + ShowSevereError(state, EnergyPlus::format("{}:Efficiency = 0.0, Heatpump={}", ModuleCompName, thisGSHP.Name)); ErrorsFound = true; } @@ -356,7 +357,7 @@ void GetGshpInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("Errors Found in getting {} Input", ModuleCompNameUC)); + ShowFatalError(state, EnergyPlus::format("Errors Found in getting {} Input", ModuleCompNameUC)); } // CurrentModuleObject='HeatPump:WaterToWater:ParameterEstimation:Heating' @@ -638,17 +639,21 @@ void GshpPeHeatingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) // check cutoff pressures if (SourceSidePressure < this->LowPressCutoff) { - ShowSevereError(state, format("{}=\"{}\" Heating Source Side Pressure Less than the Design Minimum", ModuleCompName, this->Name)); - ShowContinueError( - state, - format("Source Side Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", SourceSidePressure, this->LowPressCutoff)); + 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}", + SourceSidePressure, + this->LowPressCutoff)); ShowFatalError(state, "Preceding Conditions cause termination."); } if (LoadSidePressure > this->HighPressCutoff) { - ShowSevereError(state, format("{}=\"{}\" Heating Load Side Pressure greater than the Design Maximum", ModuleCompName, this->Name)); - ShowContinueError( - state, - format("Load Side Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", 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)); ShowFatalError(state, "Preceding Conditions cause termination."); } @@ -658,16 +663,20 @@ void GshpPeHeatingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) Real64 DischargePr = LoadSidePressure + this->CompSucPressDrop; // check cutoff pressures if (SuctionPr < this->LowPressCutoff) { - ShowSevereError(state, format("{}=\"{}\" Heating Suction Pressure Less than the Design Minimum", ModuleCompName, this->Name)); - ShowContinueError( - state, format("Heating Suction Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", 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)); ShowFatalError(state, "Preceding Conditions cause termination."); } if (DischargePr > this->HighPressCutoff) { - ShowSevereError(state, format("{}=\"{}\" Heating Discharge Pressure greater than the Design Maximum", ModuleCompName, this->Name)); - ShowContinueError( - state, - format("Heating Discharge Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", DischargePr, this->HighPressCutoff)); + ShowSevereError(state, + EnergyPlus::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)); ShowFatalError(state, "Preceding Conditions cause termination."); } @@ -729,18 +738,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, format("{} did not converge", ModuleCompName)); + ShowWarningError(state, EnergyPlus::format("{} did not converge", ModuleCompName)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Heatpump Name = {}", this->Name)); - ShowContinueError( - state, - format("Heat Imbalance (%) = {:G}", std::abs(100.0 * (this->QLoad - initialQLoad) / (initialQLoad + SmallNum)))); - ShowContinueError(state, format("Load-side heat transfer rate = {:G}", this->QLoad)); - ShowContinueError(state, format("Source-side heat transfer rate = {:G}", this->QSource)); - ShowContinueError(state, format("Source-side mass flow rate = {:G}", this->SourceSideWaterMassFlowRate)); - ShowContinueError(state, format("Load-side mass flow rate = {:G}", this->LoadSideWaterMassFlowRate)); - ShowContinueError(state, format("Source-side inlet temperature = {:G}", this->SourceSideWaterInletTemp)); - ShowContinueError(state, format("Load-side inlet temperature = {:G}", this->LoadSideWaterInletTemp)); + 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)); } goto LOOPLoadEnth_exit; diff --git a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc index 69ce28304e1..28e136853e7 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc @@ -116,7 +116,7 @@ GshpSpecs *GshpSpecs::factory(EnergyPlusData &state, DataPlant::PlantEquipmentTy return thisObj; } - ShowFatalError(state, format("EquationFit_WWHP factory: Error getting inputs for wwhp named: {}", eir_wwhp_name)); + ShowFatalError(state, EnergyPlus::format("EquationFit_WWHP factory: Error getting inputs for wwhp named: {}", eir_wwhp_name)); return nullptr; } @@ -144,7 +144,8 @@ void GshpSpecs::simulate(EnergyPlusData &state, this->reportSourceSideMassFlowRate, FirstHVACIteration); } else { - ShowFatalError(state, format("SimHPWatertoWaterSimple:: Invalid loop connection {}, Requested Unit={}", HPEqFitCooling, this->Name)); + ShowFatalError(state, + EnergyPlus::format("SimHPWatertoWaterSimple:: Invalid loop connection {}, Requested Unit={}", HPEqFitCooling, this->Name)); } } else if (this->WWHPType == DataPlant::PlantEquipmentType::HPWaterEFHeating) { if (calledFromLocation.loopNum == this->LoadPlantLoc.loopNum) { // chilled water loop @@ -164,7 +165,8 @@ void GshpSpecs::simulate(EnergyPlusData &state, this->reportSourceSideMassFlowRate, FirstHVACIteration); } else { - ShowFatalError(state, format("SimHPWatertoWaterSimple:: Invalid loop connection {}, Requested Unit={}", HPEqFitCooling, this->Name)); + ShowFatalError(state, + EnergyPlus::format("SimHPWatertoWaterSimple:: Invalid loop connection {}, Requested Unit={}", HPEqFitCooling, this->Name)); } } else { ShowFatalError(state, "SimHPWatertoWaterSimple: Module called with incorrect GSHPType"); @@ -572,8 +574,9 @@ void GshpSpecs::GetWatertoWaterHPInput(EnergyPlusData &state) if (!thisGSHP.companionName.empty()) { thisGSHP.companionIndex = Util::FindItemInList(thisGSHP.companionName, state.dataHPWaterToWaterSimple->GSHP); if (thisGSHP.companionIndex == 0) { - ShowSevereError(state, - format("GetEquationFitWaterToWater Input: did not find companion heat pump named '{}' in heat pump called {}", + ShowSevereError( + state, + EnergyPlus::format("GetEquationFitWaterToWater Input: did not find companion heat pump named '{}' in heat pump called {}", thisGSHP.companionName, thisGSHP.Name)); ErrorsFound = true; @@ -919,9 +922,11 @@ void GshpSpecs::sizeCoolingWaterToWaterHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCoolingCap - nomCoolingCapUser) / nomCoolingCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("sizeCoolingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", nomCoolingCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpCoolingCap)); + ShowMessage( + state, EnergyPlus::format("sizeCoolingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", nomCoolingCapUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpCoolingCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -968,11 +973,13 @@ void GshpSpecs::sizeCoolingWaterToWaterHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpLoadSideVolFlowRate - nomLoadSideVolFlowUser) / nomLoadSideVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("sizeCoolingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Load Side Volume Flow Rate of {:.2R} [m3/s]", nomLoadSideVolFlowUser)); + ShowMessage( + state, EnergyPlus::format("sizeCoolingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Load Side Volume Flow Rate of {:.2R} [m3/s]", tmpLoadSideVolFlowRate)); + state, EnergyPlus::format("User-Specified Load Side Volume Flow Rate of {:.2R} [m3/s]", nomLoadSideVolFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Load Side Volume Flow Rate of {:.2R} [m3/s]", + tmpLoadSideVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1026,7 +1033,7 @@ void GshpSpecs::sizeCoolingWaterToWaterHP(EnergyPlusData &state) } else { // no companion heatpump, no plant sizing object if ((this->ratedLoadVolFlowCoolWasAutoSized || this->ratedCapCoolWasAutoSized) && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Water to Water Heat Pump requires a loop Sizing:Plant object."); - ShowContinueError(state, format("Occurs in HeatPump:WaterToWater:EquationFit:Cooling object = {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in HeatPump:WaterToWater:EquationFit:Cooling object = {}", this->Name)); errorsFound = true; } } @@ -1093,10 +1100,12 @@ void GshpSpecs::sizeCoolingWaterToWaterHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpSourceSideVolFlowRate - nomSourceSideVolFlowUser) / nomSourceSideVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("sizeCoolingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Source Side Volume Flow Rate of {:.2R} [m3/s]", nomSourceSideVolFlowUser)); - ShowContinueError(state, - format("differs from Design Size Source Side Volume Flow Rate of {:.2R} [m3/s]", tmpSourceSideVolFlowRate)); + ShowMessage(state, EnergyPlus::format("sizeCoolingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError( + state, EnergyPlus::format("User-Specified Source Side Volume Flow Rate of {:.2R} [m3/s]", nomSourceSideVolFlowUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Source Side Volume Flow Rate of {:.2R} [m3/s]", tmpSourceSideVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1143,9 +1152,10 @@ void GshpSpecs::sizeCoolingWaterToWaterHP(EnergyPlusData &state) } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpPowerDraw - nomPowerDrawUser) / nomPowerDrawUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("sizeCoolingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Cooling Power Consumption of {:.2R} [W]", nomPowerDrawUser)); - ShowContinueError(state, format("differs from Design Size Cooling Power Consumption of {:.2R} [W]", tmpPowerDraw)); + ShowMessage(state, EnergyPlus::format("sizeCoolingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Cooling Power Consumption of {:.2R} [W]", nomPowerDrawUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Cooling Power Consumption of {:.2R} [W]", tmpPowerDraw)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1260,9 +1270,11 @@ void GshpSpecs::sizeHeatingWaterToWaterHP(EnergyPlusData &state) } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatingCap - nomHeatingCapUser) / nomHeatingCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("sizeHeatingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", nomHeatingCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpHeatingCap)); + ShowMessage( + state, EnergyPlus::format("sizeHeatingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", nomHeatingCapUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpHeatingCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1309,11 +1321,13 @@ void GshpSpecs::sizeHeatingWaterToWaterHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpLoadSideVolFlowRate - nomLoadSideVolFlowUser) / nomLoadSideVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("sizeHeatingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Load Side Volume Flow Rate of {:.2R} [m3/s]", nomLoadSideVolFlowUser)); + ShowMessage( + state, EnergyPlus::format("sizeHeatingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( - state, format("differs from Design Size Load Side Volume Flow Rate of {:.2R} [m3/s]", tmpLoadSideVolFlowRate)); + state, EnergyPlus::format("User-Specified Load Side Volume Flow Rate of {:.2R} [m3/s]", nomLoadSideVolFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Load Side Volume Flow Rate of {:.2R} [m3/s]", + tmpLoadSideVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1367,7 +1381,7 @@ void GshpSpecs::sizeHeatingWaterToWaterHP(EnergyPlusData &state) } else { // no companion heatpump, no plant sizing object if ((this->ratedLoadVolFlowHeatWasAutoSized || this->ratedCapHeatWasAutoSized) && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Water to Water Heat Pump requires a loop Sizing:Plant object."); - ShowContinueError(state, format("Occurs in HeatPump:WaterToWater:EquationFit:Heating object = {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in HeatPump:WaterToWater:EquationFit:Heating object = {}", this->Name)); errorsFound = true; } } @@ -1433,10 +1447,12 @@ void GshpSpecs::sizeHeatingWaterToWaterHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpSourceSideVolFlowRate - nomSourceSideVolFlowUser) / nomSourceSideVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("sizeHeatingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Source Side Volume Flow Rate of {:.2R} [m3/s]", nomSourceSideVolFlowUser)); - ShowContinueError(state, - format("differs from Design Size Source Side Volume Flow Rate of {:.2R} [m3/s]", tmpSourceSideVolFlowRate)); + ShowMessage(state, EnergyPlus::format("sizeHeatingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError( + state, EnergyPlus::format("User-Specified Source Side Volume Flow Rate of {:.2R} [m3/s]", nomSourceSideVolFlowUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Source Side Volume Flow Rate of {:.2R} [m3/s]", tmpSourceSideVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1483,9 +1499,10 @@ void GshpSpecs::sizeHeatingWaterToWaterHP(EnergyPlusData &state) } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpPowerDraw - nomPowerDrawUser) / nomPowerDrawUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("sizeHeatingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Heating Power Consumption of {:.2R} [W]", nomPowerDrawUser)); - ShowContinueError(state, format("differs from Design Size Heating Power Consumption of {:.2R} [W]", tmpPowerDraw)); + ShowMessage(state, EnergyPlus::format("sizeHeatingWaterToWaterHP: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Heating Power Consumption of {:.2R} [W]", nomPowerDrawUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Heating Power Consumption of {:.2R} [W]", tmpPowerDraw)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1600,12 +1617,13 @@ void GshpSpecs::CalcWatertoWaterHPCooling(EnergyPlusData &state, Real64 const My if (QLoad <= 0.0) { if (this->CoolCapNegativeCounter < 1) { ++this->CoolCapNegativeCounter; - ShowWarningError(state, format("{} \"{}\":", HPEqFitCooling, this->Name)); - ShowContinueError(state, format(" Cooling capacity curve output is <= 0.0 ({:.4T}).", QLoad)); - ShowContinueError(state, format(" Zero or negative value occurs with a load-side inlet temperature of {:.2T} C,", LoadSideInletTemp)); - ShowContinueError(state, format(" a source-side inlet temperature of {:.2T} C,", SourceSideInletTemp)); - ShowContinueError(state, format(" a load-side mass flow rate of {:.3T} kg/s,", LoadSideMassFlowRate)); - ShowContinueError(state, format(" and a source-side mass flow rate of {:.3T} kg/s.", SourceSideMassFlowRate)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\":", HPEqFitCooling, this->Name)); + ShowContinueError(state, EnergyPlus::format(" Cooling 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)); ShowContinueErrorTimeStamp(state, " The heat pump is turned off for this time step but simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -1619,12 +1637,13 @@ void GshpSpecs::CalcWatertoWaterHPCooling(EnergyPlusData &state, Real64 const My if (Power <= 0.0) { if (this->CoolPowerNegativeCounter < 1) { ++this->CoolPowerNegativeCounter; - ShowWarningError(state, format("{} \"{}\":", HPEqFitCooling, this->Name)); - ShowContinueError(state, format(" Cooling compressor power curve output is <= 0.0 ({:.4T}).", Power)); - ShowContinueError(state, format(" Zero or negative value occurs with a load-side inlet temperature of {:.2T} C,", LoadSideInletTemp)); - ShowContinueError(state, format(" a source-side inlet temperature of {:.2T} C,", SourceSideInletTemp)); - ShowContinueError(state, format(" a load-side mass flow rate of {:.3T} kg/s,", LoadSideMassFlowRate)); - ShowContinueError(state, format(" and a source-side mass flow rate of {:.3T} kg/s.", SourceSideMassFlowRate)); + 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)); ShowContinueErrorTimeStamp(state, " The heat pump is turned off for this time step but simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -1747,12 +1766,13 @@ void GshpSpecs::CalcWatertoWaterHPHeating(EnergyPlusData &state, Real64 const My if (QLoad <= 0.0) { if (this->HeatCapNegativeCounter < 1) { ++this->HeatCapNegativeCounter; - ShowWarningError(state, format("{} \"{}\":", HPEqFitHeating, this->Name)); - ShowContinueError(state, format(" Heating capacity curve output is <= 0.0 ({:.4T}).", QLoad)); - ShowContinueError(state, format(" Zero or negative value occurs with a load-side inlet temperature of {:.2T} C,", LoadSideInletTemp)); - ShowContinueError(state, format(" a source-side inlet temperature of {:.2T} C,", SourceSideInletTemp)); - ShowContinueError(state, format(" a load-side mass flow rate of {:.3T} kg/s,", LoadSideMassFlowRate)); - ShowContinueError(state, format(" and a source-side mass flow rate of {:.3T} kg/s.", SourceSideMassFlowRate)); + 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)); ShowContinueErrorTimeStamp(state, " The heat pump is turned off for this time step but simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -1766,12 +1786,13 @@ void GshpSpecs::CalcWatertoWaterHPHeating(EnergyPlusData &state, Real64 const My if (Power <= 0.0) { if (this->HeatPowerNegativeCounter < 1) { ++this->HeatPowerNegativeCounter; - ShowWarningError(state, format("{} \"{}\":", HPEqFitHeating, this->Name)); - ShowContinueError(state, format(" Heating compressor power curve output is <= 0.0 ({:.4T}).", Power)); - ShowContinueError(state, format(" Zero or negative value occurs with a load-side inlet temperature of {:.2T} C,", LoadSideInletTemp)); - ShowContinueError(state, format(" a source-side inlet temperature of {:.2T} C,", SourceSideInletTemp)); - ShowContinueError(state, format(" a load-side mass flow rate of {:.3T} kg/s,", LoadSideMassFlowRate)); - ShowContinueError(state, format(" and a source-side mass flow rate of {:.3T} kg/s.", SourceSideMassFlowRate)); + 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)); 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 2f9486b75d0..b316c13a115 100644 --- a/src/EnergyPlus/HeatRecovery.cc +++ b/src/EnergyPlus/HeatRecovery.cc @@ -161,25 +161,26 @@ namespace HeatRecovery { if (CompIndex == 0) { HeatExchNum = Util::FindItemInList(CompName, state.dataHeatRecovery->ExchCond); if (HeatExchNum == 0) { - ShowFatalError(state, format("SimHeatRecovery: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimHeatRecovery: Unit not found={}", CompName)); } CompIndex = HeatExchNum; } else { HeatExchNum = CompIndex; if (HeatExchNum > state.dataHeatRecovery->NumHeatExchangers || HeatExchNum < 1) { ShowFatalError(state, - format("SimHeatRecovery: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - HeatExchNum, - state.dataHeatRecovery->NumHeatExchangers, - CompName)); + EnergyPlus::format("SimHeatRecovery: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + HeatExchNum, + state.dataHeatRecovery->NumHeatExchangers, + CompName)); } if (state.dataHeatRecovery->CheckEquipName(HeatExchNum)) { if (CompName != state.dataHeatRecovery->ExchCond(HeatExchNum).Name) { - ShowFatalError(state, - format("SimHeatRecovery: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - HeatExchNum, - CompName, - state.dataHeatRecovery->ExchCond(HeatExchNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimHeatRecovery: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + HeatExchNum, + CompName, + state.dataHeatRecovery->ExchCond(HeatExchNum).Name)); } state.dataHeatRecovery->CheckEquipName(HeatExchNum) = false; } @@ -330,7 +331,8 @@ namespace HeatRecovery { "COUNTERFLOW", "PARALLELFLOW", "CROSSFLOWBOTHUNMIXED", "CROSS_FLOW_OTHER_NOT_USED"}; thisExchanger.FlowArr = static_cast(getEnumValue(hxConfigurationNamesUC, state.dataIPShortCut->cAlphaArgs(3))); if (thisExchanger.FlowArr == HXConfiguration::Invalid) { - ShowSevereError(state, format("{}: incorrect flow arrangement: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(3))); + ShowSevereError(state, + EnergyPlus::format("{}: incorrect flow arrangement: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; } @@ -339,7 +341,8 @@ namespace HeatRecovery { } else { BooleanSwitch toggle = getYesNoValue(state.dataIPShortCut->cAlphaArgs(4)); if (toggle == BooleanSwitch::Invalid) { - ShowSevereError(state, format("{}: incorrect econo lockout: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(4))); + ShowSevereError(state, + EnergyPlus::format("{}: incorrect econo lockout: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(4))); } thisExchanger.EconoLockOut = static_cast(toggle); } @@ -483,7 +486,7 @@ namespace HeatRecovery { } else { if (!Util::SameString(state.dataIPShortCut->cAlphaArgs(7), "No")) { ShowSevereError(state, "Rotary HX Speed Modulation or Plate Bypass for Temperature Control for "); - ShowContinueError(state, format("{} must be set to Yes or No", thisExchanger.Name)); + ShowContinueError(state, EnergyPlus::format("{} must be set to Yes or No", thisExchanger.Name)); ErrorsFound = true; } } @@ -504,7 +507,8 @@ namespace HeatRecovery { } else { BooleanSwitch toggle = getYesNoValue(state.dataIPShortCut->cAlphaArgs(10)); if (toggle == BooleanSwitch::Invalid) { - ShowSevereError(state, format("{}: incorrect econo lockout: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(10))); + ShowSevereError( + state, EnergyPlus::format("{}: incorrect econo lockout: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(10))); } thisExchanger.EconoLockOut = static_cast(toggle); } @@ -627,7 +631,8 @@ namespace HeatRecovery { } else { BooleanSwitch toggle = getYesNoValue(state.dataIPShortCut->cAlphaArgs(9)); if (toggle == BooleanSwitch::Invalid) { - ShowSevereError(state, format("{}: incorrect econo lockout: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(9))); + ShowSevereError(state, + EnergyPlus::format("{}: incorrect econo lockout: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(9))); } thisExchanger.EconoLockOut = static_cast(toggle); } @@ -660,9 +665,9 @@ namespace HeatRecovery { thisPerfData.NomSupAirVolFlow = state.dataIPShortCut->rNumericArgs(1); // check validity if (thisPerfData.NomSupAirVolFlow <= 0.0 && thisPerfData.NomSupAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Nominal air flow rate must be greater than zero."); - ShowContinueError(state, format("... value entered = {:.6R}", thisPerfData.NomSupAirVolFlow)); + ShowContinueError(state, EnergyPlus::format("... value entered = {:.6R}", thisPerfData.NomSupAirVolFlow)); ErrorsFound = true; } @@ -670,17 +675,17 @@ namespace HeatRecovery { // check validity if ((thisPerfData.NomProcAirFaceVel <= 0.0 && thisPerfData.NomProcAirFaceVel != DataSizing::AutoSize) || thisPerfData.NomProcAirFaceVel > 6.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Nominal air face velocity cannot be less than or equal to zero or greater than 6 m/s."); - ShowContinueError(state, format("... value entered = {:.6R}", thisPerfData.NomProcAirFaceVel)); + ShowContinueError(state, EnergyPlus::format("... value entered = {:.6R}", thisPerfData.NomProcAirFaceVel)); ErrorsFound = true; } thisPerfData.NomElecPower = state.dataIPShortCut->rNumericArgs(3); // check validity if (thisPerfData.NomElecPower < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Nominal electric power cannot be less than zero."); - ShowContinueError(state, format("... value entered = {:.6R}", thisPerfData.NomElecPower)); + ShowContinueError(state, EnergyPlus::format("... value entered = {:.6R}", thisPerfData.NomElecPower)); ErrorsFound = true; } @@ -693,144 +698,144 @@ namespace HeatRecovery { thisPerfData.T_MinRegenAirInHumRat = state.dataIPShortCut->rNumericArgs(12); thisPerfData.T_MaxRegenAirInHumRat = state.dataIPShortCut->rNumericArgs(13); if (thisPerfData.T_MinRegenAirInHumRat >= thisPerfData.T_MaxRegenAirInHumRat) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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 regeneration inlet air humidity ratio must be less than the maximum."); - ShowContinueError(state, format("... minimum value entered by user = {:.6R}", thisPerfData.T_MinRegenAirInHumRat)); - ShowContinueError(state, format("... maximum value entered by user = {:.6R}", thisPerfData.T_MaxRegenAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.T_MinRegenAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.T_MaxRegenAirInHumRat)); ErrorsFound = true; } if (thisPerfData.T_MinRegenAirInHumRat < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the minimum value of regeneration inlet air humidity ratio must be greater than or equal to 0."); - ShowContinueError(state, format("... minimum value entered by user = {:.6R}", thisPerfData.T_MinRegenAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.T_MinRegenAirInHumRat)); ErrorsFound = true; } if (thisPerfData.T_MaxRegenAirInHumRat > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in max boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the maximum value of regeneration inlet air humidity ratio must be less than or equal to 1."); - ShowContinueError(state, format("... maximum value entered by user = {:.6R}", thisPerfData.T_MaxRegenAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.T_MaxRegenAirInHumRat)); ErrorsFound = true; } thisPerfData.T_MinRegenAirInTemp = state.dataIPShortCut->rNumericArgs(14); thisPerfData.T_MaxRegenAirInTemp = state.dataIPShortCut->rNumericArgs(15); if (thisPerfData.T_MinRegenAirInTemp >= thisPerfData.T_MaxRegenAirInTemp) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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 regeneration inlet air temperature must be less than the maximum."); - ShowContinueError(state, format("... minimum value entered = {:.6R}", thisPerfData.T_MinRegenAirInTemp)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.T_MaxRegenAirInTemp)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinRegenAirInTemp)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxRegenAirInTemp)); ErrorsFound = true; } thisPerfData.T_MinProcAirInHumRat = state.dataIPShortCut->rNumericArgs(16); thisPerfData.T_MaxProcAirInHumRat = state.dataIPShortCut->rNumericArgs(17); if (thisPerfData.T_MinProcAirInHumRat >= thisPerfData.T_MaxProcAirInHumRat) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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 humidity ratio must be less than the maximum."); - ShowContinueError(state, format("... minimum value entered by user = {:.6R}", thisPerfData.T_MinProcAirInHumRat)); - ShowContinueError(state, format("... maximum value entered by user = {:.6R}", thisPerfData.T_MaxProcAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.T_MinProcAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.T_MaxProcAirInHumRat)); ErrorsFound = true; } if (thisPerfData.T_MinProcAirInHumRat < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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 humidity ratio must be greater than or equal to 0."); - ShowContinueError(state, format("... minimum value entered by user = {:.6R}", thisPerfData.T_MinProcAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.T_MinProcAirInHumRat)); ErrorsFound = true; } if (thisPerfData.T_MaxProcAirInHumRat > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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 humidity ratio must be less than or equal to 1."); - ShowContinueError(state, format("... maximum value entered by user = {:.6R}", thisPerfData.T_MaxProcAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.T_MaxProcAirInHumRat)); ErrorsFound = true; } thisPerfData.T_MinProcAirInTemp = state.dataIPShortCut->rNumericArgs(18); thisPerfData.T_MaxProcAirInTemp = state.dataIPShortCut->rNumericArgs(19); if (thisPerfData.T_MinProcAirInTemp >= thisPerfData.T_MaxProcAirInTemp) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInTemp)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.T_MaxProcAirInTemp)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInTemp)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxProcAirInTemp)); ErrorsFound = true; } thisPerfData.T_MinFaceVel = state.dataIPShortCut->rNumericArgs(20); thisPerfData.T_MaxFaceVel = state.dataIPShortCut->rNumericArgs(21); if (thisPerfData.T_MinFaceVel >= thisPerfData.T_MaxFaceVel) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.T_MinFaceVel)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.T_MaxFaceVel)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinFaceVel)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxFaceVel)); ErrorsFound = true; } thisPerfData.MinRegenAirOutTemp = state.dataIPShortCut->rNumericArgs(22); thisPerfData.MaxRegenAirOutTemp = state.dataIPShortCut->rNumericArgs(23); if (thisPerfData.MinRegenAirOutTemp >= thisPerfData.MaxRegenAirOutTemp) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutTemp)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.MaxRegenAirOutTemp)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutTemp)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.MaxRegenAirOutTemp)); ErrorsFound = true; } 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, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.T_MinRegenAirInRelHum * 100.0)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.T_MaxRegenAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinRegenAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxRegenAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.T_MinRegenAirInRelHum < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.T_MinRegenAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinRegenAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.T_MaxRegenAirInRelHum > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... maximum value entered = {:.6R}", thisPerfData.T_MaxRegenAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxRegenAirInRelHum * 100.0)); ErrorsFound = true; } 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, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInRelHum * 100.0)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.T_MaxProcAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxProcAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.T_MinProcAirInRelHum < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.T_MaxProcAirInRelHum > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... maximum value entered = {:.6R}", thisPerfData.T_MaxProcAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxProcAirInRelHum * 100.0)); ErrorsFound = true; } @@ -843,158 +848,158 @@ 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, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinRegenAirInHumRat)); - ShowContinueError(state, format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxRegenAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinRegenAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxRegenAirInHumRat)); ErrorsFound = true; } if (thisPerfData.H_MinRegenAirInHumRat < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinRegenAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinRegenAirInHumRat)); ErrorsFound = true; } if (thisPerfData.H_MaxRegenAirInHumRat > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxRegenAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxRegenAirInHumRat)); ErrorsFound = true; } thisPerfData.H_MinRegenAirInTemp = state.dataIPShortCut->rNumericArgs(38); thisPerfData.H_MaxRegenAirInTemp = state.dataIPShortCut->rNumericArgs(39); if (thisPerfData.H_MinRegenAirInTemp >= thisPerfData.H_MaxRegenAirInTemp) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInTemp)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.H_MaxRegenAirInTemp)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInTemp)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxRegenAirInTemp)); ErrorsFound = true; } thisPerfData.H_MinProcAirInHumRat = state.dataIPShortCut->rNumericArgs(40); thisPerfData.H_MaxProcAirInHumRat = state.dataIPShortCut->rNumericArgs(41); if (thisPerfData.H_MinProcAirInHumRat >= thisPerfData.H_MaxProcAirInHumRat) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinProcAirInHumRat)); - ShowContinueError(state, format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxProcAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinProcAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxProcAirInHumRat)); ErrorsFound = true; } if (thisPerfData.H_MinProcAirInHumRat < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinProcAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinProcAirInHumRat)); ErrorsFound = true; } if (thisPerfData.H_MaxProcAirInHumRat > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxProcAirInHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxProcAirInHumRat)); ErrorsFound = true; } thisPerfData.H_MinProcAirInTemp = state.dataIPShortCut->rNumericArgs(42); thisPerfData.H_MaxProcAirInTemp = state.dataIPShortCut->rNumericArgs(43); if (thisPerfData.H_MinProcAirInTemp >= thisPerfData.H_MaxProcAirInTemp) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInTemp)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.H_MaxProcAirInTemp)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInTemp)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxProcAirInTemp)); ErrorsFound = true; } thisPerfData.H_MinFaceVel = state.dataIPShortCut->rNumericArgs(44); thisPerfData.H_MaxFaceVel = state.dataIPShortCut->rNumericArgs(45); if (thisPerfData.H_MinFaceVel >= thisPerfData.H_MaxFaceVel) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.H_MinFaceVel)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.H_MaxFaceVel)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinFaceVel)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxFaceVel)); ErrorsFound = true; } thisPerfData.MinRegenAirOutHumRat = state.dataIPShortCut->rNumericArgs(46); thisPerfData.MaxRegenAirOutHumRat = state.dataIPShortCut->rNumericArgs(47); if (thisPerfData.MinRegenAirOutHumRat >= thisPerfData.MaxRegenAirOutHumRat) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutHumRat)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.MaxRegenAirOutHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.MaxRegenAirOutHumRat)); ErrorsFound = true; } if (thisPerfData.MinRegenAirOutHumRat < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutHumRat)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutHumRat)); ErrorsFound = true; } if (thisPerfData.MaxRegenAirOutHumRat > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... maximum value entered = {:.6R}", thisPerfData.MaxRegenAirOutHumRat)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.MaxRegenAirOutHumRat)); ErrorsFound = true; } 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, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInRelHum * 100.0)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.H_MaxRegenAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxRegenAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.H_MinRegenAirInRelHum < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.H_MaxRegenAirInRelHum > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... maximum value entered = {:.6R}", thisPerfData.H_MaxRegenAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxRegenAirInRelHum * 100.0)); ErrorsFound = true; } 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, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInRelHum * 100.0)); - ShowContinueError(state, format("... maximum value entered = {:.6R}", thisPerfData.H_MaxProcAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxProcAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.H_MinProcAirInRelHum < 0.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.H_MaxProcAirInRelHum > 1.0) { - ShowSevereError(state, format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, EnergyPlus::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, format("... maximum value entered = {:.6R}", thisPerfData.H_MaxProcAirInRelHum * 100.0)); + ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxProcAirInRelHum * 100.0)); ErrorsFound = true; } } @@ -1011,8 +1016,8 @@ namespace HeatRecovery { } } if (thisExchanger.PerfDataIndex == 0) { - ShowSevereError(state, format("{} \"{}\"", HVAC::hxTypeNames[(int)thisExchanger.type], thisExchanger.Name)); - ShowContinueError(state, format("... Performance data set not found = {}", thisExchanger.HeatExchPerfName)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", HVAC::hxTypeNames[(int)thisExchanger.type], thisExchanger.Name)); + ShowContinueError(state, EnergyPlus::format("... Performance data set not found = {}", thisExchanger.HeatExchPerfName)); ErrorsFound = true; } else { if (!ErrorsFound) { @@ -1182,7 +1187,7 @@ namespace HeatRecovery { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Program terminates.", RoutineName)); } } @@ -1252,68 +1257,68 @@ namespace HeatRecovery { break; // great! case CalculateNTUBoundsErrors::MassFlowRatio: FatalError = true; - ShowSevereError(state, format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the mass flow ratio is out of bounds"); - ShowContinueError(state, format("The mass flow ratio is (Min_Mass_Flow_Rate / Max_Mass_Flow_Rate) = {:.2R}", Z)); + 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"); ShowContinueError(state, - format("Min_Mass_Flow_Rate = {:.2R} [air density] * {:.1R} [Min_Vol_Flow_Rate]", - RhoAir, - min(this->NomSupAirVolFlow, this->NomSecAirVolFlow))); + EnergyPlus::format("Min_Mass_Flow_Rate = {:.2R} [air density] * {:.1R} [Min_Vol_Flow_Rate]", + RhoAir, + min(this->NomSupAirVolFlow, this->NomSecAirVolFlow))); ShowContinueError(state, - format("Max_Mass_Flow_Rate = {:.2R} [air density] * {:.1R} [Max_Vol_Flow_Rate]", - RhoAir, - max(this->NomSupAirVolFlow, this->NomSecAirVolFlow))); + EnergyPlus::format("Max_Mass_Flow_Rate = {:.2R} [air density] * {:.1R} [Max_Vol_Flow_Rate]", + RhoAir, + max(this->NomSupAirVolFlow, this->NomSecAirVolFlow))); break; case CalculateNTUBoundsErrors::NominalEffectiveness1: FatalError = true; - ShowSevereError(state, format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the calculated nominal effectiveness is out of bounds"); - ShowContinueError(state, format("The effectiveness is {:.3R}", Eps0)); - ShowContinueError(state, format("The effectiveness should be >= 0.0 and <= {:.3R}", 1.0 / (1.0 + Z))); + 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))); ShowContinueError(state, "Eff = (Nom_Sup_Mass_Flow_Rate/Min_Mass_Flow_Rate)*(T_nom_sup_out-T_nom_sup_in)/(T_nom_sec_in-T_nom_sup_in)"); ShowContinueError(state, "The temperatures are user inputs. The mass flow rates are user input volume flow rates"); - ShowContinueError(state, format(" times the density of air [{:.2R} kg/m3]", RhoAir)); + ShowContinueError(state, EnergyPlus::format(" times the density of air [{:.2R} kg/m3]", RhoAir)); ShowContinueError(state, "Change these inputs to obtain a physically realizable heat exchanger effectiveness"); break; case CalculateNTUBoundsErrors::NominalEffectiveness2: FatalError = true; - ShowSevereError(state, format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the calculated nominal effectiveness is out of bounds"); - ShowContinueError(state, format("The effectiveness is {:.3R}", Eps0)); - ShowContinueError(state, format("The effectiveness should be >= 0.0 and <= {:.3R}", (1.0 - std::exp(-Z)) / Z)); + 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)); ShowContinueError(state, "Eff = (Nom_Sup_Mass_Flow_Rate/Min_Mass_Flow_Rate)*(T_nom_sup_out-T_nom_sup_in)/(T_nom_sec_in-T_nom_sup_in)"); ShowContinueError(state, "The temperatures are user inputs. The mass flow rates are user input volume flow rates"); - ShowContinueError(state, format(" times the density of air [{:.2R} kg/m3]", RhoAir)); + ShowContinueError(state, EnergyPlus::format(" times the density of air [{:.2R} kg/m3]", RhoAir)); ShowContinueError(state, "Change these inputs to obtain a physically realizable heat exchanger effectiveness"); break; case CalculateNTUBoundsErrors::Quantity: FatalError = true; - ShowSevereError(state, format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, EnergyPlus::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, format("The value is {:.3R}", Eps0 * Z)); - ShowContinueError(state, format("The value should be >= 0.0 and <= {:.3R}", 1.0 - std::exp(Z * (SMALL - 1.0)))); + 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)))); ShowContinueError( state, "Eff_nom = (Nom_Sup_Mass_Flow_Rate/Min_Mass_Flow_Rate) * (T_nom_sup_out - T_nom_sup_in)/(T_nom_sec_in - T_nom_sup_in)"); ShowContinueError(state, "The temperatures are user inputs. The mass flow rates are user input volume flow rates"); - ShowContinueError(state, format(" times the density of air [{:.2R} kg/m3]", RhoAir)); + ShowContinueError(state, EnergyPlus::format(" times the density of air [{:.2R} kg/m3]", RhoAir)); ShowContinueError(state, "Change these inputs to obtain a physically realizable product of effectiveness times min/max mass ratio " "for this heat exchanger"); break; case CalculateNTUBoundsErrors::NominalEffectiveness3: FatalError = true; - ShowSevereError(state, format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the calculated nominal effectiveness is out of bounds"); - ShowContinueError(state, format("The effectiveness is {:.3R}", Eps0)); + ShowContinueError(state, EnergyPlus::format("The effectiveness is {:.3R}", Eps0)); ShowContinueError(state, "The effectiveness should be >= 0.0 and <= 1.0"); ShowContinueError(state, "Eff = (Nom_Sup_Mass_Flow_Rate/Min_Mass_Flow_Rate)*(T_nom_sup_out-T_nom_sup_in)/(T_nom_sec_in-T_nom_sup_in)"); ShowContinueError(state, "The temperatures are user inputs. The mass flow rates are user input volume flow rates"); - ShowContinueError(state, format(" times the density of air [{:.2R} kg/m3]", RhoAir)); + ShowContinueError(state, EnergyPlus::format(" times the density of air [{:.2R} kg/m3]", RhoAir)); ShowContinueError(state, "Change these inputs to obtain a physically realizable heat exchanger effectiveness"); break; case CalculateNTUBoundsErrors::Invalid: @@ -1351,8 +1356,9 @@ namespace HeatRecovery { if (this->SupOutletNode > 0 && this->ControlToTemperatureSetPoint) { if (state.dataLoopNodes->Node(this->SupOutletNode).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, - format("Missing temperature setpoint for {} \"{}\" :", HVAC::hxTypeNames[(int)this->type], this->Name)); + ShowSevereError( + state, + EnergyPlus::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."); @@ -1360,8 +1366,9 @@ namespace HeatRecovery { // need call to EMS to check node EMSManager::CheckIfNodeSetPointManagedByEMS(state, this->SupOutletNode, HVAC::CtrlVarType::Temp, FatalError); if (FatalError) { - ShowSevereError( - state, format("Missing temperature setpoint for {} \"{}\" :", HVAC::hxTypeNames[(int)this->type], this->Name)); + ShowSevereError(state, + EnergyPlus::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( @@ -1433,9 +1440,10 @@ namespace HeatRecovery { if (!state.dataHeatRecovery->CalledFromParentObject) { if (state.dataLoopNodes->Node(this->SecOutletNode).HumRatMax == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowWarningError( - state, - format("Missing optional HumRatMax setpoint for {} \"{}\"", HVAC::hxTypeNames[(int)this->type], this->Name)); + ShowWarningError(state, + EnergyPlus::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."); @@ -1449,9 +1457,10 @@ namespace HeatRecovery { state, this->SecOutletNode, HVAC::CtrlVarType::MaxHumRat, LocalWarningError); state.dataLoopNodes->NodeSetpointCheck(this->SecOutletNode).needsSetpointChecking = false; if (LocalWarningError) { - ShowWarningError( - state, - format("Missing optional HumRatMax setpoint for {} \"{}\"", HVAC::hxTypeNames[(int)this->type], this->Name)); + ShowWarningError(state, + EnergyPlus::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."); @@ -2080,18 +2089,21 @@ namespace HeatRecovery { if (((HXSupAirVolFlowRate / HXSecAirVolFlowRate) > 2.0) || ((HXSecAirVolFlowRate / HXSupAirVolFlowRate) > 2.0)) { ++this->UnBalancedErrCount; if (this->UnBalancedErrCount <= 2) { - ShowSevereError(state, - format("{}: \"{}\" unbalanced air volume flow ratio through the heat exchanger is greater than 2:1.", + 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)); - ShowContinueErrorTimeStamp( - state, format("...HX Supply air to Exhaust air flow ratio = {:.5R}.", HXSupAirVolFlowRate / HXSecAirVolFlowRate)); + ShowContinueErrorTimeStamp(state, + EnergyPlus::format("...HX Supply air to Exhaust air flow ratio = {:.5R}.", + HXSupAirVolFlowRate / HXSecAirVolFlowRate)); } else { ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Unbalanced air volume flow ratio exceeds 2:1 warning continues. HX flow ratio statistics follow.", - HVAC::hxTypeNames[(int)this->type], - this->Name), + EnergyPlus::format( + "{} \"{}\": Unbalanced air volume flow ratio exceeds 2:1 warning continues. HX flow ratio statistics follow.", + HVAC::hxTypeNames[(int)this->type], + this->Name), this->UnBalancedErrIndex, HXSupAirVolFlowRate / HXSecAirVolFlowRate, HXSupAirVolFlowRate / HXSecAirVolFlowRate); @@ -2107,13 +2119,13 @@ namespace HeatRecovery { if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { ++this->LowFlowErrCount; if (this->LowFlowErrCount == 1) { - ShowWarningError(state, format("{} \"{}\"", HVAC::hxTypeNames[(int)this->type], this->Name)); + ShowWarningError(state, EnergyPlus::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, format("Air volume flow rate ratio = {:.3R}.", HXAirVolFlowRatio)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("Air volume flow rate ratio = {:.3R}.", HXAirVolFlowRatio)); } else { ShowRecurringWarningErrorAtEnd( state, - format( + EnergyPlus::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), @@ -2164,17 +2176,19 @@ namespace HeatRecovery { if (!this->SensEffectivenessFlag) { ShowWarningError( state, - format( + EnergyPlus::format( "HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" sensible effectiveness is less than zero. Check the following inputs.", this->Name)); if (this->SupInTemp < this->SecInTemp) { - ShowContinueError(state, format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectSensible100)); + ShowContinueError( + state, EnergyPlus::format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectSensible100)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } else { - ShowContinueError(state, format("...Sensible Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectSensible100)); + ShowContinueError( + state, EnergyPlus::format("...Sensible Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectSensible100)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } - ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); + ShowContinueError(state, EnergyPlus::format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); this->SensEffectivenessFlag = true; } } @@ -2184,16 +2198,19 @@ namespace HeatRecovery { if (!this->LatEffectivenessFlag) { ShowWarningError( state, - format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" latent effectiveness is less than zero. Check the following inputs.", - this->Name)); + EnergyPlus::format( + "HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" latent effectiveness is less than zero. Check the following inputs.", + this->Name)); if (this->SupInTemp < this->SecInTemp) { - ShowContinueError(state, format("...Latent Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectLatent100)); + ShowContinueError(state, + EnergyPlus::format("...Latent Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectLatent100)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } else { - ShowContinueError(state, format("...Latent Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectLatent100)); + ShowContinueError(state, + EnergyPlus::format("...Latent Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectLatent100)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } - ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); + ShowContinueError(state, EnergyPlus::format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); this->LatEffectivenessFlag = true; } } @@ -2285,20 +2302,23 @@ namespace HeatRecovery { // The model should at least guard against negative numbers this->SensEffectiveness = 0.0; if (!this->SensEffectivenessFlag) { - ShowWarningError(state, - format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" sensible effectiveness is less than zero. " - "Check the following inputs.", - this->Name)); + ShowWarningError( + state, + EnergyPlus::format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" sensible effectiveness is less than zero. " + "Check the following inputs.", + this->Name)); if (this->SupInTemp < this->SecInTemp) { - ShowContinueError( - state, format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectSensible100)); + ShowContinueError(state, + EnergyPlus::format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", + this->HeatEffectSensible100)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } else { - ShowContinueError( - state, format("...Sensible Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectSensible100)); + ShowContinueError(state, + EnergyPlus::format("...Sensible Effectiveness at 100% Cooling Air Flow = {:.2R}", + this->CoolEffectSensible100)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } - ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); + ShowContinueError(state, EnergyPlus::format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); this->SensEffectivenessFlag = true; } } @@ -2306,20 +2326,23 @@ namespace HeatRecovery { // The model should at least guard against negative numbers this->LatEffectiveness = 0.0; if (!this->LatEffectivenessFlag) { - ShowWarningError(state, - format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" latent effectiveness is less than zero. " - "Check the following inputs.", - this->Name)); + ShowWarningError( + state, + EnergyPlus::format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" latent effectiveness is less than zero. " + "Check the following inputs.", + this->Name)); if (this->SupInTemp < this->SecInTemp) { - ShowContinueError(state, - format("...Latent Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectLatent100)); + ShowContinueError( + state, + EnergyPlus::format("...Latent Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectLatent100)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } else { - ShowContinueError(state, - format("...Latent Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectLatent100)); + ShowContinueError( + state, + EnergyPlus::format("...Latent Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectLatent100)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } - ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); + ShowContinueError(state, EnergyPlus::format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); this->LatEffectivenessFlag = true; } } @@ -3185,7 +3208,7 @@ namespace HeatRecovery { // check input validity if (Z < 0.0 || Z > 1.0) { - ShowFatalError(state, format("Variable Z ({:.2R}) out of range [0.0,1.0] in CalculateEpsFromNTUandZ", Z)); + ShowFatalError(state, EnergyPlus::format("Variable Z ({:.2R}) out of range [0.0,1.0] in CalculateEpsFromNTUandZ", Z)); } // effectiveness @@ -3215,7 +3238,7 @@ namespace HeatRecovery { Eps = (1.0 - std::exp(-Z * (1.0 - std::exp(-NTU)))) / Z; } break; default: { - ShowFatalError(state, format("HeatRecovery: Illegal flow arrangement in CalculateEpsFromNTUandZ, Value={}", FlowArr)); + ShowFatalError(state, EnergyPlus::format("HeatRecovery: Illegal flow arrangement in CalculateEpsFromNTUandZ, Value={}", FlowArr)); } break; } } @@ -3306,7 +3329,7 @@ namespace HeatRecovery { NTU = -std::log1p(std::log(1.0 - Eps * Z) / Z); } break; default: { - ShowFatalError(state, format("HeatRecovery: Illegal flow arrangement in CalculateNTUfromEpsAndZ, Value={}", FlowArr)); + ShowFatalError(state, EnergyPlus::format("HeatRecovery: Illegal flow arrangement in CalculateNTUfromEpsAndZ, Value={}", FlowArr)); } break; } } @@ -3419,14 +3442,15 @@ namespace HeatRecovery { "...Using regeneration inlet air temperatures that are outside the regeneration outlet air temperature " "equation model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.last); } } // Regen inlet humidity ratio for temp eqn @@ -3440,14 +3464,15 @@ 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, - 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, + 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); } } // Process inlet temp for temp eqn @@ -3463,7 +3488,7 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - format( + EnergyPlus::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), @@ -3483,14 +3508,15 @@ namespace HeatRecovery { "...Using process inlet air humidity ratios that are outside the regeneration outlet air temperature equation " "model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.last); } } // Process and regeneration face velocity for temp eqn @@ -3504,14 +3530,15 @@ namespace HeatRecovery { "...Using process and regeneration face velocities that are outside the regeneration outlet air temperature " "equation model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.last); } } } // IF(CurrentEndTime .GT. CurrentEndTimeLast .AND. TimeStepSys .GE. TimeStepSysLast)THEN @@ -3536,9 +3563,11 @@ namespace HeatRecovery { if (T_RegenInTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInTemp || T_RegenInTemp > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInTemp) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.last = T_RegenInTemp; - thisError.OutputChar = format("{:.2R}", T_RegenInTemp); - thisError.OutputCharLo = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInTemp); - thisError.OutputCharHi = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInTemp); + thisError.OutputChar = EnergyPlus::format("{:.2R}", T_RegenInTemp); + thisError.OutputCharLo = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInTemp); + thisError.OutputCharHi = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInTemp); if (T_RegenInTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInTemp) { T_RegenInTemp = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInTemp; } @@ -3547,22 +3576,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 = format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.buffer1 = EnergyPlus::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 = - format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", T_RegenInTemp); + EnergyPlus::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 = - format("...Regeneration outlet air temperature equation: regeneration inlet air temperature passed to the model = {}", - thisError.CharValue); + EnergyPlus::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; } @@ -3573,9 +3602,11 @@ namespace HeatRecovery { if (T_RegenInHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInHumRat || T_RegenInHumRat > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInHumRat) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.last = T_RegenInHumRat; - thisError.OutputChar = format("{:.6R}", T_RegenInHumRat); - thisError.OutputCharLo = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInHumRat); - thisError.OutputCharHi = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInHumRat); + thisError.OutputChar = EnergyPlus::format("{:.6R}", T_RegenInHumRat); + thisError.OutputCharLo = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInHumRat); + thisError.OutputCharHi = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInHumRat); if (T_RegenInHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInHumRat) { T_RegenInHumRat = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInHumRat; } @@ -3584,23 +3615,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 = - 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 = 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.buffer2 = - format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", T_RegenInHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.buffer3 = - format("...Regeneration outlet air temperature equation: regeneration inlet air humidity ratio passed to the model = {}", - thisError.CharValue); + EnergyPlus::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); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.print = false; } @@ -3611,9 +3642,11 @@ namespace HeatRecovery { if (T_ProcInTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInTemp || T_ProcInTemp > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInTemp) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.last = T_ProcInTemp; - thisError.OutputChar = format("{:.2R}", T_ProcInTemp); - thisError.OutputCharLo = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInTemp); - thisError.OutputCharHi = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInTemp); + thisError.OutputChar = EnergyPlus::format("{:.2R}", T_ProcInTemp); + thisError.OutputCharLo = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInTemp); + thisError.OutputCharHi = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInTemp); if (T_ProcInTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInTemp) { T_ProcInTemp = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInTemp; } @@ -3626,20 +3659,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 = format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.buffer1 = EnergyPlus::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 = - format("...Valid range = {} to {}. Occurrence info = {},{} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", T_ProcInTemp); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.buffer3 = format( + EnergyPlus::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( "...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; @@ -3651,9 +3684,11 @@ namespace HeatRecovery { if (T_ProcInHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInHumRat || T_ProcInHumRat > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInHumRat) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.last = T_ProcInHumRat; - thisError.OutputChar = format("{:.6R}", T_ProcInHumRat); - thisError.OutputCharLo = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInHumRat); - thisError.OutputCharHi = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInHumRat); + thisError.OutputChar = EnergyPlus::format("{:.6R}", T_ProcInHumRat); + thisError.OutputCharLo = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInHumRat); + thisError.OutputCharHi = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInHumRat); if (T_ProcInHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInHumRat) { T_ProcInHumRat = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInHumRat; } @@ -3666,22 +3701,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 = format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.buffer1 = EnergyPlus::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 = - format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", T_ProcInHumRat); + EnergyPlus::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 = - format("...Regeneration outlet air temperature equation: process inlet air humidity ratio passed to the model = {}", - thisError.CharValue); + EnergyPlus::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; } @@ -3692,9 +3727,9 @@ namespace HeatRecovery { if (T_FaceVel < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinFaceVel || T_FaceVel > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxFaceVel) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.last = T_FaceVel; - thisError.OutputChar = format("{:.6R}", T_FaceVel); - thisError.OutputCharLo = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinFaceVel); - thisError.OutputCharHi = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxFaceVel); + thisError.OutputChar = EnergyPlus::format("{:.6R}", T_FaceVel); + thisError.OutputCharLo = EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinFaceVel); + thisError.OutputCharHi = EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxFaceVel); if (T_FaceVel < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinFaceVel) { T_FaceVel = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinFaceVel; } @@ -3703,21 +3738,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 = - 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.buffer1 = EnergyPlus::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 = - format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", T_FaceVel); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.buffer3 = format( + EnergyPlus::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( "...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; @@ -3785,14 +3820,15 @@ namespace HeatRecovery { "...Using regeneration inlet air temperatures that are outside the regeneration inlet air temperature equation " "model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.last); } } // Regen inlet humidity ratio for humidity ratio eqn @@ -3806,14 +3842,15 @@ namespace HeatRecovery { "...Using regeneration inlet air humidity ratios that are outside the regeneration outlet air humidity ratio " "equation model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.last); } } // Process inlet temp for humidity ratio eqn @@ -3827,14 +3864,15 @@ 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, - 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, + 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); } } // Process inlet humidity ratio for humidity ratio eqn @@ -3848,14 +3886,15 @@ 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, - 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, + 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); } } // Process and regeneration face velocity for humidity ratio eqn @@ -3869,14 +3908,15 @@ 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, - 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, + 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); } } } // IF(CurrentEndTime .GT. CurrentEndTimeLast .AND. TimeStepSys .GE. TimeStepSysLast)THEN @@ -3901,9 +3941,11 @@ namespace HeatRecovery { if (H_RegenInTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInTemp || H_RegenInTemp > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInTemp) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.last = H_RegenInTemp; - thisError.OutputChar = format("{:.2R}", H_RegenInTemp); - thisError.OutputCharLo = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInTemp); - thisError.OutputCharHi = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInTemp); + thisError.OutputChar = EnergyPlus::format("{:.2R}", H_RegenInTemp); + thisError.OutputCharLo = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInTemp); + thisError.OutputCharHi = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInTemp); if (H_RegenInTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInTemp) { H_RegenInTemp = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInTemp; } @@ -3912,23 +3954,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 = - 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 = 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.buffer2 = - format("...Valid range = {} to {}. Occurrence info = {}, {} , {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.2R}", H_RegenInTemp); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.buffer3 = - format("...Regeneration outlet air humidity ratio equation: regeneration inlet air temperature passed to the model = {}", - thisError.CharValue); + EnergyPlus::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); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.print = false; } @@ -3939,9 +3981,11 @@ namespace HeatRecovery { if (H_RegenInHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInHumRat || H_RegenInHumRat > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInHumRat) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.last = H_RegenInHumRat; - thisError.OutputChar = format("{:.6R}", H_RegenInHumRat); - thisError.OutputCharLo = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInHumRat); - thisError.OutputCharHi = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInHumRat); + thisError.OutputChar = EnergyPlus::format("{:.6R}", H_RegenInHumRat); + thisError.OutputCharLo = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInHumRat); + thisError.OutputCharHi = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInHumRat); if (H_RegenInHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInHumRat) { H_RegenInHumRat = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInHumRat; } @@ -3950,23 +3994,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 = - 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 = 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.buffer2 = - format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", H_RegenInHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.buffer3 = - format("...Regeneration outlet air humidity ratio equation: regeneration inlet air humidity ratio passed to the model = {}", - thisError.CharValue); + EnergyPlus::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); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.print = false; } @@ -3977,9 +4021,11 @@ namespace HeatRecovery { if (H_ProcInTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInTemp || H_ProcInTemp > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInTemp) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.last = H_ProcInTemp; - thisError.OutputChar = format("{:.2R}", H_ProcInTemp); - thisError.OutputCharLo = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInTemp); - thisError.OutputCharHi = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInTemp); + thisError.OutputChar = EnergyPlus::format("{:.2R}", H_ProcInTemp); + thisError.OutputCharLo = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInTemp); + thisError.OutputCharHi = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInTemp); if (H_ProcInTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInTemp) { H_ProcInTemp = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInTemp; } @@ -3992,22 +4038,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 = format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.buffer1 = EnergyPlus::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 = - format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", H_ProcInTemp); + EnergyPlus::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 = - format("...Regeneration outlet air humidity ratio equation: process inlet air temperature passed to the model = {}", - thisError.CharValue); + EnergyPlus::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; } @@ -4018,9 +4064,11 @@ namespace HeatRecovery { if (H_ProcInHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInHumRat || H_ProcInHumRat > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInHumRat) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.last = H_ProcInHumRat; - thisError.OutputChar = format("{:.6R}", H_ProcInHumRat); - thisError.OutputCharLo = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInHumRat); - thisError.OutputCharHi = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInHumRat); + thisError.OutputChar = EnergyPlus::format("{:.6R}", H_ProcInHumRat); + thisError.OutputCharLo = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInHumRat); + thisError.OutputCharHi = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInHumRat); if (H_ProcInHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInHumRat) { H_ProcInHumRat = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInHumRat; } @@ -4033,23 +4081,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 = - 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 = 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.buffer2 = - format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", H_ProcInHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.buffer3 = - format("...Regeneration outlet air humidity ratio equation: process inlet air humidity ratio passed to the model = {}", - thisError.CharValue); + EnergyPlus::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); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.print = false; } @@ -4060,9 +4108,9 @@ namespace HeatRecovery { if (H_FaceVel < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinFaceVel || H_FaceVel > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxFaceVel) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.last = H_FaceVel; - thisError.OutputChar = format("{:.6R}", H_FaceVel); - thisError.OutputCharLo = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinFaceVel); - thisError.OutputCharHi = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxFaceVel); + thisError.OutputChar = EnergyPlus::format("{:.6R}", H_FaceVel); + thisError.OutputCharLo = EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinFaceVel); + thisError.OutputCharHi = EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxFaceVel); if (H_FaceVel < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinFaceVel) { H_FaceVel = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinFaceVel; } @@ -4071,23 +4119,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 = - 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.buffer1 = EnergyPlus::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 = - format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", H_FaceVel); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.buffer3 = - format("...Regeneration outlet air humidity ratio equation: process and regeneration face velocity passed to the model = {}", - thisError.CharValue); + EnergyPlus::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); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.print = false; } @@ -4151,9 +4199,9 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\" - Regeneration outlet air temperature above regen inlet air temperature error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + 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), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.last); @@ -4173,9 +4221,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - 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), + EnergyPlus::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), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.last); @@ -4190,26 +4239,26 @@ namespace HeatRecovery { // checking model regeneration outlet temperature to always be less than or equal to regeneration inlet temperature if (RegenOutTemp > RegenInTemp) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.last = RegenOutTemp; - thisError.OutputChar = format("{:.2R}", RegenOutTemp); - thisError.OutputCharHi = format("{:.2R}", RegenInTemp); + thisError.OutputChar = EnergyPlus::format("{:.2R}", RegenOutTemp); + thisError.OutputCharHi = EnergyPlus::format("{:.2R}", RegenInTemp); // IF(RegenOutTemp .GT. RegenInTemp)THEN // RegenOutTemp = RegenInTemp // END IF if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.buffer1 = - 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); + 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); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.buffer2 = - format("...Regen inlet air temperature = {}. Occurrence info = {}, {}, {}", - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", RegenOutTemp); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.buffer3 = format( + EnergyPlus::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( "...Regen outlet air temperature equation: regeneration outlet air temperature allowed from the model = {}", thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.print = false; @@ -4223,9 +4272,11 @@ namespace HeatRecovery { if (RegenOutTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutTemp || RegenOutTemp > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MaxRegenAirOutTemp) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.last = RegenOutTemp; - thisError.OutputChar = format("{:.2R}", RegenOutTemp); - thisError.OutputCharLo = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutTemp); - thisError.OutputCharHi = format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MaxRegenAirOutTemp); + thisError.OutputChar = EnergyPlus::format("{:.2R}", RegenOutTemp); + thisError.OutputCharLo = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutTemp); + thisError.OutputCharHi = + EnergyPlus::format("{:.2R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MaxRegenAirOutTemp); if (RegenOutTemp < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutTemp) { RegenOutTemp = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutTemp; } @@ -4235,19 +4286,19 @@ namespace HeatRecovery { if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.buffer1 = - 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); + 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); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.buffer2 = - format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", RegenOutTemp); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.buffer3 = format( + EnergyPlus::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( "...Regen outlet air temperature equation: regeneration outlet air temperature allowed from the model = {}", thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.print = false; @@ -4313,14 +4364,15 @@ namespace HeatRecovery { "...Regeneration outlet air humidity ratio should always be greater than or equal to regen inlet air humidity " "ratio. Verify correct model coefficients."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.last); } } @@ -4335,13 +4387,14 @@ namespace HeatRecovery { state, "...Regeneration outlet air humidity ratio outside model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.last); } } } // IF(CurrentEndTime .GT. CurrentEndTimeLast .AND. TimeStepSys .GE. TimeStepSysLast)THEN @@ -4353,28 +4406,28 @@ namespace HeatRecovery { // checking for regeneration outlet humidity ratio less than or equal to regeneration inlet humidity ratio if (RegenOutHumRat < RegenInHumRat) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.last = RegenOutHumRat; - thisError.OutputChar = format("{:.6R}", RegenOutHumRat); - thisError.OutputCharHi = format("{:.6R}", RegenInHumRat); + thisError.OutputChar = EnergyPlus::format("{:.6R}", RegenOutHumRat); + thisError.OutputCharHi = EnergyPlus::format("{:.6R}", RegenInHumRat); // IF(RegenOutHumRat .LT. RegenInHumRat)THEN // RegenOutHumRat = RegenInHumRat // END IF if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.buffer1 = - 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); + 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); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.buffer2 = - format("...Regen inlet air humidity ratio = {}. Occurrence info = {}, {}, {}", - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", RegenOutHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.buffer3 = - format("...Regen outlet air humidity ratio equation: regeneration outlet air humidity ratio allowed from the model = {}", - thisError.CharValue); + EnergyPlus::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); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.print = false; } @@ -4387,9 +4440,11 @@ namespace HeatRecovery { if (RegenOutHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutHumRat || RegenOutHumRat > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MaxRegenAirOutHumRat) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.last = RegenOutHumRat; - thisError.OutputChar = format("{:.6R}", RegenOutHumRat); - thisError.OutputCharLo = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutHumRat); - thisError.OutputCharHi = format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MaxRegenAirOutHumRat); + thisError.OutputChar = EnergyPlus::format("{:.6R}", RegenOutHumRat); + thisError.OutputCharLo = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutHumRat); + thisError.OutputCharHi = + EnergyPlus::format("{:.6R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MaxRegenAirOutHumRat); if (RegenOutHumRat < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutHumRat) { RegenOutHumRat = state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).MinRegenAirOutHumRat; } @@ -4399,21 +4454,21 @@ namespace HeatRecovery { if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.buffer1 = - 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); + 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); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.buffer2 = - format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); - thisError.CharValue = format("{:.6R}", RegenOutHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.buffer3 = - format("...Regen outlet air humidity ratio equation: regeneration outlet air humidity ratio allowed from the model = {}", - thisError.CharValue); + EnergyPlus::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); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.print = false; } @@ -4487,14 +4542,15 @@ namespace HeatRecovery { "equation model boundaries may adversely affect desiccant model performance. Verify correct model " "coefficients."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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, + 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); } } @@ -4509,14 +4565,15 @@ namespace HeatRecovery { "...Using process inlet air relative humidities that are outside the regeneration outlet temperature equation " "model boundaries may adversely affect desiccant model performance. Verify correct model coefficients."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.last); } } @@ -4558,20 +4615,22 @@ namespace HeatRecovery { if (RegenInletRH < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInRelHum || RegenInletRH > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInRelHum) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.last = RegenInletRH * 100.0; - thisError.OutputChar = format("{:.1R}", RegenInletRH * 100.0); - thisError.OutputCharLo = format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInRelHum * 100.0); - thisError.OutputCharHi = format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInRelHum * 100.0); + thisError.OutputChar = EnergyPlus::format("{:.1R}", RegenInletRH * 100.0); + thisError.OutputCharLo = + EnergyPlus::format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinRegenAirInRelHum * 100.0); + thisError.OutputCharHi = + 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 = - 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 = - format("...Model limit on regeneration inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.buffer3 = format( + 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( + "...Model limit on regeneration inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.buffer3 = EnergyPlus::format( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.print = false; @@ -4581,19 +4640,21 @@ namespace HeatRecovery { if (ProcInletRH < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInRelHum || ProcInletRH > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInRelHum) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.last = ProcInletRH * 100.0; - thisError.OutputChar = format("{:.1R}", ProcInletRH * 100.0); - thisError.OutputCharLo = format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInRelHum * 100.0); - thisError.OutputCharHi = format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInRelHum * 100.0); + thisError.OutputChar = EnergyPlus::format("{:.1R}", ProcInletRH * 100.0); + thisError.OutputCharLo = + EnergyPlus::format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MinProcAirInRelHum * 100.0); + thisError.OutputCharHi = + 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 = format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.buffer1 = EnergyPlus::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 = - format("...Model limit on process inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.buffer3 = format( + 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( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.print = false; @@ -4664,14 +4725,15 @@ namespace HeatRecovery { "equation model boundaries may adversely affect desiccant model performance. Verify correct model " "coefficients."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.last); } } @@ -4687,14 +4749,15 @@ namespace HeatRecovery { "equation model boundaries may adversely affect desiccant model performance. Verify correct model " "coefficients."); } else { - ShowRecurringWarningErrorAtEnd(state, - 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, + 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); } } @@ -4736,20 +4799,22 @@ namespace HeatRecovery { if (RegenInletRH < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInRelHum || RegenInletRH > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInRelHum) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.last = RegenInletRH * 100.0; - thisError.OutputChar = format("{:.1R}", RegenInletRH * 100.0); - thisError.OutputCharLo = format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInRelHum * 100.0); - thisError.OutputCharHi = format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInRelHum * 100.0); + thisError.OutputChar = EnergyPlus::format("{:.1R}", RegenInletRH * 100.0); + thisError.OutputCharLo = + EnergyPlus::format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinRegenAirInRelHum * 100.0); + thisError.OutputCharHi = + 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 = - 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 = - format("...Model limit on regeneration inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer3 = format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer1 = EnergyPlus::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( + "...Model limit on regeneration inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer3 = EnergyPlus::format( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.print = false; @@ -4759,20 +4824,22 @@ namespace HeatRecovery { if (ProcInletRH < state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInRelHum || ProcInletRH > state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInRelHum) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.last = ProcInletRH * 100.0; - thisError.OutputChar = format("{:.1R}", ProcInletRH * 100.0); - thisError.OutputCharLo = format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInRelHum * 100.0); - thisError.OutputCharHi = format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInRelHum * 100.0); + thisError.OutputChar = EnergyPlus::format("{:.1R}", ProcInletRH * 100.0); + thisError.OutputCharLo = + EnergyPlus::format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MinProcAirInRelHum * 100.0); + thisError.OutputCharHi = + 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 = - 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 = - format("...Model limit on process inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.buffer3 = format( + 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( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.print = false; @@ -4836,14 +4903,15 @@ namespace HeatRecovery { // //'outlet humidity ratio equation model boundaries may adversely affect desiccant model performance. '& // //'Verify correct model coefficients.') } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.last); } } @@ -4857,15 +4925,15 @@ namespace HeatRecovery { ABSImbalancedFlow = std::abs(RegenInMassFlow - ProcessInMassFlow) / RegenInMassFlow; if (ABSImbalancedFlow > 0.02) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.last = ABSImbalancedFlow; - thisError.OutputCharLo = format("{:.6R}", RegenInMassFlow); - thisError.OutputCharHi = format("{:.6R}", ProcessInMassFlow); + thisError.OutputCharLo = EnergyPlus::format("{:.6R}", RegenInMassFlow); + thisError.OutputCharHi = EnergyPlus::format("{:.6R}", ProcessInMassFlow); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer1 = - format("{} \"{}\" - unbalanced air flow rate is limited to 2%.", HVAC::hxTypeNames[(int)this->type], this->Name); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer2 = format( + 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( "...Regeneration air mass flow rate is {} and process air mass flow rate is {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer3 = format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer3 = EnergyPlus::format( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.print = false; @@ -4898,7 +4966,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).SupInletNode; } - ShowSevereError(state, format("GetSupplyInletNode: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, EnergyPlus::format("GetSupplyInletNode: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return 0; } @@ -4929,7 +4997,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).SupOutletNode; } - ShowSevereError(state, format("GetSupplyOutletNode: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, EnergyPlus::format("GetSupplyOutletNode: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return 0; } @@ -4960,7 +5028,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).SecInletNode; } - ShowSevereError(state, format("GetSecondaryInletNode: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, EnergyPlus::format("GetSecondaryInletNode: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return 0; } @@ -4991,7 +5059,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).SecOutletNode; } - ShowSevereError(state, format("GetSecondaryOutletNode: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, EnergyPlus::format("GetSecondaryOutletNode: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return 0; } @@ -5022,7 +5090,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).NomSupAirVolFlow; } - ShowSevereError(state, format("GetSupplyAirFlowRate: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, EnergyPlus::format("GetSupplyAirFlowRate: Could not find heat exchanger = \"{}\"", HXName)); ShowContinueError(state, "... Supply Air Flow Rate returned as 0."); ErrorsFound = true; return 0.0; @@ -5055,7 +5123,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).type; } - ShowSevereError(state, format("GetHeatExchangerObjectTypeNum: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, EnergyPlus::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 2914b8ee6b6..274a07f6a56 100644 --- a/src/EnergyPlus/HeatingCoils.cc +++ b/src/EnergyPlus/HeatingCoils.cc @@ -136,33 +136,35 @@ namespace HeatingCoils { if (CompIndex == 0) { CoilNum = Util::FindItemInList(CompName, state.dataHeatingCoils->HeatingCoil); if (CoilNum == 0) { - ShowFatalError(state, format("SimulateHeatingCoilComponents: Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimulateHeatingCoilComponents: Coil not found={}", CompName)); } // CompIndex=CoilNum } else { CoilNum = CompIndex; if (CoilNum > state.dataHeatingCoils->NumHeatingCoils || CoilNum < 1) { - ShowFatalError(state, - format("SimulateHeatingCoilComponents: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", - CoilNum, - state.dataHeatingCoils->NumHeatingCoils, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimulateHeatingCoilComponents: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", + CoilNum, + state.dataHeatingCoils->NumHeatingCoils, + CompName)); } if (state.dataHeatingCoils->CheckEquipName(CoilNum)) { if (!CompName.empty() && CompName != state.dataHeatingCoils->HeatingCoil(CoilNum).Name) { ShowFatalError( state, - format("SimulateHeatingCoilComponents: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CompName, - state.dataHeatingCoils->HeatingCoil(CoilNum).Name)); + EnergyPlus::format( + "SimulateHeatingCoilComponents: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CompName, + state.dataHeatingCoils->HeatingCoil(CoilNum).Name)); } state.dataHeatingCoils->CheckEquipName(CoilNum) = false; } } } else { ShowSevereError(state, "SimulateHeatingCoilComponents: CompIndex argument not used."); - ShowContinueError(state, format("..CompName = {}", CompName)); + ShowContinueError(state, EnergyPlus::format("..CompName = {}", CompName)); ShowFatalError(state, "Preceding conditions cause termination."); } @@ -612,13 +614,13 @@ namespace HeatingCoils { heatingCoil.FuelType == Constant::eFuel::OtherFuel1 || heatingCoil.FuelType == Constant::eFuel::OtherFuel2 || heatingCoil.FuelType == Constant::eFuel::Coal)) { ShowSevereError(state, - format("{}{}: Invalid {} entered ={} for {}={}", - RoutineName, - CurrentModuleObject, - cAlphaFields(3), - Alphas(3), - cAlphaFields(1), - Alphas(1))); + EnergyPlus::format("{}{}: Invalid {} entered ={} for {}={}", + RoutineName, + CurrentModuleObject, + cAlphaFields(3), + Alphas(3), + cAlphaFields(1), + Alphas(1))); state.dataHeatingCoils->InputErrorsFound = true; } std::string const sFuelType(Constant::eFuelNames[static_cast(heatingCoil.FuelType)]); @@ -691,7 +693,7 @@ namespace HeatingCoils { OutputProcessor::StoreType::Average, heatingCoil.Name); SetupOutputVariable(state, - format("Heating Coil {} Energy", sFuelType), + EnergyPlus::format("Heating Coil {} Energy", sFuelType), Constant::Units::J, heatingCoil.FuelUseLoad, OutputProcessor::TimeStepType::System, @@ -701,7 +703,7 @@ namespace HeatingCoils { OutputProcessor::Group::HVAC, OutputProcessor::EndUseCat::Heating); SetupOutputVariable(state, - format("Heating Coil {} Rate", sFuelType), + EnergyPlus::format("Heating Coil {} Rate", sFuelType), Constant::Units::W, heatingCoil.FuelUseRate, OutputProcessor::TimeStepType::System, @@ -1014,9 +1016,10 @@ namespace HeatingCoils { } else { heatingCoil.Efficiency = Numbers(1); if (Numbers(1) < 0.0 || Numbers(1) > 0.9) { - ShowSevereError( - state, - format("{}, \"{}\" heat reclaim recovery efficiency must be >= 0 and <=0.9", CurrentModuleObject, heatingCoil.Name)); + ShowSevereError(state, + EnergyPlus::format("{}, \"{}\" heat reclaim recovery efficiency must be >= 0 and <=0.9", + CurrentModuleObject, + heatingCoil.Name)); state.dataHeatingCoils->InputErrorsFound = true; } } @@ -1026,9 +1029,10 @@ namespace HeatingCoils { } else { heatingCoil.Efficiency = Numbers(1); if (Numbers(1) < 0.0 || Numbers(1) > 0.3) { - ShowSevereError( - state, - format("{}, \"{}\" heat reclaim recovery efficiency must be >= 0 and <=0.3", CurrentModuleObject, heatingCoil.Name)); + ShowSevereError(state, + EnergyPlus::format("{}, \"{}\" heat reclaim recovery efficiency must be >= 0 and <=0.3", + CurrentModuleObject, + heatingCoil.Name)); state.dataHeatingCoils->InputErrorsFound = true; } } @@ -1060,10 +1064,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format("{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{} \" cannot be over 0.3", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + "{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{} \" cannot be over 0.3", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; } @@ -1086,10 +1091,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format("{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{} \" cannot be over 0.3", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + "{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{} \" cannot be over 0.3", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; } @@ -1109,10 +1115,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format("{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{} \" cannot be over 0.3", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + "{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{} \" cannot be over 0.3", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; } @@ -1132,10 +1139,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format(R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{} " cannot be over 0.3)", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{} " cannot be over 0.3)", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; } @@ -1145,7 +1153,9 @@ namespace HeatingCoils { heatingCoil.ReclaimHeatingSourceIndexNum = CoilCoolingDX::factory(state, Alphas(6)); if (heatingCoil.ReclaimHeatingSourceIndexNum < 0) { ShowSevereError( - state, format("{}={}, could not find desuperheater coil {}={}", CurrentModuleObject, heatingCoil.Name, Alphas(5), Alphas(6))); + state, + EnergyPlus::format( + "{}={}, could not find desuperheater coil {}={}", CurrentModuleObject, heatingCoil.Name, Alphas(5), Alphas(6))); state.dataHeatingCoils->InputErrorsFound = true; } DataHeatBalance::HeatReclaimDataBase &HeatReclaim = @@ -1156,18 +1166,19 @@ namespace HeatingCoils { } HeatReclaim.ReclaimEfficiencyTotal += heatingCoil.Efficiency; if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { - ShowSevereError( - state, - format("{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + ShowSevereError(state, + EnergyPlus::format( + "{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; } else { ShowSevereError( state, - format("{}, \"{}\" valid desuperheater heat source object type not found: {}", CurrentModuleObject, heatingCoil.Name, Alphas(5))); + EnergyPlus::format( + "{}, \"{}\" valid desuperheater heat source object type not found: {}", CurrentModuleObject, heatingCoil.Name, Alphas(5))); ShowContinueError(state, "Valid desuperheater heat source objects are:"); ShowContinueError(state, "Refrigeration:CompressorRack, Coil:Cooling:DX:SingleSpeed, Refrigeration:Condenser:AirCooled, " @@ -1194,7 +1205,7 @@ namespace HeatingCoils { heatingCoil.ParasiticElecLoad = Numbers(2); if (Numbers(2) < 0.0) { - ShowSevereError(state, format("{}, \"{}\" parasitic electric load must be >= 0", CurrentModuleObject, heatingCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}, \"{}\" parasitic electric load must be >= 0", CurrentModuleObject, heatingCoil.Name)); state.dataHeatingCoils->InputErrorsFound = true; } @@ -1244,7 +1255,7 @@ namespace HeatingCoils { } if (state.dataHeatingCoils->InputErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Program terminates.", RoutineName)); } Alphas.deallocate(); @@ -1330,7 +1341,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, format("{} \"{}\"", HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), heatingCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), 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."); @@ -1340,7 +1351,7 @@ namespace HeatingCoils { auto const &controlNode = state.dataLoopNodes->Node(ControlNodeNum); if (controlNode.TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, format("{} \"{}\"", HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), heatingCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{} \"{}\"", HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), 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; @@ -1348,7 +1359,8 @@ namespace HeatingCoils { EMSManager::CheckIfNodeSetPointManagedByEMS( state, ControlNodeNum, HVAC::CtrlVarType::Temp, state.dataHeatingCoils->HeatingCoilFatalError); if (state.dataHeatingCoils->HeatingCoilFatalError) { - ShowSevereError(state, format("{} \"{}\"", HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), heatingCoil.Name)); + ShowSevereError(state, + EnergyPlus::format("{} \"{}\"", HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), 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."); @@ -1368,7 +1380,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, format("{} \"{}\"", HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), heatingCoil.Name)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), 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."); } @@ -1403,10 +1415,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format(R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; @@ -1430,10 +1443,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.9) { ShowSevereError( state, - format(R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.9)", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.9)", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; @@ -1459,10 +1473,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format(R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; @@ -1486,10 +1501,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format(R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; @@ -1506,10 +1522,11 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format("{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::format( + "{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; @@ -1521,9 +1538,9 @@ namespace HeatingCoils { if ((state.dataHeatingCoils->ValidSourceTypeCounter > state.dataHeatingCoils->NumDesuperheaterCoil * 2) && state.dataHeatingCoils->ShowSingleWarning(CoilNum) && !state.dataHeatingCoils->ValidSourceType(CoilNum)) { ShowWarningError(state, - format("Coil:Heating:Desuperheater, \"{}\" desuperheater heat source object name not found: {}", - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + EnergyPlus::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; } @@ -1652,10 +1669,13 @@ namespace HeatingCoils { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(NominalCapacityDes - NominalCapacityUser) / NominalCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeHeatingCoil: Potential issue with equipment sizing for {}, {}", CompType, CompName)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NominalCapacityUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", NominalCapacityDes)); + ShowMessage( + state, + EnergyPlus::format("SizeHeatingCoil: Potential issue with equipment sizing for {}, {}", CompType, CompName)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", NominalCapacityUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", NominalCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1675,8 +1695,9 @@ namespace HeatingCoils { // Ensure capacity at lower Stage must be lower or equal to the capacity at higher Stage. for (int StageNum = 1; StageNum <= heatingCoil.NumOfStages - 1; ++StageNum) { if (heatingCoil.MSNominalCapacity(StageNum) > heatingCoil.MSNominalCapacity(StageNum + 1)) { - ShowSevereError(state, - format("SizeHeatingCoil: {} {}, Stage {} Nominal Capacity ({:.2R} W) must be less than or equal to Stage {} " + ShowSevereError( + state, + EnergyPlus::format("SizeHeatingCoil: {} {}, Stage {} Nominal Capacity ({:.2R} W) must be less than or equal to Stage {} " "Nominal Capacity ({:.2R} W).", heatingCoil.HeatingCoilType, heatingCoil.Name, @@ -2186,10 +2207,10 @@ namespace HeatingCoils { if (heatingCoil.PLFErrorCount < 1) { ++heatingCoil.PLFErrorCount; ShowWarningError(state, - format("CalcFuelHeatingCoil: {}=\"{}\", PLF curve values", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name)); - ShowContinueError(state, format("The PLF curve value = {:.5T} for part-load ratio = {:.5T}", PLF, PartLoadRat)); + EnergyPlus::format("CalcFuelHeatingCoil: {}=\"{}\", PLF curve values", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name)); + ShowContinueError(state, EnergyPlus::format("The PLF curve value = {:.5T} for part-load ratio = {:.5T}", 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 { @@ -2204,18 +2225,19 @@ namespace HeatingCoils { if (heatingCoil.RTFErrorCount < 1) { ++heatingCoil.RTFErrorCount; ShowWarningError(state, - format("CalcFuelHeatingCoil: {}=\"{}\", runtime fraction", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name)); - ShowContinueError(state, format("The runtime fraction exceeded 1.0. [{:.4T}].", heatingCoil.RTF)); + EnergyPlus::format("CalcFuelHeatingCoil: {}=\"{}\", runtime fraction", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name)); + ShowContinueError(state, EnergyPlus::format("The runtime fraction exceeded 1.0. [{:.4T}].", 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, - format("{}, Heating coil runtime fraction > 1.0 warning continues... ", heatingCoil.Name), - heatingCoil.RTFErrorIndex, - heatingCoil.RTF, - heatingCoil.RTF); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::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) { @@ -2459,15 +2481,15 @@ namespace HeatingCoils { if (heatingCoil.PLFErrorCount < 1) { ++heatingCoil.PLFErrorCount; ShowWarningError(state, - format("CalcFuelHeatingCoil: {}=\"{}\", PLF curve values", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name)); - ShowContinueError(state, format("The PLF curve value = {:.5T} for part-load ratio = {:.5T}", PLF, PartLoadRat)); + EnergyPlus::format("CalcFuelHeatingCoil: {}=\"{}\", PLF curve values", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name)); + ShowContinueError(state, EnergyPlus::format("The PLF curve value = {:.5T} for part-load ratio = {:.5T}", 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, - format("{}, Heating coil PLF curve < 0.7 warning continues... ", heatingCoil.Name), + EnergyPlus::format("{}, Heating coil PLF curve < 0.7 warning continues... ", heatingCoil.Name), heatingCoil.PLFErrorIndex, PLF, PLF); @@ -2480,18 +2502,19 @@ namespace HeatingCoils { if (heatingCoil.RTFErrorCount < 1) { ++heatingCoil.RTFErrorCount; ShowWarningError(state, - format("CalcFuelHeatingCoil: {}=\"{}\", runtime fraction", - HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), - heatingCoil.Name)); - ShowContinueError(state, format("The runtime fraction exceeded 1.0. [{:.4T}].", heatingCoil.RTF)); + EnergyPlus::format("CalcFuelHeatingCoil: {}=\"{}\", runtime fraction", + HVAC::cAllCoilTypes(heatingCoil.HCoilType_Num), + heatingCoil.Name)); + ShowContinueError(state, EnergyPlus::format("The runtime fraction exceeded 1.0. [{:.4T}].", 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, - format("{}, Heating coil runtime fraction > 1.0 warning continues... ", heatingCoil.Name), - heatingCoil.RTFErrorIndex, - heatingCoil.RTF, - heatingCoil.RTF); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::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) { @@ -2582,7 +2605,8 @@ namespace HeatingCoils { heatingCoil.NominalCapacity = 0.0; ShowRecurringWarningErrorAtEnd( state, - format("Coil:Heating:Desuperheater {} - Waste heat source temperature was too low to be useful.", heatingCoil.Name), + EnergyPlus::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 - @@ -2846,7 +2870,7 @@ namespace HeatingCoils { HeatingCoilIndex = Util::FindItem(HeatingCoilName, state.dataHeatingCoils->HeatingCoil); if (HeatingCoilIndex == 0) { - ShowSevereError(state, format("GetCoilIndex: Heating coil not found={}", HeatingCoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilIndex: Heating coil not found={}", HeatingCoilName)); ErrorsFound = true; } } @@ -2876,14 +2900,14 @@ namespace HeatingCoils { if (CompIndex == 0) { int CoilNum = Util::FindItem(CompName, state.dataHeatingCoils->HeatingCoil); if (CoilNum == 0) { - ShowFatalError(state, format("CheckHeatingCoilSchedule: Coil not found=\"{}\".", CompName)); + ShowFatalError(state, EnergyPlus::format("CheckHeatingCoilSchedule: Coil not found=\"{}\".", CompName)); } if (!Util::SameString(CompType, HVAC::cAllCoilTypes(state.dataHeatingCoils->HeatingCoil(CoilNum).HCoilType_Num))) { - ShowSevereError(state, format("CheckHeatingCoilSchedule: Coil=\"{}\"", CompName)); + ShowSevereError(state, EnergyPlus::format("CheckHeatingCoilSchedule: Coil=\"{}\"", CompName)); ShowContinueError(state, - format("...expected type=\"{}\", actual type=\"{}\".", - CompType, - HVAC::cAllCoilTypes(state.dataHeatingCoils->HeatingCoil(CoilNum).HCoilType_Num))); + EnergyPlus::format("...expected type=\"{}\", actual type=\"{}\".", + CompType, + HVAC::cAllCoilTypes(state.dataHeatingCoils->HeatingCoil(CoilNum).HCoilType_Num))); ShowFatalError(state, "Program terminates due to preceding conditions."); } CompIndex = CoilNum; @@ -2892,21 +2916,22 @@ namespace HeatingCoils { int CoilNum = CompIndex; if (CoilNum > state.dataHeatingCoils->NumHeatingCoils || CoilNum < 1) { ShowFatalError(state, - format("CheckHeatingCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", - CoilNum, - state.dataHeatingCoils->NumHeatingCoils, - CompName)); + EnergyPlus::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, - format("CheckHeatingCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + ShowSevereError( + state, + EnergyPlus::format("CheckHeatingCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", CoilNum, CompName, state.dataHeatingCoils->HeatingCoil(CoilNum).Name)); ShowContinueError(state, - format("...expected type=\"{}\", actual type=\"{}\".", - CompType, - HVAC::cAllCoilTypes(state.dataHeatingCoils->HeatingCoil(CoilNum).HCoilType_Num))); + EnergyPlus::format("...expected type=\"{}\", actual type=\"{}\".", + CompType, + HVAC::cAllCoilTypes(state.dataHeatingCoils->HeatingCoil(CoilNum).HCoilType_Num))); ShowFatalError(state, "Program terminates due to preceding conditions."); } Value = state.dataHeatingCoils->HeatingCoil(CoilNum).availSched->getCurrentVal(); // not scheduled? @@ -2960,14 +2985,15 @@ namespace HeatingCoils { if (WhichCoil == 0) { // Autodesk:Return Reworked block to assure CoilCapacity is set before return if (FoundType == 0) { - ShowSevereError(state, format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); } else if (FoundType > 0) { - ShowSevereError(state, format("GetCoilCapacity: Invalid coil type for capacity, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilCapacity: Invalid coil type for capacity, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ShowContinueError(state, - format("...only {}, {} or {} are valid in this context.", - HVAC::cAllCoilTypes(HVAC::Coil_HeatingElectric), - HVAC::cAllCoilTypes(HVAC::Coil_HeatingGasOrOtherFuel), - HVAC::cAllCoilTypes(HVAC::Coil_HeatingDesuperheater))); + EnergyPlus::format("...only {}, {} or {} are valid in this context.", + HVAC::cAllCoilTypes(HVAC::Coil_HeatingElectric), + HVAC::cAllCoilTypes(HVAC::Coil_HeatingGasOrOtherFuel), + HVAC::cAllCoilTypes(HVAC::Coil_HeatingDesuperheater))); } ShowContinueError(state, "... returning Coil Capacity as -1000."); ErrorsFound = true; @@ -3013,7 +3039,7 @@ namespace HeatingCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -3057,7 +3083,7 @@ namespace HeatingCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -3102,7 +3128,7 @@ namespace HeatingCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -3205,7 +3231,7 @@ namespace HeatingCoils { } } - ShowSevereError(state, format("GetCoilControlNodeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilControlNodeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -3242,7 +3268,7 @@ namespace HeatingCoils { } } - ShowSevereError(state, format("GetHeatingCoilTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetHeatingCoilTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -3278,7 +3304,7 @@ namespace HeatingCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetHeatingCoilIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetHeatingCoilIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -3316,7 +3342,8 @@ namespace HeatingCoils { if (WhichCoil != 0) { return state.dataHeatingCoils->HeatingCoil(WhichCoil).PLFCurveIndex; } - ShowSevereError(state, format("GetHeatingCoilPLFCurveIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetHeatingCoilPLFCurveIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -3348,7 +3375,7 @@ namespace HeatingCoils { if (WhichCoil != 0) { return state.dataHeatingCoils->HeatingCoil(WhichCoil).NumOfStages; } - ShowSevereError(state, format("GetHeatingCoilNumberOfSpeeds: Invalid Heating Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetHeatingCoilNumberOfSpeeds: Invalid Heating Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -3376,9 +3403,9 @@ namespace HeatingCoils { if (CoilNum <= 0 || CoilNum > state.dataHeatingCoils->NumHeatingCoils) { ShowSevereError(state, - format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", - CoilNum, - state.dataHeatingCoils->NumHeatingCoils)); + EnergyPlus::format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", + CoilNum, + state.dataHeatingCoils->NumHeatingCoils)); ErrorsFound = true; return; } @@ -3410,7 +3437,7 @@ namespace HeatingCoils { HeatingCoilIndex = Util::FindItem(HeatingCoilName, state.dataHeatingCoils->HeatingCoil); if (HeatingCoilIndex == 0) { - ShowSevereError(state, format("GetCoilIndex: Heating coil not found={}", HeatingCoilName)); + ShowSevereError(state, EnergyPlus::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 c75c5363d9d..169cdde308a 100644 --- a/src/EnergyPlus/HighTempRadiantSystem.cc +++ b/src/EnergyPlus/HighTempRadiantSystem.cc @@ -146,25 +146,26 @@ namespace HighTempRadiantSystem { if (CompIndex == 0) { RadSysNum = Util::FindItemInList(CompName, state.dataHighTempRadSys->HighTempRadSys); if (RadSysNum == 0) { - ShowFatalError(state, format("SimHighTempRadiantSystem: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimHighTempRadiantSystem: Unit not found={}", CompName)); } CompIndex = RadSysNum; } else { RadSysNum = CompIndex; if (RadSysNum > state.dataHighTempRadSys->NumOfHighTempRadSys || RadSysNum < 1) { ShowFatalError(state, - format("SimHighTempRadiantSystem: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - RadSysNum, - state.dataHighTempRadSys->NumOfHighTempRadSys, - CompName)); + EnergyPlus::format("SimHighTempRadiantSystem: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + RadSysNum, + state.dataHighTempRadSys->NumOfHighTempRadSys, + CompName)); } if (state.dataHighTempRadSys->CheckEquipName(RadSysNum)) { if (CompName != state.dataHighTempRadSys->HighTempRadSys(RadSysNum).Name) { - ShowFatalError(state, - format("SimHighTempRadiantSystem: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - RadSysNum, - CompName, - state.dataHighTempRadSys->HighTempRadSys(RadSysNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimHighTempRadiantSystem: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + RadSysNum, + CompName, + state.dataHighTempRadSys->HighTempRadSys(RadSysNum).Name)); } state.dataHighTempRadSys->CheckEquipName(RadSysNum) = false; } @@ -272,8 +273,9 @@ namespace HighTempRadiantSystem { highTempRadSys.ZonePtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(3), state.dataHeatBal->Zone); if (highTempRadSys.ZonePtr == 0) { - ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -286,78 +288,80 @@ namespace HighTempRadiantSystem { if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatDesignCapacityNumericNum)) { highTempRadSys.ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum); if (highTempRadSys.ScaledHeatingCapacity < 0.0 && highTempRadSys.ScaledHeatingCapacity != DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Blank field not allowed for {}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (highTempRadSys.HeatingCapMethod == DataSizing::DesignSizingType::CapacityPerFloorArea) { if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatCapacityPerFloorAreaNumericNum)) { highTempRadSys.ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum); if (highTempRadSys.ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (highTempRadSys.ScaledHeatingCapacity == DataSizing::AutoSize) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = Autosize", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, - format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + 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))); 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, format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, - format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + 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))); ErrorsFound = true; } } @@ -370,17 +374,17 @@ namespace HighTempRadiantSystem { // Limit the combustion efficiency to between zero and one... if (highTempRadSys.CombustionEffic < MinCombustionEffic) { highTempRadSys.CombustionEffic = MinCombustionEffic; - ShowWarningError( - state, - format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } if (highTempRadSys.CombustionEffic > MaxCombustionEffic) { highTempRadSys.CombustionEffic = MaxCombustionEffic; - ShowWarningError( - state, - format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } } else { highTempRadSys.CombustionEffic = MaxCombustionEffic; // No inefficiency in the heater @@ -389,51 +393,58 @@ namespace HighTempRadiantSystem { highTempRadSys.FracRadiant = state.dataIPShortCut->rNumericArgs(5); if (highTempRadSys.FracRadiant < MinFraction) { highTempRadSys.FracRadiant = MinFraction; - ShowWarningError( - state, format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(5))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } if (highTempRadSys.FracRadiant > MaxFraction) { highTempRadSys.FracRadiant = MaxFraction; - ShowWarningError( - state, format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(5))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } highTempRadSys.FracLatent = state.dataIPShortCut->rNumericArgs(6); if (highTempRadSys.FracLatent < MinFraction) { highTempRadSys.FracLatent = MinFraction; - ShowWarningError( - state, format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(6))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } if (highTempRadSys.FracLatent > MaxFraction) { highTempRadSys.FracLatent = MaxFraction; - ShowWarningError( - state, format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(6))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } highTempRadSys.FracLost = state.dataIPShortCut->rNumericArgs(7); if (highTempRadSys.FracLost < MinFraction) { highTempRadSys.FracLost = MinFraction; - ShowWarningError( - state, format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(7))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } if (highTempRadSys.FracLost > MaxFraction) { highTempRadSys.FracLost = MaxFraction; - ShowWarningError( - state, format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(7))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } // 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, - format("Fractions radiant, latent, and lost sum up to greater than 1 for{}", state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; highTempRadSys.FracConvect = 0.0; } else { @@ -453,8 +464,8 @@ namespace HighTempRadiantSystem { highTempRadSys.ThrottlRange = state.dataIPShortCut->rNumericArgs(8); if (highTempRadSys.ThrottlRange < MinThrottlingRange) { highTempRadSys.ThrottlRange = 1.0; - ShowWarningError(state, format("{} is below the minimum allowed.", state.dataIPShortCut->cNumericFieldNames(8))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{} is below the minimum allowed.", state.dataIPShortCut->cNumericFieldNames(8))); + ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Thus, the throttling range value has been reset to 1.0"); } @@ -473,15 +484,17 @@ namespace HighTempRadiantSystem { highTempRadSys.FracDistribPerson = state.dataIPShortCut->rNumericArgs(9); if (highTempRadSys.FracDistribPerson < MinFraction) { highTempRadSys.FracDistribPerson = MinFraction; - ShowWarningError( - state, format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(9))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } if (highTempRadSys.FracDistribPerson > MaxFraction) { highTempRadSys.FracDistribPerson = MaxFraction; - ShowWarningError( - state, format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(9))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } highTempRadSys.TotSurfToDistrib = NumNumbers - 9; @@ -504,16 +517,16 @@ namespace HighTempRadiantSystem { if (highTempRadSys.FracDistribToSurf(SurfNum) < MinFraction) { highTempRadSys.FracDistribToSurf(SurfNum) = MinFraction; ShowWarningError(state, - format("{} was less than the allowable minimum, reset to minimum value.", - state.dataIPShortCut->cNumericFieldNames(SurfNum + 9))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } if (highTempRadSys.FracDistribToSurf(SurfNum) > MaxFraction) { highTempRadSys.FracDistribToSurf(SurfNum) = MaxFraction; ShowWarningError(state, - format("{} was greater than the allowable maximum, reset to maximum value.", - state.dataIPShortCut->cNumericFieldNames(SurfNum + 9))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } if (highTempRadSys.SurfacePtr(SurfNum) != 0) { @@ -527,30 +540,31 @@ namespace HighTempRadiantSystem { // Error trap if the fractions add up to greater than 1.0 if (AllFracsSummed > (MaxFraction + 0.01)) { - ShowSevereError( - state, - format("Fraction of radiation distributed to surfaces sums up to greater than 1 for {}", state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); 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, - format("Fraction of radiation distributed to surfaces and people sums up to less than 1 for {}", - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, format("The sum of all radiation fractions to surfaces = {:.5T}", TotalFracToSurfs)); - ShowContinueError(state, format("The radiant fraction to people = {:.5T}", highTempRadSys.FracDistribPerson)); - ShowContinueError(state, format("So, all radiant fractions including surfaces and people = {:.5T}", AllFracsSummed)); - ShowContinueError(state, - format("This means that the fraction of radiant energy that would be lost from the high temperature radiant heater " - "would be = {:.5T}", - FracOfRadPotentiallyLost)); + 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, + EnergyPlus::format("This means that the fraction of radiant energy that would be lost from the high temperature radiant heater " + "would be = {:.5T}", + FracOfRadPotentiallyLost)); ShowContinueError(state, - format("Please check and correct this so that all radiant energy is accounted for in {} = {}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Please check and correct this so that all radiant energy is accounted for in {} = {}", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -649,8 +663,9 @@ namespace HighTempRadiantSystem { if (CheckZoneEquipmentList(state, "ZoneHVAC:HighTemperatureRadiant", thisHTRSys.Name)) { continue; } - ShowSevereError(state, - format("InitHighTempRadiantSystem: Unit=[ZoneHVAC:HighTemperatureRadiant,{}] is not on any ZoneHVAC:EquipmentList. " + ShowSevereError( + state, + EnergyPlus::format("InitHighTempRadiantSystem: Unit=[ZoneHVAC:HighTemperatureRadiant,{}] is not on any ZoneHVAC:EquipmentList. " "It will not be simulated.", thisHTRSys.Name)); } @@ -722,7 +737,8 @@ namespace HighTempRadiantSystem { // Integer representation of sizing method name (e.g., CoolingAirflowSizing, HeatingCapacitySizing, etc.) int SizingMethod = HVAC::HeatingCapacitySizing; int FieldNum = 1; - std::string const SizingString = format("{} [W]", state.dataHighTempRadSys->HighTempRadSysNumericFields(RadSysNum).FieldNames(FieldNum)); + std::string const SizingString = + EnergyPlus::format("{} [W]", state.dataHighTempRadSys->HighTempRadSysNumericFields(RadSysNum).FieldNames(FieldNum)); // capacity sizing methods (HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity, and // FractionOfAutosizedHeatingCapacity ) int CapSizingMethod = static_cast(thisHTR.HeatingCapMethod); @@ -1175,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, format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); - ShowContinueError(state, format("Occurs in ZoneHVAC:HighTemperatureRadiant = {}", thisHTR.Name)); - ShowContinueError(state, format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); + ShowContinueError(state, EnergyPlus::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, 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, format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); - ShowContinueError(state, format("Occurs in ZoneHVAC:HighTemperatureRadiant = {}", thisHTR.Name)); + ShowContinueError(state, EnergyPlus::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, "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 26978802749..1a830afcb5d 100644 --- a/src/EnergyPlus/Humidifiers.cc +++ b/src/EnergyPlus/Humidifiers.cc @@ -135,31 +135,31 @@ namespace Humidifiers { if (CompIndex == 0) { HumNum = Util::FindItemInList(CompName, state.dataHumidifiers->Humidifier); if (HumNum == 0) { - ShowFatalError(state, format("SimHumidifier: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimHumidifier: Unit not found={}", CompName)); } CompIndex = HumNum; } else { HumNum = CompIndex; if (HumNum > state.dataHumidifiers->NumHumidifiers || HumNum < 1) { ShowFatalError(state, - format("SimHumidifier: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - HumNum, - state.dataHumidifiers->NumHumidifiers, - CompName)); + EnergyPlus::format("SimHumidifier: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + HumNum, + state.dataHumidifiers->NumHumidifiers, + CompName)); } if (state.dataHumidifiers->CheckEquipName(HumNum)) { if (CompName != state.dataHumidifiers->Humidifier(HumNum).Name) { ShowFatalError(state, - format("SimHumidifier: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - HumNum, - CompName, - state.dataHumidifiers->Humidifier(HumNum).Name)); + EnergyPlus::format("SimHumidifier: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + HumNum, + CompName, + state.dataHumidifiers->Humidifier(HumNum).Name)); } state.dataHumidifiers->CheckEquipName(HumNum) = false; } } if (HumNum <= 0) { - ShowFatalError(state, format("SimHumidifier: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimHumidifier: Unit not found={}", CompName)); } auto &thisHum = state.dataHumidifiers->Humidifier(HumNum); @@ -177,8 +177,8 @@ namespace Humidifiers { thisHum.CalcGasSteamHumidifier(state, WaterAddNeeded); } break; default: { - ShowSevereError(state, format("SimHumidifier: Invalid Humidifier Type Code={}", thisHum.HumType)); - ShowContinueError(state, format("...Component Name=[{}].", CompName)); + ShowSevereError(state, EnergyPlus::format("SimHumidifier: Invalid Humidifier Type Code={}", thisHum.HumType)); + ShowContinueError(state, EnergyPlus::format("...Component Name=[{}].", CompName)); ShowFatalError(state, "Preceding Condition causes termination."); } break; } @@ -391,9 +391,9 @@ namespace Humidifiers { Humidifier.Name, // Object Name cAlphaFields(3)); // Field Name } else if (!lAlphaBlanks(3)) { - ShowSevereError(state, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFields(3), Alphas(3))); - ShowContinueError(state, format("...{} not found.", cAlphaFields(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(3), Alphas(3))); + ShowContinueError(state, EnergyPlus::format("...{} not found.", cAlphaFields(3))); ErrorsFound = true; } @@ -579,7 +579,7 @@ namespace Humidifiers { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input.", RoutineName)); } } @@ -617,25 +617,26 @@ namespace Humidifiers { if (AirOutNode > 0) { if (state.dataLoopNodes->Node(AirOutNode).HumRatMin == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError( - state, - format("Humidifiers: Missing humidity setpoint for {} = {}", format(HumidifierType[static_cast(HumType)]), Name)); + ShowSevereError(state, + EnergyPlus::format("Humidifiers: Missing humidity setpoint for {} = {}", + EnergyPlus::format(HumidifierType[static_cast(HumType)]), + Name)); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"MinimumHumidityRatio\" to establish a setpoint at the " "humidifier outlet node."); - ShowContinueError(state, format(" expecting it on Node=\"{}\".", state.dataLoopNodes->NodeID(AirOutNode))); + ShowContinueError(state, EnergyPlus::format(" expecting it on Node=\"{}\".", state.dataLoopNodes->NodeID(AirOutNode))); state.dataHVACGlobal->SetPointErrorFlag = true; } else { CheckIfNodeSetPointManagedByEMS(state, AirOutNode, HVAC::CtrlVarType::MinHumRat, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - format("Humidifiers: Missing humidity setpoint for {} = {}", - format(HumidifierType[static_cast(HumType)]), - Name)); + EnergyPlus::format("Humidifiers: Missing humidity setpoint for {} = {}", + EnergyPlus::format(HumidifierType[static_cast(HumType)]), + Name)); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"MinimumHumidityRatio\" to establish a setpoint at " "the humidifier outlet node."); - ShowContinueError(state, format(" expecting it on Node=\"{}\".", state.dataLoopNodes->NodeID(AirOutNode))); + ShowContinueError(state, EnergyPlus::format(" expecting it on Node=\"{}\".", state.dataLoopNodes->NodeID(AirOutNode))); ShowContinueError( state, " or use an EMS actuator to control minimum humidity ratio to establish a setpoint at the humidifier outlet node."); @@ -748,7 +749,7 @@ namespace Humidifiers { HardSizeNoDesRun = true; if (NomCapVol > 0.0) { BaseSizer::reportSizerOutput(state, - format(HumidifierType[static_cast(HumType)]), + EnergyPlus::format(HumidifierType[static_cast(HumType)]), Name, "User-Specified Nominal Capacity Volume [m3/s]", NomCapVol); @@ -770,7 +771,7 @@ namespace Humidifiers { HardSizeNoDesRun = true; if (NomCapVol > 0.0) { BaseSizer::reportSizerOutput(state, - format(HumidifierType[static_cast(HumType)]), + EnergyPlus::format(HumidifierType[static_cast(HumType)]), Name, "User-Specified Nominal Capacity Volume [m3/s]", NomCapVol); @@ -818,13 +819,16 @@ namespace Humidifiers { if (IsAutoSize) { NomCapVol = NomCapVolDes; - BaseSizer::reportSizerOutput( - state, format(HumidifierType[static_cast(HumType)]), Name, "Design Size Nominal Capacity Volume [m3/s]", NomCapVolDes); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format(HumidifierType[static_cast(HumType)]), + Name, + "Design Size Nominal Capacity Volume [m3/s]", + NomCapVolDes); } else { if (NomCapVol > 0.0) { NomCapVolUser = NomCapVol; BaseSizer::reportSizerOutput(state, - format(HumidifierType[static_cast(HumType)]), + EnergyPlus::format(HumidifierType[static_cast(HumType)]), Name, "Design Size Nominal Capacity Volume [m3/s]", NomCapVolDes, @@ -833,11 +837,13 @@ namespace Humidifiers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(NomCapVolDes - NomCapVolUser) / NomCapVolUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHumidifier: Potential issue with equipment sizing for {} = \"{}\".", - format(HumidifierType[static_cast(HumType)]), - Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity Volume of {:.2R} [Wm3/s]", NomCapVolUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity Volume of {:.2R} [m3/s]", NomCapVolDes)); + EnergyPlus::format("SizeHumidifier: Potential issue with equipment sizing for {} = \"{}\".", + EnergyPlus::format(HumidifierType[static_cast(HumType)]), + Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Nominal Capacity Volume of {:.2R} [Wm3/s]", NomCapVolUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Nominal Capacity Volume of {:.2R} [m3/s]", NomCapVolDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -867,17 +873,18 @@ namespace Humidifiers { ThermalEffRated = NominalPower / NomPower; } else { ShowMessage(state, - format("{}: capacity and thermal efficiency mismatch for {} =\"{}\".", - CalledFrom, - format(HumidifierType[static_cast(HumType)]), - Name)); - ShowContinueError(state, format("User-Specified Rated Gas Use Rate of {:.2R} [W]", NomPower)); - ShowContinueError(state, format("User-Specified or Autosized Rated Capacity of {:.2R} [m3/s]", NomCapVol)); - ShowContinueError(state, - format("Rated Gas Use Rate at the Rated Capacity of {:.2R} [m3/s] must be greater than the ideal, i.e., " - "100% thermal efficiency gas use rate of {:.2R} [W]", - NomCapVol, - NomPowerDes)); + EnergyPlus::format("{}: capacity and thermal efficiency mismatch for {} =\"{}\".", + CalledFrom, + EnergyPlus::format(HumidifierType[static_cast(HumType)]), + Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Rated Gas Use Rate of {:.2R} [W]", NomPower)); + ShowContinueError(state, EnergyPlus::format("User-Specified or Autosized Rated Capacity of {:.2R} [m3/s]", NomCapVol)); + ShowContinueError( + state, + EnergyPlus::format("Rated Gas Use Rate at the Rated Capacity of {:.2R} [m3/s] must be greater than the ideal, i.e., " + "100% thermal efficiency gas use rate of {:.2R} [W]", + NomCapVol, + NomPowerDes)); ShowContinueError(state, "Resize the Rated Gas Use Rate by dividing the ideal gas use rate with expected thermal efficiency. "); // Changing this from a hard-stop condition to just a limiting condition of eta=1.0 @@ -898,12 +905,12 @@ namespace Humidifiers { if (IsAutoSize) { NomPower = NomPowerDes; BaseSizer::reportSizerOutput( - state, format(HumidifierType[static_cast(HumType)]), Name, "Design Size Rated Power [W]", NomPowerDes); + state, EnergyPlus::format(HumidifierType[static_cast(HumType)]), Name, "Design Size Rated Power [W]", NomPowerDes); } else { if (NomPower >= 0.0 && NomCap > 0.0) { NomPowerUser = NomPower; BaseSizer::reportSizerOutput(state, - format(HumidifierType[static_cast(HumType)]), + EnergyPlus::format(HumidifierType[static_cast(HumType)]), Name, "Design Size Rated Power [W]", NomPowerDes, @@ -912,26 +919,26 @@ namespace Humidifiers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(NomPowerDes - NomPowerUser) / NomPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHumidifier: Potential issue with equipment sizing for {} =\"{}\".", - format(HumidifierType[static_cast(HumType)]), - Name)); - ShowContinueError(state, format("User-Specified Rated Power of {:.2R} [W]", NomPowerUser)); - ShowContinueError(state, format("differs from Design Size Rated Power of {:.2R} [W]", NomPowerDes)); + EnergyPlus::format("SizeHumidifier: Potential issue with equipment sizing for {} =\"{}\".", + EnergyPlus::format(HumidifierType[static_cast(HumType)]), + Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Rated Power of {:.2R} [W]", NomPowerUser)); + ShowContinueError(state, EnergyPlus::format("differs from Design Size Rated Power of {:.2R} [W]", NomPowerDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } } if (NomPower < NominalPower) { ShowWarningError(state, - format(HumidifierType[static_cast(HumType)]) + + EnergyPlus::format(HumidifierType[static_cast(HumType)]) + ": specified Rated Power is less than nominal Rated Power for " + ModuleObjectType + " steam humidifier = " + Name + ". "); - ShowContinueError(state, format(" specified Rated Power = {:.2R}", NomPower)); - ShowContinueError(state, format(" while expecting a minimum Rated Power = {:.2R}", NominalPower)); + ShowContinueError(state, EnergyPlus::format(" specified Rated Power = {:.2R}", NomPower)); + ShowContinueError(state, EnergyPlus::format(" while expecting a minimum Rated Power = {:.2R}", NominalPower)); } } else { ShowWarningError(state, - format(HumidifierType[static_cast(HumType)]) + ": specified nominal capacity is zero for " + + EnergyPlus::format(HumidifierType[static_cast(HumType)]) + ": specified nominal capacity is zero for " + ModuleObjectType + " steam humidifier = " + Name + ". "); ShowContinueError(state, " For zero nominal capacity humidifier the rated power is zero."); } @@ -939,10 +946,11 @@ namespace Humidifiers { } if (ErrorsFound) { - ShowFatalError(state, - format("{}: Mismatch was found in the Rated Gas Use Rate and Thermal Efficiency for gas fired steam humidifier = {}. ", - CalledFrom, - Name)); + ShowFatalError( + state, + EnergyPlus::format("{}: Mismatch was found in the Rated Gas Use Rate and Thermal Efficiency for gas fired steam humidifier = {}. ", + CalledFrom, + Name)); } } @@ -1378,7 +1386,7 @@ namespace Humidifiers { if (WhichHumidifier != 0) { NodeNum = state.dataHumidifiers->Humidifier(WhichHumidifier).AirInNode; } else { - ShowSevereError(state, format("GetAirInletNodeNum: Could not find Humidifier = \"{}\"", HumidifierName)); + ShowSevereError(state, EnergyPlus::format("GetAirInletNodeNum: Could not find Humidifier = \"{}\"", HumidifierName)); ErrorsFound = true; NodeNum = 0; } @@ -1401,7 +1409,7 @@ namespace Humidifiers { if (WhichHumidifier != 0) { return state.dataHumidifiers->Humidifier(WhichHumidifier).AirOutNode; } - ShowSevereError(state, format("GetAirInletNodeNum: Could not find Humidifier = \"{}\"", HumidifierName)); + ShowSevereError(state, EnergyPlus::format("GetAirInletNodeNum: Could not find Humidifier = \"{}\"", HumidifierName)); ErrorsFound = true; return 0; } diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index ce83778d0dc..0ea3dbdf23d 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -464,8 +464,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(TEMP_CURVE, -1); } else { @@ -482,8 +482,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(W_CURVE, -1); } else { @@ -498,8 +498,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(POWER_CURVE, -1); } else { @@ -514,8 +514,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(SUPPLY_FAN_POWER, -1); } else { @@ -530,8 +530,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(EXTERNAL_STATIC_PRESSURE, -1); } else { @@ -547,8 +547,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(SECOND_FUEL_USE, -1); } else { @@ -563,8 +563,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(THIRD_FUEL_USE, -1); } else { @@ -579,8 +579,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(WATER_USE, -1); } else { @@ -595,8 +595,8 @@ namespace HybridEvapCoolingModel { // N9, \field Mode1 Maximum Outdoor Air Temperature bool ok = InitializeOutdoorAirTemperatureConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -604,8 +604,8 @@ namespace HybridEvapCoolingModel { // N11, \field Mode1 Maximum Outdoor Air Humidity Ratio ok = InitializeOutdoorAirHumidityRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -613,8 +613,8 @@ namespace HybridEvapCoolingModel { // N13, \field Mode1 Maximum Outdoor Air Relative Humidity ok = InitializeOutdoorAirRelativeHumidityConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -622,8 +622,8 @@ namespace HybridEvapCoolingModel { // N15, \field Mode1 Maximum Return Air Temperature ok = InitializeReturnAirTemperatureConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -631,8 +631,8 @@ namespace HybridEvapCoolingModel { // N17, \field Mode1 Maximum Return Air Humidity Ratio ok = InitializeReturnAirHumidityRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -641,12 +641,12 @@ namespace HybridEvapCoolingModel { ok = InitializeReturnAirRelativeHumidityConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { ShowSevereError(state, - format("Invalid {}={}Or Invalid{}={}", - cAlphaFields(inter_Number), - Alphas(inter_Number), - cAlphaFields(inter_Number + 1), - Alphas(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + EnergyPlus::format("Invalid {}={}Or Invalid{}={}", + cAlphaFields(inter_Number), + Alphas(inter_Number), + cAlphaFields(inter_Number + 1), + Alphas(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -655,8 +655,9 @@ namespace HybridEvapCoolingModel { ok = InitializeOSAFConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } // N22, \field Mode1 Minimum Supply Air Mass Flow Rate Ratio @@ -664,8 +665,9 @@ namespace HybridEvapCoolingModel { inter_Number = inter_Number + 2; ok = InitializeMsaRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } (*OperatingModes).push_back(*this); @@ -930,7 +932,8 @@ namespace HybridEvapCoolingModel { Real64 Model::CheckVal_T(EnergyPlusData &state, Real64 T) { if ((T > 100) || (T < 0)) { - ShowWarningError(state, format("Supply air temperature exceeded realistic range error called in {}, check performance curve", Name)); + ShowWarningError(state, + EnergyPlus::format("Supply air temperature exceeded realistic range error called in {}, check performance curve", Name)); } return T; } @@ -1258,15 +1261,17 @@ namespace HybridEvapCoolingModel { Real64 PreviousMaxiumHumidOrDehumidOutput = 0; std::string ObjectID = Name.c_str(); if (StepIns.RHosa > 1) { - ShowSevereError(state, - format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); + ShowSevereError( + state, + EnergyPlus::format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); assert(true); return -1; } // because it should be fractional, this should only really be possible if its called from a unit test if (StepIns.RHra > 1) { - ShowSevereError(state, - format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); + ShowSevereError( + state, + EnergyPlus::format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); assert(true); return -1; } // because it should be fractional, this should only really be possible if its called from a unit test @@ -1626,38 +1631,42 @@ namespace HybridEvapCoolingModel { // day, so report", but that doesn't seem to exist. if ((TimeElapsed > 24) && WarnOnceFlag && !state.dataGlobal->WarmupFlag) { if (count_EnvironmentConditionsNotMet > 0) { - ShowWarningError(state, - format("In day {:.1R} was unable to operate for of simulation, {}{:.1R} timesteps because environment conditions " - "were beyond the allowable operating range for any mode.", - (Real64)state.dataGlobal->DayOfSim, - Name, - (Real64)count_EnvironmentConditionsNotMet)); + ShowWarningError( + state, + EnergyPlus::format("In day {:.1R} was unable to operate for of simulation, {}{:.1R} timesteps because environment conditions " + "were beyond the allowable operating range for any mode.", + (Real64)state.dataGlobal->DayOfSim, + Name, + (Real64)count_EnvironmentConditionsNotMet)); } if (count_SAHR_OC_MetOnce > 0) { - ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to meet supply air humidity ratio for {:.1R} time steps. For these " - "time steps For these time steps was set to mode 0{}", - (Real64)state.dataGlobal->DayOfSim, - Name, - Real64(count_SAHR_OC_MetOnce), - Name)); + ShowWarningError( + state, + EnergyPlus::format("In day {:.1R} of simulation, {} failed to meet supply air humidity ratio for {:.1R} time steps. For these " + "time steps For these time steps was set to mode 0{}", + (Real64)state.dataGlobal->DayOfSim, + Name, + Real64(count_SAHR_OC_MetOnce), + Name)); } if (count_SAT_OC_MetOnce > 0) { - ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to meet supply air temperature constraints for {:.1R} time steps. " - "For these time steps For these time steps{} was set to mode 0", - (Real64)state.dataGlobal->DayOfSim, - Name, - Real64(count_SAT_OC_MetOnce), - Name)); + ShowWarningError( + state, + EnergyPlus::format("In day {:.1R} of simulation, {} failed to meet supply air temperature constraints for {:.1R} time steps. " + "For these time steps For these time steps{} was set to mode 0", + (Real64)state.dataGlobal->DayOfSim, + Name, + Real64(count_SAT_OC_MetOnce), + Name)); } - ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to satisfy sensible load for {:.1R} time steps. For these time steps " - "settings were selected to provide as much sensible cooling or heating as possible, given other constraints.", - (Real64)state.dataGlobal->DayOfSim, - Name, - (Real64)count_DidWeNotMeetLoad)); + ShowWarningError( + state, + EnergyPlus::format("In day {:.1R} of simulation, {} failed to satisfy sensible load for {:.1R} time steps. For these time steps " + "settings were selected to provide as much sensible cooling or heating as possible, given other constraints.", + (Real64)state.dataGlobal->DayOfSim, + Name, + (Real64)count_DidWeNotMeetLoad)); count_SAT_OC_MetOnce = 0; count_DidWeNotMeetLoad = 0; @@ -1840,8 +1849,9 @@ namespace HybridEvapCoolingModel { CMode Mode = *(OperatingModes.begin()); if (SetStandByMode(state, Mode, StepIns.Tosa, Wosa, StepIns.Tra, Wra)) { std::string ObjectID = Name.c_str(); - ShowSevereError(state, - format("Standby mode not defined correctly, as the mode is defined there are zero combinations of acceptable outside air " + ShowSevereError( + state, + EnergyPlus::format("Standby mode not defined correctly, as the mode is defined there are zero combinations of acceptable outside air " "fractions and supply air mass flow rate, called in object {}", ObjectID)); } @@ -1915,8 +1925,9 @@ namespace HybridEvapCoolingModel { if (CoolingRequested || HeatingRequested) { ShowSevereError( state, - format("Outlet air mass flow rate of zero during period with conditioning need, check mode definition. Called in object {}", - Name)); + EnergyPlus::format( + "Outlet air mass flow rate of zero during period with conditioning need, check mode definition. Called in object {}", + Name)); } averageOSAF = 1; } diff --git a/src/EnergyPlus/HybridModel.cc b/src/EnergyPlus/HybridModel.cc index 2eff0deb4d1..6e45a8955f7 100644 --- a/src/EnergyPlus/HybridModel.cc +++ b/src/EnergyPlus/HybridModel.cc @@ -160,19 +160,22 @@ namespace HybridModel { // Scenario 1-1: To solve thermal mass if (state.dataHybridModel->FlagHybridModel_TM) { if (state.dataHybridModel->FlagHybridModel_AI) { - ShowSevereError(state, - format("Field \"{} and {}\" cannot be both set to YES.", cAlphaFieldNames(3), cAlphaFieldNames(4))); + ShowSevereError( + state, + EnergyPlus::format("Field \"{} and {}\" cannot be both set to YES.", cAlphaFieldNames(3), cAlphaFieldNames(4))); ErrorsFound = true; } if (state.dataHybridModel->FlagHybridModel_PC) { - ShowSevereError(state, - format("Field \"{} and {}\" cannot be both set to YES.", cAlphaFieldNames(3), cAlphaFieldNames(5))); + ShowSevereError( + state, + EnergyPlus::format("Field \"{} and {}\" cannot be both set to YES.", cAlphaFieldNames(3), cAlphaFieldNames(5))); ErrorsFound = true; } if (temperatureSched == nullptr) { - ShowSevereError(state, format("Measured Zone Air Temperature Schedule is not defined for: {}", CurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("Measured Zone Air Temperature Schedule is not defined for: {}", CurrentModuleObject)); ErrorsFound = true; } else { hmZone.InternalThermalMassCalc_T = true; @@ -182,38 +185,41 @@ namespace HybridModel { // Scenario 1-2: To solve infiltration rate if (state.dataHybridModel->FlagHybridModel_AI) { if (state.dataHybridModel->FlagHybridModel_PC) { - ShowSevereError(state, - format("Field \"{}\" and \"{}\" cannot be both set to YES.", cAlphaFieldNames(4), cAlphaFieldNames(5))); + ShowSevereError( + state, + EnergyPlus::format("Field \"{}\" and \"{}\" cannot be both set to YES.", cAlphaFieldNames(4), cAlphaFieldNames(5))); ErrorsFound = true; } if (temperatureSched == nullptr && humidityRatioSched == nullptr && CO2ConcentrationSched == nullptr) { // Show fatal error if no measurement schedule is provided - ShowSevereError(state, format("No measured environmental parameter is provided for: {}", CurrentModuleObject)); - ShowContinueError(state, - format("One of the field \"{}\", \"{}\", or {}\" must be provided for the HybridModel:Zone.", - cAlphaFieldNames(6), - cAlphaFieldNames(7), - cAlphaFieldNames(8))); + ShowSevereError(state, + EnergyPlus::format("No measured environmental parameter is provided for: {}", CurrentModuleObject)); + ShowContinueError( + state, + EnergyPlus::format("One of the field \"{}\", \"{}\", or {}\" must be provided for the HybridModel:Zone.", + cAlphaFieldNames(6), + cAlphaFieldNames(7), + cAlphaFieldNames(8))); ErrorsFound = true; } else { if (temperatureSched != nullptr && !state.dataHybridModel->FlagHybridModel_TM) { // Temperature schedule is provided, ignore humidity ratio and CO2 concentration schedules. hmZone.InfiltrationCalc_T = true; if (humidityRatioSched != nullptr) { - ShowWarningError(state, format("Field \"{}\" is provided.", cAlphaFieldNames(6))); - ShowContinueError(state, format("Field \"{}\" will not be used.", cAlphaFieldNames(7))); + ShowWarningError(state, EnergyPlus::format("Field \"{}\" is provided.", cAlphaFieldNames(6))); + ShowContinueError(state, EnergyPlus::format("Field \"{}\" will not be used.", cAlphaFieldNames(7))); } if (CO2ConcentrationSched != nullptr) { - ShowWarningError(state, format("Field \"{}\" is provided.", cAlphaFieldNames(6))); - ShowContinueError(state, format("Field \"{}\" will not be used.", cAlphaFieldNames(8))); + ShowWarningError(state, EnergyPlus::format("Field \"{}\" is provided.", cAlphaFieldNames(6))); + ShowContinueError(state, EnergyPlus::format("Field \"{}\" will not be used.", cAlphaFieldNames(8))); } } if (humidityRatioSched != nullptr && temperatureSched == nullptr) { // Humidity ratio schedule is provided, ignore CO2 concentration schedule. hmZone.InfiltrationCalc_H = true; if (CO2ConcentrationSched != nullptr) { - ShowWarningError(state, format("Field \"{}\" is provided.", cAlphaFieldNames(7))); - ShowContinueError(state, format("Field \"{}\" will not be used.", cAlphaFieldNames(8))); + ShowWarningError(state, EnergyPlus::format("Field \"{}\" is provided.", cAlphaFieldNames(7))); + ShowContinueError(state, EnergyPlus::format("Field \"{}\" will not be used.", cAlphaFieldNames(8))); } } if (CO2ConcentrationSched != nullptr && temperatureSched == nullptr && humidityRatioSched == nullptr) { @@ -227,12 +233,14 @@ namespace HybridModel { if (state.dataHybridModel->FlagHybridModel_PC) { if (temperatureSched == nullptr && humidityRatioSched == nullptr && CO2ConcentrationSched == nullptr) { // Show fatal error if no measurement schedule is provided - ShowSevereError(state, format("No measured environmental parameter is provided for: {}", CurrentModuleObject)); - ShowContinueError(state, - format("One of the field \"{}\", \"{}\", or {}\" must be provided for the HybridModel:Zone.", - cAlphaFieldNames(6), - cAlphaFieldNames(7), - cAlphaFieldNames(8))); + ShowSevereError(state, + EnergyPlus::format("No measured environmental parameter is provided for: {}", CurrentModuleObject)); + ShowContinueError( + state, + EnergyPlus::format("One of the field \"{}\", \"{}\", or {}\" must be provided for the HybridModel:Zone.", + cAlphaFieldNames(6), + cAlphaFieldNames(7), + cAlphaFieldNames(8))); ErrorsFound = true; } else { if (temperatureSched != nullptr && !state.dataHybridModel->FlagHybridModel_TM) { @@ -271,10 +279,10 @@ namespace HybridModel { hmZone.IncludeSystemSupplyParameters = true; } else { ShowWarningError(state, - format("Field \"{}\", {}, and \"{}\" will not be used in the inverse balance equation.", - cAlphaFieldNames(13), - cAlphaFieldNames(14), - cAlphaFieldNames(15))); + EnergyPlus::format("Field \"{}\", {}, and \"{}\" will not be used in the inverse balance equation.", + cAlphaFieldNames(13), + cAlphaFieldNames(14), + cAlphaFieldNames(15))); } } @@ -283,9 +291,9 @@ namespace HybridModel { hmZone.IncludeSystemSupplyParameters = true; } else { ShowWarningError(state, - format("Field \"{}\" and \"{}\" will not be used in the inverse balance equation.", - cAlphaFieldNames(15), - cAlphaFieldNames(14))); + EnergyPlus::format("Field \"{}\" and \"{}\" will not be used in the inverse balance equation.", + cAlphaFieldNames(15), + cAlphaFieldNames(14))); } } @@ -294,9 +302,9 @@ namespace HybridModel { hmZone.IncludeSystemSupplyParameters = true; } else { ShowWarningError(state, - format("Field \"{}\" and \"{}\" will not be used in the inverse balance equation.", - cAlphaFieldNames(16), - cAlphaFieldNames(14))); + EnergyPlus::format("Field \"{}\" and \"{}\" will not be used in the inverse balance equation.", + cAlphaFieldNames(16), + cAlphaFieldNames(14))); } } @@ -331,32 +339,36 @@ namespace HybridModel { } else { ShowWarningError( state, - format("Field \"{}\": default people activity level is not provided, default value of 130W/person will be used.", - cAlphaFieldNames(9))); + EnergyPlus::format( + "Field \"{}\": default people activity level is not provided, default value of 130W/person will be used.", + cAlphaFieldNames(9))); } if (peopleSensibleFractionSched != nullptr) { hmZone.peopleSensibleFracSched = peopleSensibleFractionSched; } else { ShowWarningError( state, - format("Field \"{}\": default people sensible heat rate is not provided, default value of 0.6 will be used.", - cAlphaFieldNames(10))); + EnergyPlus::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, - format("Field \"{}\": default people radiant heat portion (of sensible heat) is not provided, default " - "value of 0.7 will be used.", - cAlphaFieldNames(11))); + 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))); } if (peopleCO2GenRateSched != nullptr) { hmZone.peopleCO2GenRateSched = peopleCO2GenRateSched; } else { - ShowWarningError(state, - format("Field \"{}\": default people CO2 generation rate is not provided, default value of 0.0000000382 " - "kg/W will be used.", - cAlphaFieldNames(12))); + 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))); } } @@ -433,7 +445,8 @@ namespace HybridModel { } else { ShowSevereError( state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); + EnergyPlus::format( + "{}=\"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); ErrorsFound = true; } } diff --git a/src/EnergyPlus/HybridUnitaryAirConditioners.cc b/src/EnergyPlus/HybridUnitaryAirConditioners.cc index d7a0529f881..f036fd81874 100644 --- a/src/EnergyPlus/HybridUnitaryAirConditioners.cc +++ b/src/EnergyPlus/HybridUnitaryAirConditioners.cc @@ -105,20 +105,22 @@ void SimZoneHybridUnitaryAirConditioners(EnergyPlusData &state, } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > state.dataHybridUnitaryAC->NumZoneHybridEvap) { - ShowFatalError(state, - format("SimZoneHybridUnitaryAirConditioners: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", - CompNum, - state.dataHybridUnitaryAC->NumZoneHybridEvap, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimZoneHybridUnitaryAirConditioners: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", + CompNum, + state.dataHybridUnitaryAC->NumZoneHybridEvap, + CompName)); } if (state.dataHybridUnitaryAC->CheckZoneHybridEvapName(CompNum)) { if (CompName != state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name) { ShowFatalError( state, - format("SimZoneHybridUnitaryAirConditioners: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", - CompNum, - CompName, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name)); + EnergyPlus::format( + "SimZoneHybridUnitaryAirConditioners: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", + CompNum, + CompName, + state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name)); } state.dataHybridUnitaryAC->CheckZoneHybridEvapName(CompNum) = false; } @@ -127,33 +129,34 @@ void SimZoneHybridUnitaryAirConditioners(EnergyPlusData &state, InitZoneHybridUnitaryAirConditioners(state, CompNum, ZoneNum); } catch (int e) { ShowFatalError(state, - format("An exception occurred in InitZoneHybridUnitaryAirConditioners{}, Unit name={}, stored unit name for that " - "index={}. Please check idf.", - CompNum, - CompName, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name)); + EnergyPlus::format("An exception occurred in InitZoneHybridUnitaryAirConditioners{}, Unit name={}, stored unit name for that " + "index={}. Please check idf.", + CompNum, + CompName, + state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name)); return; } try { CalcZoneHybridUnitaryAirConditioners(state, CompNum, ZoneNum, SensibleOutputProvided, LatentOutputProvided); } catch (int e) { ShowFatalError(state, - format("An exception occurred in CalcZoneHybridUnitaryAirConditioners{}, Unit name={}, stored unit name for that " - "index={}. Please check idf.", - CompNum, - CompName, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name)); + EnergyPlus::format("An exception occurred in CalcZoneHybridUnitaryAirConditioners{}, Unit name={}, stored unit name for that " + "index={}. Please check idf.", + CompNum, + CompName, + state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name)); return; } try { ReportZoneHybridUnitaryAirConditioners(state, CompNum); } catch (int e) { - ShowFatalError(state, - format("An exception occurred in ReportZoneHybridUnitaryAirConditioners{}, Unit name={}, stored unit name for that " - "index={}. Please check idf.", - CompNum, - CompName, - state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("An exception occurred in ReportZoneHybridUnitaryAirConditioners{}, Unit name={}, stored unit name for that " + "index={}. Please check idf.", + CompNum, + CompName, + state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(CompNum).Name)); return; } } @@ -234,8 +237,9 @@ void InitZoneHybridUnitaryAirConditioners(EnergyPlusData &state, if (CheckZoneEquipmentList(state, "ZoneHVAC:HybridUnitaryHVAC", state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(Loop).Name)) { state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(Loop).ZoneNodeNum = state.dataZoneEquip->ZoneEquipConfig(ZoneNum).ZoneNode; } else { - ShowSevereError(state, - format("InitZoneHybridUnitaryAirConditioners: ZoneHVAC:HybridUnitaryHVAC = {}, is not on any ZoneHVAC:EquipmentList. " + ShowSevereError( + state, + EnergyPlus::format("InitZoneHybridUnitaryAirConditioners: ZoneHVAC:HybridUnitaryHVAC = {}, is not on any ZoneHVAC:EquipmentList. " " It will not be simulated.", state.dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(Loop).Name)); } @@ -608,8 +612,8 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error } else if (Util::SameString(Alphas(13), "No")) { hybridUnitaryAC.FanHeatGain = true; } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, hybridUnitaryAC.Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, hybridUnitaryAC.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(13), Alphas(13))); ErrorsFound = true; } } @@ -665,8 +669,8 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error if (!lAlphaBlanks(19)) { hybridUnitaryAC.OARequirementsPtr = Util::FindItemInList(Alphas(19), state.dataSize->OARequirements); if (hybridUnitaryAC.OARequirementsPtr == 0) { - ShowSevereError(state, format("{}: {} = {} invalid data", routineName, cCurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Invalid-not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); + ShowSevereError(state, EnergyPlus::format("{}: {} = {} invalid data", routineName, cCurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Invalid-not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); ErrorsFound = true; } else { hybridUnitaryAC.OutdoorAir = true; @@ -687,7 +691,7 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error for (int modeIter = 0; modeIter <= Numberofoperatingmodes - 1; ++modeIter) { ErrorsFound = hybridUnitaryAC.ParseMode(state, Alphas, cAlphaFields, Numbers, cNumericFields, lAlphaBlanks, cCurrentModuleObject); if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found parsing modes", routineName)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found parsing modes", routineName)); ShowContinueError(state, "... Preceding condition causes termination."); break; } @@ -1248,35 +1252,35 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error for (auto &thisSetting : hybridUnitaryAC.CurrentOperatingSettings) { SetupOutputVariable(state, - format("Zone Hybrid Unitary HVAC Runtime Fraction in Setting {}", index), + EnergyPlus::format("Zone Hybrid Unitary HVAC Runtime Fraction in Setting {}", index), Constant::Units::None, thisSetting.Runtime_Fraction, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, hybridUnitaryAC.Name); SetupOutputVariable(state, - format("Zone Hybrid Unitary HVAC Mode in Setting {}", index), + EnergyPlus::format("Zone Hybrid Unitary HVAC Mode in Setting {}", index), Constant::Units::None, thisSetting.Mode, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, hybridUnitaryAC.Name); SetupOutputVariable(state, - format("Zone Hybrid Unitary HVAC Outdoor Air Fraction in Setting {}", index), + EnergyPlus::format("Zone Hybrid Unitary HVAC Outdoor Air Fraction in Setting {}", index), Constant::Units::kg_s, thisSetting.Outdoor_Air_Fraction, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, hybridUnitaryAC.Name); SetupOutputVariable(state, - format("Zone Hybrid Unitary HVAC Supply Air Mass Flow Rate in Setting {}", index), + EnergyPlus::format("Zone Hybrid Unitary HVAC Supply Air Mass Flow Rate in Setting {}", index), Constant::Units::kg_s, thisSetting.Unscaled_Supply_Air_Mass_Flow_Rate, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, hybridUnitaryAC.Name); SetupOutputVariable(state, - format("Zone Hybrid Unitary HVAC Supply Air Mass Flow Rate Ratio in Setting {}", index), + EnergyPlus::format("Zone Hybrid Unitary HVAC Supply Air Mass Flow Rate Ratio in Setting {}", index), Constant::Units::None, thisSetting.Supply_Air_Mass_Flow_Rate_Ratio, OutputProcessor::TimeStepType::Zone, @@ -1287,7 +1291,7 @@ void GetInputZoneHybridUnitaryAirConditioners(EnergyPlusData &state, bool &Error } Errors = ErrorsFound; if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in getting input.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in getting input.", routineName)); ShowContinueError(state, "... Preceding condition causes termination."); } } diff --git a/src/EnergyPlus/ICEngineElectricGenerator.cc b/src/EnergyPlus/ICEngineElectricGenerator.cc index fc52bdd7a42..0cd48109858 100644 --- a/src/EnergyPlus/ICEngineElectricGenerator.cc +++ b/src/EnergyPlus/ICEngineElectricGenerator.cc @@ -104,8 +104,8 @@ namespace ICEngineElectricGenerator { } // If we didn't find it, fatal ShowFatalError(state, - format("LocalICEngineGeneratorFactory: Error getting inputs for internal combustion engine generator named: {}", - objectName)); // LCOV_EXCL_LINE + EnergyPlus::format("LocalICEngineGeneratorFactory: Error getting inputs for internal combustion engine generator named: {}", + objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -138,7 +138,7 @@ namespace ICEngineElectricGenerator { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (state.dataICEngElectGen->NumICEngineGenerators <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -168,8 +168,8 @@ namespace ICEngineElectricGenerator { iceGen.RatedPowerOutput = NumArray(1); if (NumArray(1) == 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), NumArray(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), NumArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -230,10 +230,11 @@ namespace ICEngineElectricGenerator { } else { Real64 xValue = iceGen.ExhaustTempCurve->value(state, 1.0); if (xValue < ReferenceTemp) { - ShowSevereError(state, format("GetICEngineGeneratorInput: {} output has very low value.", s_ipsc->cAlphaFieldNames(7))); - ShowContinueError(state, format("...curve generates [{:.3R} C] at PLR=1.0", xValue)); - ShowContinueError(state, - format("...this is less than the Reference Temperature [{:.2R} C] and may cause errors.", ReferenceTemp)); + ShowSevereError(state, + EnergyPlus::format("GetICEngineGeneratorInput: {} output has very low value.", s_ipsc->cAlphaFieldNames(7))); + ShowContinueError(state, EnergyPlus::format("...curve generates [{:.3R} C] at PLR=1.0", xValue)); + ShowContinueError( + state, EnergyPlus::format("...this is less than the Reference Temperature [{:.2R} C] and may cause errors.", ReferenceTemp)); } } @@ -257,8 +258,8 @@ namespace ICEngineElectricGenerator { NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (iceGen.HeatRecInletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(8), AlphArray(8))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(8), AlphArray(8))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } iceGen.HeatRecOutletNodeNum = @@ -272,8 +273,8 @@ namespace ICEngineElectricGenerator { NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (iceGen.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(9), AlphArray(9))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(9), AlphArray(9))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } BranchNodeConnections::TestCompSet( @@ -284,9 +285,10 @@ namespace ICEngineElectricGenerator { iceGen.HeatRecInletNodeNum = 0; iceGen.HeatRecOutletNodeNum = 0; if (!s_ipsc->lAlphaFieldBlanks(8) || !s_ipsc->lAlphaFieldBlanks(9)) { - ShowWarningError( - state, - format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowWarningError(state, + EnergyPlus::format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", + s_ipsc->cCurrentModuleObject, + AlphArray(1))); ShowContinueError(state, "However, Node names were specified for Heat Recovery inlet or outlet nodes"); } } @@ -294,8 +296,8 @@ namespace ICEngineElectricGenerator { // Validate fuel type input iceGen.FuelType = static_cast(getEnumValue(Constant::eFuelNamesUC, AlphArray(10))); if (iceGen.FuelType == Constant::eFuel::Invalid) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(10), AlphArray(10))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(10), AlphArray(10))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -303,7 +305,7 @@ namespace ICEngineElectricGenerator { } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); } } @@ -330,7 +332,7 @@ namespace ICEngineElectricGenerator { OutputProcessor::EndUseCat::Cogeneration); SetupOutputVariable(state, - format("Generator {} Rate", sFuelType), + EnergyPlus::format("Generator {} Rate", sFuelType), Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::TimeStepType::System, @@ -338,7 +340,7 @@ namespace ICEngineElectricGenerator { this->Name); SetupOutputVariable(state, - format("Generator {} Energy", sFuelType), + EnergyPlus::format("Generator {} Energy", sFuelType), Constant::Units::J, this->FuelEnergy, OutputProcessor::TimeStepType::System, @@ -366,7 +368,7 @@ namespace ICEngineElectricGenerator { this->Name); SetupOutputVariable(state, - format("Generator {} Mass Flow Rate", sFuelType), + EnergyPlus::format("Generator {} Mass Flow Rate", sFuelType), Constant::Units::kg_s, this->FuelMdot, OutputProcessor::TimeStepType::System, @@ -650,9 +652,11 @@ namespace ICEngineElectricGenerator { QExhaustRec = max(ExhaustGasFlow * ExhaustCP * (exhaustTemp - exhaustStackTemp), 0.0); } else { if (this->ErrExhaustTempIndex == 0) { - ShowWarningMessage( - state, format("CalcICEngineGeneratorModel: {}=\"{}\" low Exhaust Temperature from Curve Value", this->TypeOf, this->Name)); - ShowContinueError(state, format("...curve generated temperature=[{:.3R} C], PLR=[{:.3R}].", exhaustTemp, PLR)); + ShowWarningMessage(state, + EnergyPlus::format("CalcICEngineGeneratorModel: {}=\"{}\" low Exhaust Temperature from Curve Value", + this->TypeOf, + this->Name)); + ShowContinueError(state, EnergyPlus::format("...curve generated temperature=[{:.3R} C], PLR=[{:.3R}].", exhaustTemp, PLR)); ShowContinueError(state, "...simulation will continue with exhaust heat reclaim set to 0."); } ShowRecurringWarningErrorAtEnd(state, diff --git a/src/EnergyPlus/IceThermalStorage.cc b/src/EnergyPlus/IceThermalStorage.cc index 52ae8e73c73..81941577090 100644 --- a/src/EnergyPlus/IceThermalStorage.cc +++ b/src/EnergyPlus/IceThermalStorage.cc @@ -134,8 +134,9 @@ namespace IceThermalStorage { } } // If we didn't find it, fatal - ShowFatalError(state, - format("LocalSimpleIceStorageFactory: Error getting inputs for simple ice storage named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError( + state, + EnergyPlus::format("LocalSimpleIceStorageFactory: Error getting inputs for simple ice storage named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -155,8 +156,9 @@ namespace IceThermalStorage { } } // If we didn't find it, fatal - ShowFatalError( - state, format("LocalDetailedIceStorageFactory: Error getting inputs for detailed ice storage named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalDetailedIceStorageFactory: Error getting inputs for detailed ice storage named: {}", + objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -515,7 +517,7 @@ namespace IceThermalStorage { ++this->ChargeIterErrors; if (this->ChargeIterErrors <= 25) { ShowWarningError(state, "Detailed Ice Storage model exceeded its internal charging maximum iteration limit"); - ShowContinueError(state, format("Detailed Ice Storage System Name = {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Detailed Ice Storage System Name = {}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd(state, @@ -649,7 +651,7 @@ namespace IceThermalStorage { ++this->DischargeIterErrors; if (this->DischargeIterErrors <= 25) { ShowWarningError(state, "Detailed Ice Storage model exceeded its internal discharging maximum iteration limit"); - ShowContinueError(state, format("Detailed Ice Storage System Name = {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Detailed Ice Storage System Name = {}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd(state, @@ -745,14 +747,14 @@ namespace IceThermalStorage { if (state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).onPeakEnd <= state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).onPeakStart) { ShowSevereError(state, - format("{}{}=\"{}\"", - routineName, - state.dataIPShortCut->cCurrentModuleObject, - state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).name)); + EnergyPlus::format("{}{}=\"{}\"", + routineName, + state.dataIPShortCut->cCurrentModuleObject, + state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).name)); ShowContinueError(state, - format("Invalid start {} and end times {}. End time must be greater than start time.", - state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).onPeakStart, - state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).onPeakEnd)); + EnergyPlus::format("Invalid start {} and end times {}. End time must be greater than start time.", + state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).onPeakStart, + state.dataIceThermalStorage->ThermalStorageSizing(sizingNum).onPeakEnd)); } } @@ -792,8 +794,9 @@ namespace IceThermalStorage { } else if (Util::SameString(state.dataIceThermalStorage->SimpleIceStorage(iceNum).ITSType, "IceOnCoilExternal")) { state.dataIceThermalStorage->SimpleIceStorage(iceNum).ITSType_Num = ITSType::IceOnCoilExternal; } else { - ShowSevereError(state, format("{}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } @@ -802,9 +805,10 @@ namespace IceThermalStorage { if (state.dataIPShortCut->rNumericArgs(1) == DataSizing::AutoSize) { state.dataIceThermalStorage->SimpleIceStorage(iceNum).NomCapacityWasAutoSized = true; } else if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, format("{}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); ErrorsFound = true; } @@ -844,12 +848,14 @@ namespace IceThermalStorage { state.dataIPShortCut->cAlphaArgs(5), state.dataIceThermalStorage->ThermalStorageSizing, &ThermalStorageSizingData::name); if (state.dataIceThermalStorage->SimpleIceStorage(iceNum).TESSizingIndex == 0 && state.dataIceThermalStorage->SimpleIceStorage(iceNum).NomCapacityWasAutoSized) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError(state, - format("Input field {} must be entered when input field {} is autosized", - state.dataIPShortCut->cAlphaFieldNames(5), - state.dataIPShortCut->cNumericFieldNames(1))); + EnergyPlus::format("Input field {} must be entered when input field {} is autosized", + state.dataIPShortCut->cAlphaFieldNames(5), + state.dataIPShortCut->cNumericFieldNames(1))); ErrorsFound = true; } @@ -868,7 +874,7 @@ namespace IceThermalStorage { } // IceNum if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } ErrorsFound = false; // Always need to reset this since there are multiple types of ice storage systems @@ -923,9 +929,11 @@ namespace IceThermalStorage { if (state.dataIPShortCut->rNumericArgs(1) == DataSizing::AutoSize) { state.dataIceThermalStorage->DetailedIceStorage(iceNum).NomCapacityWasAutoSized = true; } else if (state.dataIPShortCut->rNumericArgs(1) <= 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -966,19 +974,23 @@ namespace IceThermalStorage { state.dataIceThermalStorage->DetailedIceStorage(iceNum).DischargeCurveNum = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(6)); if (state.dataIceThermalStorage->DetailedIceStorage(iceNum).DischargeCurveNum <= 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } int dischargeCurveDim = state.dataCurveManager->curves(state.dataIceThermalStorage->DetailedIceStorage(iceNum).DischargeCurveNum)->numDims; if (dischargeCurveDim != 2) { - ShowSevereError(state, format("{}: Discharge curve must have 2 independent variables", state.dataIPShortCut->cCurrentModuleObject)); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("{}: Discharge curve must have 2 independent variables", state.dataIPShortCut->cCurrentModuleObject)); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("{} does not have 2 independent variables and thus cannot be used for detailed ice storage", - state.dataIPShortCut->cAlphaArgs(6))); + EnergyPlus::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") { @@ -991,11 +1003,12 @@ namespace IceThermalStorage { state.dataIceThermalStorage->DetailedIceStorage(iceNum).DischargeCurveTypeNum = CurveVars::LMTDFracCharged; } else { ShowSevereError(state, - format("{}: Discharge curve independent variable options not valid, option={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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))); ShowContinueError(state, "The valid options are: FractionChargedLMTD, FractionDischargedLMTD, LMTDMassFlow or LMTDFractionCharged"); ErrorsFound = true; @@ -1013,18 +1026,22 @@ 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, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } int chargeCurveDim = state.dataCurveManager->curves(state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeCurveNum)->numDims; if (chargeCurveDim != 2) { - ShowSevereError(state, format("{}: Charge curve must have 2 independent variables", state.dataIPShortCut->cCurrentModuleObject)); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError(state, - format("{} does not have 2 independent variables and thus cannot be used for detailed ice storage", - state.dataIPShortCut->cAlphaArgs(8))); + EnergyPlus::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") { @@ -1037,11 +1054,12 @@ namespace IceThermalStorage { state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeCurveTypeNum = CurveVars::LMTDFracCharged; } else { ShowSevereError(state, - format("{}: Charge curve independent variable options not valid, option={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(7))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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))); ShowContinueError(state, "The valid options are: FractionChargedLMTD, FractionDischargedLMTD, LMTDMassFlow or LMTDFractionCharged"); ErrorsFound = true; @@ -1059,11 +1077,14 @@ namespace IceThermalStorage { state.dataIceThermalStorage->DetailedIceStorage(iceNum).CurveFitTimeStep = state.dataIPShortCut->rNumericArgs(2); if ((state.dataIceThermalStorage->DetailedIceStorage(iceNum).CurveFitTimeStep <= 0.0) || (state.dataIceThermalStorage->DetailedIceStorage(iceNum).CurveFitTimeStep > 1.0)) { - ShowSevereError(state, - format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( - state, format("Curve fit time step invalid, less than zero or greater than 1 for {}", state.dataIPShortCut->cAlphaArgs(1))); + state, + EnergyPlus::format("Curve fit time step invalid, less than zero or greater than 1 for {}", state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -1074,8 +1095,9 @@ namespace IceThermalStorage { (state.dataIceThermalStorage->DetailedIceStorage(iceNum).ThawProcessIndicator.empty())) { state.dataIceThermalStorage->DetailedIceStorage(iceNum).ThawProcessIndex = DetIce::OutsideMelt; } else { - ShowSevereError(state, format("Invalid thaw process indicator of {} was entered", state.dataIPShortCut->cAlphaArgs(9))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); 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... @@ -1085,12 +1107,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, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError(state, - format("Input field {} must be entered when input field {} is autosized", - state.dataIPShortCut->cAlphaFieldNames(10), - state.dataIPShortCut->cNumericFieldNames(1))); + EnergyPlus::format("Input field {} must be entered when input field {} is autosized", + state.dataIPShortCut->cAlphaFieldNames(10), + state.dataIPShortCut->cNumericFieldNames(1))); ErrorsFound = true; } @@ -1102,37 +1126,45 @@ namespace IceThermalStorage { if ((state.dataIceThermalStorage->DetailedIceStorage(iceNum).DischargeParaElecLoad < 0.0) || (state.dataIceThermalStorage->DetailedIceStorage(iceNum).DischargeParaElecLoad > 1.0)) { - ShowSevereError(state, - format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(3), state.dataIPShortCut->rNumericArgs(3))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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, "Value is either less than/equal to zero or greater than 1"); ErrorsFound = true; } if ((state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeParaElecLoad < 0.0) || (state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeParaElecLoad > 1.0)) { - ShowSevereError(state, - format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(4), state.dataIPShortCut->rNumericArgs(4))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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, "Value is either less than/equal to zero or greater than 1"); ErrorsFound = true; } if ((state.dataIceThermalStorage->DetailedIceStorage(iceNum).TankLossCoeff < 0.0) || (state.dataIceThermalStorage->DetailedIceStorage(iceNum).TankLossCoeff > 0.1)) { - ShowSevereError(state, - format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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, "Value is either less than/equal to zero or greater than 0.1 (10%)"); ErrorsFound = true; } if ((state.dataIceThermalStorage->DetailedIceStorage(iceNum).FreezingTemp < -10.0) || (state.dataIceThermalStorage->DetailedIceStorage(iceNum).FreezingTemp > 10.0)) { - ShowWarningError( - state, - format("Potentially invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(6), state.dataIPShortCut->rNumericArgs(6))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, + 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, "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"); } @@ -1163,7 +1195,7 @@ namespace IceThermalStorage { } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } diff --git a/src/EnergyPlus/IndoorGreen.cc b/src/EnergyPlus/IndoorGreen.cc index 808dba5bbb7..e929bbe14f6 100644 --- a/src/EnergyPlus/IndoorGreen.cc +++ b/src/EnergyPlus/IndoorGreen.cc @@ -91,7 +91,7 @@ namespace IndoorGreen { GetIndoorGreenInput(state, ErrorsFound); if (ErrorsFound) { const char *RoutineName("IndoorLivingWall: "); // include trailing blank space - ShowFatalError(state, format("{}Errors found in input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Program terminates.", RoutineName)); } SetIndoorGreenOutput(state); lw->getInputFlag = false; @@ -146,8 +146,9 @@ namespace IndoorGreen { ErrorsFound = true; } else { if (state.dataSurface->Surface(ig.SurfPtr).insideHeatSourceTermSched != nullptr) { - ShowSevereError(state, - format("The indoor green surface {} has an Inside Face Heat Source Term Schedule defined. This surface cannot " + ShowSevereError( + state, + EnergyPlus::format("The indoor green surface {} has an Inside Face Heat Source Term Schedule defined. This surface cannot " "also be used for indoor green.", s_ipsc->cAlphaArgs(2))); ErrorsFound = true; @@ -157,21 +158,21 @@ namespace IndoorGreen { if (ig.ZonePtr <= 0 || ig.SpacePtr <= 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {} entered={}, {} is not associated with a thermal zone or space", - RoutineName, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {} entered={}, {} is not associated with a thermal zone or space", + RoutineName, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else if (state.dataSurface->Surface(ig.SurfPtr).ExtBoundCond < 0 || state.dataSurface->Surface(ig.SurfPtr).HeatTransferAlgorithm != DataSurfaces::HeatTransferModel::CTF) { ShowSevereError(state, - format("{}=\"{}\", invalid {} entered={}, not a valid surface for indoor green module", - RoutineName, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {} entered={}, not a valid surface for indoor green module", + RoutineName, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } } @@ -241,41 +242,41 @@ namespace IndoorGreen { ig.LeafArea = s_ipsc->rNumericArgs(1); if (ig.LeafArea < 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {} entered={}", - RoutineName, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(1), - s_ipsc->rNumericArgs(1))); + EnergyPlus::format("{}=\"{}\", invalid {} entered={}", + RoutineName, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(1), + s_ipsc->rNumericArgs(1))); ErrorsFound = true; } ig.LEDNominalPPFD = s_ipsc->rNumericArgs(2); if (ig.LEDNominalPPFD < 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {} entered={}", - RoutineName, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(2), - s_ipsc->rNumericArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {} entered={}", + RoutineName, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(2), + s_ipsc->rNumericArgs(2))); ErrorsFound = true; } ig.LEDNominalEleP = s_ipsc->rNumericArgs(3); if (ig.LEDNominalEleP < 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {} entered={}", - RoutineName, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(3), - s_ipsc->rNumericArgs(3))); + EnergyPlus::format("{}=\"{}\", invalid {} entered={}", + RoutineName, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(3), + s_ipsc->rNumericArgs(3))); ErrorsFound = true; } ig.LEDRadFraction = s_ipsc->rNumericArgs(4); if (ig.LEDRadFraction < 0 || ig.LEDRadFraction > 1.0) { ShowSevereError(state, - format("{}=\"{}\", invalid {} entered={}", - RoutineName, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(4), - s_ipsc->rNumericArgs(4))); + EnergyPlus::format("{}=\"{}\", invalid {} entered={}", + RoutineName, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(4), + s_ipsc->rNumericArgs(4))); ErrorsFound = true; } if (state.dataGlobal->AnyEnergyManagementSystemInModel) { @@ -445,7 +446,8 @@ namespace IndoorGreen { LAI = LAI_Cal; if (LAI_Cal > 2.0) { LAI = 2.0; // maximum LAI=2.0 in the surface heat balance - ShowSevereError(state, format("Maximum indoor living wall leaf area index (LAI) =2.0 is used,calculated LAI is {}", LAI_Cal)); + ShowSevereError(state, + EnergyPlus::format("Maximum indoor living wall leaf area index (LAI) =2.0 is used,calculated LAI is {}", LAI_Cal)); } switch (ig.lightingMethod) { case LightingMethod::LED: { diff --git a/src/EnergyPlus/InputProcessing/InputProcessor.cc b/src/EnergyPlus/InputProcessing/InputProcessor.cc index 298cef64e21..0f251c8a018 100644 --- a/src/EnergyPlus/InputProcessing/InputProcessor.cc +++ b/src/EnergyPlus/InputProcessing/InputProcessor.cc @@ -918,7 +918,7 @@ const json &InputProcessor::getJSONObjectItem(EnergyPlusData &state, std::string auto tmp_umit = caseInsensitiveObjectMap.find(convertToUpper(objectInfo.objectType)); if (tmp_umit == caseInsensitiveObjectMap.end()) { // indicates object type not found, see function GeneralRoutines::ValidateComponent - ShowFatalError(state, format(R"(ObjectType of type "{}" requested was not found in input)", objectInfo.objectType)); + ShowFatalError(state, EnergyPlus::format(R"(ObjectType of type "{}" requested was not found in input)", objectInfo.objectType)); } objectInfo.objectType = tmp_umit->second; obj_iter = epJSON.find(objectInfo.objectType); @@ -938,7 +938,8 @@ const json &InputProcessor::getJSONObjectItem(EnergyPlusData &state, std::string } } - ShowFatalError(state, format(R"(Name "{}" requested was not found in input for ObjectType "{}")", objectInfo.objectType, objectInfo.objectName)); + ShowFatalError( + state, EnergyPlus::format(R"(Name "{}" requested was not found in input for ObjectType "{}")", objectInfo.objectType, objectInfo.objectName)); throw; } diff --git a/src/EnergyPlus/IntegratedHeatPump.cc b/src/EnergyPlus/IntegratedHeatPump.cc index a517edfb552..e8cbf31a4f8 100644 --- a/src/EnergyPlus/IntegratedHeatPump.cc +++ b/src/EnergyPlus/IntegratedHeatPump.cc @@ -113,24 +113,25 @@ void SimIHP(EnergyPlusData &state, if (CompIndex == 0) { DXCoilNum = Util::FindItemInList(CompName, state.dataIntegratedHP->IntegratedHeatPumps); if (DXCoilNum == 0) { - ShowFatalError(state, format("Integrated Heat Pump not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("Integrated Heat Pump not found={}", CompName)); } CompIndex = DXCoilNum; } else { DXCoilNum = CompIndex; if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("SimIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name={}", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size(), - CompName)); + EnergyPlus::format("SimIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name={}", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size(), + CompName)); } if (!CompName.empty() && CompName != state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum).Name) { - ShowFatalError(state, - format("SimIHP: Invalid CompIndex passed={}, Integrated HP name={}, stored Integrated HP Name for that index={}", - DXCoilNum, - CompName, - state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimIHP: Invalid CompIndex passed={}, Integrated HP name={}, stored Integrated HP Name for that index={}", + DXCoilNum, + CompName, + state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum).Name)); } }; @@ -486,13 +487,13 @@ void GetIHPInput(EnergyPlusData &state) ValidateComponent(state, ihp.SCCoilType, ihp.SCCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { errFlag = false; ihp.SCCoilIndex = GetCoilIndexVariableSpeed(state, ihp.SCCoilType, ihp.SCCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -503,13 +504,13 @@ void GetIHPInput(EnergyPlusData &state) ValidateComponent(state, ihp.SHCoilType, ihp.SHCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { errFlag = false; ihp.SHCoilIndex = GetCoilIndexVariableSpeed(state, ihp.SHCoilType, ihp.SHCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -520,13 +521,13 @@ void GetIHPInput(EnergyPlusData &state) ValidateComponent(state, ihp.DWHCoilType, ihp.DWHCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { errFlag = false; ihp.DWHCoilIndex = GetCoilIndexVariableSpeed(state, ihp.DWHCoilType, ihp.DWHCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -537,13 +538,13 @@ void GetIHPInput(EnergyPlusData &state) ValidateComponent(state, ihp.SCWHCoilType, ihp.SCWHCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { errFlag = false; ihp.SCWHCoilIndex = GetCoilIndexVariableSpeed(state, ihp.SCWHCoilType, ihp.SCWHCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -554,13 +555,13 @@ void GetIHPInput(EnergyPlusData &state) ValidateComponent(state, ihp.SCDWHCoolCoilType, ihp.SCDWHCoolCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { errFlag = false; ihp.SCDWHCoolCoilIndex = GetCoilIndexVariableSpeed(state, ihp.SCDWHCoolCoilType, ihp.SCDWHCoolCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -571,13 +572,13 @@ void GetIHPInput(EnergyPlusData &state) ValidateComponent(state, ihp.SCDWHWHCoilType, ihp.SCDWHWHCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { errFlag = false; ihp.SCDWHWHCoilIndex = GetCoilIndexVariableSpeed(state, ihp.SCDWHWHCoilType, ihp.SCDWHWHCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHWHCoilIndex).bIsDesuperheater = true; @@ -590,13 +591,13 @@ void GetIHPInput(EnergyPlusData &state) ValidateComponent(state, ihp.SHDWHHeatCoilType, ihp.SHDWHHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { errFlag = false; ihp.SHDWHHeatCoilIndex = GetCoilIndexVariableSpeed(state, ihp.SHDWHHeatCoilType, ihp.SHDWHHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -607,13 +608,13 @@ void GetIHPInput(EnergyPlusData &state) ValidateComponent(state, ihp.SHDWHWHCoilType, ihp.SHDWHWHCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { errFlag = false; ihp.SHDWHWHCoilIndex = GetCoilIndexVariableSpeed(state, ihp.SHDWHWHCoilType, ihp.SHDWHWHCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).bIsDesuperheater = true; @@ -695,7 +696,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCWHCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCWHCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError(state, format("Mistaken air node connection: {}{}-wrong coil node names.", CurrentModuleObject, ihp.SCWHCoilName)); + ShowContinueError(state, + EnergyPlus::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); @@ -720,7 +722,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHCoolCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHCoolCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError(state, format("Mistaken air node connection: {}{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHCoolCoilName)); + ShowContinueError( + state, EnergyPlus::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 +755,9 @@ void GetIHPInput(EnergyPlusData &state) InNodeName = state.dataLoopNodes->NodeID(InNode); OutNodeName = state.dataLoopNodes->NodeID(OutNode); if (state.dataVariableSpeedCoils->VarSpeedCoil(ChildCoilIndex).AirInletNodeNum != InNode) { - ShowContinueError(state, - format("Mistaken air node connection: {}- cooling coil outlet mismatches heating coil inlet.", CurrentModuleObject)); + ShowContinueError( + state, + EnergyPlus::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 +802,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHHeatCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHHeatCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError(state, - format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHHeatCoilName)); + ShowContinueError( + state, EnergyPlus::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,7 +837,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, format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHWHCoilName)); + ShowContinueError( + state, EnergyPlus::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHWHCoilName)); ErrorsFound = true; } @@ -899,7 +904,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).WaterInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).WaterOutletNodeNum != OutNode)) { - ShowContinueError(state, format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHWHCoilName)); + ShowContinueError( + state, EnergyPlus::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); @@ -924,7 +930,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.DWHCoilIndex).WaterInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.DWHCoilIndex).WaterOutletNodeNum != OutNode)) { - ShowContinueError(state, format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.DWHCoilName)); + ShowContinueError(state, + EnergyPlus::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); @@ -968,7 +975,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, format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHWHCoilName)); + ShowContinueError( + state, EnergyPlus::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHWHCoilName)); ErrorsFound = true; } @@ -1038,7 +1046,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError(state, format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHWHCoilName)); + ShowContinueError( + state, EnergyPlus::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); @@ -1072,8 +1081,9 @@ void GetIHPInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, - format("{} Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{} Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } for (int CoilCounter = 1; CoilCounter <= NumASIHPs; ++CoilCounter) { @@ -1207,9 +1217,9 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("SizeIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::format("SizeIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } if (state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum).IHPCoilsSized) { @@ -1222,14 +1232,15 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) bool errFlag = false; SetVarSpeedCoilData(state, ihp.SCCoilIndex, errFlag, _, ihp.SHCoilIndex); if (errFlag) { - ShowSevereError(state, format(R"(SizeIHP: Could not match cooling coil"{}" with heating coil="{}")", ihp.SCCoilName, ihp.SHCoilName)); + ShowSevereError(state, + EnergyPlus::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, format("SizeIHP: failed to size SC coil\"{}\"", ihp.SCCoilName)); + ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SC coil\"{}\"", ihp.SCCoilName)); ErrorsFound = true; } else { RatedCapacity = state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCCoilIndex).RatedCapCoolTotal; @@ -1238,7 +1249,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SHCoilIndex, errFlag); // size heating coil if (errFlag) { - ShowSevereError(state, format("SizeIHP: failed to size SH coil\"{}\"", ihp.SHCoilName)); + ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SH coil\"{}\"", ihp.SHCoilName)); ErrorsFound = true; }; @@ -1253,7 +1264,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) // size SCDWH air coil SizeVarSpeedCoil(state, ihp.SCDWHCoolCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, format("SizeIHP: failed to size SCDWH cooling coil\"{}\"", ihp.SCDWHCoolCoilName)); + ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SCDWH cooling coil\"{}\"", ihp.SCDWHCoolCoilName)); ErrorsFound = true; }; @@ -1261,7 +1272,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SHDWHHeatCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, format("SizeIHP: failed to size SHDWH heating coil\"{}\"", ihp.SHDWHHeatCoilName)); + ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SHDWH heating coil\"{}\"", ihp.SHDWHHeatCoilName)); ErrorsFound = true; }; @@ -1275,7 +1286,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SCWHCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, format("SizeIHP: failed to size SCWH coil\"{}\"", ihp.SCWHCoilName)); + ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SCWH coil\"{}\"", ihp.SCWHCoilName)); ErrorsFound = true; }; @@ -1287,7 +1298,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.DWHCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, format("SizeIHP: failed to size DWH coil\"{}\"", ihp.DWHCoilName)); + ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size DWH coil\"{}\"", ihp.DWHCoilName)); ErrorsFound = true; }; @@ -1299,7 +1310,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SCDWHWHCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, format("SizeIHP: failed to size SCDWH water heating coil\"{}\"", ihp.SCDWHWHCoilName)); + ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SCDWH water heating coil\"{}\"", ihp.SCDWHWHCoilName)); ErrorsFound = true; }; @@ -1311,7 +1322,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SHDWHWHCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, format("SizeIHP: failed to size SHDWH water heating coil\"{}\"", ihp.SHDWHWHCoilName)); + ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SHDWH water heating coil\"{}\"", ihp.SHDWHWHCoilName)); ErrorsFound = true; }; @@ -1332,9 +1343,9 @@ void InitializeIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("InitializeIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::format("InitializeIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -1368,9 +1379,9 @@ void UpdateIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("UpdateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::format("UpdateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -1480,9 +1491,9 @@ void DecideWorkMode(EnergyPlusData &state, if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("DecideWorkMode: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::format("DecideWorkMode: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -1621,9 +1632,9 @@ void ClearCoils(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("ClearCoils: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::format("ClearCoils: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -1649,9 +1660,9 @@ IHPOperationMode GetCurWorkMode(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("GetCurWorkMode: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::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) { @@ -1700,7 +1711,7 @@ int GetCoilIndexIHP(EnergyPlusData &state, IndexNum = Util::FindItemInList(CoilName, state.dataIntegratedHP->IntegratedHeatPumps); if (IndexNum == 0) { - ShowSevereError(state, format(R"(GetCoilIndexIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(GetCoilIndexIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; } @@ -1742,7 +1753,7 @@ int GetCoilInletNodeIHP(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -1785,7 +1796,7 @@ int GetDWHCoilInletNodeIHP(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -1828,7 +1839,7 @@ int GetDWHCoilOutletNodeIHP(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -1882,7 +1893,7 @@ int GetIHPDWHCoilPLFFPLR(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(GetIHPDWHCoilPLFFPLR: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(GetIHPDWHCoilPLFFPLR: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; PLRNumber = 0; } @@ -1940,7 +1951,8 @@ Real64 GetDWHCoilCapacityIHP(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(GetCoilCapacityVariableSpeed: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format(R"(GetCoilCapacityVariableSpeed: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; CoilCapacity = -1000.0; } @@ -1960,9 +1972,9 @@ int GetLowSpeedNumIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("GetLowSpeedNumIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::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); @@ -2003,9 +2015,9 @@ int GetMaxSpeedNumIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("GetMaxSpeedNumIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::format("GetMaxSpeedNumIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } int SpeedNum(0); @@ -2061,9 +2073,9 @@ Real64 GetAirVolFlowRateIHP(EnergyPlusData &state, if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("GetAirVolFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::format("GetAirVolFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -2170,9 +2182,9 @@ Real64 GetWaterVolFlowRateIHP(EnergyPlusData &state, int const DXCoilNum, int co if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("GetWaterVolFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::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); @@ -2253,9 +2265,9 @@ Real64 GetAirMassFlowRateIHP(EnergyPlusData &state, if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - format("GetAirMassFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + EnergyPlus::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 509f74a578b..cd3f7f27739 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -447,12 +447,12 @@ namespace InternalHeatGains { if (Item1 == 1) { if (thisPeople.FractionConvected < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} < 0.0, value ={:.2R}", - RoutineName, - peopleModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(4), - IHGNumbers(4))); + EnergyPlus::format("{}{}=\"{}\", {} < 0.0, value ={:.2R}", + RoutineName, + peopleModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(4), + IHGNumbers(4))); ErrorsFound = true; } } @@ -483,12 +483,12 @@ namespace InternalHeatGains { if (thisPeople.CO2RateFactor < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} < 0.0, value ={:.2R}", - RoutineName, - peopleModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(6), - IHGNumbers(6))); + EnergyPlus::format("{}{}=\"{}\", {} < 0.0, value ={:.2R}", + RoutineName, + peopleModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(6), + IHGNumbers(6))); ErrorsFound = true; } @@ -546,11 +546,12 @@ namespace InternalHeatGains { NoTCModelSelectedWithSchedules = CheckThermalComfortSchedules(IHGAlphaFieldBlanks(9), IHGAlphaFieldBlanks(12), IHGAlphaFieldBlanks(13)); if (NoTCModelSelectedWithSchedules) { - ShowWarningError(state, - format("{}{}=\"{}\" has comfort related schedules but no thermal comfort model selected.", - RoutineName, - peopleModuleObject, - IHGAlphas(1))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\" has comfort related schedules but no thermal comfort model selected.", + RoutineName, + peopleModuleObject, + IHGAlphas(1))); ShowContinueError(state, "If schedules are specified for air velocity, clothing insulation, and/or work efficiency but no " "thermal comfort"); @@ -634,13 +635,13 @@ namespace InternalHeatGains { if (thisPeople.SurfacePtr == 0 && ModelWithAdditionalInputs) { if (Item1 == 1) { ShowSevereError(state, - format("{}{}=\"{}\", {}={} invalid Surface Name={}", - RoutineName, - peopleModuleObject, - IHGAlphas(1), - IHGAlphaFieldNames(7), - IHGAlphas(7), - IHGAlphas(8))); + EnergyPlus::format("{}{}=\"{}\", {}={} invalid Surface Name={}", + RoutineName, + peopleModuleObject, + IHGAlphas(1), + IHGAlphaFieldNames(7), + IHGAlphas(7), + IHGAlphas(8))); ErrorsFound = true; } } else { @@ -648,17 +649,17 @@ namespace InternalHeatGains { int const thisPeopleRadEnclNum = state.dataHeatBal->space(thisPeople.spaceIndex).radiantEnclosureNum; if (surfRadEnclNum != thisPeopleRadEnclNum && ModelWithAdditionalInputs) { ShowSevereError(state, - format("{}{}=\"{}\", Surface referenced in {}={} in different enclosure.", - RoutineName, - peopleModuleObject, - IHGAlphas(1), - IHGAlphaFieldNames(7), - IHGAlphas(7))); + EnergyPlus::format("{}{}=\"{}\", Surface referenced in {}={} in different enclosure.", + RoutineName, + peopleModuleObject, + IHGAlphas(1), + IHGAlphaFieldNames(7), + IHGAlphas(7))); ShowContinueError(state, - format("Surface is in Enclosure={} and {} is in Enclosure={}", - state.dataViewFactor->EnclRadInfo(surfRadEnclNum).Name, - peopleModuleObject, - state.dataViewFactor->EnclRadInfo(thisPeopleRadEnclNum).Name)); + EnergyPlus::format("Surface is in Enclosure={} and {} is in Enclosure={}", + state.dataViewFactor->EnclRadInfo(surfRadEnclNum).Name, + peopleModuleObject, + state.dataViewFactor->EnclRadInfo(thisPeopleRadEnclNum).Name)); ErrorsFound = true; } } @@ -671,12 +672,12 @@ namespace InternalHeatGains { default: { // An invalid keyword was entered--warn but ignore if (Item1 == 1 && ModelWithAdditionalInputs) { ShowWarningError(state, - format("{}{}=\"{}\", invalid {}={}", - RoutineName, - peopleModuleObject, - IHGAlphas(1), - IHGAlphaFieldNames(7), - IHGAlphas(7))); + EnergyPlus::format("{}{}=\"{}\", invalid {}={}", + RoutineName, + peopleModuleObject, + IHGAlphas(1), + IHGAlphaFieldNames(7), + IHGAlphas(7))); ShowContinueError(state, "...Valid values are \"EnclosureAveraged\", \"SurfaceWeighted\", \"AngleFactor\"."); } } break; @@ -855,15 +856,17 @@ namespace InternalHeatGains { if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0 && state.dataHeatBal->Zone(Loop).FloorArea / state.dataHeatBal->Zone(Loop).TotOccupants < 0.1) { ShowWarningError( - state, format("{}Zone=\"{}\" occupant density is extremely high.", RoutineName, state.dataHeatBal->Zone(Loop).Name)); + state, + EnergyPlus::format("{}Zone=\"{}\" occupant density is extremely high.", RoutineName, state.dataHeatBal->Zone(Loop).Name)); if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0) { - ShowContinueError(state, - format("Occupant Density=[{:.0R}] person/m2.", - state.dataHeatBal->Zone(Loop).TotOccupants / state.dataHeatBal->Zone(Loop).FloorArea)); + ShowContinueError( + state, + EnergyPlus::format("Occupant Density=[{:.0R}] person/m2.", + state.dataHeatBal->Zone(Loop).TotOccupants / state.dataHeatBal->Zone(Loop).FloorArea)); } ShowContinueError(state, - format("Occupant Density=[{:.3R}] m2/person. Problems in Temperature Out of Bounds may result.", - state.dataHeatBal->Zone(Loop).FloorArea / state.dataHeatBal->Zone(Loop).TotOccupants)); + EnergyPlus::format("Occupant Density=[{:.3R}] m2/person. Problems in Temperature Out of Bounds may result.", + state.dataHeatBal->Zone(Loop).FloorArea / state.dataHeatBal->Zone(Loop).TotOccupants)); } Real64 maxOccupLoad = 0.0; int OptionNum = 0; @@ -880,20 +883,22 @@ namespace InternalHeatGains { if (maxOccupLoad > state.dataHeatBal->Zone(Loop).TotOccupants) { if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0 && state.dataHeatBal->Zone(Loop).FloorArea / maxOccupLoad < 0.1) { ShowWarningError(state, - format("{}Zone=\"{}\" occupant density at a maximum schedule value is extremely high.", - RoutineName, - state.dataHeatBal->Zone(Loop).Name)); + EnergyPlus::format("{}Zone=\"{}\" occupant density at a maximum schedule value is extremely high.", + RoutineName, + state.dataHeatBal->Zone(Loop).Name)); if (state.dataHeatBal->Zone(Loop).FloorArea > 0.0) { - ShowContinueError( - state, format("Occupant Density=[{:.0R}] person/m2.", maxOccupLoad / state.dataHeatBal->Zone(Loop).FloorArea)); + ShowContinueError(state, + EnergyPlus::format("Occupant Density=[{:.0R}] person/m2.", + maxOccupLoad / state.dataHeatBal->Zone(Loop).FloorArea)); } + ShowContinueError( + state, + EnergyPlus::format("Occupant Density=[{:.3R}] m2/person. Problems in Temperature Out of Bounds may result.", + state.dataHeatBal->Zone(Loop).FloorArea / maxOccupLoad)); ShowContinueError(state, - format("Occupant Density=[{:.3R}] m2/person. Problems in Temperature Out of Bounds may result.", - state.dataHeatBal->Zone(Loop).FloorArea / maxOccupLoad)); - ShowContinueError(state, - format("Check values in People={}, Number of People Schedule={}", - state.dataHeatBal->People(OptionNum).Name, - state.dataHeatBal->People(OptionNum).sched->getCurrentVal())); + EnergyPlus::format("Check values in People={}, Number of People Schedule={}", + state.dataHeatBal->People(OptionNum).Name, + state.dataHeatBal->People(OptionNum).sched->getCurrentVal())); } } } @@ -1010,7 +1015,8 @@ namespace InternalHeatGains { } if (thisLights.FractionConvected < 0.0) { if (Item1 == 1) { - ShowSevereError(state, format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, lightsModuleObject, thisLights.Name)); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, lightsModuleObject, thisLights.Name)); ErrorsFound = true; } } @@ -1036,12 +1042,12 @@ namespace InternalHeatGains { } else if (IHGAlphas(6) != "YES" && IHGAlphas(6) != "NO") { if (Item1 == 1) { ShowWarningError(state, - format("{}{}=\"{}\", invalid {}, value ={}", - RoutineName, - lightsModuleObject, - thisLightsInput.Name, - IHGAlphaFieldNames(6), - IHGAlphas(6))); + EnergyPlus::format("{}{}=\"{}\", invalid {}, value ={}", + RoutineName, + lightsModuleObject, + thisLightsInput.Name, + IHGAlphaFieldNames(6), + IHGAlphas(6))); ShowContinueError(state, ".. Return Air Fraction from Plenum will NOT be calculated."); } thisLights.FractionReturnAirIsCalculated = false; @@ -1055,11 +1061,11 @@ namespace InternalHeatGains { if (!IHGAlphaFieldBlanks(7)) { if (thisLightsInput.ZoneListActive) { ShowSevereError(state, - format("{}{}=\"{}\": {} must be blank when using a ZoneList.", - RoutineName, - lightsModuleObject, - thisLightsInput.Name, - IHGAlphaFieldNames(7))); + EnergyPlus::format("{}{}=\"{}\": {} must be blank when using a ZoneList.", + RoutineName, + lightsModuleObject, + thisLightsInput.Name, + IHGAlphaFieldNames(7))); ErrorsFound = true; } else { thisLights.RetNodeName = IHGAlphas(7); @@ -1072,7 +1078,7 @@ namespace InternalHeatGains { if ((thisLights.ZoneReturnNum == 0) && (thisLights.FractionReturnAir > 0.0) && (!IHGAlphaFieldBlanks(7))) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", invalid {} ={}", RoutineName, lightsModuleObject, IHGAlphas(1), IHGAlphaFieldNames(7), IHGAlphas(7))); ShowContinueError(state, "No matching Zone Return Air Node found."); ErrorsFound = true; @@ -1082,11 +1088,11 @@ namespace InternalHeatGains { if (!IHGAlphaFieldBlanks(8)) { if (thisLightsInput.ZoneListActive) { ShowSevereError(state, - format("{}{}=\"{}\": {} must be blank when using a ZoneList.", - RoutineName, - lightsModuleObject, - thisLightsInput.Name, - IHGAlphaFieldNames(8))); + EnergyPlus::format("{}{}=\"{}\": {} must be blank when using a ZoneList.", + RoutineName, + lightsModuleObject, + thisLightsInput.Name, + IHGAlphaFieldNames(8))); ErrorsFound = true; } else { bool exhaustNodeError = false; @@ -1105,12 +1111,12 @@ namespace InternalHeatGains { } if (exhaustNodeError) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} = {}", - RoutineName, - lightsModuleObject, - IHGAlphas(1), - IHGAlphaFieldNames(8), - IHGAlphas(8))); + EnergyPlus::format("{}{}=\"{}\", invalid {} = {}", + RoutineName, + lightsModuleObject, + IHGAlphas(1), + IHGAlphaFieldNames(8), + IHGAlphas(8))); ShowContinueError(state, "No matching Zone Exhaust Air Node found."); ErrorsFound = true; } else { @@ -1120,12 +1126,12 @@ namespace InternalHeatGains { CheckSharedExhaustFlag = true; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} ={} is not used", - RoutineName, - lightsModuleObject, - IHGAlphas(1), - IHGAlphaFieldNames(8), - IHGAlphas(8))); + EnergyPlus::format("{}{}=\"{}\", {} ={} is not used", + RoutineName, + lightsModuleObject, + IHGAlphas(1), + IHGAlphaFieldNames(8), + IHGAlphas(8))); ShowContinueError( state, "No matching Zone Return Air Node found. The Exhaust Node requires Return Node to work together"); ErrorsFound = true; @@ -1229,14 +1235,14 @@ namespace InternalHeatGains { if (ReturnNum == state.dataHeatBal->Lights(Loop1).ZoneReturnNum && ExhaustNodeNum != state.dataHeatBal->Lights(Loop1).ZoneExhaustNodeNum) { ShowSevereError(state, - format("{}{}: Duplicated Return Air Node = {} is found, ", - RoutineName, - lightsModuleObject, - state.dataHeatBal->Lights(Loop1).RetNodeName)); + EnergyPlus::format("{}{}: Duplicated Return Air Node = {} is found, ", + RoutineName, + lightsModuleObject, + state.dataHeatBal->Lights(Loop1).RetNodeName)); ShowContinueError(state, - format(" in both Lights objects = {} and {}.", - state.dataHeatBal->Lights(Loop).Name, - state.dataHeatBal->Lights(Loop1).Name)); + EnergyPlus::format(" in both Lights objects = {} and {}.", + state.dataHeatBal->Lights(Loop).Name, + state.dataHeatBal->Lights(Loop1).Name)); ErrorsFound = true; ReturnNodeShared(Loop1) = true; } @@ -1345,7 +1351,8 @@ namespace InternalHeatGains { thisZoneElectric.FractionConvected = 0.0; } if (thisZoneElectric.FractionConvected < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, elecEqModuleObject, thisElecEqInput.Name)); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, elecEqModuleObject, thisElecEqInput.Name)); ErrorsFound = true; } @@ -1466,22 +1473,22 @@ namespace InternalHeatGains { } if (thisZoneGas.CO2RateFactor < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} < 0.0, value ={:.2R}", - RoutineName, - gasEqModuleObject, - thisGasEqInput.Name, - IHGNumericFieldNames(7), - IHGNumbers(7))); + EnergyPlus::format("{}{}=\"{}\", {} < 0.0, value ={:.2R}", + RoutineName, + gasEqModuleObject, + thisGasEqInput.Name, + IHGNumericFieldNames(7), + IHGNumbers(7))); ErrorsFound = true; } if (thisZoneGas.CO2RateFactor > 4.0e-7) { ShowSevereError(state, - format("{}{}=\"{}\", {} > 4.0E-7, value ={:.2R}", - RoutineName, - gasEqModuleObject, - thisGasEqInput.Name, - IHGNumericFieldNames(7), - IHGNumbers(7))); + EnergyPlus::format("{}{}=\"{}\", {} > 4.0E-7, value ={:.2R}", + RoutineName, + gasEqModuleObject, + thisGasEqInput.Name, + IHGNumericFieldNames(7), + IHGNumbers(7))); ErrorsFound = true; } // FractionConvected is a calculated field @@ -1491,8 +1498,9 @@ namespace InternalHeatGains { } if (thisZoneGas.FractionConvected < 0.0) { if (Item1 == 1) { - ShowSevereError(state, - format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, gasEqModuleObject, thisGasEqInput.Name)); + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, gasEqModuleObject, thisGasEqInput.Name)); ErrorsFound = true; } } @@ -1618,7 +1626,8 @@ namespace InternalHeatGains { thisZoneHWEq.FractionConvected = 0.0; } if (thisZoneHWEq.FractionConvected < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, hwEqModuleObject, thisHWEqInput.Name)); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, hwEqModuleObject, thisHWEqInput.Name)); ErrorsFound = true; } @@ -1741,7 +1750,8 @@ namespace InternalHeatGains { thisZoneStmEq.FractionConvected = 0.0; } if (thisZoneStmEq.FractionConvected < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, stmEqModuleObject, IHGAlphas(1))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, stmEqModuleObject, IHGAlphas(1))); ErrorsFound = true; } @@ -1860,13 +1870,13 @@ namespace InternalHeatGains { if (thisZoneOthEq.OtherEquipFuelType == Constant::eFuel::Invalid || thisZoneOthEq.OtherEquipFuelType == Constant::eFuel::Water) { ShowSevereError(state, - format("{}{}: invalid {} entered={} for {}={}", - RoutineName, - othEqModuleObject, - IHGAlphaFieldNames(2), - IHGAlphas(2), - IHGAlphaFieldNames(1), - thisOthEqInput.Name)); + EnergyPlus::format("{}{}: invalid {} entered={} for {}={}", + RoutineName, + othEqModuleObject, + IHGAlphaFieldNames(2), + IHGAlphas(2), + IHGAlphaFieldNames(1), + thisOthEqInput.Name)); ErrorsFound = true; } @@ -1904,13 +1914,14 @@ namespace InternalHeatGains { if (thisZoneOthEq.DesignLevel < 0.0 && thisZoneOthEq.OtherEquipFuelType != Constant::eFuel::Invalid && thisZoneOthEq.OtherEquipFuelType != Constant::eFuel::None) { ShowSevereError(state, - format("{}{}=\"{}\", {} is not allowed to be negative", - RoutineName, - othEqModuleObject, - thisOthEqInput.Name, - IHGNumericFieldNames(levelFieldNum))); - ShowContinueError( - state, format("... when a fuel type of {} is specified.", Constant::eFuelNames[(int)thisZoneOthEq.OtherEquipFuelType])); + 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])); ErrorsFound = true; } @@ -1927,22 +1938,22 @@ namespace InternalHeatGains { } if (thisZoneOthEq.CO2RateFactor < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} < 0.0, value ={:.2R}", - RoutineName, - othEqModuleObject, - thisOthEqInput.Name, - IHGNumericFieldNames(7), - IHGNumbers(7))); + EnergyPlus::format("{}{}=\"{}\", {} < 0.0, value ={:.2R}", + RoutineName, + othEqModuleObject, + thisOthEqInput.Name, + IHGNumericFieldNames(7), + IHGNumbers(7))); ErrorsFound = true; } if (thisZoneOthEq.CO2RateFactor > 4.0e-7) { ShowSevereError(state, - format("{}{}=\"{}\", {} > 4.0E-7, value ={:.2R}", - RoutineName, - othEqModuleObject, - thisOthEqInput.Name, - IHGNumericFieldNames(7), - IHGNumbers(7))); + EnergyPlus::format("{}{}=\"{}\", {} > 4.0E-7, value ={:.2R}", + RoutineName, + othEqModuleObject, + thisOthEqInput.Name, + IHGNumericFieldNames(7), + IHGNumbers(7))); ErrorsFound = true; } @@ -1953,7 +1964,8 @@ namespace InternalHeatGains { thisZoneOthEq.FractionConvected = 0.0; } if (thisZoneOthEq.FractionConvected < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, othEqModuleObject, thisOthEqInput.Name)); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, othEqModuleObject, thisOthEqInput.Name)); ErrorsFound = true; } @@ -2064,7 +2076,8 @@ namespace InternalHeatGains { } else { ShowSevereError( state, - format("{}{}=\"{}\": invalid calculation method: {}", RoutineName, itEqModuleObject, IHGAlphas(1), IHGAlphas(3))); + EnergyPlus::format( + "{}{}=\"{}\": invalid calculation method: {}", RoutineName, itEqModuleObject, IHGAlphas(1), IHGAlphas(3))); ErrorsFound = true; } } @@ -2078,33 +2091,35 @@ namespace InternalHeatGains { if (zoneArea > 0.0) { spaceFrac = state.dataHeatBal->space(spaceNum).FloorArea / zoneArea; } else { - ShowSevereError( - state, - format("{}Zone floor area is zero when allocating ElectricEquipment:ITE:AirCooled loads to Spaces.", - RoutineName)); + ShowSevereError(state, + EnergyPlus::format( + "{}Zone floor area is zero when allocating ElectricEquipment:ITE:AirCooled loads to Spaces.", + RoutineName)); ShowContinueError(state, - format("Occurs for ElectricEquipment:ITE:AirCooled object ={} in Zone={}", - thisITEqInput.Name, - state.dataHeatBal->Zone(zoneNum).Name)); + EnergyPlus::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, - format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(1))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(1))); } if (IHGNumericFieldBlanks(2)) { - ShowWarningError(state, - format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(2))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(2))); } } else if (equipmentLevel == "WATTS/AREA") { @@ -2114,42 +2129,43 @@ 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, - format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 IT Equipment will result.", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(3))); + ShowWarningError(state, + EnergyPlus::format( + "{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 IT Equipment will result.", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(3))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(3), - IHGNumbers(3))); + EnergyPlus::format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(3), + IHGNumbers(3))); ErrorsFound = true; } } if (IHGNumericFieldBlanks(3)) { - ShowWarningError(state, - format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(3))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(3))); } } else { ShowSevereError(state, - format("{}{}=\"{}\", invalid {}, value ={}", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGAlphaFieldNames(4), - IHGAlphas(4))); + EnergyPlus::format("{}{}=\"{}\", invalid {}, value ={}", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGAlphaFieldNames(4), + IHGAlphas(4))); ShowContinueError(state, "...Valid values are \"Watts/Unit\" or \"Watts/Area\"."); ErrorsFound = true; } @@ -2176,22 +2192,22 @@ namespace InternalHeatGains { // Performance curves thisZoneITEq.CPUPowerFLTCurve = GetCurveIndex(state, IHGAlphas(7)); if (thisZoneITEq.CPUPowerFLTCurve == 0) { - ShowSevereError(state, format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, format("Invalid {}={}", IHGAlphaFieldNames(7), IHGAlphas(7))); + ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(7), IHGAlphas(7))); ErrorsFound = true; } thisZoneITEq.AirFlowFLTCurve = GetCurveIndex(state, IHGAlphas(8)); if (thisZoneITEq.AirFlowFLTCurve == 0) { - ShowSevereError(state, format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, format("Invalid {}={}", IHGAlphaFieldNames(8), IHGAlphas(8))); + ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(8), IHGAlphas(8))); ErrorsFound = true; } thisZoneITEq.FanPowerFFCurve = GetCurveIndex(state, IHGAlphas(9)); if (thisZoneITEq.FanPowerFFCurve == 0) { - ShowSevereError(state, format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, format("Invalid {}={}", IHGAlphaFieldNames(9), IHGAlphas(9))); + ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(9), IHGAlphas(9))); ErrorsFound = true; } @@ -2199,8 +2215,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, format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, format("Invalid {}={}", IHGAlphaFieldNames(15), IHGAlphas(15))); + ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(15), IHGAlphas(15))); ErrorsFound = true; } } else { @@ -2212,8 +2228,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, format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, format("Invalid {}={}", IHGAlphaFieldNames(16), IHGAlphas(16))); + ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(16), IHGAlphas(16))); ErrorsFound = true; } } else { @@ -2230,29 +2246,31 @@ namespace InternalHeatGains { static_cast(getEnumValue(ITEInletConnectionNamesUC, Util::makeUPPER(IHGAlphas(11)))); if (thisZoneITEq.AirConnectionType == ITEInletConnection::RoomAirModel) { // ZoneITEq(Loop).AirConnectionType = ITEInletConnection::RoomAirModel; - ShowWarningError(state, - format("{}{}=\"{}Air Inlet Connection Type = RoomAirModel is not implemented yet, using ZoneAirNode", - RoutineName, - itEqModuleObject, - IHGAlphas(1))); + ShowWarningError( + state, + EnergyPlus::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, format("{}{}: {}", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}: {}", RoutineName, itEqModuleObject, IHGAlphas(1))); ShowContinueError(state, - format("For {}= AdjustedSupply, {} is required, but this field is blank.", - IHGAlphaFieldNames(11), - IHGAlphaFieldNames(14))); + EnergyPlus::format("For {}= AdjustedSupply, {} is required, but this field is blank.", + IHGAlphaFieldNames(11), + IHGAlphaFieldNames(14))); ErrorsFound = true; } else if (thisZoneITEq.FlowControlWithApproachTemps) { - ShowSevereError(state, format("{}{}: {}", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, - format("For {}= FlowControlWithApproachTemperatures, {} is required, but this field is blank.", - IHGAlphaFieldNames(3), - IHGAlphaFieldNames(14))); + 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))); ErrorsFound = true; } } else { @@ -2281,22 +2299,23 @@ namespace InternalHeatGains { if (thisZoneITEq.AirConnectionType == ITEInletConnection::AdjustedSupply && !supplyNodeFound) { // supply air node must match zone equipment supply air node for these conditions - ShowSevereError(state, format("{}: ElectricEquipment:ITE:AirCooled {}", RoutineName, thisZoneITEq.Name)); + ShowSevereError(state, EnergyPlus::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, format("{}: ElectricEquipment:ITE:AirCooled {}", RoutineName, thisZoneITEq.Name)); + ShowSevereError(state, EnergyPlus::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, - format("{}name: '{}. Supply Air Node Name '{}' does not match any ZoneHVAC:EquipmentConnections objects.", - itEqModuleObject, - IHGAlphas(1), - IHGAlphas(14))); + EnergyPlus::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 @@ -2327,10 +2346,11 @@ namespace InternalHeatGains { ShowSevereCustom( state, eoh, - format("For {}= FlowControlWithApproachTemperatures, either {} or {} is required, but both are left blank.", - IHGAlphaFieldNames(3), - IHGNumericFieldNames(10), - IHGAlphaFieldNames(20))); + EnergyPlus::format( + "For {}= FlowControlWithApproachTemperatures, either {} or {} is required, but both are left blank.", + IHGAlphaFieldNames(3), + IHGNumericFieldNames(10), + IHGAlphaFieldNames(20))); ErrorsFound = true; } } else if ((thisZoneITEq.supplyApproachTempSched = Sched::GetSchedule(state, IHGAlphas(20))) == nullptr) { @@ -2343,10 +2363,11 @@ namespace InternalHeatGains { ShowSevereCustom( state, eoh, - format("For {}= FlowControlWithApproachTemperatures, either {} or {} is required, but both are left blank.", - IHGAlphaFieldNames(3), - IHGNumericFieldNames(11), - IHGAlphaFieldNames(21))); + EnergyPlus::format( + "For {}= FlowControlWithApproachTemperatures, either {} or {} is required, but both are left blank.", + IHGAlphaFieldNames(3), + IHGNumericFieldNames(11), + IHGAlphaFieldNames(21))); ErrorsFound = true; } } else if ((thisZoneITEq.returnApproachTempSched = Sched::GetSchedule(state, IHGAlphas(21))) == nullptr) { @@ -2395,12 +2416,12 @@ namespace InternalHeatGains { if (state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(Loop).ZonePtr).HasAdjustedReturnTempByITE && (!state.dataHeatBal->ZoneITEq(Loop).FlowControlWithApproachTemps)) { ShowSevereError(state, - format("{}{}=\"{}\": invalid calculation method {} for Zone: {}", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGAlphas(3), - IHGAlphas(2))); + EnergyPlus::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; } @@ -2466,12 +2487,13 @@ namespace InternalHeatGains { } else { ShowSevereError( state, - format("{}Zone floor area is zero when allocating ZoneBaseboard:OutdoorTemperatureControlled loads to Spaces.", - RoutineName)); + EnergyPlus::format( + "{}Zone floor area is zero when allocating ZoneBaseboard:OutdoorTemperatureControlled loads to Spaces.", + RoutineName)); ShowContinueError(state, - format("Occurs for ZoneBaseboard:OutdoorTemperatureControlled object ={} in Zone={}", - thisBBHeatInput.Name, - state.dataHeatBal->Zone(zoneNum).Name)); + EnergyPlus::format("Occurs for ZoneBaseboard:OutdoorTemperatureControlled object ={} in Zone={}", + thisBBHeatInput.Name, + state.dataHeatBal->Zone(zoneNum).Name)); ErrorsFound = true; } } @@ -2482,7 +2504,8 @@ namespace InternalHeatGains { thisZoneBBHeat.FractionRadiant = IHGNumbers(5); thisZoneBBHeat.FractionConvected = 1.0 - thisZoneBBHeat.FractionRadiant; if (thisZoneBBHeat.FractionConvected < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, bbModuleObject, thisBBHeatInput.Name)); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, bbModuleObject, thisBBHeatInput.Name)); ErrorsFound = true; } @@ -2550,7 +2573,7 @@ namespace InternalHeatGains { if (state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr == 0) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", invalid {} entered={}", RoutineName, contamSSModuleObject, IHGAlphas(1), IHGAlphaFieldNames(2), IHGAlphas(2))); ErrorsFound = true; } @@ -2609,7 +2632,7 @@ namespace InternalHeatGains { RepVarSet.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in Getting Internal Gains Input, Program Stopped", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in Getting Internal Gains Input, Program Stopped", RoutineName)); } setupIHGOutputs(state); @@ -3350,8 +3373,9 @@ namespace InternalHeatGains { int zoneListNum = Util::FindItemInList(areaName, state.dataHeatBal->ZoneList); if (zoneListNum > 0) { if (zoneListNotAllowed) { - ShowSevereError( - state, format("{}=\"{}\" ZoneList Name=\"{}\" not allowed for {}.", objectType, thisObjectName, areaName, objectType)); + ShowSevereError(state, + EnergyPlus::format( + "{}=\"{}\" ZoneList Name=\"{}\" not allowed for {}.", objectType, thisObjectName, areaName, objectType)); errors = true; localErrFlag = true; } else { @@ -3374,8 +3398,9 @@ namespace InternalHeatGains { int spaceListNum = Util::FindItemInList(areaName, state.dataHeatBal->spaceList); if (spaceListNum > 0) { if (zoneListNotAllowed) { - ShowSevereError( - state, format("{}=\"{}\" SpaceList Name=\"{}\" not allowed for {}.", objectType, thisObjectName, areaName, objectType)); + ShowSevereError(state, + EnergyPlus::format( + "{}=\"{}\" SpaceList Name=\"{}\" not allowed for {}.", objectType, thisObjectName, areaName, objectType)); errors = true; localErrFlag = true; } else { @@ -3392,12 +3417,13 @@ namespace InternalHeatGains { } continue; } - ShowSevereError(state, format("{}=\"{}\" invalid {}=\"{}\" not found.", objectType, thisObjectName, areaFieldName, areaName)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", objectType, thisObjectName, areaFieldName, areaName)); errors = true; localErrFlag = true; } if (localErrFlag) { - ShowSevereError(state, format("{}Errors with invalid names in {} objects.", routineName, objectType)); + ShowSevereError(state, EnergyPlus::format("{}Errors with invalid names in {} objects.", routineName, objectType)); ShowContinueError(state, "...These will not be read in. Other errors may occur."); numGainInstances = 0; } @@ -3422,12 +3448,12 @@ namespace InternalHeatGains { // Check input value if (inputBlank) { ShowWarningError(state, - format("{}{}=\"{}\", specifies {}, but that field is blank. 0 {} will result.", - RoutineName, - objectType, - inputObject.Name, - fieldName, - objectType)); + EnergyPlus::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 {} will result.", + RoutineName, + objectType, + inputObject.Name, + fieldName, + objectType)); return designLevel; } @@ -3442,7 +3468,9 @@ namespace InternalHeatGains { case DesignLevelMethod::PowerPerArea: { if (inputValue < 0.0) { ShowSevereError( - state, format("{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}", RoutineName, objectType, inputObject.Name, fieldName, inputValue)); + state, + EnergyPlus::format( + "{}{}=\"{}\", invalid {}, value [<0.0]={:.3R}", RoutineName, objectType, inputObject.Name, fieldName, inputValue)); ErrorsFound = true; } } break; @@ -3452,7 +3480,8 @@ namespace InternalHeatGains { if (inputValue <= 0.0) { ShowSevereError( state, - format("{}{}=\"{}\", invalid {}, value [<=0.0]={:.3R}", RoutineName, objectType, inputObject.Name, fieldName, inputValue)); + EnergyPlus::format( + "{}{}=\"{}\", invalid {}, value [<=0.0]={:.3R}", RoutineName, objectType, inputObject.Name, fieldName, inputValue)); ErrorsFound = true; } } break; @@ -3480,8 +3509,9 @@ namespace InternalHeatGains { if (zone.FloorArea > 0.0) { spaceFrac = state.dataHeatBal->space(spaceNum).FloorArea / zone.FloorArea; } else { - ShowSevereError(state, format("{}Zone floor area is zero when allocating {} loads to Spaces.", RoutineName, objectType)); - ShowContinueError(state, format("Occurs for {} object ={} in Zone={}", objectType, inputObject.Name, zone.Name)); + 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)); ErrorsFound = true; } } @@ -3496,12 +3526,12 @@ namespace InternalHeatGains { designLevel = inputValue * space.FloorArea; if ((space.FloorArea <= 0.0) && !space.isRemainderSpace) { ShowWarningError(state, - format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 {} will result.", - RoutineName, - objectType, - inputObject.Name, - fieldName, - objectType)); + EnergyPlus::format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 {} will result.", + RoutineName, + objectType, + inputObject.Name, + fieldName, + objectType)); } } } break; @@ -3511,12 +3541,12 @@ namespace InternalHeatGains { designLevel = space.FloorArea / inputValue; if ((space.FloorArea <= 0.0) && !space.isRemainderSpace) { ShowWarningError(state, - format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 {} will result.", - RoutineName, - objectType, - inputObject.Name, - fieldName, - objectType)); + EnergyPlus::format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 {} will result.", + RoutineName, + objectType, + inputObject.Name, + fieldName, + objectType)); } } } break; @@ -3527,12 +3557,12 @@ namespace InternalHeatGains { designLevel = inputValue * space.TotOccupants; if (space.TotOccupants <= 0.0) { ShowWarningError(state, - format("{}{}=\"{}\", specifies {}, but Total Occupants = 0. 0 {} will result.", - RoutineName, - objectType, - inputObject.Name, - fieldName, - objectType)); + EnergyPlus::format("{}{}=\"{}\", specifies {}, but Total Occupants = 0. 0 {} will result.", + RoutineName, + objectType, + inputObject.Name, + fieldName, + objectType)); } } } break; @@ -5406,14 +5436,14 @@ namespace InternalHeatGains { addSpaceOutputs(zoneOtherEq.spaceIndex) = true; if (zoneOtherEq.OtherEquipFuelType != Constant::eFuel::Invalid && zoneOtherEq.OtherEquipFuelType != Constant::eFuel::None) { SetupOutputVariable(state, - format("Other Equipment {} Rate", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), + EnergyPlus::format("Other Equipment {} Rate", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), Constant::Units::W, zoneOtherEq.Power, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, zoneOtherEq.Name); SetupOutputVariable(state, - format("Other Equipment {} Energy", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), + EnergyPlus::format("Other Equipment {} Energy", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), Constant::Units::J, zoneOtherEq.Consumption, OutputProcessor::TimeStepType::Zone, @@ -5513,14 +5543,14 @@ namespace InternalHeatGains { std::string_view fuelName = Constant::eFuelNames[(int)state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNums[i]]; SetupOutputVariable(state, - format("Zone Other Equipment {} Rate", fuelName), + EnergyPlus::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, - format("Zone Other Equipment {} Energy", fuelName), + EnergyPlus::format("Zone Other Equipment {} Energy", fuelName), Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).OtherConsump[(int)fuelType], OutputProcessor::TimeStepType::Zone, @@ -5613,14 +5643,14 @@ namespace InternalHeatGains { } SetupOutputVariable(state, - format("Space Other Equipment {} Rate", Constant::eFuelNames[(int)fuelType]), + EnergyPlus::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, - format("Space Other Equipment {} Energy", Constant::eFuelNames[(int)fuelType]), + EnergyPlus::format("Space Other Equipment {} Energy", Constant::eFuelNames[(int)fuelType]), Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).OtherConsump[(int)fuelType], OutputProcessor::TimeStepType::Zone, @@ -8013,23 +8043,25 @@ 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, - format("..Lights=\"{}\", Fraction Replaceable will be reset to 1.0 to allow dimming controls", - state.dataHeatBal->Lights(Loop).Name)); - ShowContinueError(state, format("..in Zone={}", state.dataHeatBal->Zone(WhichZone).Name)); + 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)); state.dataHeatBal->Lights(Loop).FractionReplaceable = 1.0; } } if (state.dataDayltg->ZoneDaylight(WhichZone).totRefPts > 0) { if (LightsRepMax == 0.0) { - ShowWarningError(state, - format("CheckLightsReplaceable: Zone \"{}\" has Daylighting:Controls.", state.dataHeatBal->Zone(WhichZone).Name)); + ShowWarningError( + state, + EnergyPlus::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, - format("CheckLightsReplaceable: Zone \"{}\" has Daylighting:Controls.", state.dataHeatBal->Zone(WhichZone).Name)); + ShowWarningError( + state, + EnergyPlus::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 41e6c7dbccd..7f509f30bd3 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.cc +++ b/src/EnergyPlus/LowTempRadiantSystem.cc @@ -208,7 +208,7 @@ namespace LowTempRadiantSystem { if (CompIndex == 0) { RadSysNum = Util::FindItemInList(CompName, state.dataLowTempRadSys->RadSysTypes); if (RadSysNum == 0) { - ShowFatalError(state, format("SimLowTempRadiantSystem: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimLowTempRadiantSystem: Unit not found={}", CompName)); } CompIndex = RadSysNum; systemType = state.dataLowTempRadSys->RadSysTypes(RadSysNum).systemType; @@ -230,18 +230,19 @@ namespace LowTempRadiantSystem { systemType = state.dataLowTempRadSys->RadSysTypes(RadSysNum).systemType; if (RadSysNum > state.dataLowTempRadSys->TotalNumOfRadSystems || RadSysNum < 1) { ShowFatalError(state, - format("SimLowTempRadiantSystem: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - RadSysNum, - state.dataLowTempRadSys->TotalNumOfRadSystems, - CompName)); + EnergyPlus::format("SimLowTempRadiantSystem: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + RadSysNum, + state.dataLowTempRadSys->TotalNumOfRadSystems, + CompName)); } if (state.dataLowTempRadSys->CheckEquipName(RadSysNum)) { if (CompName != state.dataLowTempRadSys->RadSysTypes(RadSysNum).Name) { - ShowFatalError(state, - format("SimLowTempRadiantSystem: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - RadSysNum, - CompName, - state.dataLowTempRadSys->RadSysTypes(RadSysNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimLowTempRadiantSystem: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + RadSysNum, + CompName, + state.dataLowTempRadSys->RadSysTypes(RadSysNum).Name)); } state.dataLowTempRadSys->CheckEquipName(RadSysNum) = false; } @@ -263,7 +264,7 @@ namespace LowTempRadiantSystem { } else if (systemType == SystemType::Electric) { baseSystem = &state.dataLowTempRadSys->ElecRadSys(state.dataLowTempRadSys->RadSysTypes(RadSysNum).CompIndex); } else { - ShowFatalError(state, format("SimLowTempRadiantSystem: Illegal system type for system {}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimLowTempRadiantSystem: Illegal system type for system {}", CompName)); } if ((systemType == SystemType::Hydronic) || (systemType == SystemType::ConstantFlow) || (systemType == SystemType::Electric)) { @@ -504,20 +505,22 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(4)) { thisRadSysDesign.DesignScaledHeatingCapacity = Numbers(4); if (thisRadSysDesign.DesignScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(4), Numbers(4))); + 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))); ErrorsFound = true; } else if (thisRadSysDesign.DesignScaledHeatingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(4))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(4))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(4))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.Name)); + ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); + ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(4))); ErrorsFound = true; } } else if (Util::SameString(thisRadSysDesign.DesignHeatingCapMethodInput, "FractionOfAutosizedHeatingCapacity")) { @@ -525,19 +528,19 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(5)) { thisRadSysDesign.DesignScaledHeatingCapacity = Numbers(5); if (thisRadSysDesign.DesignScaledHeatingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(5), Numbers(5))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(5), Numbers(5))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(5))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); + ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(5))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); ErrorsFound = true; } @@ -558,20 +561,23 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(7)) { thisRadSysDesign.DesignScaledCoolingCapacity = Numbers(7); if (thisRadSysDesign.DesignScaledCoolingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(7), thisRadSysDesign.DesignScaledCoolingCapacity)); + 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)); ErrorsFound = true; } else if (thisRadSysDesign.DesignScaledCoolingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(7))); + 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))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(7))); + 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))); ErrorsFound = true; } } else if (Util::SameString(thisRadSysDesign.DesignCoolingCapMethodInput, "FractionOfAutosizedCoolingCapacity")) { @@ -579,19 +585,19 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(8)) { thisRadSysDesign.DesignScaledCoolingCapacity = Numbers(8); if (thisRadSysDesign.DesignScaledCoolingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(8), Numbers(8))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(8), Numbers(8))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(8))); + 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))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); ErrorsFound = true; } @@ -680,8 +686,8 @@ namespace LowTempRadiantSystem { thisRadSys.ZoneName = Alphas(4); thisRadSys.ZonePtr = Util::FindItemInList(Alphas(4), Zone); if (thisRadSys.ZonePtr == 0) { - ShowSevereError(state, format("{}Invalid {} = {}", RoutineName, cAlphaFields(3), Alphas(4))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(3), Alphas(4))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -716,13 +722,14 @@ namespace LowTempRadiantSystem { thisRadSys.NumCircuits(1) = 0.0; // Error checking for single surfaces if (thisRadSys.SurfacePtr(1) == 0) { - ShowSevereError(state, format("{}Invalid {} = {}", RoutineName, cAlphaFields(5), Alphas(5))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else if (state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(thisRadSys.SurfacePtr(1))) { - ShowSevereError(state, format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, - format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } if (thisRadSys.SurfacePtr(1) != 0) { @@ -742,15 +749,15 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(2)) { thisRadSys.ScaledHeatingCapacity = Numbers(2); if (thisRadSys.ScaledHeatingCapacity < 0.0 && thisRadSys.ScaledHeatingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSys.Name)); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); ErrorsFound = true; } } else { if ((!lAlphaBlanks(6)) || (!lAlphaBlanks(7))) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); ShowContinueError(state, "Input for Heating Design Capacity Method = HeatingDesignCapacity"); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(2))); + ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(2))); ErrorsFound = true; } } @@ -792,7 +799,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, format("Occurs in {} (heating input) = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} (heating input) = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -802,15 +809,15 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(4)) { thisRadSys.ScaledCoolingCapacity = Numbers(4); if (thisRadSys.ScaledCoolingCapacity < 0.0 && thisRadSys.ScaledCoolingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSys.Name)); - ShowContinueError(state, format("Illegal {} = {:.7T}", cNumericFields(4), Numbers(4))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(4), Numbers(4))); ErrorsFound = true; } } else { if ((!lAlphaBlanks(8)) || (!lAlphaBlanks(9))) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisRadSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); ShowContinueError(state, "Input for Cooling Design Capacity Method = CoolingDesignCapacity"); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(4))); + ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(4))); ErrorsFound = true; } } @@ -866,7 +873,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, format("Occurs in {} (cooling input) ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} (cooling input) ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -998,8 +1005,8 @@ namespace LowTempRadiantSystem { thisCFloSys.ZoneName = Alphas(4); thisCFloSys.ZonePtr = Util::FindItemInList(Alphas(4), Zone); if (thisCFloSys.ZonePtr == 0) { - ShowSevereError(state, format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1037,13 +1044,14 @@ namespace LowTempRadiantSystem { thisCFloSys.NumCircuits(1) = 0.0; // Error checking for single surfaces if (thisCFloSys.SurfacePtr(1) == 0) { - ShowSevereError(state, format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else if (state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(thisCFloSys.SurfacePtr(1))) { - ShowSevereError(state, format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, - format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } if (thisCFloSys.SurfacePtr(1) != 0) { @@ -1225,8 +1233,8 @@ namespace LowTempRadiantSystem { thisElecSys.ZoneName = Alphas(3); thisElecSys.ZonePtr = Util::FindItemInList(Alphas(3), Zone); if (thisElecSys.ZonePtr == 0) { - ShowSevereError(state, format("{}Invalid {} = {}", RoutineName, cAlphaFields(3), Alphas(3))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(3), Alphas(3))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1255,13 +1263,14 @@ namespace LowTempRadiantSystem { thisElecSys.SurfaceFrac(1) = 1.0; // Error checking for single surfaces if (thisElecSys.SurfacePtr(1) == 0) { - ShowSevereError(state, format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else if (state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(thisElecSys.SurfacePtr(1))) { - ShowSevereError(state, format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, - format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(4), Alphas(4))); + ShowSevereError(state, EnergyPlus::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))); ErrorsFound = true; } if (thisElecSys.SurfacePtr(1) != 0) { @@ -1280,16 +1289,17 @@ namespace LowTempRadiantSystem { thisElecSys.ScaledHeatingCapacity = Numbers(iHeatDesignCapacityNumericNum); thisElecSys.MaxElecPower = thisElecSys.ScaledHeatingCapacity; if (thisElecSys.ScaledHeatingCapacity < 0.0 && thisElecSys.ScaledHeatingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iHeatDesignCapacityNumericNum), Numbers(iHeatDesignCapacityNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iHeatDesignCapacityNumericNum), + Numbers(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatDesignCapacityNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "CapacityPerFloorArea")) { @@ -1298,23 +1308,24 @@ namespace LowTempRadiantSystem { thisElecSys.ScaledHeatingCapacity = Numbers(iHeatCapacityPerFloorAreaNumericNum); thisElecSys.MaxElecPower = thisElecSys.ScaledHeatingCapacity; if (thisElecSys.ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iHeatCapacityPerFloorAreaNumericNum), - Numbers(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iHeatCapacityPerFloorAreaNumericNum), + Numbers(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (thisElecSys.ScaledHeatingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "FractionOfAutosizedHeatingCapacity")) { @@ -1323,22 +1334,23 @@ namespace LowTempRadiantSystem { thisElecSys.ScaledHeatingCapacity = Numbers(iHeatFracOfAutosizedCapacityNumericNum); thisElecSys.MaxElecPower = thisElecSys.ScaledHeatingCapacity; if (thisElecSys.ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iHeatFracOfAutosizedCapacityNumericNum), - Numbers(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iHeatFracOfAutosizedCapacityNumericNum), + Numbers(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatFracOfAutosizedCapacityNumericNum))); + 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))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); ErrorsFound = true; } @@ -1383,8 +1395,9 @@ namespace LowTempRadiantSystem { continue; } if (AssignedAsRadiantSurface(CheckSurfNum)) { - ShowSevereError( - state, format("Surface {} is referenced by more than one radiant system--this is not allowed", Surface(CheckSurfNum).Name)); + ShowSevereError(state, + EnergyPlus::format("Surface {} is referenced by more than one radiant system--this is not allowed", + Surface(CheckSurfNum).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(CheckSurfNum) = true; @@ -1393,8 +1406,8 @@ namespace LowTempRadiantSystem { if ((Surface(CheckSurfNum).ExtBoundCond > 0) && (Surface(CheckSurfNum).ExtBoundCond != CheckSurfNum)) { if (AssignedAsRadiantSurface(Surface(CheckSurfNum).ExtBoundCond)) { ShowSevereError(state, - format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", - Surface(Surface(CheckSurfNum).ExtBoundCond).Name)); + EnergyPlus::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", + Surface(Surface(CheckSurfNum).ExtBoundCond).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(Surface(CheckSurfNum).ExtBoundCond) = true; @@ -1410,8 +1423,9 @@ namespace LowTempRadiantSystem { continue; } if (AssignedAsRadiantSurface(CheckSurfNum)) { - ShowSevereError( - state, format("Surface {} is referenced by more than one radiant system--this is not allowed", Surface(CheckSurfNum).Name)); + ShowSevereError(state, + EnergyPlus::format("Surface {} is referenced by more than one radiant system--this is not allowed", + Surface(CheckSurfNum).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(CheckSurfNum) = true; @@ -1420,8 +1434,8 @@ namespace LowTempRadiantSystem { if ((Surface(CheckSurfNum).ExtBoundCond > 0) && (Surface(CheckSurfNum).ExtBoundCond != CheckSurfNum)) { if (AssignedAsRadiantSurface(Surface(CheckSurfNum).ExtBoundCond)) { ShowSevereError(state, - format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", - Surface(Surface(CheckSurfNum).ExtBoundCond).Name)); + EnergyPlus::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", + Surface(Surface(CheckSurfNum).ExtBoundCond).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(Surface(CheckSurfNum).ExtBoundCond) = true; @@ -1437,8 +1451,9 @@ namespace LowTempRadiantSystem { continue; } if (AssignedAsRadiantSurface(CheckSurfNum)) { - ShowSevereError( - state, format("Surface {} is referenced by more than one radiant system--this is not allowed", Surface(CheckSurfNum).Name)); + ShowSevereError(state, + EnergyPlus::format("Surface {} is referenced by more than one radiant system--this is not allowed", + Surface(CheckSurfNum).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(CheckSurfNum) = true; @@ -1447,8 +1462,8 @@ namespace LowTempRadiantSystem { if ((Surface(CheckSurfNum).ExtBoundCond > 0) && (Surface(CheckSurfNum).ExtBoundCond != CheckSurfNum)) { if (AssignedAsRadiantSurface(Surface(CheckSurfNum).ExtBoundCond)) { ShowSevereError(state, - format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", - Surface(Surface(CheckSurfNum).ExtBoundCond).Name)); + EnergyPlus::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", + Surface(Surface(CheckSurfNum).ExtBoundCond).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(Surface(CheckSurfNum).ExtBoundCond) = true; @@ -1466,7 +1481,7 @@ namespace LowTempRadiantSystem { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding conditions cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding conditions cause termination.", RoutineName)); } // Set up the output variables for low temperature radiant systems @@ -1839,12 +1854,12 @@ namespace LowTempRadiantSystem { if (Surface(this->SurfacePtr(SurfNum)).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, format("Surface = {}", Surface(this->SurfacePtr(SurfNum)).Name)); + ShowContinueError(state, EnergyPlus::format("Surface = {}", Surface(this->SurfacePtr(SurfNum)).Name)); ShowContinueError(state, - format("Surface in Zone = {}. Radiant System in Zone = {}", - Zone(Surface(this->SurfacePtr(SurfNum)).Zone).Name, - this->ZoneName)); - ShowContinueError(state, format("Occurs in Low Temperature Radiant System = {}", this->Name)); + EnergyPlus::format("Surface in Zone = {}. Radiant System in Zone = {}", + Zone(Surface(this->SurfacePtr(SurfNum)).Zone).Name, + this->ZoneName)); + ShowContinueError(state, EnergyPlus::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."); } @@ -1859,7 +1874,7 @@ 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, format("Occurs in Low Temperature Radiant System = {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Low Temperature Radiant System = {}", this->Name)); errorsFound = true; } @@ -1867,9 +1882,9 @@ namespace LowTempRadiantSystem { if (!state.dataConstruction->Construct(Surface(this->SurfacePtr(SurfNum)).Construction).SourceSinkPresent) { ShowSevereError(state, "Construction referenced in Radiant System Surface does not have a source/sink present"); ShowContinueError(state, - format("Surface name= {} Construction name = {}", - Surface(this->SurfacePtr(SurfNum)).Name, - state.dataConstruction->Construct(Surface(this->SurfacePtr(SurfNum)).Construction).Name)); + EnergyPlus::format("Surface name= {} Construction name = {}", + Surface(this->SurfacePtr(SurfNum)).Name, + state.dataConstruction->Construct(Surface(this->SurfacePtr(SurfNum)).Construction).Name)); ShowContinueError(state, "Construction needs to be referenced by a \"ConstructionProperty:InternalHeatSource\" object."); errorsFound = true; } @@ -1992,18 +2007,19 @@ namespace LowTempRadiantSystem { constexpr std::string_view fmt = "Check input. Calc Pump Efficiency={:.5R}% {}, for pump in radiant system {}"; Real64 pumpEfficiency = thisCFLRadSys.PumpEffic * 100.0; if (thisCFLRadSys.PumpEffic < 0.50) { - ShowWarningError(state, format(fmt, pumpEfficiency, "which is less than 50%", thisCFLRadSys.Name)); + ShowWarningError(state, EnergyPlus::format(fmt, pumpEfficiency, "which is less than 50%", thisCFLRadSys.Name)); } else if ((thisCFLRadSys.PumpEffic > 0.95) && (thisCFLRadSys.PumpEffic <= 1.0)) { - ShowWarningError(state, format(fmt, pumpEfficiency, "is approaching 100%", thisCFLRadSys.Name)); + ShowWarningError(state, EnergyPlus::format(fmt, pumpEfficiency, "is approaching 100%", thisCFLRadSys.Name)); } else if (thisCFLRadSys.PumpEffic > 1.0) { - ShowSevereError(state, format(fmt, pumpEfficiency, "which is bigger than 100%", thisCFLRadSys.Name)); + ShowSevereError(state, EnergyPlus::format(fmt, pumpEfficiency, "which is bigger than 100%", thisCFLRadSys.Name)); InitErrorsFound = true; } } else { // Autosize is not an error but it does not need to check pump efficiency here if (thisCFLRadSys.WaterVolFlowMax != AutoSize) { - ShowSevereError(state, - format("Check input. Pump nominal power and motor efficiency cannot be 0, for pump={}", thisCFLRadSys.Name)); + ShowSevereError( + state, + EnergyPlus::format("Check input. Pump nominal power and motor efficiency cannot be 0, for pump={}", thisCFLRadSys.Name)); InitErrorsFound = true; } } @@ -2098,8 +2114,9 @@ namespace LowTempRadiantSystem { if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:VariableFlow", thisRadSys.Name)) { continue; } - ShowSevereError(state, - format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:VariableFlow,{}] is not on any " + ShowSevereError( + state, + EnergyPlus::format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:VariableFlow,{}] is not on any " "ZoneHVAC:EquipmentList. It will not be simulated.", thisRadSys.Name)); } break; @@ -2107,8 +2124,9 @@ namespace LowTempRadiantSystem { if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:ConstantFlow", thisRadSys.Name)) { continue; } - ShowSevereError(state, - format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:ConstantFlow,{}] is not on any " + ShowSevereError( + state, + EnergyPlus::format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:ConstantFlow,{}] is not on any " "ZoneHVAC:EquipmentList. It will not be simulated.", thisRadSys.Name)); } break; @@ -2117,9 +2135,9 @@ namespace LowTempRadiantSystem { continue; } ShowSevereError(state, - format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:Electric,{}] is not on any " - "ZoneHVAC:EquipmentList. It will not be simulated.", - thisRadSys.Name)); + EnergyPlus::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; @@ -2425,7 +2443,7 @@ namespace LowTempRadiantSystem { } break; default: { ShowSevereError(state, "Radiant system entered without specification of type: electric, constant flow, or hydronic?"); - ShowContinueError(state, format("Occurs in Radiant System={}", state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Radiant System={}", state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -2732,10 +2750,10 @@ namespace LowTempRadiantSystem { state.dataLowTempRadSys->ElecRadSys(RadSysNum).MaxElecPower = TempSize; } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { ShowSevereError(state, - format("{}: auto-sizing cannot be done for {} = {}\".", - RoutineName, - CompType, - state.dataLowTempRadSys->ElecRadSys(RadSysNum).Name)); + EnergyPlus::format("{}: auto-sizing cannot be done for {} = {}\".", + RoutineName, + CompType, + state.dataLowTempRadSys->ElecRadSys(RadSysNum).Name)); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when the " "Heating Design Capacity Method = \"FractionOfAutosizedHeatingCapacity\"."); @@ -2826,10 +2844,10 @@ namespace LowTempRadiantSystem { } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxHeat == AutoSize) { ShowSevereError(state, - format("{}: auto-sizing cannot be done for {} = {}\".", - RoutineName, - CompType, - state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); + EnergyPlus::format("{}: auto-sizing cannot be done for {} = {}\".", + RoutineName, + CompType, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when " "the Heating Design Capacity Method = \"FractionOfAutosizedHeatingCapacity\"."); @@ -2920,8 +2938,8 @@ namespace LowTempRadiantSystem { } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); ShowContinueError(state, - format("Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object={}", - state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); + EnergyPlus::format("Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object={}", + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); ErrorsFound = true; } } @@ -2947,13 +2965,14 @@ namespace LowTempRadiantSystem { if ((std::abs(WaterVolFlowMaxHeatDes - WaterVolFlowMaxHeatUser) / WaterVolFlowMaxHeatUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", - state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); - ShowContinueError(state, - format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxHeatUser)); + EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); ShowContinueError( - state, format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxHeatDes)); + state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxHeatUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", + WaterVolFlowMaxHeatDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2997,10 +3016,10 @@ namespace LowTempRadiantSystem { } else if (CapSizingMethod == FractionOfAutosizedCoolingCapacity) { if (state.dataLowTempRadSys->HydrRadSys(RadSysNum).WaterVolFlowMaxCool == AutoSize) { ShowSevereError(state, - format("{}: auto-sizing cannot be done for {} = {}\".", - RoutineName, - CompType, - state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); + EnergyPlus::format("{}: auto-sizing cannot be done for {} = {}\".", + RoutineName, + CompType, + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when " "the Cooling Design Capacity Method = \"FractionOfAutosizedCoolingCapacity\"."); @@ -3091,8 +3110,8 @@ namespace LowTempRadiantSystem { } else { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); ShowContinueError(state, - format("Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object={}", - state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); + EnergyPlus::format("Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object={}", + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); ErrorsFound = true; } } @@ -3118,13 +3137,15 @@ namespace LowTempRadiantSystem { if ((std::abs(WaterVolFlowMaxCoolDes - WaterVolFlowMaxCoolUser) / WaterVolFlowMaxCoolUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", - state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); - ShowContinueError(state, - format("User-Specified Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolUser)); + EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); ShowContinueError( - state, format("differs from Design Size Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolDes)); + state, + EnergyPlus::format("User-Specified Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Cool Water Flow of {:.5R} [m3/s]", + WaterVolFlowMaxCoolDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3170,11 +3191,13 @@ namespace LowTempRadiantSystem { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(TubeLengthDes - TubeLengthUser) / TubeLengthUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", - state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); - ShowContinueError(state, format("User-Specified Hydronic Tubing Length of {:.5R} [m]", TubeLengthUser)); - ShowContinueError(state, format("differs from Design Size Hydronic Tubing Length of {:.5R} [m]", TubeLengthDes)); + EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", + state.dataLowTempRadSys->HydrRadSys(RadSysNum).Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Hydronic Tubing Length of {:.5R} [m]", TubeLengthUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Hydronic Tubing Length of {:.5R} [m]", TubeLengthDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3265,8 +3288,8 @@ namespace LowTempRadiantSystem { if (OpMode == OperatingMode::ClgHtg || OpMode == OperatingMode::HtgOnly) { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); ShowContinueError(state, - format("Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object={}", - state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name)); + EnergyPlus::format("Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object={}", + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name)); ErrorsFound = true; } } @@ -3295,8 +3318,8 @@ namespace LowTempRadiantSystem { if (OpMode == OperatingMode::ClgHtg || OpMode == OperatingMode::ClgOnly) { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); ShowContinueError(state, - format("Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object={}", - state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name)); + EnergyPlus::format("Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object={}", + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name)); ErrorsFound = true; } } @@ -3333,12 +3356,14 @@ namespace LowTempRadiantSystem { if ((std::abs(WaterVolFlowMaxDes - WaterVolFlowMaxUser) / WaterVolFlowMaxUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" {}\".", - state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name)); - ShowContinueError(state, format("User-Specified Maximum Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxUser)); + EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" {}\".", + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name)); ShowContinueError(state, - format("differs from Design Size Maximum Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxDes)); + EnergyPlus::format("User-Specified Maximum Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Maximum Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3385,11 +3410,13 @@ namespace LowTempRadiantSystem { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(TubeLengthDes - TubeLengthUser) / TubeLengthUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" {}\".", - state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name)); - ShowContinueError(state, format("User-Specified Hydronic Tubing Length of {:.5R} [m]", TubeLengthUser)); - ShowContinueError(state, format("differs from Design Size Hydronic Tubing Length of {:.5R} [m]", TubeLengthDes)); + EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" {}\".", + state.dataLowTempRadSys->CFloRadSys(RadSysNum).Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Hydronic Tubing Length of {:.5R} [m]", TubeLengthUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Hydronic Tubing Length of {:.5R} [m]", TubeLengthDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3562,7 +3589,7 @@ namespace LowTempRadiantSystem { // potentially be heating or cooling at a particular control temperature if (OffTempHeat > OffTempCool) { MassFlowFrac = 0.0; - ShowSevereError(state, format("Overlapping heating and cooling control temps in radiant system: {}", this->Name)); + ShowSevereError(state, EnergyPlus::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 @@ -3699,7 +3726,7 @@ namespace LowTempRadiantSystem { default: { WaterNodeIn = 0; // Suppress uninitialized warning ShowSevereError(state, "Illegal low temperature radiant system operating mode"); - ShowContinueError(state, format("Occurs in Radiant System={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Radiant System={}", this->Name)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -3894,31 +3921,33 @@ 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, format("{} [{}]", cHydronicSystem, this->Name)); - ShowContinueError(state, - format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - Surface(this->SurfacePtr(RadSurfNum2)).Name)); + ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cHydronicSystem, this->Name)); + ShowContinueError( + state, + EnergyPlus::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + Surface(this->SurfacePtr(RadSurfNum2)).Name)); ShowContinueError(state, "Flow to the radiant system will be shut-off to avoid condensation"); ShowContinueError(state, - format("Predicted radiant system surface temperature = {:.2R}", - state.dataHeatBalSurf->SurfInsideTempHist(1)(this->SurfacePtr(RadSurfNum2)))); + EnergyPlus::format("Predicted radiant system surface temperature = {:.2R}", + state.dataHeatBalSurf->SurfInsideTempHist(1)(this->SurfacePtr(RadSurfNum2)))); ShowContinueError(state, - format("Zone dew-point temperature + safety delta T= {:.2R}", - DewPointTemp + variableFlowDesignDataObject.CondDewPtDeltaT)); + EnergyPlus::format("Zone dew-point temperature + safety delta T= {:.2R}", + DewPointTemp + variableFlowDesignDataObject.CondDewPtDeltaT)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", - variableFlowDesignDataObject.CondDewPtDeltaT)); + EnergyPlus::format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", + variableFlowDesignDataObject.CondDewPtDeltaT)); ShowContinueError(state, "Note also that this affects all surfaces that are part of this radiant system"); } - ShowRecurringWarningErrorAtEnd(state, - format("{} [{}] condensation shut-off occurrence continues.", cHydronicSystem, this->Name), - this->CondErrIndex, - DewPointTemp, - DewPointTemp, - _, - "C", - "C"); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} [{}] condensation shut-off occurrence continues.", cHydronicSystem, this->Name), + this->CondErrIndex, + DewPointTemp, + DewPointTemp, + _, + "C", + "C"); } break; // outer do loop } @@ -4069,31 +4098,33 @@ 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, format("{} [{}]", cHydronicSystem, this->Name)); - ShowContinueError(state, - format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - Surface(this->SurfacePtr(CondSurfNum)).Name)); + ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cHydronicSystem, this->Name)); + ShowContinueError( + state, + EnergyPlus::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + Surface(this->SurfacePtr(CondSurfNum)).Name)); ShowContinueError(state, "Flow to the radiant system will be shut-off to avoid condensation"); ShowContinueError(state, - format("Predicted radiant system surface temperature = {:.2R}", - state.dataHeatBalSurf->SurfInsideTempHist(1)(this->SurfacePtr(CondSurfNum)))); + EnergyPlus::format("Predicted radiant system surface temperature = {:.2R}", + state.dataHeatBalSurf->SurfInsideTempHist(1)(this->SurfacePtr(CondSurfNum)))); ShowContinueError(state, - format("Zone dew-point temperature + safety delta T= {:.2R}", - DewPointTemp + variableFlowDesignDataObject.CondDewPtDeltaT)); + EnergyPlus::format("Zone dew-point temperature + safety delta T= {:.2R}", + DewPointTemp + variableFlowDesignDataObject.CondDewPtDeltaT)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", - variableFlowDesignDataObject.CondDewPtDeltaT)); + EnergyPlus::format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", + variableFlowDesignDataObject.CondDewPtDeltaT)); ShowContinueError(state, "Note also that this affects all surfaces that are part of this radiant system"); } - ShowRecurringWarningErrorAtEnd(state, - format("{} [{}] condensation shut-off occurrence continues.", cHydronicSystem, this->Name), - this->CondErrIndex, - DewPointTemp, - DewPointTemp, - _, - "C", - "C"); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} [{}] condensation shut-off occurrence continues.", cHydronicSystem, this->Name), + this->CondErrIndex, + DewPointTemp, + DewPointTemp, + _, + "C", + "C"); } } } // Condensation Predicted in Variable Shut-Off Control Type @@ -4220,7 +4251,7 @@ namespace LowTempRadiantSystem { SetPointTempHi = this->hotCtrlHiTempSched->getCurrentVal(); SetPointTempLo = this->hotCtrlLoTempSched->getCurrentVal(); if (SetPointTempHi < SetPointTempLo) { - ShowSevereError(state, format("Heating setpoint temperature mismatch in{}", this->Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -4228,7 +4259,7 @@ namespace LowTempRadiantSystem { WaterTempHi = this->hotWaterHiTempSched->getCurrentVal(); WaterTempLo = this->hotWaterLoTempSched->getCurrentVal(); if (WaterTempHi < WaterTempLo) { - ShowSevereError(state, format("Heating water temperature mismatch in{}", this->Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -4259,7 +4290,7 @@ namespace LowTempRadiantSystem { SetPointTempHi = this->coldCtrlHiTempSched->getCurrentVal(); SetPointTempLo = this->coldCtrlLoTempSched->getCurrentVal(); if (SetPointTempHi < SetPointTempLo) { - ShowSevereError(state, format("Cooling setpoint temperature mismatch in{}", this->Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -4267,7 +4298,7 @@ namespace LowTempRadiantSystem { WaterTempHi = this->coldWaterHiTempSched->getCurrentVal(); WaterTempLo = this->coldWaterLoTempSched->getCurrentVal(); if (WaterTempHi < WaterTempLo) { - ShowSevereError(state, format("Cooling water temperature mismatch in{}", this->Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -4603,7 +4634,8 @@ 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, format("WaterRecircRate={:.2T}, in Radiant System={},", this->WaterRecircRate, this->Name)); + ShowContinueErrorTimeStamp(state, + EnergyPlus::format("WaterRecircRate={:.2T}, in Radiant System={},", this->WaterRecircRate, this->Name)); this->WaterRecircRate = 0.0; this->WaterInjectionRate = this->WaterMassFlowRate; } @@ -4976,26 +5008,27 @@ 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, format("{} [{}]", cConstantFlowSystem, this->Name)); - ShowContinueError(state, - format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - Surface(this->SurfacePtr(RadSurfNum2)).Name)); + ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cConstantFlowSystem, this->Name)); + ShowContinueError( + state, + EnergyPlus::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + Surface(this->SurfacePtr(RadSurfNum2)).Name)); ShowContinueError(state, "Flow to the radiant system will be shut-off to avoid condensation"); ShowContinueError(state, - format("Predicted radiant system surface temperature = {:.2R}", - state.dataHeatBalSurf->SurfInsideTempHist(1)(this->SurfacePtr(RadSurfNum2)))); + EnergyPlus::format("Predicted radiant system surface temperature = {:.2R}", + state.dataHeatBalSurf->SurfInsideTempHist(1)(this->SurfacePtr(RadSurfNum2)))); ShowContinueError(state, - format("Zone dew-point temperature + safety delta T= {:.2R}", - DewPointTemp + ConstantFlowDesignDataObject.CondDewPtDeltaT)); + EnergyPlus::format("Zone dew-point temperature + safety delta T= {:.2R}", + DewPointTemp + ConstantFlowDesignDataObject.CondDewPtDeltaT)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", - ConstantFlowDesignDataObject.CondDewPtDeltaT)); + EnergyPlus::format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", + ConstantFlowDesignDataObject.CondDewPtDeltaT)); ShowContinueError(state, "Note also that this affects all surfaces that are part of this radiant system"); } ShowRecurringWarningErrorAtEnd( state, - format("{} [{}] condensation shut-off occurrence continues.", cConstantFlowSystem, this->Name), + EnergyPlus::format("{} [{}] condensation shut-off occurrence continues.", cConstantFlowSystem, this->Name), this->CondErrIndex, DewPointTemp, DewPointTemp, @@ -5040,27 +5073,29 @@ 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, format("{} [{}]", cConstantFlowSystem, this->Name)); + ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cConstantFlowSystem, this->Name)); ShowContinueError( state, - format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - Surface(this->SurfacePtr(RadSurfNum2)).Name)); + EnergyPlus::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + 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}", + state.dataHeatBalSurf->SurfInsideTempHist(1)(this->SurfacePtr(RadSurfNum2)))); ShowContinueError(state, - format("Predicted radiant system surface temperature = {:.2R}", - state.dataHeatBalSurf->SurfInsideTempHist(1)(this->SurfacePtr(RadSurfNum2)))); - ShowContinueError(state, - format("Zone dew-point temperature + safety delta T= {:.2R}", - DewPointTemp + ConstantFlowDesignDataObject.CondDewPtDeltaT)); + EnergyPlus::format("Zone dew-point temperature + safety delta T= {:.2R}", + DewPointTemp + ConstantFlowDesignDataObject.CondDewPtDeltaT)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", - ConstantFlowDesignDataObject.CondDewPtDeltaT)); + ShowContinueError( + state, + EnergyPlus::format("Note that a {:.4R} C safety was chosen in the input for the shut-off criteria", + ConstantFlowDesignDataObject.CondDewPtDeltaT)); ShowContinueError(state, "Note also that this affects all surfaces that are part of this radiant system"); } ShowRecurringWarningErrorAtEnd( state, - format("{} [{}] condensation shut-off occurrence continues.", cConstantFlowSystem, this->Name), + EnergyPlus::format("{} [{}] condensation shut-off occurrence continues.", cConstantFlowSystem, this->Name), this->CondErrIndex, DewPointTemp, DewPointTemp, @@ -5464,9 +5499,9 @@ namespace LowTempRadiantSystem { if (state.dataLowTempRadSys->warnTooLow) { if (this->OutRangeLoErrorCount == 0) { ShowSevereMessage(state, "UpdateLowTempRadiantSystem: model result for fluid outlet temperature is not physical."); - ShowContinueError(state, format("Occurs for radiant system name = {}", this->Name)); - ShowContinueError(state, format("Calculated radiant system outlet temperature = {:.3R} [C]", outletTemp)); - ShowContinueError(state, format("Radiant system inlet temperature = {:.3R} [C]", inletTemp)); + ShowContinueError(state, EnergyPlus::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( state, "A possible cause is that the materials used in the internal source construction are not compatible with the model."); } @@ -5481,9 +5516,9 @@ namespace LowTempRadiantSystem { if (state.dataLowTempRadSys->warnTooHigh) { if (this->OutRangeHiErrorCount == 0) { ShowSevereMessage(state, "UpdateLowTempRadiantSystem: model result for fluid outlet temperature is not physical."); - ShowContinueError(state, format("Occurs for radiant system name = {}", this->Name)); - ShowContinueError(state, format("Calculated radiant system outlet temperature = {:.3R} [C]", outletTemp)); - ShowContinueError(state, format("Radiant system inlet temperature = {:.3R} [C]", inletTemp)); + ShowContinueError(state, EnergyPlus::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( state, "A possible cause is that the materials used in the internal source construction are not compatible with the model."); } @@ -5519,7 +5554,8 @@ namespace LowTempRadiantSystem { case CtrlType::RunningMeanODB: return this->todayRunningMeanOutdoorDryBulbTemperature; default: - ShowSevereError(state, format("Illegal control type in low temperature radiant system or it's design object: {}", this->Name)); + ShowSevereError(state, + EnergyPlus::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 } @@ -5550,7 +5586,7 @@ namespace LowTempRadiantSystem { case SetpointType::ZeroFlowPower: return scheduleValue; default: - ShowSevereError(state, format("Illegal setpoint type in low temperature radiant system: {}", this->Name)); + ShowSevereError(state, EnergyPlus::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 6eead4ac91a..75693ccd25b 100644 --- a/src/EnergyPlus/Material.cc +++ b/src/EnergyPlus/Material.cc @@ -219,7 +219,7 @@ 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, format("Positive thermal conductivity required for material {}", mat->Name)); + ShowSevereError(state, EnergyPlus::format("Positive thermal conductivity required for material {}", mat->Name)); ErrorsFound = true; } } @@ -313,7 +313,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if for (int Loop = 1; Loop <= TotFfactorConstructs + TotCfactorConstructs; ++Loop) { auto *mat = new MaterialBase; mat->group = Group::Regular; - mat->Name = format("~FC_Insulation_{}", Loop); + mat->Name = EnergyPlus::format("~FC_Insulation_{}", Loop); s_mat->materials.push_back(mat); mat->Num = s_mat->materials.isize(); @@ -476,14 +476,15 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if mat->Resistance = mat->NominalR = mat->Thickness / mat->Conductivity; } else { ErrorsFound = true; - ShowSevereError(state, format("Window glass material {} has Conductivity = 0.0, must be >0.0, default = .9", mat->Name)); + ShowSevereError(state, EnergyPlus::format("Window glass material {} has Conductivity = 0.0, must be >0.0, default = .9", mat->Name)); } mat->windowOpticalData = static_cast(getEnumValue(Window::opticalDataModelNamesUC, s_ipsc->cAlphaArgs(2))); if (mat->windowOpticalData == Window::OpticalDataModel::Spectral) { if (s_ipsc->lAlphaFieldBlanks(3)) { - ShowSevereCustom(state, eoh, format("{} = Spectral but {} is blank.", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaFieldNames(3))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} = Spectral but {} is blank.", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaFieldNames(3))); ErrorsFound = true; } else if ((mat->GlassSpectralDataPtr = Util::FindItemInList(s_ipsc->cAlphaArgs(3), s_mat->SpectralData)) == 0) { ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3)); @@ -496,103 +497,103 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (s_ipsc->rNumericArgs(2) + s_ipsc->rNumericArgs(3) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(2), s_ipsc->cNumericFieldNames(3))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(2), s_ipsc->cNumericFieldNames(3))); } if (s_ipsc->rNumericArgs(2) + s_ipsc->rNumericArgs(4) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(2), s_ipsc->cNumericFieldNames(4))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(2), s_ipsc->cNumericFieldNames(4))); } if (s_ipsc->rNumericArgs(5) + s_ipsc->rNumericArgs(6) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(5), s_ipsc->cNumericFieldNames(6))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(5), s_ipsc->cNumericFieldNames(6))); } if (s_ipsc->rNumericArgs(5) + s_ipsc->rNumericArgs(7) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(5), s_ipsc->cNumericFieldNames(7))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(5), s_ipsc->cNumericFieldNames(7))); } if (s_ipsc->rNumericArgs(8) + s_ipsc->rNumericArgs(9) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(8), s_ipsc->cNumericFieldNames(9))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(8), s_ipsc->cNumericFieldNames(9))); } if (s_ipsc->rNumericArgs(8) + s_ipsc->rNumericArgs(10) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(8), s_ipsc->cNumericFieldNames(10))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} + {} not <= 1.0", s_ipsc->cNumericFieldNames(8), s_ipsc->cNumericFieldNames(10))); } if (s_ipsc->rNumericArgs(2) < 0.0) { - ShowSevereCustom(state, eoh, format("{} not >= 0.0", s_ipsc->cNumericFieldNames(2))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not >= 0.0", s_ipsc->cNumericFieldNames(2))); ErrorsFound = true; } if (s_ipsc->rNumericArgs(2) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not <= 1.0", s_ipsc->cNumericFieldNames(2))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not <= 1.0", s_ipsc->cNumericFieldNames(2))); } if (s_ipsc->rNumericArgs(3) < 0.0 || s_ipsc->rNumericArgs(3) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not >= 0.0 and <= 1.0", s_ipsc->cNumericFieldNames(3))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not >= 0.0 and <= 1.0", s_ipsc->cNumericFieldNames(3))); } if (s_ipsc->rNumericArgs(4) < 0.0 || s_ipsc->rNumericArgs(4) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not >= 0.0 and <= 1.0", s_ipsc->cNumericFieldNames(4))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not >= 0.0 and <= 1.0", s_ipsc->cNumericFieldNames(4))); } if (s_ipsc->rNumericArgs(5) < 0.0) { - ShowWarningCustom(state, eoh, format("{} not >= 0.0", s_ipsc->cNumericFieldNames(5))); + ShowWarningCustom(state, eoh, EnergyPlus::format("{} not >= 0.0", s_ipsc->cNumericFieldNames(5))); } if (s_ipsc->rNumericArgs(5) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not <= 1.0", s_ipsc->cNumericFieldNames(5))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not <= 1.0", s_ipsc->cNumericFieldNames(5))); } if (s_ipsc->rNumericArgs(6) < 0.0 || s_ipsc->rNumericArgs(6) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not >= 0.0 and <= 1.0", s_ipsc->cNumericFieldNames(6))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not >= 0.0 and <= 1.0", s_ipsc->cNumericFieldNames(6))); } if (s_ipsc->rNumericArgs(7) < 0.0 || s_ipsc->rNumericArgs(7) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not >= 0.0 and <= 1.0", s_ipsc->cNumericFieldNames(7))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not >= 0.0 and <= 1.0", s_ipsc->cNumericFieldNames(7))); } } if (s_ipsc->rNumericArgs(8) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not <= 1.0", s_ipsc->cNumericFieldNames(8))); + ShowSevereCustom(state, eoh, EnergyPlus::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, format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(9))); + ShowSevereCustom(state, eoh, EnergyPlus::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, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(10))); + 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))); } if (s_ipsc->rNumericArgs(11) <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not > 0.0", s_ipsc->cNumericFieldNames(11))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(11))); } if (s_ipsc->rNumericArgs(13) < 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not > 0.0", s_ipsc->cNumericFieldNames(13))); + ShowSevereCustom(state, eoh, EnergyPlus::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, format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(14))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(14))); } if (s_ipsc->cAlphaArgs(4).empty()) { @@ -601,8 +602,9 @@ 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, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} must be Yes or No, entered value={}", s_ipsc->cNumericFieldNames(4), s_ipsc->cAlphaArgs(4))); + 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))); } else { mat->SolarDiffusing = (answer == BooleanSwitch::Yes); } @@ -629,36 +631,36 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ErrorsFound = true; ShowSevereCustom(state, eoh, - format("{} requires the minimum value = 0.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the maximum value = 90.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the minimum value = 0.1 micron in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the maximum value = 4.0 microns in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::format("{} requires the maximum value = 4.0 microns in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } } @@ -680,33 +682,33 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ErrorsFound = true; ShowSevereCustom(state, eoh, - format("{} requires the minimum value = 0.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the maximum value = 90.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the minimum value = 0.1 micron in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the maximum value = 4.0 microns in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::format("{} requires the maximum value = 4.0 microns in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } } @@ -728,33 +730,33 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ErrorsFound = true; ShowSevereCustom(state, eoh, - format("{} requires the minimum value = 0.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the maximum value = 90.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the minimum value = 0.1 micron in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{} requires the maximum value = 4.0 microns in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::format("{} requires the maximum value = 4.0 microns in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } } } @@ -835,7 +837,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, format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(6), s_ipsc->cNumericFieldNames(7))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(6), s_ipsc->cNumericFieldNames(7))); } if (s_ipsc->cAlphaArgs(2).empty()) { @@ -846,8 +848,9 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if mat->SolarDiffusing = false; } else { ErrorsFound = true; - ShowSevereError(state, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} must be Yes or No, entered value={}", s_ipsc->cNumericFieldNames(2), s_ipsc->cAlphaArgs(4))); + 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))); } } @@ -1020,11 +1023,11 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (matGas->gases[0].vis.c0 <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not > 0.0", s_ipsc->cNumericFieldNames(5))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(5))); } if (matGas->gases[0].cp.c0 <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} not > 0.0", s_ipsc->cNumericFieldNames(8))); + ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(8))); } if (matGas->gases[0].wght <= 0.0) { ErrorsFound = true; @@ -1040,8 +1043,9 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if matGas->NominalR = matGas->Thickness / DenomRGas; } else { ShowSevereError(state, s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", Illegal value."); - ShowContinueError(state, - format("Nominal resistance of gap at room temperature calculated at a negative Conductivity=[{:.3R}].", DenomRGas)); + ShowContinueError( + state, + EnergyPlus::format("Nominal resistance of gap at room temperature calculated at a negative Conductivity=[{:.3R}].", DenomRGas)); ErrorsFound = true; } } @@ -1122,18 +1126,18 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (matGas->gases[0].vis.c0 <= 0.0) { ErrorsFound = true; - ShowSevereError(state, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} not > 0.0", s_ipsc->cNumericFieldNames(5))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(5))); } if (matGas->gases[0].cp.c0 <= 0.0) { ErrorsFound = true; - ShowSevereError(state, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} not > 0.0", s_ipsc->cNumericFieldNames(8))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(8))); } if (matGas->gases[0].wght <= 0.0) { ErrorsFound = true; - ShowSevereError(state, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} not > 0.0", s_ipsc->cNumericFieldNames(11))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(11))); } } @@ -1143,9 +1147,10 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (DenomRGas > 0.0) { matGas->NominalR = matGas->Thickness / DenomRGas; } else { - ShowSevereError(state, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("Nominal resistance of gap at room temperature calculated at a negative Conductivity=[{:.3R}].", DenomRGas)); + ShowSevereError(state, EnergyPlus::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)); ErrorsFound = true; } } @@ -1196,7 +1201,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, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1 + NumGas))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1 + NumGas))); // Error check? ErrorsFound = true; } @@ -1206,7 +1211,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if matGas->Thickness = s_ipsc->rNumericArgs(1); if (matGas->Thickness <= 0.0) { - ShowSevereError(state, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, s_ipsc->cNumericFieldNames(1) + " must be greater than 0."); } matGas->ROnly = true; @@ -1523,11 +1528,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, format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("{}=\"{}\", must be one of DoNotModel, ModelAsDirectBeam or ModelAsDiffuse.", - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", must be one of DoNotModel, ModelAsDirectBeam or ModelAsDiffuse.", + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } matScreen->Roughness = SurfaceRoughness::MediumRough; @@ -1772,7 +1777,8 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ShowContinueError(state, " ...the screen diameter is recalculated from the material openness specified "); ShowContinueError(state, " ...and wire spacing using the formula = wire spacing * (1.0 - SQRT(Opennes))"); matScreen->wireDiameter = matScreen->wireSpacing * (1.0 - std::sqrt(matScreen->TAR.Sol.Ft.Bm[0].BmTra)); - ShowContinueError(state, format(" ...Recalculated {}={:.4R} m", s_ipsc->cNumericFieldNames(10), matScreen->wireDiameter)); + ShowContinueError(state, + EnergyPlus::format(" ...Recalculated {}={:.4R} m", s_ipsc->cNumericFieldNames(10), matScreen->wireDiameter)); } } } @@ -1874,11 +1880,11 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (matBlind->SlatWidth < matBlind->SlatSeparation) { ShowWarningError(state, s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", Slat Angles/Widths"); ShowContinueError(state, - format("{} [{:.2R}] is less than {} [{:.2R}].", - s_ipsc->cNumericFieldNames(1), - matBlind->SlatWidth, - s_ipsc->cNumericFieldNames(2), - matBlind->SlatSeparation)); + EnergyPlus::format("{} [{:.2R}] is less than {} [{:.2R}].", + s_ipsc->cNumericFieldNames(1), + matBlind->SlatWidth, + s_ipsc->cNumericFieldNames(2), + matBlind->SlatSeparation)); ShowContinueError(state, "This will allow direct beam to be transmitted when Slat angle = 0."); } @@ -2001,18 +2007,18 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ErrorsFound = true; ShowSevereError(state, s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", Illegal value combination."); ShowContinueError(state, - format("{}=[{:.1R}], is less than smallest allowed by slat dimensions and spacing, [{:.1R}] deg.", - s_ipsc->cNumericFieldNames(4), - matBlind->SlatAngle, - MinSlatAngGeom)); + EnergyPlus::format("{}=[{:.1R}], is less than smallest allowed by slat dimensions and spacing, [{:.1R}] deg.", + s_ipsc->cNumericFieldNames(4), + matBlind->SlatAngle, + MinSlatAngGeom)); } else if (matBlind->SlatAngle > MaxSlatAngGeom) { ErrorsFound = true; ShowSevereError(state, s_ipsc->cCurrentModuleObject + "=\"" + s_ipsc->cAlphaArgs(1) + "\", Illegal value combination."); ShowContinueError(state, - format("{}=[{:.1R}], is greater than largest allowed by slat dimensions and spacing, [{:.1R}] deg.", - s_ipsc->cNumericFieldNames(4), - matBlind->SlatAngle, - MinSlatAngGeom)); + EnergyPlus::format("{}=[{:.1R}], is greater than largest allowed by slat dimensions and spacing, [{:.1R}] deg.", + s_ipsc->cNumericFieldNames(4), + matBlind->SlatAngle, + MinSlatAngGeom)); } } @@ -2153,63 +2159,65 @@ 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, format("{}=\"{}\", Slat Separation/Width", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\", Slat Separation/Width", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("{} [{:.2R}] is less than {} [{:.2R}].", - s_ipsc->cNumericFieldNames(1), - mat->SlatWidth, - s_ipsc->cNumericFieldNames(2), - mat->SlatSeparation)); + EnergyPlus::format("{} [{:.2R}] is less than {} [{:.2R}].", + s_ipsc->cNumericFieldNames(1), + mat->SlatWidth, + s_ipsc->cNumericFieldNames(2), + mat->SlatSeparation)); ShowContinueError(state, "This will allow direct beam to be transmitted when Slat angle = 0."); } if (mat->SlatSeparation < 0.001) { - ShowWarningError(state, format("{}=\"{}\", Slat Separation", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} [{:.2R}]. Slate spacing must be > 0.0", s_ipsc->cNumericFieldNames(2), mat->SlatSeparation)); + ShowWarningError(state, EnergyPlus::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, "...Setting slate spacing to default value of 0.025 m and " "simulation continues."); mat->SlatSeparation = 0.025; } if (mat->SlatWidth < 0.001 || mat->SlatWidth >= 2.0 * mat->SlatSeparation) { - ShowWarningError(state, format("{}=\"{}\", Slat Width", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("{} [{:.2R}]. Slat width range is 0 < Width <= 2*Spacing", s_ipsc->cNumericFieldNames(1), mat->SlatWidth)); + ShowWarningError(state, EnergyPlus::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, format("{}=\"{}\", Slat Crown", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("{} [{:.2R}]. Slat crwon range is 0 <= crown < 0.5*Width", s_ipsc->cNumericFieldNames(3), mat->SlatCrown)); + ShowWarningError(state, EnergyPlus::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, format("{}=\"{}\", Slat Angle", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} [{:.2R}]. Slat angle range is -90.0 <= Angle < 90.0", s_ipsc->cNumericFieldNames(4), mat->SlatAngle)); + ShowWarningError(state, EnergyPlus::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."); mat->SlatAngle = 0.0; } if ((s_ipsc->rNumericArgs(5) + s_ipsc->rNumericArgs(7) >= 1.0)) { ErrorsFound = true; - ShowSevereError(state, format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(5), s_ipsc->cNumericFieldNames(7))); + 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))); } if ((s_ipsc->rNumericArgs(6) + s_ipsc->rNumericArgs(8) >= 1.0)) { ErrorsFound = true; - ShowSevereError(state, format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(6), s_ipsc->cNumericFieldNames(8))); + 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))); } if ((s_ipsc->rNumericArgs(9) + s_ipsc->rNumericArgs(11) >= 1.0)) { ErrorsFound = true; - ShowSevereError(state, format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(11))); + 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))); } if ((s_ipsc->rNumericArgs(10) + s_ipsc->rNumericArgs(12) >= 1.0)) { ErrorsFound = true; - ShowSevereError(state, format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(12))); + 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))); } } // TotBlindsEQL loop @@ -2282,19 +2290,21 @@ 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, format("{}=\"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is <=0.", s_ipsc->cNumericFieldNames(7))); + 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))); ErrorsFound = true; } if (mat->InitMoisture > mat->Porosity) { - ShowWarningError(state, format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError( - state, format("{} is greater than {}. It must be less or equal.", s_ipsc->cNumericFieldNames(15), s_ipsc->cNumericFieldNames(13))); - ShowContinueError(state, format("{} = {:.3T}.", s_ipsc->cNumericFieldNames(13), mat->Porosity)); - ShowContinueError(state, format("{} = {:.3T}.", s_ipsc->cNumericFieldNames(15), mat->InitMoisture)); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("{} is reset to the maximum (saturation) value = {:.3T}.", s_ipsc->cNumericFieldNames(15), mat->Porosity)); + 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)); + ShowContinueError( + state, EnergyPlus::format("{} is reset to the maximum (saturation) value = {:.3T}.", s_ipsc->cNumericFieldNames(15), mat->Porosity)); ShowContinueError(state, "Simulation continues."); mat->InitMoisture = mat->Porosity; } @@ -2337,7 +2347,9 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (NumNums + 1 != NumAlphas) { ShowSevereCustom( - state, eoh, format("Check number of {} compared to number of {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cNumericFieldNames(1))); + state, + eoh, + EnergyPlus::format("Check number of {} compared to number of {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cNumericFieldNames(1))); ErrorsFound = true; continue; } @@ -2361,10 +2373,11 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if auto *matGlass = s_mat->materials(matRef.matNum); // test that named material is of the right type if (matGlass->group != Group::Glass) { - ShowSevereCustom( - state, - eoh, - format("{} = {}, Material is not a window glazing ", s_ipsc->cAlphaFieldNames(1 + iMatRef), s_ipsc->cAlphaArgs(1 + iMatRef))); + ShowSevereCustom(state, + eoh, + EnergyPlus::format("{} = {}, Material is not a window glazing ", + s_ipsc->cAlphaFieldNames(1 + iMatRef), + s_ipsc->cAlphaArgs(1 + iMatRef))); ErrorsFound = true; continue; } @@ -2458,13 +2471,15 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if mat->Thickness = s_ipsc->rNumericArgs(1); if (s_ipsc->rNumericArgs(1) <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} must be > 0, entered {:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} must be > 0, entered {:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); } mat->Pressure = s_ipsc->rNumericArgs(2); if (s_ipsc->rNumericArgs(2) <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} must be > 0, entered {:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} must be > 0, entered {:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); } if (!s_ipsc->lAlphaFieldBlanks(2)) { @@ -2609,59 +2624,76 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (s_ipsc->rNumericArgs(1) <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); } if (s_ipsc->rNumericArgs(2) <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} must be > 0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); } if ((s_ipsc->rNumericArgs(3) < 0.0) || (s_ipsc->rNumericArgs(3) > 1.0)) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} value must be >= 0 and <= 1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(3), s_ipsc->rNumericArgs(3))); + state, + eoh, + EnergyPlus::format("{} value must be >= 0 and <= 1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(3), s_ipsc->rNumericArgs(3))); } if ((s_ipsc->rNumericArgs(4) <= 0.0) || (s_ipsc->rNumericArgs(4) > 1.0)) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} value must be >= 0 and <= 1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(4), s_ipsc->rNumericArgs(4))); + state, + eoh, + EnergyPlus::format("{} value must be >= 0 and <= 1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(4), s_ipsc->rNumericArgs(4))); } if ((s_ipsc->rNumericArgs(5) <= 0.0) || (s_ipsc->rNumericArgs(5) > 1.0)) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} value must be >= 0 and <= 1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(5), s_ipsc->rNumericArgs(5))); + state, + eoh, + EnergyPlus::format("{} value must be >= 0 and <= 1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(5), s_ipsc->rNumericArgs(5))); } if ((s_ipsc->rNumericArgs(6) < 0.0) || (s_ipsc->rNumericArgs(6) > 1.0)) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be >= 0 or <= 1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(6), s_ipsc->rNumericArgs(6))); + state, + eoh, + EnergyPlus::format("{} must be >= 0 or <= 1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(6), s_ipsc->rNumericArgs(6))); } if ((s_ipsc->rNumericArgs(7) < 0.0) || (s_ipsc->rNumericArgs(7) > 1.0)) { ErrorsFound = true; - ShowSevereCustom(state, eoh, format("{} must be >=0 or <=1, entered {:.2R}", s_ipsc->cNumericFieldNames(7), s_ipsc->rNumericArgs(7))); + ShowSevereCustom( + state, eoh, EnergyPlus::format("{} must be >=0 or <=1, entered {:.2R}", s_ipsc->cNumericFieldNames(7), s_ipsc->rNumericArgs(7))); } if ((s_ipsc->rNumericArgs(8) < 0.0) || (s_ipsc->rNumericArgs(8) > 1.0)) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be >=0 or <=1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(8), s_ipsc->rNumericArgs(8))); + state, + eoh, + EnergyPlus::format("{} must be >=0 or <=1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(8), s_ipsc->rNumericArgs(8))); } if ((s_ipsc->rNumericArgs(9) < 0.0) || (s_ipsc->rNumericArgs(9) > 1.0)) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be >=0 or <=1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(9), s_ipsc->rNumericArgs(9))); + state, + eoh, + EnergyPlus::format("{} must be >=0 or <=1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(9), s_ipsc->rNumericArgs(9))); } if ((s_ipsc->rNumericArgs(10) < 0.0) || (s_ipsc->rNumericArgs(10) > 1.0)) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be >=0 or <=1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(10), s_ipsc->rNumericArgs(10))); + state, + eoh, + EnergyPlus::format("{} must be >=0 or <=1, entered value = {:.2R}", s_ipsc->cNumericFieldNames(10), s_ipsc->rNumericArgs(10))); } if ((mat->LayerType == TARCOGParams::TARCOGLayerType::VENETBLIND_HORIZ) || @@ -2669,33 +2701,41 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (s_ipsc->rNumericArgs(11) <= 0.0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(11), s_ipsc->rNumericArgs(11))); + state, + eoh, + EnergyPlus::format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(11), s_ipsc->rNumericArgs(11))); } if (s_ipsc->rNumericArgs(12) <= 0.0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(12), s_ipsc->rNumericArgs(12))); + state, + eoh, + EnergyPlus::format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(12), s_ipsc->rNumericArgs(12))); } if (s_ipsc->rNumericArgs(13) <= 0.0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(13), s_ipsc->rNumericArgs(13))); + state, + eoh, + EnergyPlus::format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(13), s_ipsc->rNumericArgs(13))); } if ((s_ipsc->rNumericArgs(14) < -90.0) || (s_ipsc->rNumericArgs(14) > 90.0)) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - format("{} must be >=-90 and <=90, entered value = {:.2R}", s_ipsc->cNumericFieldNames(14), s_ipsc->rNumericArgs(14))); + ShowSevereCustom(state, + eoh, + EnergyPlus::format( + "{} must be >=-90 and <=90, entered value = {:.2R}", s_ipsc->cNumericFieldNames(14), s_ipsc->rNumericArgs(14))); } if (s_ipsc->rNumericArgs(15) <= 0.0) { ErrorsFound = true; ShowSevereCustom( - state, eoh, format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(15), s_ipsc->rNumericArgs(15))); + state, + eoh, + EnergyPlus::format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(15), s_ipsc->rNumericArgs(15))); } if ((s_ipsc->rNumericArgs(16) < 0.0) || @@ -2703,9 +2743,9 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ErrorsFound = true; ShowSevereCustom(state, eoh, - format("{} must be = 0 or greater than SlatWidth/2, entered value = {:.2R}", - s_ipsc->cNumericFieldNames(16), - s_ipsc->rNumericArgs(16))); + EnergyPlus::format("{} must be = 0 or greater than SlatWidth/2, entered value = {:.2R}", + s_ipsc->cNumericFieldNames(16), + s_ipsc->rNumericArgs(16))); } } @@ -2836,10 +2876,11 @@ void GetVariableAbsorptanceInput(EnergyPlusData &state, bool &errorsFound) if (mat->group != Group::Regular) { ShowSevereError( state, - 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)); + 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)); errorsFound = true; continue; } @@ -2855,26 +2896,29 @@ void GetVariableAbsorptanceInput(EnergyPlusData &state, bool &errorsFound) if ((mat->absorpThermalVarSched == nullptr) && (mat->absorpSolarVarSched == nullptr)) { ShowSevereError( state, - format("{}: Control signal \"Scheduled\" is chosen but both thermal and solar absorptance schedules are undefined, for object {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::format( + "{}: Control signal \"Scheduled\" is chosen but both thermal and solar absorptance schedules are undefined, for object {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); errorsFound = true; return; } if ((mat->absorpThermalVarCurve != nullptr) || (mat->absorpSolarVarCurve != nullptr)) { - ShowWarningError(state, - 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, + 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))); errorsFound = true; return; } } else { // controlled by performance table or curve if ((mat->absorpThermalVarCurve == nullptr) && (mat->absorpSolarVarCurve == nullptr)) { - ShowSevereError(state, - format("{}: Non-schedule control signal is chosen but both thermal and solar absorptance table or curve are " + 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))); @@ -2882,11 +2926,12 @@ void GetVariableAbsorptanceInput(EnergyPlusData &state, bool &errorsFound) return; } if ((mat->absorpThermalVarSched != nullptr) || (mat->absorpSolarVarSched != nullptr)) { - ShowWarningError(state, - 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, + 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))); errorsFound = true; return; } @@ -2961,13 +3006,14 @@ void GetWindowGlassSpectralData(EnergyPlusData &state, bool &ErrorsFound) // set ShowWarningCustom( state, eoh, - format("{} of items in data set is not a multiple of 4 (Wavelength,Trans,ReflFront,ReflBack), remainder items set to 0.0", NumNums)); + EnergyPlus::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, format("More than {} entries in set ({})", MaxSpectralDataElements, NumNums)); + ShowSevereCustom(state, eoh, EnergyPlus::format("More than {} entries in set ({})", MaxSpectralDataElements, NumNums)); ErrorsFound = true; continue; } @@ -2998,19 +3044,22 @@ void GetWindowGlassSpectralData(EnergyPlusData &state, bool &ErrorsFound) // set RhoB = specData.ReflBack(LamNum); if (LamNum < TotLam && specData.WaveLength(LamNum + 1) <= Lam) { ErrorsFound = true; - ShowSevereError(state, format("{}{}=\"{}\" invalid set.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\" invalid set.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("... Wavelengths not in increasing order. at wavelength#={}, value=[{:.4T}], next is [{:.4T}].", - LamNum, - Lam, - specData.WaveLength(LamNum + 1))); + EnergyPlus::format("... Wavelengths not in increasing order. at wavelength#={}, value=[{:.4T}], next is [{:.4T}].", + LamNum, + Lam, + specData.WaveLength(LamNum + 1))); } if (Lam < 0.1 || Lam > 4.0) { ErrorsFound = true; - ShowSevereError(state, format("{}{}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("... A wavelength is not in the range 0.1 to 4.0 microns; at wavelength#={}, value=[{:.4T}].", LamNum, Lam)); + ShowSevereError(state, + EnergyPlus::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)); } // TH 2/15/2011. CR 8343 @@ -3018,23 +3067,30 @@ 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, format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("... A transmittance is > 1.0; at wavelength#={}, value=[{:.4T}].", LamNum, Tau)); + 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)); } if (RhoF < 0.0 || RhoF > 1.02 || RhoB < 0.0 || RhoB > 1.02) { ErrorsFound = true; - ShowSevereError(state, format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("... A reflectance is < 0.0 or > 1.0; at wavelength#={}, RhoF value=[{:.4T}].", LamNum, RhoF)); - ShowContinueError(state, format("... A reflectance is < 0.0 or > 1.0; at wavelength#={}, RhoB value=[{:.4T}].", LamNum, RhoB)); + 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)); } if ((Tau + RhoF) > 1.03 || (Tau + RhoB) > 1.03) { ErrorsFound = true; - ShowSevereError(state, format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("... Transmittance + reflectance) > 1.0 for an entry; at wavelength#={}", - format("{}, value(Tau+RhoF)=[{:.4T}], value(Tau+RhoB)=[{:.4T}].", LamNum, (Tau + RhoF), (Tau + RhoB)))); + ShowSevereError(state, + EnergyPlus::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)))); } } } @@ -3094,10 +3150,11 @@ 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, - format("WindowMaterial:SimpleGlazingSystem: {} has U-factor higher than that provided by surface film resistances, " - "Check value of U-factor", - this->Name)); + ShowWarningError( + state, + EnergyPlus::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. @@ -3115,8 +3172,9 @@ void MaterialGlass::SetupSimpleWindowGlazingSystem(EnergyPlusData &state) this->NominalR = this->Resistance = Rlw; } else { ErrorsFound = true; - ShowSevereError(state, - format("WindowMaterial:SimpleGlazingSystem: {} has Conductivity <= 0.0, must be >0.0, Check value of U-factor", this->Name)); + ShowSevereError( + state, + EnergyPlus::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/MatrixDataManager.cc b/src/EnergyPlus/MatrixDataManager.cc index 4c4a6a7114a..fd35ea6fa0d 100644 --- a/src/EnergyPlus/MatrixDataManager.cc +++ b/src/EnergyPlus/MatrixDataManager.cc @@ -157,19 +157,19 @@ namespace MatrixDataManager { // test if (NumElements < 1) { - ShowSevereError(state, format("GetMatrixInput: for {}: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("GetMatrixInput: for {}: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("Check {} and {} total number of elements in matrix must be 1 or more", - state.dataIPShortCut->cNumericFieldNames(1), - state.dataIPShortCut->cNumericFieldNames(2))); + EnergyPlus::format("Check {} and {} total number of elements in matrix must be 1 or more", + state.dataIPShortCut->cNumericFieldNames(1), + state.dataIPShortCut->cNumericFieldNames(2))); ErrorsFound = true; } if ((NumNumbers - 2) < NumElements) { - ShowSevereError(state, format("GetMatrixInput: for {}: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("GetMatrixInput: for {}: {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("Check input, total number of elements does not agree with {} and {}", - state.dataIPShortCut->cNumericFieldNames(1), - state.dataIPShortCut->cNumericFieldNames(2))); + EnergyPlus::format("Check input, total number of elements does not agree with {} and {}", + state.dataIPShortCut->cNumericFieldNames(1), + state.dataIPShortCut->cNumericFieldNames(2))); ErrorsFound = true; } state.dataMatrixDataManager->MatData(MatNum).MatrixType = TwoDimensional; diff --git a/src/EnergyPlus/MicroCHPElectricGenerator.cc b/src/EnergyPlus/MicroCHPElectricGenerator.cc index 074125f2fc1..9426e98aca0 100644 --- a/src/EnergyPlus/MicroCHPElectricGenerator.cc +++ b/src/EnergyPlus/MicroCHPElectricGenerator.cc @@ -117,7 +117,8 @@ PlantComponent *MicroCHPDataStruct::factory(EnergyPlusData &state, std::string c } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalMicroCHPGenFactory: Error getting inputs for micro-CHP gen named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalMicroCHPGenFactory: Error getting inputs for micro-CHP gen named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -154,7 +155,7 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) state.dataCHPElectGen->NumMicroCHPParams = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (state.dataCHPElectGen->NumMicroCHPParams <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -207,8 +208,8 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) microCHPParams.PlantFlowControl = false; } if ((!(Util::SameString(AlphArray(4), "InternalControl"))) && (!(Util::SameString(AlphArray(4), "PlantControl")))) { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(4), AlphArray(4))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(4), AlphArray(4))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } if (microCHPParams.InternalFlowControl) { // get the curve @@ -237,15 +238,15 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) microCHPParams.RadiativeFraction = NumArray(9); // N9 radiative fraction for skin losses microCHPParams.MCeng = NumArray(10); // N10 Aggregated Thermal Mass of Generator MC_eng if (microCHPParams.MCeng <= 0.0) { - ShowSevereError(state, format("Invalid, {} = {:.5R}", s_ipsc->cNumericFieldNames(10), NumArray(10))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {:.5R}", s_ipsc->cNumericFieldNames(10), NumArray(10))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ShowContinueError(state, "Thermal mass must be greater than zero"); ErrorsFound = true; } microCHPParams.MCcw = NumArray(11); // Aggregated Thermal Mass of Heat Recovery MC_cw if (microCHPParams.MCcw <= 0.0) { - ShowSevereError(state, format("Invalid, {} = {:.5R}", s_ipsc->cNumericFieldNames(11), NumArray(11))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {:.5R}", s_ipsc->cNumericFieldNames(11), NumArray(11))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ShowContinueError(state, "Thermal mass must be greater than zero"); ErrorsFound = true; } @@ -256,8 +257,8 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) microCHPParams.WarmUpByEngineTemp = false; } if ((!(Util::SameString(AlphArray(7), "NominalEngineTemperature"))) && (!(Util::SameString(AlphArray(7), "TimeDelay")))) { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(7), AlphArray(7))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(7), AlphArray(7))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } microCHPParams.kf = NumArray(13); // N13 Warmup Fuel Flow Rate Coefficient k_f @@ -275,8 +276,8 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) microCHPParams.WarmRestartOkay = false; } if ((!(Util::SameString(AlphArray(8), "MandatoryCoolDown"))) && (!(Util::SameString(AlphArray(8), "OptionalCoolDown")))) { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(8), AlphArray(8))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(8), AlphArray(8))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -286,7 +287,7 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) if (state.dataCHPElectGen->NumMicroCHPs <= 0) { // shouldn't ever come here? - ShowSevereError(state, format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -321,8 +322,8 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) if (thisParamID != 0) { microCHP.A42Model = state.dataCHPElectGen->MicroCHPParamInput(thisParamID); // entire structure of input data assigned here! } else { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(2), AlphArray(2))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(2), AlphArray(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -330,8 +331,8 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) microCHP.ZoneName = AlphArray(3); // A3 Zone Name microCHP.ZoneID = Util::FindItemInList(microCHP.ZoneName, state.dataHeatBal->Zone); if (microCHP.ZoneID == 0) { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(3), AlphArray(3))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(3), AlphArray(3))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } else { @@ -385,8 +386,8 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) microCHP.FuelSupplyID = Util::FindItemInList(AlphArray(8), state.dataGenerator->FuelSupply); // Fuel Supply ID if (microCHP.FuelSupplyID == 0) { - ShowSevereError(state, format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(8), AlphArray(8))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(8), AlphArray(8))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -401,7 +402,7 @@ void GetMicroCHPGeneratorInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); } // setup report variables diff --git a/src/EnergyPlus/MicroturbineElectricGenerator.cc b/src/EnergyPlus/MicroturbineElectricGenerator.cc index 1649d0a9bd2..7258edaec35 100644 --- a/src/EnergyPlus/MicroturbineElectricGenerator.cc +++ b/src/EnergyPlus/MicroturbineElectricGenerator.cc @@ -108,8 +108,9 @@ PlantComponent *MTGeneratorSpecs::factory(EnergyPlusData &state, std::string con } } // If we didn't find it, fatal - ShowFatalError( - state, format("LocalMicroTurbineGeneratorFactory: Error getting inputs for microturbine generator named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalMicroTurbineGeneratorFactory: Error getting inputs for microturbine generator named: {}", + objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -132,7 +133,7 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataMircoturbElectGen->NumMTGenerators <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } @@ -163,9 +164,9 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput = NumArray(1); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), NumArray(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), NumArray(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(1))); ErrorsFound = true; } @@ -173,9 +174,9 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).MaxElecPowerOutput = NumArray(3); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).MinElecPowerOutput < 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), NumArray(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(2))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), NumArray(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(2))); ErrorsFound = true; } @@ -184,23 +185,24 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput; } else { if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).MaxElecPowerOutput <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(3), NumArray(3))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(3))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(3), NumArray(3))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(3))); ErrorsFound = true; } } if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).MinElecPowerOutput >= state.dataMircoturbElectGen->MTGenerator(GeneratorNum).MaxElecPowerOutput) { - ShowSevereError( - state, format("{}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowSevereError(state, + EnergyPlus::format( + "{}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(2), - NumArray(2), - state.dataIPShortCut->cNumericFieldNames(3), - NumArray(3))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(2), + NumArray(2), + state.dataIPShortCut->cNumericFieldNames(3), + NumArray(3))); ShowContinueError(state, "Minimum Full Load Electrical Power Output must be less than or equal"); ShowContinueError(state, "to Maximum Full Load Electrical Power Output."); ErrorsFound = true; @@ -210,24 +212,27 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).MaxElecPowerOutput || state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput < state.dataMircoturbElectGen->MTGenerator(GeneratorNum).MinElecPowerOutput) { - ShowSevereError( - state, format("{}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, - format("{} must be >= {}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->cNumericFieldNames(2))); - ShowContinueError(state, - format("{} must be <= {}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->cNumericFieldNames(3))); - ShowContinueError(state, format("{} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(1), NumArray(1))); - ShowContinueError(state, format("{} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(2), NumArray(2))); - ShowContinueError(state, format("{} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(3), NumArray(3))); + ShowSevereError(state, + EnergyPlus::format( + "{}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError( + state, + EnergyPlus::format("{} must be >= {}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->cNumericFieldNames(2))); + ShowContinueError( + state, + EnergyPlus::format("{} must be <= {}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->cNumericFieldNames(3))); + ShowContinueError(state, EnergyPlus::format("{} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(1), NumArray(1))); + ShowContinueError(state, EnergyPlus::format("{} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(2), NumArray(2))); + ShowContinueError(state, EnergyPlus::format("{} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(3), NumArray(3))); ErrorsFound = true; } state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecEfficiencyLHV = NumArray(4); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecEfficiencyLHV <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(4), NumArray(4))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(4))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(4), NumArray(4))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(4))); ErrorsFound = true; } @@ -236,9 +241,9 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation = NumArray(7); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletHumRat <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(6), NumArray(6))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(6))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(6), NumArray(6))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(6))); ErrorsFound = true; } else { // Reference barometric pressure, adjusted for reference elevation (Pa) @@ -254,8 +259,8 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecPowFTempElevCurveNum = Curve::GetCurveIndex(state, AlphArray(2)); // Convert curve name to number if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecPowFTempElevCurveNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), AlphArray(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), AlphArray(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { // Verify curve object, only legal type is BiQuadratic @@ -268,18 +273,19 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation); if (std::abs(ElectOutFTempElevOutput - 1.0) > 0.1) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(2), AlphArray(2))); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(2), AlphArray(2))); ShowContinueError(state, "... Curve output at reference conditions should equal 1 (+-10%)."); ShowContinueError(state, - format("...Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + EnergyPlus::format("...Reference combustion air inlet temperature = {:.4T} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); ShowContinueError(state, - format("...Reference elevation = {:.4T} m", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation)); - ShowContinueError(state, format("...Curve output = {:.4T}", ElectOutFTempElevOutput)); + EnergyPlus::format("...Reference elevation = {:.4T} m", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation)); + ShowContinueError(state, EnergyPlus::format("...Curve output = {:.4T}", ElectOutFTempElevOutput)); } } } @@ -287,9 +293,11 @@ 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, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); + ShowSevereError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); ErrorsFound = true; } else { // Verify curve object, only legal types are Quadratic and Cubic @@ -301,15 +309,16 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFTempCurveNum, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp); if (std::abs(ElecEfficFTempOutput - 1.0) > 0.1) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - format("... Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); - ShowContinueError(state, format("... Curve output = {:.4T}", ElecEfficFTempOutput)); + EnergyPlus::format("... Reference combustion air inlet temperature = {:.4T} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ElecEfficFTempOutput)); } } } @@ -317,9 +326,11 @@ 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, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); + ShowSevereError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); ErrorsFound = true; } else { // Verify curve object, only legal types are Quadratic and Cubic @@ -330,12 +341,13 @@ void GetMTGeneratorInput(EnergyPlusData &state) Real64 ElecEfficFPLROutput = Curve::CurveValue(state, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFPLRCurveNum, 1.0); if (std::abs(ElecEfficFPLROutput - 1.0) > 0.1) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); ShowContinueError(state, "... Curve output at a part-load ratio of 1 should equal 1 (+-10%)."); - ShowContinueError(state, format("... Curve output = {:.4T}", ElecEfficFPLROutput)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ElecEfficFPLROutput)); } Real64 Var1Min(0.0); @@ -350,9 +362,11 @@ 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, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); + ShowSevereError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); ErrorsFound = true; } @@ -360,45 +374,48 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelLowerHeatingValue = NumArray(9); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelLowerHeatingValue <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(9), NumArray(9))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(9))); + 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))); ErrorsFound = true; } if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelHigherHeatingValue <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(8), NumArray(8))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(8))); + 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))); ErrorsFound = true; } if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelLowerHeatingValue > state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelHigherHeatingValue) { - ShowSevereError( - state, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError( - state, - format("{} must be greater than the {}", state.dataIPShortCut->cNumericFieldNames(8), state.dataIPShortCut->cNumericFieldNames(9))); - ShowContinueError(state, format("{}={:.2R}", state.dataIPShortCut->cNumericFieldNames(8), NumArray(8))); - ShowContinueError(state, format("{}={:.2R}", state.dataIPShortCut->cNumericFieldNames(9), NumArray(9))); + ShowSevereError(state, + EnergyPlus::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))); + ShowContinueError(state, EnergyPlus::format("{}={:.2R}", state.dataIPShortCut->cNumericFieldNames(8), NumArray(8))); + ShowContinueError(state, EnergyPlus::format("{}={:.2R}", state.dataIPShortCut->cNumericFieldNames(9), NumArray(9))); ErrorsFound = true; } state.dataMircoturbElectGen->MTGenerator(GeneratorNum).StandbyPower = NumArray(10); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).StandbyPower < 0.0) { - ShowWarningError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(10), NumArray(10))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(10))); + 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, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).StandbyPower = 0.0; } state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPower = NumArray(11); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPower < 0.0) { - ShowWarningError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(11), NumArray(11))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(11))); + 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, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPower = 0.0; } @@ -407,8 +424,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, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); + ShowContinueError(state, EnergyPlus::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 @@ -422,22 +439,23 @@ void GetMTGeneratorInput(EnergyPlusData &state) Real64 AncillaryPowerOutput = Curve::CurveValue(state, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPowerFuelCurveNum, RefFuelUseMdot); if (std::abs(AncillaryPowerOutput - 1.0) > 0.1) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); ShowContinueError(state, "... Curve output at reference conditions should equal 1 (+-10%)."); ShowContinueError(state, - format("... Reference Electrical Power Output = {:.2T} W", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput)); + EnergyPlus::format("... Reference Electrical Power Output = {:.2T} W", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput)); ShowContinueError(state, - format("... Reference Electrical Efficiency (LHV basis) = {:.4T}", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecEfficiencyLHV)); + EnergyPlus::format("... Reference Electrical Efficiency (LHV basis) = {:.4T}", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecEfficiencyLHV)); ShowContinueError(state, - format("... Fuel Lower Heating Value = {:.2T} kJ/kg", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelLowerHeatingValue)); - ShowContinueError(state, format("... Calculated fuel flow = {:.4T} kg/s", RefFuelUseMdot)); - ShowContinueError(state, format("... Curve output = {:.4T}", AncillaryPowerOutput)); + 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)); } } } @@ -482,8 +500,10 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecInletNodeNum == 0) || (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecOutletNodeNum == 0 && state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecInletNodeNum > 0)) { - ShowSevereError( - state, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -497,10 +517,11 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefThermalEffLHV = NumArray(12); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefThermalEffLHV < 0.0) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(12))); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(12))); ShowContinueError(state, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefThermalEffLHV = 0.0; } @@ -527,8 +548,8 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).PlantFlowControl = false; } if ((!(Util::SameString(AlphArray(9), "InternalControl"))) && (!(Util::SameString(AlphArray(9), "PlantControl")))) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), AlphArray(9))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), AlphArray(9))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ShowContinueError(state, "Operating Mode must be INTERNAL CONTROL or PLANT CONTROL."); ErrorsFound = true; } @@ -536,9 +557,9 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate = NumArray(14); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(14), NumArray(14))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(14))); + 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))); ErrorsFound = true; } @@ -566,17 +587,17 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ThermalEffTempElevOutput - 1.0) > 0.1) { ShowWarningError(state, - format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(11), AlphArray(11))); + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(11), AlphArray(11))); ShowContinueError(state, "... Curve output at reference conditions should equal 1 (+-10%)."); ShowContinueError(state, - format("... Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + EnergyPlus::format("... Reference combustion air inlet temperature = {:.4T} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); ShowContinueError(state, - format("... Reference elevation = {:.4T} m", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation)); + EnergyPlus::format("... Reference elevation = {:.4T} m", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation)); } } } @@ -593,12 +614,12 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(HeatRecRateFPLROutput - 1.0) > 0.1) { ShowWarningError(state, - format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(12), AlphArray(12))); + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(12), AlphArray(12))); ShowContinueError(state, "... Curve output at a part-load ratio of 1 should equal 1 (+-10%)."); - ShowContinueError(state, format("... Curve output = {:.4T}", HeatRecRateFPLROutput)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", HeatRecRateFPLROutput)); } } } @@ -616,15 +637,15 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(HeatRecRateFTempOutput - 1.0) > 0.1) { ShowWarningError(state, - format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(13), AlphArray(13))); + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(13), AlphArray(13))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - format("... Reference inlet water temperature temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefInletWaterTemp)); - ShowContinueError(state, format("... Curve output = {:.4T}", HeatRecRateFTempOutput)); + EnergyPlus::format("... Reference inlet water temperature temperature = {:.4T} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefInletWaterTemp)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", HeatRecRateFTempOutput)); } } } @@ -642,50 +663,55 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(HeatRecRateFFlowOutput - 1.0) > 0.1) { ShowWarningError(state, - format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(14), AlphArray(14))); + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(14), AlphArray(14))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - format("... Reference Heat Recovery Water Flow Rate = {:.4T} m3/s", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate)); - ShowContinueError(state, format("... Curve output = {:.4T}", HeatRecRateFFlowOutput)); + EnergyPlus::format("... Reference Heat Recovery Water Flow Rate = {:.4T} m3/s", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", HeatRecRateFFlowOutput)); } } } state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate = NumArray(15); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate < 0.0) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(15))); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(15))); ShowContinueError(state, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate = 0.0; } state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate = NumArray(16); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate < 0.0) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(16))); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(16))); ShowContinueError(state, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate = 0.0; } if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate < state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError( - state, format("{} must be >= {}", state.dataIPShortCut->cNumericFieldNames(16), state.dataIPShortCut->cNumericFieldNames(15))); + 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))); ShowContinueError(state, - format("Resetting {} = {} and the simulation continues.", - state.dataIPShortCut->cNumericFieldNames(16), - state.dataIPShortCut->cNumericFieldNames(15))); + EnergyPlus::format("Resetting {} = {} and the simulation continues.", + state.dataIPShortCut->cNumericFieldNames(16), + state.dataIPShortCut->cNumericFieldNames(15))); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate = state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate; } @@ -693,15 +719,18 @@ void GetMTGeneratorInput(EnergyPlusData &state) // Check if reference heat recovery water flow rate is below the minimum flow rate if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate < state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError( - state, format("{} must be >= {}", state.dataIPShortCut->cNumericFieldNames(14), state.dataIPShortCut->cNumericFieldNames(15))); + 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))); ShowContinueError(state, - format("Resetting {} = {} and the simulation continues.", - state.dataIPShortCut->cNumericFieldNames(14), - state.dataIPShortCut->cNumericFieldNames(15))); + EnergyPlus::format("Resetting {} = {} and the simulation continues.", + state.dataIPShortCut->cNumericFieldNames(14), + state.dataIPShortCut->cNumericFieldNames(15))); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate = state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate; } @@ -709,15 +738,18 @@ void GetMTGeneratorInput(EnergyPlusData &state) // Check if reference heat recovery water flow rate is above the maximum flow rate if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate > state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate) { - ShowWarningError( - state, - format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError( - state, format("{} must be <= {}", state.dataIPShortCut->cNumericFieldNames(14), state.dataIPShortCut->cNumericFieldNames(16))); + ShowWarningError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); ShowContinueError(state, - format("Resetting {} = {} and the simulation continues.", - state.dataIPShortCut->cNumericFieldNames(14), - state.dataIPShortCut->cNumericFieldNames(16))); + EnergyPlus::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))); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate = state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate; } @@ -747,9 +779,12 @@ 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, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} is not a valid Outdoor Air Node = {}", state.dataIPShortCut->cAlphaFieldNames(15), AlphArray(15))); + 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))); ShowContinueError(state, "it does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -769,12 +804,14 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).CombustionAirOutletNodeNum > 0 && state.dataMircoturbElectGen->MTGenerator(GeneratorNum).CombustionAirInletNodeNum == 0) { - ShowSevereError( - state, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowSevereError(state, + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); ShowContinueError(state, - format("A {} must be specified when a {} is specified.", - state.dataIPShortCut->cAlphaFieldNames(15), - state.dataIPShortCut->cAlphaFieldNames(16))); + EnergyPlus::format("A {} must be specified when a {} is specified.", + state.dataIPShortCut->cAlphaFieldNames(15), + state.dataIPShortCut->cAlphaFieldNames(16))); ErrorsFound = true; } @@ -786,9 +823,9 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefExhaustAirMassFlowRate = NumArray(18); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefExhaustAirMassFlowRate <= 0.0 && !state.dataIPShortCut->lNumericFieldBlanks(18)) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(18), NumArray(18))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(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))); ErrorsFound = true; } @@ -804,15 +841,15 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ExhFlowFTempOutput - 1.0) > 0.1) { ShowWarningError(state, - format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(17), AlphArray(17))); + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(17), AlphArray(17))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - format("... Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); - ShowContinueError(state, format("... Curve output = {:.4T}", ExhFlowFTempOutput)); + EnergyPlus::format("... Reference combustion air inlet temperature = {:.4T} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ExhFlowFTempOutput)); } } } @@ -829,12 +866,12 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ExhFlowFPLROutput - 1.0) > 0.1) { ShowWarningError(state, - format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(18), AlphArray(18))); + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(18), AlphArray(18))); ShowContinueError(state, "... Curve output at a part-load ratio of 1 should equal 1 (+-10%)."); - ShowContinueError(state, format("... Curve output = {:.4T}", ExhFlowFPLROutput)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ExhFlowFPLROutput)); } } } @@ -853,15 +890,15 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ExhAirTempFTempOutput - 1.0) > 0.1) { ShowWarningError(state, - format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(19), AlphArray(19))); + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(19), AlphArray(19))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - format("... Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); - ShowContinueError(state, format("... Curve output = {:.4T}", ExhAirTempFTempOutput)); + EnergyPlus::format("... Reference combustion air inlet temperature = {:.4T} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ExhAirTempFTempOutput)); } } } @@ -878,12 +915,12 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ExhOutAirTempFPLROutput - 1.0) > 0.1) { ShowWarningError(state, - format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(20), AlphArray(20))); + EnergyPlus::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(20), AlphArray(20))); ShowContinueError(state, "... Curve output at a part-load ratio of 1 should equal 1 (+-10%)."); - ShowContinueError(state, format("... Curve output = {:.4T}", ExhOutAirTempFPLROutput)); + ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ExhOutAirTempFPLROutput)); } } } @@ -893,7 +930,7 @@ void GetMTGeneratorInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -929,7 +966,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) // Fuel specific report variables SetupOutputVariable(state, - format("Generator {} HHV Basis Rate", sFuelType), + EnergyPlus::format("Generator {} HHV Basis Rate", sFuelType), Constant::Units::W, this->FuelEnergyUseRateHHV, OutputProcessor::TimeStepType::System, @@ -937,7 +974,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) this->Name); SetupOutputVariable(state, - format("Generator {} HHV Basis Energy", sFuelType), + EnergyPlus::format("Generator {} HHV Basis Energy", sFuelType), Constant::Units::J, this->FuelEnergyHHV, OutputProcessor::TimeStepType::System, @@ -948,7 +985,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) OutputProcessor::EndUseCat::Cogeneration); SetupOutputVariable(state, - format("Generator {} Mass Flow Rate", sFuelType), + EnergyPlus::format("Generator {} Mass Flow Rate", sFuelType), Constant::Units::kg_s, this->FuelMdot, OutputProcessor::TimeStepType::System, @@ -1303,12 +1340,14 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (PowerFTempElev < 0.0) { if (this->PowerFTempElevErrorIndex == 0) { // MTGenerator(GeneratorNum)%PowerFTempElevErrorCount = MTGenerator(GeneratorNum)%PowerFTempElevErrorCount + 1 - ShowWarningMessage(state, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::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, - format("... Electrical Power Modifier curve (function of temperature and elevation) output is less than zero ({:.4T}).", - PowerFTempElev)); - ShowContinueError(state, format("... Value occurs using a combustion inlet air temperature of {:.2T} C.", CombustionAirInletTemp)); - ShowContinueError(state, format("... and an elevation of {:.2T} m.", state.dataEnvrn->Elevation)); + 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)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1366,11 +1405,13 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (ElecEfficiencyFTemp < 0.0) { if (this->EffFTempErrorIndex == 0) { // MTGenerator(GeneratorNum)%EffFTempErrorCount = MTGenerator(GeneratorNum)%EffFTempErrorCount + 1 - ShowWarningMessage(state, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - format("... Electrical Efficiency Modifier (function of temperature) output is less than zero ({:.4T}).", ElecEfficiencyFTemp)); - ShowContinueError(state, format("... Value occurs using a combustion inlet air temperature of {:.2T} C.", CombustionAirInletTemp)); + 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)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1390,11 +1431,12 @@ 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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError(state, - format("... Electrical Efficiency Modifier (function of part-load ratio) output is less than zero ({:.4T}).", - ElecEfficiencyFPLR)); - ShowContinueError(state, format("... Value occurs using a part-load ratio of {:.3T}.", PLR)); + 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)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1432,11 +1474,12 @@ 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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError( - state, - format("... Ancillary Power Modifier (function of fuel input) output is less than zero ({:.4T}).", AnciPowerFMdotFuel)); - ShowContinueError(state, format("... Value occurs using a fuel input mass flow rate of {:.4T} kg/s.", this->FuelMdot)); + 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)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1465,11 +1508,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (AncPowerCalcIterIndex > MaxAncPowerIter) { if (this->AnciPowerIterErrorIndex == 0) { - ShowWarningMessage(state, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::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, format("... Ancillary Power = {:.1T} W.", ancillaryPowerRate)); - ShowContinueError(state, format("... Fuel input rate = {:.4T} kg/s.", AnciPowerFMdotFuel)); + ShowContinueError(state, EnergyPlus::format("... Ancillary Power = {:.1T} W.", ancillaryPowerRate)); + ShowContinueError(state, EnergyPlus::format("... Fuel input rate = {:.4T} kg/s.", AnciPowerFMdotFuel)); ShowContinueErrorTimeStamp(state, "... Simulation will continue."); } ShowRecurringWarningErrorAtEnd(state, @@ -1501,14 +1544,15 @@ 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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - format("... Electrical Power Modifier curve (function of temperature and elevation) output is less than zero ({:.4T}).", - PowerFTempElev)); - ShowContinueError(state, - format("... Value occurs using a combustion inlet air temperature of {:.2T} C.", CombustionAirInletTemp)); - ShowContinueError(state, format("... and an elevation of {:.2T} m.", state.dataEnvrn->Elevation)); + 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)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1532,11 +1576,12 @@ 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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - format("... Heat Recovery Rate Modifier (function of part-load ratio) output is less than zero ({:.4T}).", HeatRecRateFPLR)); - ShowContinueError(state, format("... Value occurs using a part-load ratio of {:.3T}.", PLR)); + 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)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1559,11 +1604,13 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, HeatRecRateFTemp = Curve::CurveValue(state, this->HeatRecRateFTempCurveNum, HeatRecInTemp); if (HeatRecRateFTemp < 0.0) { if (this->HeatRecRateFTempErrorIndex == 0) { - ShowWarningMessage(state, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError(state, - format("... Heat Recovery Rate Modifier (function of inlet water temp) output is less than zero ({:.4T}).", - HeatRecRateFTemp)); - ShowContinueError(state, format("... Value occurs using an inlet water temperature temperature of {:.2T} C.", HeatRecInTemp)); + 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)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1590,11 +1637,12 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, HeatRecRateFFlow = Curve::CurveValue(state, this->HeatRecRateFWaterFlowCurveNum, HeatRecVolFlowRate); if (HeatRecRateFFlow < 0.0) { if (this->HeatRecRateFFlowErrorIndex == 0) { - ShowWarningMessage(state, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - format("... Heat Recovery Rate Modifier (function of water flow rate) output is less than zero ({:.4T}).", HeatRecRateFFlow)); - ShowContinueError(state, format("... Value occurs using a water flow rate of {:.4T} m3/s.", HeatRecVolFlowRate)); + 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)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1652,11 +1700,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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningError(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError(state, - format("...Heat reclaim water flow rate is below the generators minimum mass flow rate of ({:.4T}).", - this->HeatRecMinMassFlowRate)); - ShowContinueError(state, format("...Heat reclaim water mass flow rate = {:.4T}.", heatRecMdot)); + 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)); ShowContinueErrorTimeStamp(state, "...Check inputs for heat recovery water flow rate."); } ShowRecurringWarningErrorAtEnd( @@ -1671,11 +1719,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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningError(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError(state, - format("...Heat reclaim water flow rate is above the generators maximum mass flow rate of ({:.4T}).", - this->HeatRecMaxMassFlowRate)); - ShowContinueError(state, format("...Heat reclaim water mass flow rate = {:.4T}.", heatRecMdot)); + 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)); ShowContinueErrorTimeStamp(state, "...Check inputs for heat recovery water flow rate."); } ShowRecurringWarningErrorAtEnd( @@ -1705,12 +1753,14 @@ 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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - format("...Exhaust Air Flow Rate Modifier (function of temperature) output is less than or equal to zero ({:.4T}).", - ExhFlowFTemp)); - ShowContinueError(state, format("...Value occurs using a combustion inlet air temperature of {:.2T}.", CombustionAirInletTemp)); + 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)); ShowContinueErrorTimeStamp(state, "...Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1733,12 +1783,13 @@ 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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - format("...Exhaust Air Flow Rate Modifier (function of part-load ratio) output is less than or equal to zero ({:.4T}).", - ExhFlowFPLR)); - ShowContinueError(state, format("...Value occurs using a part-load ratio of {:.2T}.", PLR)); + 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)); ShowContinueErrorTimeStamp(state, "...Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1775,12 +1826,14 @@ 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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - format("...Exhaust Air Temperature Modifier (function of temperature) output is less than or equal to zero ({:.4T}).", - ExhAirTempFTemp)); - ShowContinueError(state, format("...Value occurs using a combustion inlet air temperature of {:.2T}.", CombustionAirInletTemp)); + 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)); ShowContinueErrorTimeStamp(state, "...Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1803,12 +1856,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, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - format("...Exhaust Air Temperature Modifier (function of part-load ratio) output is less than or equal to zero ({:.4T}).", - ExhAirTempFPLR)); - ShowContinueError(state, format("...Value occurs using a part-load ratio of {:.2T}.", PLR)); + EnergyPlus::format( + "...Exhaust Air Temperature Modifier (function of part-load ratio) output is less than or equal to zero ({:.4T}).", + ExhAirTempFPLR)); + ShowContinueError(state, EnergyPlus::format("...Value occurs using a part-load ratio of {:.2T}.", PLR)); ShowContinueErrorTimeStamp(state, "...Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1855,11 +1909,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (this->ExhaustAirTemperature < CombustionAirInletTemp) { if (this->ExhTempLTInletTempIndex == 0) { - ShowWarningMessage(state, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::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, format("...Value of exhaust air temperature ={:.4T} C.", this->ExhaustAirTemperature)); - ShowContinueError(state, format("...Value of combustion air inlet temp ={:.4T} C.", CombustionAirInletTemp)); + 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)); ShowContinueErrorTimeStamp(state, "... Simulation will continue."); } ShowRecurringWarningErrorAtEnd(state, @@ -1872,11 +1926,13 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (this->ExhaustAirHumRat < CombustionAirInletW) { if (this->ExhHRLTInletHRIndex == 0) { - ShowWarningMessage(state, format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, EnergyPlus::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, format("...Value of exhaust air humidity ratio ={:.6T} kgWater/kgDryAir.", this->ExhaustAirHumRat)); - ShowContinueError(state, format("...Value of combustion air inlet humidity ratio ={:.6T} kgWater/kgDryAir.", CombustionAirInletW)); + 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)); ShowContinueErrorTimeStamp(state, "... Simulation will continue."); } ShowRecurringWarningErrorAtEnd(state, diff --git a/src/EnergyPlus/MixedAir.cc b/src/EnergyPlus/MixedAir.cc index 31e596d0585..c09466fd4d3 100644 --- a/src/EnergyPlus/MixedAir.cc +++ b/src/EnergyPlus/MixedAir.cc @@ -263,7 +263,7 @@ void ManageOutsideAirSystem(EnergyPlusData &state, std::string const &OASysName, if (OASysNum == 0) { OASysNum = Util::FindItemInList(OASysName, state.dataAirLoop->OutsideAirSys); if (OASysNum == 0) { - ShowFatalError(state, format("ManageOutsideAirSystem: AirLoopHVAC:OutdoorAirSystem not found={}", OASysName)); + ShowFatalError(state, EnergyPlus::format("ManageOutsideAirSystem: AirLoopHVAC:OutdoorAirSystem not found={}", OASysName)); } } @@ -361,9 +361,9 @@ void SimOutsideAirSys(EnergyPlusData &state, int const OASysNum, bool const Firs if (state.dataMixedAir->MyOneTimeErrorFlag(OASysNum)) { bool FatalErrorFlag(false); if (CurrentOASystem.NumControllers - CurrentOASystem.NumSimpleControllers > 1) { - ShowWarningError( - state, - format("AirLoopHVAC:OutdoorAirSystem {} has more than 1 outside air controller; only the 1st will be used", CurrentOASystem.Name)); + ShowWarningError(state, + EnergyPlus::format("AirLoopHVAC:OutdoorAirSystem {} has more than 1 outside air controller; only the 1st will be used", + CurrentOASystem.Name)); } for (int CompNum = 1; CompNum <= CurrentOASystem.NumComponents; ++CompNum) { auto &CompType = CurrentOASystem.ComponentType(CompNum); @@ -372,45 +372,48 @@ void SimOutsideAirSys(EnergyPlusData &state, int const OASysNum, bool const Firs int OAMixerNum = Util::FindItemInList(CompName, state.dataMixedAir->OAMixer); int OAControllerNum = CurrentOASystem.OAControllerIndex; if (state.dataMixedAir->OAController(OAControllerNum).MixNode != state.dataMixedAir->OAMixer(OAMixerNum).MixNode) { - ShowSevereError( - state, format("The mixed air node of Controller:OutdoorAir=\"{}\"", state.dataMixedAir->OAController(OAControllerNum).Name)); + ShowSevereError(state, + EnergyPlus::format("The mixed air node of Controller:OutdoorAir=\"{}\"", + state.dataMixedAir->OAController(OAControllerNum).Name)); ShowContinueError(state, - format("should be the same node as the mixed air node of OutdoorAir:Mixer=\"{}\".", - state.dataMixedAir->OAMixer(OAMixerNum).Name)); + EnergyPlus::format("should be the same node as the mixed air node of OutdoorAir:Mixer=\"{}\".", + state.dataMixedAir->OAMixer(OAMixerNum).Name)); ShowContinueError(state, - format("Controller:OutdoorAir mixed air node=\"{}\".", - state.dataLoopNodes->NodeID(state.dataMixedAir->OAController(OAControllerNum).MixNode))); + EnergyPlus::format("Controller:OutdoorAir mixed air node=\"{}\".", + state.dataLoopNodes->NodeID(state.dataMixedAir->OAController(OAControllerNum).MixNode))); ShowContinueError(state, - format("OutdoorAir:Mixer mixed air node=\"{}\".", - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OAMixerNum).MixNode))); + EnergyPlus::format("OutdoorAir:Mixer mixed air node=\"{}\".", + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OAMixerNum).MixNode))); FatalErrorFlag = true; } if (state.dataMixedAir->OAController(OAControllerNum).RelNode != state.dataMixedAir->OAMixer(OAMixerNum).RelNode) { - ShowSevereError( - state, format("The relief air node of Controller:OutdoorAir=\"{}\"", state.dataMixedAir->OAController(OAControllerNum).Name)); + ShowSevereError(state, + EnergyPlus::format("The relief air node of Controller:OutdoorAir=\"{}\"", + state.dataMixedAir->OAController(OAControllerNum).Name)); ShowContinueError(state, - format("should be the same node as the relief air node of OutdoorAir:Mixer=\"{}\".", - state.dataMixedAir->OAMixer(OAMixerNum).Name)); + EnergyPlus::format("should be the same node as the relief air node of OutdoorAir:Mixer=\"{}\".", + state.dataMixedAir->OAMixer(OAMixerNum).Name)); ShowContinueError(state, - format("Controller:OutdoorAir relief air node=\"{}\".", - state.dataLoopNodes->NodeID(state.dataMixedAir->OAController(OAControllerNum).RelNode))); + EnergyPlus::format("Controller:OutdoorAir relief air node=\"{}\".", + state.dataLoopNodes->NodeID(state.dataMixedAir->OAController(OAControllerNum).RelNode))); ShowContinueError(state, - format("OutdoorAir:Mixer relief air node=\"{}\".", - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OAMixerNum).RelNode))); + EnergyPlus::format("OutdoorAir:Mixer relief air node=\"{}\".", + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OAMixerNum).RelNode))); FatalErrorFlag = true; } if (state.dataMixedAir->OAController(OAControllerNum).RetNode != state.dataMixedAir->OAMixer(OAMixerNum).RetNode) { - ShowSevereError( - state, format("The return air node of Controller:OutdoorAir=\"{}\"", state.dataMixedAir->OAController(OAControllerNum).Name)); + ShowSevereError(state, + EnergyPlus::format("The return air node of Controller:OutdoorAir=\"{}\"", + state.dataMixedAir->OAController(OAControllerNum).Name)); ShowContinueError(state, - format("should be the same node as the return air node of OutdoorAir:Mixer=\"{}\".", - state.dataMixedAir->OAMixer(OAMixerNum).Name)); + EnergyPlus::format("should be the same node as the return air node of OutdoorAir:Mixer=\"{}\".", + state.dataMixedAir->OAMixer(OAMixerNum).Name)); ShowContinueError(state, - format("Controller:OutdoorAir return air node=\"{}\".", - state.dataLoopNodes->NodeID(state.dataMixedAir->OAController(OAControllerNum).RetNode))); + EnergyPlus::format("Controller:OutdoorAir return air node=\"{}\".", + state.dataLoopNodes->NodeID(state.dataMixedAir->OAController(OAControllerNum).RetNode))); ShowContinueError(state, - format("OutdoorAir:Mixer return air node=\"{}\".", - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OAMixerNum).RetNode))); + EnergyPlus::format("OutdoorAir:Mixer return air node=\"{}\".", + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OAMixerNum).RetNode))); FatalErrorFlag = true; } } @@ -731,7 +734,7 @@ void SimOAComponent(EnergyPlusData &state, } } break; default: - ShowFatalError(state, format("Invalid Outside Air Component={}", CompType)); + ShowFatalError(state, EnergyPlus::format("Invalid Outside Air Component={}", CompType)); } } @@ -757,7 +760,7 @@ void SimOAMixer(EnergyPlusData &state, std::string const &CompName, int &CompInd OAMixerNum = Util::FindItemInList(CompName, state.dataMixedAir->OAMixer); CompIndex = OAMixerNum; if (OAMixerNum == 0) { - ShowFatalError(state, format("SimOAMixer: OutdoorAir:Mixer not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimOAMixer: OutdoorAir:Mixer not found={}", CompName)); } } else { OAMixerNum = CompIndex; @@ -821,7 +824,7 @@ void SimOAController(EnergyPlusData &state, std::string const &CtrlName, int &Ct if (!sensLoadCtrlUnitarySystemFound) { ShowWarningError( state, - format( + EnergyPlus::format( "SimOAController: EconomizerFirst was selected in the \"{}\" Controller:OutdoorAir object but the air loop it belongs to " "does not include an AirLoopHVAC:UnitarySystem with a \"Load\" Control Type input and cooling coil of one of the " "following types: Coil:Cooling:DX:MultiSpeed," @@ -841,7 +844,7 @@ void SimOAController(EnergyPlusData &state, std::string const &CtrlName, int &Ct } CtrlIndex = OAControllerNum; if (OAControllerNum == 0) { - ShowFatalError(state, format("SimOAController: Outside Air Controller not found={}", CtrlName)); + ShowFatalError(state, EnergyPlus::format("SimOAController: Outside Air Controller not found={}", CtrlName)); } } else { OAControllerNum = CtrlIndex; @@ -947,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, format("Controller instance repeated in multiple {} objects", CurrentModuleObject)); - ShowContinueError(state, format("Found in {} = {}", CurrentModuleObject, thisControllerList.Name)); - ShowContinueError(state, format("Also found in {} = {}", CurrentModuleObject, previousList.Name)); + 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)); ErrorsFound = true; } } @@ -1024,11 +1027,13 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) } else { ShowSevereError( state, - format("{} = \"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, OASys.Name, cAlphaFields(3), OASys.ComponentListName)); + EnergyPlus::format( + "{} = \"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, OASys.Name, cAlphaFields(3), OASys.ComponentListName)); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = \"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, OASys.Name, cAlphaFields(3))); + ShowSevereError( + state, EnergyPlus::format("{} = \"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, OASys.Name, cAlphaFields(3))); ErrorsFound = true; } @@ -1057,8 +1062,9 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) } } } else { - ShowSevereError(state, - format("{} = \"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); + ShowSevereError( + state, + EnergyPlus::format("{} = \"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); ErrorsFound = true; } } @@ -1091,7 +1097,8 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) } else { ShowSevereError( state, - format("{} = \"{}\" invalid Outside Air Component=\"{}\".", CurrentModuleObject, AlphArray(1), OASys.ComponentType(CompNum))); + EnergyPlus::format( + "{} = \"{}\" invalid Outside Air Component=\"{}\".", CurrentModuleObject, AlphArray(1), OASys.ComponentType(CompNum))); ErrorsFound = true; } } @@ -1108,7 +1115,7 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting {}.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {}.", RoutineName, CurrentModuleObject)); } AlphArray.deallocate(); @@ -1272,7 +1279,7 @@ void GetOAControllerInputs(EnergyPlusData &state) lAlphaBlanks.deallocate(); cAlphaFields.deallocate(); cNumericFields.deallocate(); - ShowFatalError(state, format("{}Errors found in getting {} inputs.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {} inputs.", RoutineName, CurrentModuleObject)); } } @@ -1321,8 +1328,9 @@ void GetOAControllerInputs(EnergyPlusData &state) } else if (Util::SameString(AlphArray(3), "No") || lAlphaBlanks(3)) { thisVentilationMechanical.DCVFlag = false; } else { - ShowSevereError(state, - format("{}=\"{}\" invalid value {}=\"{}\".", CurrentModuleObject, AlphArray(1), cAlphaFields(3), AlphArray(3))); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\" invalid value {}=\"{}\".", CurrentModuleObject, AlphArray(1), cAlphaFields(3), AlphArray(3))); ShowContinueError(state, "...Valid values are \"Yes\" or \"No\"."); ErrorsFound = true; } @@ -1338,7 +1346,7 @@ void GetOAControllerInputs(EnergyPlusData &state) if (!state.dataContaminantBalance->Contaminant.CO2Simulation) { ShowSevereError( state, - format( + EnergyPlus::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; @@ -1349,11 +1357,11 @@ void GetOAControllerInputs(EnergyPlusData &state) thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::IAQPCOM) { if (!state.dataContaminantBalance->Contaminant.GenericContamSimulation) { ShowSevereError(state, - format("{}=\"{}\" valid {}=\"{}\" requires generic contaminant simulation.", - CurrentModuleObject, - AlphArray(1), - cAlphaFields(2), - AlphArray(2))); + EnergyPlus::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; } @@ -1362,10 +1370,10 @@ void GetOAControllerInputs(EnergyPlusData &state) if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::Invalid) { // If specified incorrectly, show errors thisVentilationMechanical.SystemOAMethod = DataSizing::SysOAMethod::ZoneSum; ShowWarningError(state, - format("{}=\"{}\" incorrect specification for {}, the ZoneSum method will be used.", - CurrentModuleObject, - AlphArray(1), - cAlphaFields(4))); + EnergyPlus::format("{}=\"{}\" incorrect specification for {}, the ZoneSum method will be used.", + CurrentModuleObject, + AlphArray(1), + cAlphaFields(4))); // ErrorsFound=.TRUE. } @@ -1390,15 +1398,18 @@ void GetOAControllerInputs(EnergyPlusData &state) int ObjIndex = Util::FindItemInList(designSpecOAObjName, state.dataSize->OARequirements); designSpecOAObjIndex(groupNum) = ObjIndex; if (ObjIndex == 0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, format("... not found {}=\"{}\".", cAlphaFields((groupNum - 1) * 3 + 6), designSpecOAObjName)); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, + EnergyPlus::format("... not found {}=\"{}\".", cAlphaFields((groupNum - 1) * 3 + 6), designSpecOAObjName)); ErrorsFound = true; } } else { - ShowSevereError( - state, - format("{}=\"{}\", Design Specification Outdoor Air Object Name blank", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, format("For Zone=\"{}\".", ventMechZoneOrListName(groupNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", Design Specification Outdoor Air Object Name blank", + CurrentModuleObject, + thisVentilationMechanical.Name)); + ShowContinueError(state, EnergyPlus::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."); } @@ -1410,8 +1421,10 @@ void GetOAControllerInputs(EnergyPlusData &state) designSpecZoneADObjIndex(groupNum) = ObjIndex; if (ObjIndex == 0) { // Cannot find the design specification Zone Air Distribution object - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, format("... not found {}=\"{}\".", cAlphaFields((groupNum - 1) * 3 + 7), designSpecZoneADObjName)); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError( + state, EnergyPlus::format("... not found {}=\"{}\".", cAlphaFields((groupNum - 1) * 3 + 7), designSpecZoneADObjName)); ErrorsFound = true; } } @@ -1426,8 +1439,10 @@ void GetOAControllerInputs(EnergyPlusData &state) } else { ShowWarningError( state, - format("{}=\"{}\" invalid {} not found.", CurrentModuleObject, AlphArray(1), cAlphaFields((groupNum - 1) * 3 + 5))); - ShowContinueError(state, format("Missing {} = {}", cAlphaFields((groupNum - 1) * 3 + 5), ventMechZoneOrListName(groupNum))); + 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))); ErrorsFound = true; } } @@ -1449,10 +1464,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, - format("Zone name = {} for {} object = {}", - ventMechZoneOrListName(groupNum), - CurrentModuleObject, - thisVentilationMechanical.Name)); + EnergyPlus::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 { @@ -1500,11 +1515,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, - format("Zone name = {} in ZoneList = {} for {} object = {}", - state.dataHeatBal->Zone(zoneNum2).Name, - ventMechZoneOrListName(groupNum), - CurrentModuleObject, - thisVentilationMechanical.Name)); + EnergyPlus::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 { @@ -1556,9 +1571,10 @@ void GetOAControllerInputs(EnergyPlusData &state) if (thisVentMechZone.ZoneDesignSpecOAObjIndex == 0) { // use defaults thisVentMechZone.ZoneDesignSpecOAObjIndex = DataSizing::getDefaultOAReq(state); - ShowWarningError(state, format("{}{}=\"{}", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); ShowContinueError( - state, format("Cannot locate a matching DesignSpecification:OutdoorAir object for Zone=\"{}\".", thisVentMechZone.name)); + state, + EnergyPlus::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); @@ -1573,11 +1589,11 @@ void GetOAControllerInputs(EnergyPlusData &state) thisVentMechZone.zoneOASched = curOARequirements.getZoneFlowFracSched(state, notAllSame); if (notAllSame) { ShowWarningError(state, - format("{}{}=\"{}\", mixed schedules found for Zone={}.", - RoutineName, - CurrentModuleObject, - thisVentilationMechanical.Name, - thisVentMechZone.name)); + EnergyPlus::format("{}{}=\"{}\", mixed schedules found for Zone={}.", + RoutineName, + CurrentModuleObject, + thisVentilationMechanical.Name, + thisVentMechZone.name)); } } if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlSchOcc || @@ -1587,17 +1603,18 @@ void GetOAControllerInputs(EnergyPlusData &state) thisVentMechZone.zonePropCtlMinRateSched = curOARequirements.getZonePropCtlMinRateSched(state, notAllSame); if (notAllSame) { ShowWarningError(state, - format("{}{}=\"{}\", mixed schedules found for Zone={}.", - RoutineName, - CurrentModuleObject, - thisVentilationMechanical.Name, - thisVentMechZone.name)); + EnergyPlus::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, - format("{}{}=\"{}\", invalid input with System Outdoor Air Method = ProportionalControlBasedOnDesignOARate.", + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\", invalid input with System Outdoor Air Method = ProportionalControlBasedOnDesignOARate.", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); @@ -1609,11 +1626,13 @@ void GetOAControllerInputs(EnergyPlusData &state) } if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlSchOcc) { if (curOARequirements.desFlowPerACH(state) > 0.0 || curOARequirements.desFlowPerZone(state) > 0.0) { - ShowWarningError(state, - format("{}=\"{}\", inappropriate outdoor air method", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError( - state, format("Inappropriate method for Design Specification Outdoor Air Object Name=\"{}\".", curOARequirements.Name)); - ShowContinueError(state, format("For Zone=\"{}\".", thisVentMechZone.name)); + ShowWarningError( + 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)); ShowContinueError(state, "Since System Outdoor Air Method= ProportionalControlBasedOnOccupancySchedule\", AirChanges/Hour or " "Flow/Zone outdoor air methods are not valid. Simulation continues.... "); @@ -1621,11 +1640,13 @@ void GetOAControllerInputs(EnergyPlusData &state) } if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlDesOcc) { if (curOARequirements.desFlowPerACH(state) > 0.0 || curOARequirements.desFlowPerZone(state) > 0.0) { - ShowWarningError(state, - format("{}=\"{}\", inappropriate outdoor air method", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError( - state, format("Inappropriate method for Design Specification Outdoor Air Object Name=\"{}\".", curOARequirements.Name)); - ShowContinueError(state, format("For Zone=\"{}\".", thisVentMechZone.name)); + ShowWarningError( + 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)); ShowContinueError(state, "Since System Outdoor Air Method= ProportionalControlBasedOnDesignOccupancy\", AirChanges/Hour or " "Flow/Zone outdoor air methods are not valid. Simulation continues.... "); @@ -1642,10 +1663,10 @@ void GetOAControllerInputs(EnergyPlusData &state) thisVentMechZone.ZoneADEffCooling = 1.0; thisVentMechZone.ZoneADEffHeating = 1.0; thisVentMechZone.ZoneSecondaryRecirculation = 0.0; - ShowWarningError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError( - state, - format("Cannot locate a matching DesignSpecification:ZoneAirDistribution object for Zone=\"{}\".", thisVentMechZone.name)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, + EnergyPlus::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."); } @@ -1683,16 +1704,18 @@ void GetOAControllerInputs(EnergyPlusData &state) DataDefineEquip::ZnAirLoopEquipType::SingleDuctConstVolFourPipeBeam) || (state.dataDefineEquipment->AirDistUnit(ADUNum).EquipTypeEnum(EquipNum) == DataDefineEquip::ZnAirLoopEquipType::DualDuctVAVOutdoorAir)) { - ShowWarningError(state, - format("{}=\"{}\", inappropriate use of Zone secondary recirculation", - CurrentModuleObject, - thisVentilationMechanical.Name)); + ShowWarningError( + state, + EnergyPlus::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, - format("...terminal unit \"{}\" , that indicates a single path system", - state.dataDefineEquipment->AirDistUnit(ADUNum).Name)); - ShowContinueError(state, format("For Zone=\"{}\".", thisVentMechZone.name)); + 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, "...The zone secondary recirculation for that zone was set to 0.0"); thisVentMechZone.ZoneSecondaryRecirculation = 0.0; } @@ -1708,29 +1731,33 @@ void GetOAControllerInputs(EnergyPlusData &state) } } if (zoneOAPeopleRate <= 0.0 && thisVentilationMechanical.DCVFlag) { - ShowWarningError(state, format("{}=\"{}\", Zone OA/person rate", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, format("For Zone=\"{}\".", thisVentMechZone.name)); - ShowContinueError(state, - format("Zone outside air per person rate not set in Design Specification Outdoor Air Object=\"{}\".", - state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); + 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)); } if (zoneOAAreaRate < 0.0) { - ShowSevereError(state, - format("{}=\"{}\", invalid Outdoor Air flow per area", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, format("For Zone=\"{}\".", thisVentMechZone.name)); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", invalid Outdoor Air flow per area", CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", thisVentMechZone.name)); ShowContinueError(state, - format("invalid Outdoor Air flow per area specified in object=\"{}\". Value must be >= 0.0.", - state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); + EnergyPlus::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, - format("{}=\"{}\", invalid Outdoor Air flow per person", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, format("For Zone=\"{}\".", thisVentMechZone.name)); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", invalid Outdoor Air flow per person", CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", thisVentMechZone.name)); ShowContinueError(state, - format("invalid Outdoor Air flow per person specified in object \"{}\". Value must be >= 0.0.", - state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); + EnergyPlus::format("invalid Outdoor Air flow per person specified in object \"{}\". Value must be >= 0.0.", + state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); ErrorsFound = true; } } @@ -1743,15 +1770,16 @@ void GetOAControllerInputs(EnergyPlusData &state) if (state.dataMixedAir->OAController(OAControllerNum).VentMechObjectNum == 0 && !state.dataMixedAir->OAController(OAControllerNum).VentilationMechanicalName.empty()) { ShowSevereError(state, - format("{}=\"{}\", non-match to Controller:OutdoorAir", - CurrentModuleObject, - state.dataMixedAir->OAController(OAControllerNum).VentilationMechanicalName)); - ShowContinueError( - state, format("Invalid specified in Controller:OutdoorAir object = {}", state.dataMixedAir->OAController(OAControllerNum).Name)); + 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)); ShowContinueError(state, - format("{} object name must match the {} object name specified in Controller:OutdoorAir.", - CurrentModuleObject, - CurrentModuleObject)); + EnergyPlus::format("{} object name must match the {} object name specified in Controller:OutdoorAir.", + CurrentModuleObject, + CurrentModuleObject)); ErrorsFound = true; } } @@ -1768,7 +1796,7 @@ void GetOAControllerInputs(EnergyPlusData &state) ventMech.Name, (ventMech.availSched != nullptr) ? ventMech.availSched->Name : ""); - print(state.files.eio, format("{},", yesNoNames[(int)ventMech.DCVFlag])); + print(state.files.eio, EnergyPlus::format("{},", yesNoNames[(int)ventMech.DCVFlag])); if (ventMech.SystemOAMethod != DataSizing::SysOAMethod::Invalid) { print(state.files.eio, printSysOAMethod[(int)ventMech.SystemOAMethod]); @@ -1802,7 +1830,7 @@ void GetOAControllerInputs(EnergyPlusData &state) cNumericFields.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found when getting {} inputs.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found when getting {} inputs.", RoutineName, CurrentModuleObject)); } } @@ -1932,61 +1960,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, - format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(3), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).InletNode), - cAlphaFields(2))); + EnergyPlus::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, - format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(4), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RelNode), - cAlphaFields(2))); + EnergyPlus::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, - format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(5), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), - cAlphaFields(2))); + EnergyPlus::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, - format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(4), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RelNode), - cAlphaFields(3))); + EnergyPlus::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, - format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(5), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), - cAlphaFields(3))); + EnergyPlus::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, - format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(5), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), - cAlphaFields(4))); + EnergyPlus::format("{} = {} {} = {} duplicates the {}.", + CurrentModuleObject, + state.dataMixedAir->OAMixer(OutAirNum).Name, + cAlphaFields(5), + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), + cAlphaFields(4))); ErrorsFound = true; } BranchNodeConnections::TestCompSet( @@ -1995,7 +2023,7 @@ void GetOAMixerInputs(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting {}", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {}", RoutineName, CurrentModuleObject)); } state.dataMixedAir->GetOAMixerInputFlag = false; @@ -2058,8 +2086,9 @@ void ProcessOAControllerInputs(EnergyPlusData &state, NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, state.dataMixedAir->OAController(OutAirNum).OANode)) { - ShowWarningError(state, - format("{}=\"{}\": {}=\"{}\" is not an OutdoorAir:Node.", CurrentModuleObject, AlphArray(1), cAlphaFields(5), AlphArray(5))); + ShowWarningError( + state, + EnergyPlus::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")) { @@ -2079,7 +2108,8 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(6), "ElectronicEnthalpy")) { state.dataMixedAir->OAController(OutAirNum).Econo = EconoOp::ElectronicEnthalpy; } else { - ShowSevereError(state, format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(6), AlphArray(6))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(6), AlphArray(6))); ErrorsFound = true; } // Bypass choice - Added by Amit for new feature implementation @@ -2088,7 +2118,8 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(7), "MinimumFlowWithBypass")) { state.dataMixedAir->OAController(OutAirNum).EconBypass = true; } else { - ShowSevereError(state, format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(7), AlphArray(7))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(7), AlphArray(7))); ErrorsFound = true; } @@ -2099,7 +2130,8 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(9), "LockoutWithCompressor")) { state.dataMixedAir->OAController(OutAirNum).Lockout = LockoutType::LockoutWithCompressorPossible; } else { - ShowSevereError(state, format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(9), AlphArray(9))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(9), AlphArray(9))); ErrorsFound = true; } if (Util::SameString(AlphArray(10), "FixedMinimum")) { @@ -2133,8 +2165,9 @@ 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, - format("{}=\"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(8), AlphArray(8))); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(8), AlphArray(8))); ErrorsFound = true; } else { // Verify Curve Object, only legal types are Quadratic and Cubic @@ -2260,38 +2293,43 @@ void ProcessOAControllerInputs(EnergyPlusData &state, if (OASysIndex == 0) { ShowSevereError( state, - format("Did not find an AirLoopHVAC:OutdoorAirSystem for {} = \"{}\"", - MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], - state.dataMixedAir->OAController(OutAirNum).Name)); + EnergyPlus::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, - format("Did not find Air Node (Zone with Humidistat), {} = \"{}\"", + 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, format("Specified {} = {}", cAlphaFields(17), AlphArray(17))); + ShowContinueError(state, EnergyPlus::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, - format("Did not find correct Primary Air Loop for {} = \"{}\"", + 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, format("{} = {} is not served by this Primary Air Loop equipment.", cAlphaFields(17), AlphArray(17))); + ShowContinueError(state, + EnergyPlus::format("{} = {} is not served by this Primary Air Loop equipment.", cAlphaFields(17), AlphArray(17))); ErrorsFound = true; } } else { - ShowSevereError(state, - format("Did not find Air Node (Zone with Humidistat), {} = \"{}\"", + 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, format("Specified {} = {}", cAlphaFields(17), AlphArray(17))); + ShowContinueError(state, EnergyPlus::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; @@ -2299,9 +2337,9 @@ void ProcessOAControllerInputs(EnergyPlusData &state, state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio = NumArray(7); if (state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio <= 0.0 && NumNums > 6) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, format(" {} must be greater than 0.", cNumericFields(7))); - ShowContinueError(state, format(" {} is reset to 1 and the simulation continues.", cNumericFields(7))); + 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))); state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio = 1.0; } @@ -2309,19 +2347,23 @@ 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, format("{} \"{}\"", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); + ShowWarningError(state, EnergyPlus::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, - format("... The {} is less than the ratio of the outside air controllers minimum to maximum outside air flow rate.", - cNumericFields(7))); + EnergyPlus::format( + "... The {} is less than the ratio of the outside air controllers minimum to maximum outside air flow rate.", + cNumericFields(7))); ShowContinueError( - state, format("... Controller {} = {:.4T} m3/s.", cNumericFields(1), state.dataMixedAir->OAController(OutAirNum).MinOA)); + state, + EnergyPlus::format("... Controller {} = {:.4T} m3/s.", cNumericFields(1), state.dataMixedAir->OAController(OutAirNum).MinOA)); ShowContinueError( - state, format("... Controller {} = {:.4T} m3/s.", cNumericFields(2), state.dataMixedAir->OAController(OutAirNum).MaxOA)); - ShowContinueError(state, format("... Controller minimum to maximum flow ratio = {:.4T}.", OAFlowRatio)); - ShowContinueError(state, - format("... {} = {:.4T}.", cNumericFields(7), state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio)); + 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)); + ShowContinueError( + state, + EnergyPlus::format("... {} = {:.4T}.", cNumericFields(7), state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio)); } } } @@ -2332,9 +2374,10 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(18), "No")) { state.dataMixedAir->OAController(OutAirNum).ModifyDuringHighOAMoisture = true; } else { - ShowSevereError(state, - format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); + 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))); ErrorsFound = true; } } else { @@ -2342,30 +2385,34 @@ void ProcessOAControllerInputs(EnergyPlusData &state, state.dataMixedAir->OAController(OutAirNum).ModifyDuringHighOAMoisture = true; } else { state.dataMixedAir->OAController(OutAirNum).ModifyDuringHighOAMoisture = false; - ShowWarningError(state, - format("{} \"{}\", missing field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, format("...{} will default to Yes when {}= \"Yes\"", cAlphaFields(18), cAlphaFields(16))); + 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))); } } } 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, - format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); + 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))); ErrorsFound = true; } } } else { // Invalid field 16 - ShowSevereError(state, format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(16), AlphArray(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))); ErrorsFound = true; if (NumAlphas >= 18) { if (!Util::SameString(AlphArray(18), "Yes") && !Util::SameString(AlphArray(18), "No")) { - ShowSevereError(state, - format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); + 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))); ErrorsFound = true; } } @@ -2378,7 +2425,8 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(19), "BypassWhenOAFlowGreaterThanMinimum")) { state.dataMixedAir->OAController(OutAirNum).HeatRecoveryBypassControlType = HVAC::BypassWhenOAFlowGreaterThanMinimum; } else { - ShowWarningError(state, format("{}=\"{}\" invalid {}=\"{}\".", CurrentModuleObject, AlphArray(1), cAlphaFields(19), AlphArray(19))); + ShowWarningError( + state, EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", CurrentModuleObject, AlphArray(1), cAlphaFields(19), AlphArray(19))); ShowContinueError(state, "...assuming \"BypassWhenWithinEconomizerLimits\" and the simulation continues."); state.dataMixedAir->OAController(OutAirNum).HeatRecoveryBypassControlType = HVAC::BypassWhenWithinEconomizerLimits; } @@ -2397,10 +2445,10 @@ void ProcessOAControllerInputs(EnergyPlusData &state, if (Util::SameString(AlphArray(16), "Yes") && state.dataMixedAir->OAController(OutAirNum).Econo == EconoOp::NoEconomizer) { ShowWarningError(state, - format("{} \"{}\"", - MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], - state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, format("...Economizer operation must be enabled when {} is set to YES.", cAlphaFields(16))); + 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))); ShowContinueError(state, "...The high humidity control option will be disabled and the simulation continues."); } @@ -2476,7 +2524,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } } if (thisOASys == 0) { - ShowSevereError(state, format("InitOAController: Did not find OAController=\"{}\".", thisOAController.Name)); + ShowSevereError(state, EnergyPlus::format("InitOAController: Did not find OAController=\"{}\".", thisOAController.Name)); ShowContinueError(state, "in list of valid OA Controllers."); ErrorsFound = true; } @@ -2489,7 +2537,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (thisMixerIndex != 0) { thisOAController.InletNode = state.dataMixedAir->OAMixer(thisMixerIndex).InletNode; } else { - ShowSevereError(state, format("InitOAController: Did not find OAMixer=\"{}\".", equipName)); + ShowSevereError(state, EnergyPlus::format("InitOAController: Did not find OAMixer=\"{}\".", equipName)); ShowContinueError(state, "in list of valid OA Mixers."); ErrorsFound = true; } @@ -2500,9 +2548,9 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } if (thisOAController.InletNode == 0) { // throw an error - ShowSevereError( - state, - format("InitOAController: Failed to find proper inlet node for OutdoorAir:Mixer and Controller = {}", thisOAController.Name)); + ShowSevereError(state, + EnergyPlus::format("InitOAController: Failed to find proper inlet node for OutdoorAir:Mixer and Controller = {}", + thisOAController.Name)); ErrorsFound = true; } } break; @@ -2513,8 +2561,8 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } break; default: { ShowSevereError(state, - format("InitOAController: Failed to find ControllerType: {}", - MixedAirControllerTypeNames[static_cast(thisOAController.ControllerType)])); + EnergyPlus::format("InitOAController: Failed to find ControllerType: {}", + MixedAirControllerTypeNames[static_cast(thisOAController.ControllerType)])); ErrorsFound = true; } break; } @@ -2530,8 +2578,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 == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, format("MixedAir: Missing temperature setpoint for economizer controller {}", thisOAController.Name)); - ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); + 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))); ShowContinueError( state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the mixed air node."); state.dataHVACGlobal->SetPointErrorFlag = true; @@ -2540,9 +2589,11 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con EMSManager::CheckIfNodeSetPointManagedByEMS( state, MixedAirNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { - ShowSevereError(state, - format("MixedAir: Missing temperature setpoint for economizer controller {}", thisOAController.Name)); - ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); + 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))); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the " "mixed air node."); @@ -2576,11 +2627,11 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } } if ((thisOAController.MaxOA - thisOAController.MinOA) < -HVAC::SmallAirVolFlow) { - ShowSevereError(state, format("For Controller:OutdoorAir: {}", thisOAController.Name)); + ShowSevereError(state, EnergyPlus::format("For Controller:OutdoorAir: {}", thisOAController.Name)); ShowContinueError(state, - format(" maximum outdoor air flow rate ({:.4R}) < minimum outdoor air flow rate ({:.4R})", - thisOAController.MaxOA, - thisOAController.MinOA)); + EnergyPlus::format(" maximum outdoor air flow rate ({:.4R}) < minimum outdoor air flow rate ({:.4R})", + thisOAController.MaxOA, + thisOAController.MinOA)); ShowContinueError(state, " To set the minimum outside air flow rate use the \"Design (minimum) outdoor air flow rate\" field in the " "Sizing:System object"); @@ -2590,30 +2641,34 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (AirLoopNum > 0) { Real64 DesSupplyVolFlowRate = state.dataAirLoop->AirLoopFlow(AirLoopNum).DesSupply / state.dataEnvrn->StdRhoAir; if ((thisOAController.MinOA - DesSupplyVolFlowRate) > 0.0001) { - ShowWarningError(state, - 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, - format("...Minimum Outdoor Air Flow Rate={:.6R} will be reset to loop Design Supply Air Flow Rate={:.6R}", - thisOAController.MinOA, - DesSupplyVolFlowRate)); + 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)); + ShowContinueError( + state, + EnergyPlus::format("...Minimum Outdoor Air Flow Rate={:.6R} will be reset to loop Design Supply Air Flow Rate={:.6R}", + thisOAController.MinOA, + DesSupplyVolFlowRate)); thisOAController.MinOA = DesSupplyVolFlowRate; } else if ((thisOAController.MinOA - DesSupplyVolFlowRate) > 0.0) { // If difference is tiny, reset silently thisOAController.MinOA = DesSupplyVolFlowRate; } if ((thisOAController.MaxOA - DesSupplyVolFlowRate) > 0.0001) { - ShowWarningError(state, - 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, - format("...Maximum Outdoor Air Flow Rate={:.6R} will be reset to loop Design Supply Air Flow Rate={:.6R}", - thisOAController.MaxOA, - DesSupplyVolFlowRate)); + 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)); + ShowContinueError( + state, + EnergyPlus::format("...Maximum Outdoor Air Flow Rate={:.6R} will be reset to loop Design Supply Air Flow Rate={:.6R}", + thisOAController.MaxOA, + DesSupplyVolFlowRate)); thisOAController.MaxOA = DesSupplyVolFlowRate; } else if ((thisOAController.MaxOA - DesSupplyVolFlowRate) > 0.0) { // If difference is tiny, reset silently @@ -2734,12 +2789,13 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } } if (!FoundZone) { - ShowWarningError(state, - 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, + 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)); ShowContinueError(state, "This zone will not be used and the simulation will continue..."); } } @@ -2793,7 +2849,8 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con writeDSOAToPredefined(dsoa, zoneName); } else { for (int n = 0; n < dsoa.numDSOA; ++n) { - writeDSOAToPredefined(state.dataSize->OARequirements(dsoa.dsoaIndexes[n]), format("{}:{}", zoneName, dsoa.dsoaSpaceNames[n])); + writeDSOAToPredefined(state.dataSize->OARequirements(dsoa.dsoaIndexes[n]), + EnergyPlus::format("{}:{}", zoneName, dsoa.dsoaSpaceNames[n])); } } } @@ -2829,13 +2886,14 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } if (!FoundAreaZone) { ShowWarningError(state, - format("Zone name = {} is not accounted for by {} object name = {}", - state.dataHeatBal->Zone(NumZone).Name, - CurrentModuleObjects[static_cast(CMO::MechVentilation)], - thisOAController.VentilationMechanicalName)); + EnergyPlus::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, format("the air loop served by Controller:OutdoorAir = {}. Simulation will continue...", thisOAController.Name)); + state, + EnergyPlus::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 @@ -2843,18 +2901,18 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (state.dataHeatBal->People(PeopleNum).ZonePtr == NumZone) { if (!FoundAreaZone) { ShowWarningError(state, - format("PEOPLE object for zone = {} is not accounted for by {} object name = {}", - state.dataHeatBal->Zone(NumZone).Name, - CurrentModuleObjects[static_cast(CMO::MechVentilation)], - thisOAController.VentilationMechanicalName)); + 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)); ShowContinueError( state, - format( + EnergyPlus::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, - format("Check {} object. Simulation will continue.", - CurrentModuleObjects[static_cast(CMO::MechVentilation)])); + EnergyPlus::format("Check {} object. Simulation will continue.", + CurrentModuleObjects[static_cast(CMO::MechVentilation)])); } } } @@ -2869,10 +2927,10 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } if (!FoundAreaZone) { ShowWarningError(state, - format("{} = \"{}\", Zone=\"{}\".", - CurrentModuleObjects[static_cast(CMO::MechVentilation)], - thisOAController.VentilationMechanicalName, - state.dataHeatBal->Zone(NumZone).Name)); + EnergyPlus::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."); @@ -2926,7 +2984,8 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con bool AirLoopFound = false; if (thisOASys <= 0) { // Check outside air system name - ShowWarningError(state, format("Cannot find the AirLoopHVAC:OutdoorAirSystem for the OA Controller: {}", loopOAController.Name)); + ShowWarningError( + state, EnergyPlus::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) { @@ -2957,7 +3016,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, format("Cannot find the primary air loop for the OA Controller: {}", loopOAController.Name)); + ShowWarningError(state, EnergyPlus::format("Cannot find the primary air loop for the OA Controller: {}", loopOAController.Name)); airloopName = "AirLoop not found"; } @@ -3274,7 +3333,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } if (ErrorsFound) { - ShowFatalError(state, format("Error in {}; program terminated", CurrentModuleObjects[static_cast(CMO::OAController)])); + ShowFatalError(state, EnergyPlus::format("Error in {}; program terminated", CurrentModuleObjects[static_cast(CMO::OAController)])); } } // namespace MixedAir @@ -3432,14 +3491,16 @@ void OAControllerProps::CalcOAController(EnergyPlusData &state, int const AirLoo ++this->CountMechVentFrac; ShowWarningError( state, - format("{}Minimum OA fraction > Mechanical Ventilation Controller request for Controller:OutdoorAir={}, Min OA fraction is used.", - RoutineName, - this->Name)); + EnergyPlus::format( + "{}Minimum OA fraction > Mechanical Ventilation Controller request for Controller:OutdoorAir={}, Min OA fraction is used.", + RoutineName, + this->Name)); ShowContinueError(state, "This may be overriding desired ventilation controls. Check inputs for Minimum Outdoor Air Flow Rate, Minimum " "Outdoor Air Schedule Name and Controller:MechanicalVentilation"); ShowContinueErrorTimeStamp( - state, format("Minimum OA fraction = {:.4R}, Mech Vent OA fraction = {:.4R}", OutAirMinFrac, MechVentOutsideAirMinFrac)); + state, + EnergyPlus::format("Minimum OA fraction = {:.4R}, Mech Vent OA fraction = {:.4R}", OutAirMinFrac, MechVentOutsideAirMinFrac)); } else { ShowRecurringWarningErrorAtEnd(state, "Controller:OutdoorAir=\"" + this->Name + @@ -3818,13 +3879,15 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, ZoneOAMin = ZoneOAMax; ++this->OAMaxMinLimitErrorCount; if (this->OAMaxMinLimitErrorCount < 2) { - ShowSevereError(state, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError(state, + EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, - format("For System Outdoor Air Method = ProportionalControlBasedOnDesignOARate, maximum zone " - "outdoor air rate ({:.4R}), is not greater than minimum zone outdoor air rate ({:.4R}).", - ZoneOAMax, - ZoneOAMin)); + EnergyPlus::format( + "For System Outdoor Air Method = ProportionalControlBasedOnDesignOARate, maximum zone " + "outdoor air rate ({:.4R}), is not greater than minimum zone outdoor air rate ({:.4R}).", + ZoneOAMax, + ZoneOAMin)); ShowContinueError(state, " The minimum zone outdoor air rate is set to the maximum zone outdoor air rate. " "Simulation continues..."); @@ -3832,10 +3895,11 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - format("{} = \"{}\", For System Outdoor Air Method = ProportionalControlBasedOnDesignOARate, maximum " - "zone outdoor air rate is not greater than minimum zone outdoor air rate. Error continues...", - CurrentModuleObject, - this->Name), + EnergyPlus::format( + "{} = \"{}\", For System Outdoor Air Method = ProportionalControlBasedOnDesignOARate, maximum " + "zone outdoor air rate is not greater than minimum zone outdoor air rate. Error continues...", + CurrentModuleObject, + this->Name), this->OAMaxMinLimitErrorIndex); } } @@ -3879,80 +3943,89 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, ++this->CO2MaxMinLimitErrorCount; if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlSchOcc) { if (this->CO2MaxMinLimitErrorCount < 2) { - ShowSevereError(state, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError( + state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, - format("For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, " - "maximum target CO2 concentration ({:.2R}), is not greater than minimum target " - "CO2 concentration ({:.2R}).", - ZoneMaxCO2, - ZoneMinCO2)); + EnergyPlus::format( + "For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, " + "maximum target CO2 concentration ({:.2R}), is not greater than minimum target " + "CO2 concentration ({:.2R}).", + ZoneMaxCO2, + ZoneMinCO2)); ShowContinueError(state, "\"ProportionalControlBasedOnOccupancySchedule\" will not be modeled. " "Default \"Standard62.1VentilationRateProcedure\" will be modeled. Simulation " "continues..."); ShowContinueErrorTimeStamp(state, ""); } else { - ShowRecurringWarningErrorAtEnd(state, - 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, + 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); } } if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlDesOcc) { if (this->CO2MaxMinLimitErrorCount < 2) { - ShowSevereError(state, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError( + state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, - format("For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, " - "maximum target CO2 concentration ({:.2R}), is not greater than minimum target " - "CO2 concentration ({:.2R}).", - ZoneMaxCO2, - ZoneMinCO2)); + EnergyPlus::format( + "For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, " + "maximum target CO2 concentration ({:.2R}), is not greater than minimum target " + "CO2 concentration ({:.2R}).", + ZoneMaxCO2, + ZoneMinCO2)); ShowContinueError(state, "\"ProportionalControlBasedOnDesignOccupancy\" will not be modeled. " "Default \"Standard62.1VentilationRateProcedure\" will be modeled. Simulation " "continues..."); ShowContinueErrorTimeStamp(state, ""); } else { - ShowRecurringWarningErrorAtEnd(state, - 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, + 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); } } if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlDesOARate) { if (this->CO2MaxMinLimitErrorCount < 2) { - ShowSevereError(state, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError( + state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, - format("For System Outdoor Air Method = ProportionalControlBasedOnDesignOARate, maximum " - "target CO2 concentration ({:.2R}), is not greater than minimum target CO2 " - "concentration ({:.2R}).", - ZoneMaxCO2, - ZoneMinCO2)); + EnergyPlus::format( + "For System Outdoor Air Method = ProportionalControlBasedOnDesignOARate, maximum " + "target CO2 concentration ({:.2R}), is not greater than minimum target CO2 " + "concentration ({:.2R}).", + ZoneMaxCO2, + ZoneMinCO2)); ShowContinueError( state, "\"ProportionalControlBasedOnDesignOARate\" will not be modeled. Default " "\"Standard62.1VentilationRateProcedure\" will be modeled. Simulation continues..."); ShowContinueErrorTimeStamp(state, ""); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + 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), + this->CO2MaxMinLimitErrorIndex); } } @@ -3981,12 +4054,14 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, ++this->CO2GainErrorCount; if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlSchOcc) { if (this->CO2GainErrorCount < 2) { - ShowSevereError(state, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError( + state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, - format("For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, CO2 " - "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", - curZone.Name)); + EnergyPlus::format( + "For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, CO2 " + "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", + curZone.Name)); ShowContinueError(state, "\"ProportionalControlBasedOnOccupancySchedule\" will not be modeled. " "Default \"Standard62.1VentilationRateProcedure\" will be modeled. Simulation " @@ -3995,22 +4070,24 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - format("{} = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnOccupancySchedule, " - "CO2 generation from people is not greater than zero. Error continues...", - CurrentModuleObject, - this->Name), + EnergyPlus::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, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError( + state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, - format("For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, CO2 " - "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", - curZone.Name)); + EnergyPlus::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 " @@ -4019,7 +4096,7 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - format( + EnergyPlus::format( "{} = \"{}\", For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, " "CO2 generation from people is not greater than zero. Error continues...", CurrentModuleObject, @@ -4710,15 +4787,15 @@ void OAControllerProps::SizeOAController(EnergyPlusData &state) if (this->MaxOA > 0.0) { Real64 OAFlowRatio = this->MinOA / this->MaxOA; if (this->HighRHOAFlowRatio < OAFlowRatio) { - ShowWarningError(state, format("{} \"{}\"", CurrentModuleObject, this->Name)); + ShowWarningError(state, EnergyPlus::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, format("... Controller minimum flow rate = {:.4T} m3/s.", this->MinOA)); - ShowContinueError(state, format("... Controller maximum flow rate = {:.4T} m3/s.", this->MaxOA)); - ShowContinueError(state, format("... Controller minimum to maximum flow ratio = {:.4T}.", OAFlowRatio)); - ShowContinueError(state, format("... High humidity control flow ratio = {:.4T}.", this->HighRHOAFlowRatio)); + 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)); } } } @@ -4899,7 +4976,7 @@ Array1D_int GetOAMixerNodeNumbers(EnergyPlusData &state, } if (WhichOAMixer == 0) { - ShowSevereError(state, format("GetOAMixerNodeNumbers: Could not find OA Mixer = \"{}\"", OAMixerName)); + ShowSevereError(state, EnergyPlus::format("GetOAMixerNodeNumbers: Could not find OA Mixer = \"{}\"", OAMixerName)); ErrorsFound = true; OANodeNumbers = 0; } @@ -4960,9 +5037,9 @@ int GetOAMixerReliefNodeNumber(EnergyPlusData &state, int const OAMixerNum) // W if (OAMixerNum > state.dataMixedAir->NumOAMixers) { ShowFatalError(state, - format("GetOAMixerReliefNodeNumber: Requested Mixer #={}, which is > number of OA Mixers={}", - OAMixerNum, - state.dataMixedAir->NumOAMixers)); + EnergyPlus::format("GetOAMixerReliefNodeNumber: Requested Mixer #={}, which is > number of OA Mixers={}", + OAMixerNum, + state.dataMixedAir->NumOAMixers)); } return state.dataMixedAir->OAMixer(OAMixerNum).RelNode; @@ -5192,7 +5269,7 @@ int GetOAMixerIndex(EnergyPlusData &state, std::string const &OAMixerName) // Wh int OAMixerIndex = Util::FindItem(OAMixerName, state.dataMixedAir->OAMixer); if (OAMixerIndex == 0) { - ShowSevereError(state, format("GetOAMixerIndex: Could not find OutdoorAir:Mixer, Name=\"{}\"", OAMixerName)); + ShowSevereError(state, EnergyPlus::format("GetOAMixerIndex: Could not find OutdoorAir:Mixer, Name=\"{}\"", OAMixerName)); } return OAMixerIndex; @@ -5367,19 +5444,19 @@ void CheckControllerLists(EnergyPlusData &state, bool &ErrFound) if (Count == 0) { ShowSevereError(state, - format("{}=\"{}\" is not referenced on a AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem object.", - CurrentModuleObject, - ControllerListName)); + EnergyPlus::format("{}=\"{}\" is not referenced on a AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem object.", + CurrentModuleObject, + ControllerListName)); ErrFound = true; } else if (Count > 1) { ShowSevereError(state, - format("{}=\"{}\" has too many references on AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem objects.", - CurrentModuleObject, - ControllerListName)); + EnergyPlus::format("{}=\"{}\" has too many references on AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem objects.", + CurrentModuleObject, + ControllerListName)); if (Found > 0) { - ShowContinueError(state, format("...AirLoopHVAC:OutdoorAirSystem=\"{}\".", state.dataAirLoop->OutsideAirSys(Found).Name)); + ShowContinueError(state, EnergyPlus::format("...AirLoopHVAC:OutdoorAirSystem=\"{}\".", state.dataAirLoop->OutsideAirSys(Found).Name)); } - ShowContinueError(state, format("...also on AirLoopHVAC=\"{}\".", AirLoopName)); + ShowContinueError(state, EnergyPlus::format("...also on AirLoopHVAC=\"{}\".", AirLoopName)); ErrFound = true; } } diff --git a/src/EnergyPlus/MixerComponent.cc b/src/EnergyPlus/MixerComponent.cc index ced283d7ec7..8153c8342aa 100644 --- a/src/EnergyPlus/MixerComponent.cc +++ b/src/EnergyPlus/MixerComponent.cc @@ -109,25 +109,25 @@ void SimAirMixer(EnergyPlusData &state, std::string_view CompName, int &CompInde if (CompIndex == 0) { MixerNum = Util::FindItemInList(CompName, state.dataMixerComponent->MixerCond, &MixerConditions::MixerName); if (MixerNum == 0) { - ShowFatalError(state, format("SimAirLoopMixer: Mixer not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimAirLoopMixer: Mixer not found={}", CompName)); } CompIndex = MixerNum; } else { MixerNum = CompIndex; if (MixerNum > state.dataMixerComponent->NumMixers || MixerNum < 1) { ShowFatalError(state, - format("SimAirLoopMixer: Invalid CompIndex passed={}, Number of Mixers={}, Mixer name={}", - MixerNum, - state.dataMixerComponent->NumMixers, - CompName)); + EnergyPlus::format("SimAirLoopMixer: Invalid CompIndex passed={}, Number of Mixers={}, Mixer name={}", + MixerNum, + state.dataMixerComponent->NumMixers, + CompName)); } if (state.dataMixerComponent->CheckEquipName(MixerNum)) { if (CompName != state.dataMixerComponent->MixerCond(MixerNum).MixerName) { ShowFatalError(state, - format("SimAirLoopMixer: Invalid CompIndex passed={}, Mixer name={}, stored Mixer Name for that index={}", - MixerNum, - CompName, - state.dataMixerComponent->MixerCond(MixerNum).MixerName)); + EnergyPlus::format("SimAirLoopMixer: Invalid CompIndex passed={}, Mixer name={}, stored Mixer Name for that index={}", + MixerNum, + CompName, + state.dataMixerComponent->MixerCond(MixerNum).MixerName)); } state.dataMixerComponent->CheckEquipName(MixerNum) = false; } @@ -273,7 +273,7 @@ void GetMixerInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (lAlphaBlanks(2 + NodeNum)) { - ShowSevereError(state, format("{} is Blank, {} = {}", cAlphaFields(2 + NodeNum), CurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("{} is Blank, {} = {}", cAlphaFields(2 + NodeNum), CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -288,11 +288,11 @@ void GetMixerInput(EnergyPlusData &state) continue; } ShowSevereError(state, - format("{} = {} specifies an inlet node name the same as the outlet node.", - CurrentModuleObject, - state.dataMixerComponent->MixerCond(MixerNum).MixerName)); - ShowContinueError(state, format("..{} = {}", cAlphaFields(2), state.dataLoopNodes->NodeID(NodeNum))); - ShowContinueError(state, format("..Inlet Node #{} is duplicate.", InNodeNum1)); + EnergyPlus::format("{} = {} specifies an inlet node name the same as the outlet node.", + CurrentModuleObject, + state.dataMixerComponent->MixerCond(MixerNum).MixerName)); + ShowContinueError(state, EnergyPlus::format("..{} = {}", cAlphaFields(2), state.dataLoopNodes->NodeID(NodeNum))); + ShowContinueError(state, EnergyPlus::format("..Inlet Node #{} is duplicate.", InNodeNum1)); ErrorsFound = true; } for (InNodeNum1 = 1; InNodeNum1 <= state.dataMixerComponent->MixerCond(MixerNum).NumInletNodes; ++InNodeNum1) { @@ -302,11 +302,11 @@ void GetMixerInput(EnergyPlusData &state) continue; } ShowSevereError(state, - format("{} = {} specifies duplicate inlet nodes in its inlet node list.", - CurrentModuleObject, - state.dataMixerComponent->MixerCond(MixerNum).MixerName)); - ShowContinueError(state, format("..Inlet Node #{} Name={}", InNodeNum1, state.dataLoopNodes->NodeID(InNodeNum1))); - ShowContinueError(state, format("..Inlet Node #{} is duplicate.", InNodeNum2)); + EnergyPlus::format("{} = {} specifies duplicate inlet nodes in its inlet node list.", + CurrentModuleObject, + state.dataMixerComponent->MixerCond(MixerNum).MixerName)); + ShowContinueError(state, EnergyPlus::format("..Inlet Node #{} Name={}", InNodeNum1, state.dataLoopNodes->NodeID(InNodeNum1))); + ShowContinueError(state, EnergyPlus::format("..Inlet Node #{} is duplicate.", InNodeNum2)); ErrorsFound = true; } } @@ -320,7 +320,7 @@ void GetMixerInput(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input.", RoutineName)); } } @@ -695,9 +695,9 @@ void GetZoneMixerIndex(EnergyPlusData &state, std::string const &MixerName, int MixerIndex = Util::FindItemInList(MixerName, state.dataMixerComponent->MixerCond, &MixerConditions::MixerName); if (MixerIndex == 0) { if (!ThisObjectType.empty()) { - ShowSevereError(state, format("{}, GetZoneMixerIndex: Zone Mixer not found={}", ThisObjectType, MixerName)); + ShowSevereError(state, EnergyPlus::format("{}, GetZoneMixerIndex: Zone Mixer not found={}", ThisObjectType, MixerName)); } else { - ShowSevereError(state, format("GetZoneMixerIndex: Zone Mixer not found={}", MixerName)); + ShowSevereError(state, EnergyPlus::format("GetZoneMixerIndex: Zone Mixer not found={}", MixerName)); } ErrorsFound = true; } diff --git a/src/EnergyPlus/MoistureBalanceEMPDManager.cc b/src/EnergyPlus/MoistureBalanceEMPDManager.cc index 65f81201167..38ab6b7f182 100644 --- a/src/EnergyPlus/MoistureBalanceEMPDManager.cc +++ b/src/EnergyPlus/MoistureBalanceEMPDManager.cc @@ -168,7 +168,7 @@ void GetMoistureBalanceEMPDInput(EnergyPlusData &state) EMPDMat = s_ip->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (EMPDMat == 0) { - ShowSevereError(state, format("EMPD Solution requested, but no \"{}\" objects were found.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("EMPD Solution requested, but no \"{}\" objects were found.", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -234,7 +234,7 @@ void GetMoistureBalanceEMPDInput(EnergyPlusData &state) matEMPD->muCoating = MaterialProps(9); if (matEMPD->deepDepth <= matEMPD->surfaceDepth && matEMPD->deepDepth != 0.0) { - ShowWarningError(state, format("{}: material=\"{}\"", s_ipsc->cCurrentModuleObject, matEMPD->Name)); + ShowWarningError(state, EnergyPlus::format("{}: material=\"{}\"", s_ipsc->cCurrentModuleObject, matEMPD->Name)); ShowContinueError(state, "Deep-layer penetration depth should be zero or greater than the surface-layer penetration depth."); } } @@ -263,9 +263,10 @@ void GetMoistureBalanceEMPDInput(EnergyPlusData &state) ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual surfaces."); } if (state.dataGlobal->DisplayExtraWarnings) { - ShowMessage(state, - format("GetMoistureBalanceEMPDInput: EMPD properties are not assigned to the inside layer in Surface={}", surf.Name)); - ShowContinueError(state, format("with Construction={}", constr.Name)); + ShowMessage( + state, + EnergyPlus::format("GetMoistureBalanceEMPDInput: EMPD properties are not assigned to the inside layer in Surface={}", surf.Name)); + ShowContinueError(state, EnergyPlus::format("with Construction={}", constr.Name)); } } @@ -276,8 +277,9 @@ void GetMoistureBalanceEMPDInput(EnergyPlusData &state) // Multiple layer construction auto const *mat1 = s_mat->materials(constr.LayerPoint(1)); if (mat1->hasEMPD && surf.ExtBoundCond <= 0) { // The external layer is not exposed to zone - ShowSevereError(state, format("{}: EMPD properties are assigned to the outside layer in Construction = {}", routineName, constr.Name)); - ShowContinueError(state, format("..Outside layer material with EMPD properties = {}", mat1->Name)); + ShowSevereError( + state, EnergyPlus::format("{}: EMPD properties are assigned to the outside layer in Construction = {}", routineName, constr.Name)); + ShowContinueError(state, EnergyPlus::format("..Outside layer material with EMPD properties = {}", mat1->Name)); ShowContinueError(state, "..A material with EMPD properties must be assigned to the inside layer of a construction."); ErrorsFound = true; continue; @@ -286,8 +288,9 @@ void GetMoistureBalanceEMPDInput(EnergyPlusData &state) for (int Layer = 2; Layer <= constr.TotLayers - 1; ++Layer) { auto const *matL = s_mat->materials(constr.LayerPoint(Layer)); if (matL->hasEMPD) { - ShowSevereError(state, format("{}: EMPD properties are assigned to a middle layer in Construction = {}", routineName, constr.Name)); - ShowContinueError(state, format("..Middle layer material with EMPD properties = {}", matL->Name)); + ShowSevereError( + state, EnergyPlus::format("{}: EMPD properties are assigned to a middle layer in Construction = {}", routineName, constr.Name)); + ShowContinueError(state, EnergyPlus::format("..Middle layer material with EMPD properties = {}", matL->Name)); ShowContinueError(state, "..A material with EMPD properties must be assigned to the inside layer of a construction."); ErrorsFound = true; } @@ -297,9 +300,9 @@ void GetMoistureBalanceEMPDInput(EnergyPlusData &state) for (int Loop = 1; Loop <= state.dataGlobal->NumOfZones; ++Loop) { if (!EMPDzone(Loop)) { ShowSevereError(state, - format("{}: None of the constructions for zone = {} has an inside layer with EMPD properties", - routineName, - state.dataHeatBal->Zone(Loop).Name)); + EnergyPlus::format("{}: None of the constructions for zone = {} has an inside layer with EMPD properties", + routineName, + state.dataHeatBal->Zone(Loop).Name)); ShowContinueError(state, "..For each zone, the inside layer of at least one construction must have EMPD properties"); ErrorsFound = true; } diff --git a/src/EnergyPlus/MundtSimMgr.cc b/src/EnergyPlus/MundtSimMgr.cc index 36760136df8..98ba08c7adc 100644 --- a/src/EnergyPlus/MundtSimMgr.cc +++ b/src/EnergyPlus/MundtSimMgr.cc @@ -280,7 +280,7 @@ namespace RoomAir { // error check for debugging if (!AirNodeFoundFlag) { - ShowSevereError(state, format("InitMundtModel: Air Node in Zone=\"{}\" is not found.", thisZone.Name)); + ShowSevereError(state, EnergyPlus::format("InitMundtModel: Air Node in Zone=\"{}\" is not found.", thisZone.Name)); ErrorsFound = true; continue; } @@ -351,7 +351,7 @@ namespace RoomAir { ZoneEquipConfigNum = ZoneNum; // check whether this zone is a controlled zone or not if (!Zone(ZoneNum).IsControlled) { - ShowFatalError(state, format("Zones must be controlled for Mundt air model. No system serves zone {}", Zone(ZoneNum).Name)); + ShowFatalError(state, EnergyPlus::format("Zones must be controlled for Mundt air model. No system serves zone {}", Zone(ZoneNum).Name)); return; } @@ -514,7 +514,8 @@ namespace RoomAir { state.dataMundtSimMgr->MundtAirSurf(state.dataMundtSimMgr->FloorSurfSetIDs(SurfNum), state.dataMundtSimMgr->MundtZoneNum).Area; } } else { - ShowSevereError(state, format("SetupMundtModel: Mundt model has no FloorAirNode, Zone={}", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowSevereError(state, + EnergyPlus::format("SetupMundtModel: Mundt model has no FloorAirNode, Zone={}", state.dataHeatBal->Zone(ZoneNum).Name)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/NodeInputManager.cc b/src/EnergyPlus/NodeInputManager.cc index d929524279d..63f6cc3bf4a 100644 --- a/src/EnergyPlus/NodeInputManager.cc +++ b/src/EnergyPlus/NodeInputManager.cc @@ -121,8 +121,8 @@ void GetNodeNums(EnergyPlusData &state, if (nodeFluidType != DataLoopNode::NodeFluidType::Air && nodeFluidType != DataLoopNode::NodeFluidType::Water && nodeFluidType != DataLoopNode::NodeFluidType::Electric && nodeFluidType != DataLoopNode::NodeFluidType::Steam && nodeFluidType != DataLoopNode::NodeFluidType::Blank) { - ShowSevereError(state, format("{}{}=\"{}=\", invalid fluid type.", RoutineName, objTypeStr, NodeObjectName)); - ShowContinueError(state, format("..Invalid FluidType={}", nodeFluidType)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}=\", invalid fluid type.", RoutineName, objTypeStr, NodeObjectName)); + ShowContinueError(state, EnergyPlus::format("..Invalid FluidType={}", nodeFluidType)); ErrorsFound = true; ShowFatalError(state, "Preceding issue causes termination."); } @@ -136,19 +136,20 @@ void GetNodeNums(EnergyPlusData &state, if (nodeFluidType != DataLoopNode::NodeFluidType::Blank && state.dataLoopNodes->Node(NodeNumbers(Loop)).FluidType != DataLoopNode::NodeFluidType::Blank) { if (state.dataLoopNodes->Node(NodeNumbers(Loop)).FluidType != nodeFluidType) { - ShowSevereError(state, format("{}{}=\"{}=\", invalid data.", RoutineName, objTypeStr, NodeObjectName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}=\", invalid data.", RoutineName, objTypeStr, NodeObjectName)); if (!InputFieldName.empty()) { ShowContinueError(state, fmt::format("...Ref field={}", InputFieldName)); } + ShowContinueError(state, + EnergyPlus::format("Existing Fluid type for node, incorrect for request. Node={}", + state.dataLoopNodes->NodeID(NodeNumbers(Loop)))); ShowContinueError( state, - format("Existing Fluid type for node, incorrect for request. Node={}", state.dataLoopNodes->NodeID(NodeNumbers(Loop)))); - ShowContinueError( - state, - format("Existing Fluid type={}, Requested Fluid Type={}", - format("{}", - DataLoopNode::NodeFluidTypeNames[static_cast(state.dataLoopNodes->Node(NodeNumbers(Loop)).FluidType)]), - format("{}", DataLoopNode::NodeFluidTypeNames[static_cast(nodeFluidType)]))); + EnergyPlus::format( + "Existing Fluid type={}, Requested Fluid Type={}", + EnergyPlus::format( + "{}", DataLoopNode::NodeFluidTypeNames[static_cast(state.dataLoopNodes->Node(NodeNumbers(Loop)).FluidType)]), + EnergyPlus::format("{}", DataLoopNode::NodeFluidTypeNames[static_cast(nodeFluidType)]))); ErrorsFound = true; } } @@ -571,9 +572,10 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true state.dataNodeInputMgr->NodeLists(NCount).NumOfNodesInList = NumAlphas - 1; if (NumAlphas <= 1) { if (NumAlphas == 1) { - ShowSevereError(state, format("{}{}=\"{}\" does not have any nodes.", RoutineName, CurrentModuleObject, cAlphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" does not have any nodes.", RoutineName, CurrentModuleObject, cAlphas(1))); } else { - ShowSevereError(state, format("{}{}= does not have any nodes or nodelist name.", RoutineName, CurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("{}{}= does not have any nodes or nodelist name.", RoutineName, CurrentModuleObject)); } localErrorsFound = true; continue; @@ -582,10 +584,10 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true for (int Loop1 = 1; Loop1 <= NumAlphas - 1; ++Loop1) { state.dataNodeInputMgr->NodeLists(NCount).NodeNames(Loop1) = cAlphas(Loop1 + 1); if (cAlphas(Loop1 + 1).empty()) { - ShowWarningError(state, format("{}{}=\"{}\", blank node name in list.", RoutineName, CurrentModuleObject, cAlphas(1))); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", blank node name in list.", RoutineName, CurrentModuleObject, cAlphas(1))); --state.dataNodeInputMgr->NodeLists(NCount).NumOfNodesInList; if (state.dataNodeInputMgr->NodeLists(NCount).NumOfNodesInList <= 0) { - ShowSevereError(state, format("{}{}=\"{}\" does not have any nodes.", RoutineName, CurrentModuleObject, cAlphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" does not have any nodes.", RoutineName, CurrentModuleObject, cAlphas(1))); localErrorsFound = true; break; } @@ -594,8 +596,8 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true state.dataNodeInputMgr->NodeLists(NCount).NodeNumbers(Loop1) = AssignNodeNumber( state, state.dataNodeInputMgr->NodeLists(NCount).NodeNames(Loop1), DataLoopNode::NodeFluidType::Blank, localErrorsFound); if (Util::SameString(state.dataNodeInputMgr->NodeLists(NCount).NodeNames(Loop1), state.dataNodeInputMgr->NodeLists(NCount).Name)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid node name in list.", RoutineName, CurrentModuleObject, cAlphas(1))); - ShowContinueError(state, format("... Node {} Name=\"{}\", duplicates NodeList Name.", Loop1, cAlphas(Loop1 + 1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid node name in list.", RoutineName, CurrentModuleObject, cAlphas(1))); + ShowContinueError(state, EnergyPlus::format("... Node {} Name=\"{}\", duplicates NodeList Name.", Loop1, cAlphas(Loop1 + 1))); localErrorsFound = true; } } @@ -607,15 +609,15 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true continue; } if (flagError) { // only list nodelist name once - ShowSevereError(state, format("{}{}=\"{}\" has duplicate nodes:", RoutineName, CurrentModuleObject, cAlphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" has duplicate nodes:", RoutineName, CurrentModuleObject, cAlphas(1))); flagError = false; } ShowContinueError(state, - format("...list item={}, \"{}\", duplicate list item={}, \"{}\".", - Loop1, - state.dataLoopNodes->NodeID(state.dataNodeInputMgr->NodeLists(NCount).NodeNumbers(Loop1)), - Loop2, - state.dataLoopNodes->NodeID(state.dataNodeInputMgr->NodeLists(NCount).NodeNumbers(Loop2)))); + EnergyPlus::format("...list item={}, \"{}\", duplicate list item={}, \"{}\".", + Loop1, + state.dataLoopNodes->NodeID(state.dataNodeInputMgr->NodeLists(NCount).NodeNumbers(Loop1)), + Loop2, + state.dataLoopNodes->NodeID(state.dataNodeInputMgr->NodeLists(NCount).NodeNumbers(Loop2)))); localErrorsFound = true; } } @@ -632,12 +634,13 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true } ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", invalid node name in list.", RoutineName, CurrentModuleObject, state.dataNodeInputMgr->NodeLists(Loop1).Name)); - ShowContinueError( - state, - format("... Node {} Name=\"{}\", duplicates NodeList Name.", Loop2, state.dataNodeInputMgr->NodeLists(Loop).NodeNames(Loop2))); - ShowContinueError(state, format("... NodeList=\"{}\", is duplicated.", state.dataNodeInputMgr->NodeLists(Loop1).Name)); + ShowContinueError(state, + 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, "... Items in NodeLists must not be the name of another NodeList."); localErrorsFound = true; } @@ -648,7 +651,7 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true rNumbers.deallocate(); if (localErrorsFound) { - ShowFatalError(state, format("{}{}: Error getting input - causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}{}: Error getting input - causes termination.", RoutineName, CurrentModuleObject)); ErrorsFound = true; } } @@ -678,7 +681,7 @@ int AssignNodeNumber(EnergyPlusData &state, if (nodeFluidType != DataLoopNode::NodeFluidType::Air && nodeFluidType != DataLoopNode::NodeFluidType::Water && nodeFluidType != DataLoopNode::NodeFluidType::Electric && nodeFluidType != DataLoopNode::NodeFluidType::Steam && nodeFluidType != DataLoopNode::NodeFluidType::Blank) { - ShowSevereError(state, format("AssignNodeNumber: Invalid FluidType={}", nodeFluidType)); + ShowSevereError(state, EnergyPlus::format("AssignNodeNumber: Invalid FluidType={}", nodeFluidType)); ErrorsFound = true; ShowFatalError(state, "AssignNodeNumber: Preceding issue causes termination."); } @@ -692,13 +695,15 @@ int AssignNodeNumber(EnergyPlusData &state, if (nodeFluidType != DataLoopNode::NodeFluidType::Blank) { if (state.dataLoopNodes->Node(NumNode).FluidType != nodeFluidType && state.dataLoopNodes->Node(NumNode).FluidType != DataLoopNode::NodeFluidType::Blank) { - ShowSevereError(state, - format("Existing Fluid type for node, incorrect for request. Node={}", state.dataLoopNodes->NodeID(NumNode))); - ShowContinueError( + ShowSevereError( state, - format("Existing Fluid type={}, Requested Fluid Type={}", - format("{}", DataLoopNode::NodeFluidTypeNames[static_cast(state.dataLoopNodes->Node(NumNode).FluidType)]), - format("{}", DataLoopNode::NodeFluidTypeNames[static_cast(nodeFluidType)]))); + EnergyPlus::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( + "{}", DataLoopNode::NodeFluidTypeNames[static_cast(state.dataLoopNodes->Node(NumNode).FluidType)]), + EnergyPlus::format("{}", DataLoopNode::NodeFluidTypeNames[static_cast(nodeFluidType)]))); ErrorsFound = true; } } @@ -792,11 +797,11 @@ int GetOnlySingleNode(EnergyPlusData &state, InputFieldName); if (NumNodes > 1) { - ShowSevereError(state, format("{}{}=\"{}=\", invalid data.", RoutineName, objTypeStr, NodeObjectName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}=\", invalid data.", RoutineName, objTypeStr, NodeObjectName)); if (!InputFieldName.empty()) { ShowContinueError(state, fmt::format("...Ref field={}", InputFieldName)); } - ShowContinueError(state, format("Only 1st Node used from NodeList=\"{}\".", NodeName)); + ShowContinueError(state, EnergyPlus::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) { @@ -829,9 +834,9 @@ void InitUniqueNodeCheck(EnergyPlusData &state, std::string const &ContextName) if (!state.dataNodeInputMgr->CurCheckContextName.empty()) { ShowFatalError(state, - format("Init Uniqueness called for \"{}, but checks for \"{}\" was already in progress.", - ContextName, - state.dataNodeInputMgr->CurCheckContextName)); + EnergyPlus::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"); @@ -870,8 +875,9 @@ void CheckUniqueNodeNames( if (!CheckName.empty()) { int Found = Util::FindItemInList(CheckName, state.dataNodeInputMgr->UniqueNodeNames, state.dataNodeInputMgr->NumCheckNodes); if (Found != 0) { - ShowSevereError(state, format("{}=\"{}\", duplicate node names found.", state.dataNodeInputMgr->CurCheckContextName, ObjectName)); - ShowContinueError(state, format("...for Node Type(s)={}, duplicate node name=\"{}\".", NodeTypes, CheckName)); + 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)); 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)) @@ -911,9 +917,11 @@ void CheckUniqueNodeNumbers( int Found = Util::FindItemInList( state.dataLoopNodes->NodeID(CheckNumber), state.dataNodeInputMgr->UniqueNodeNames, state.dataNodeInputMgr->NumCheckNodes); if (Found != 0) { - ShowSevereError(state, format("{}=\"{}\", duplicate node names found.", state.dataNodeInputMgr->CurCheckContextName, ObjectName)); - ShowContinueError(state, - format("...for Node Type(s)={}, duplicate node name=\"{}\".", NodeTypes, state.dataLoopNodes->NodeID(CheckNumber))); + ShowSevereError(state, + EnergyPlus::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))); ShowContinueError(state, "...Nodes must be unique across instances of this object."); ErrorsFound = true; } else { @@ -940,9 +948,9 @@ void EndUniqueNodeCheck(EnergyPlusData &state, std::string const &ContextName) if (state.dataNodeInputMgr->CurCheckContextName != ContextName) { ShowFatalError(state, - format("End Uniqueness called for \"{}, but checks for \"{}\" was in progress.", - ContextName, - state.dataNodeInputMgr->CurCheckContextName)); + EnergyPlus::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"); @@ -1245,12 +1253,13 @@ void CheckMarkedNodes(EnergyPlusData &state, bool &ErrorsFound) if (state.dataNodeInputMgr->NodeRef(NodeNum) == 0) { std::string_view objType = BranchNodeConnections::ConnectionObjectTypeNames[static_cast(state.dataLoopNodes->MarkedNode(NodeNum).ObjectType)]; - ShowSevereError(state, format("Node=\"{}\" did not find reference by another object.", state.dataLoopNodes->NodeID(NodeNum))); + ShowSevereError(state, + EnergyPlus::format("Node=\"{}\" did not find reference by another object.", state.dataLoopNodes->NodeID(NodeNum))); ShowContinueError(state, - format(R"(Object="{}", Name="{}", Field=[{}])", - objType, - state.dataLoopNodes->MarkedNode(NodeNum).ObjectName, - state.dataLoopNodes->MarkedNode(NodeNum).FieldName)); + EnergyPlus::format(R"(Object="{}", Name="{}", Field=[{}])", + objType, + state.dataLoopNodes->MarkedNode(NodeNum).ObjectName, + state.dataLoopNodes->MarkedNode(NodeNum).FieldName)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/OutAirNodeManager.cc b/src/EnergyPlus/OutAirNodeManager.cc index d49919aa163..15fcec1731b 100644 --- a/src/EnergyPlus/OutAirNodeManager.cc +++ b/src/EnergyPlus/OutAirNodeManager.cc @@ -228,7 +228,8 @@ namespace OutAirNodeManager { cAlphaFields(AlphaNum)); NextFluidStreamNum += NumNodes; if (ErrInList) { - ShowContinueError(state, format("Occurred in {}, {} = {}", CurrentModuleObject, cAlphaFields(AlphaNum), Alphas(AlphaNum))); + ShowContinueError( + state, EnergyPlus::format("Occurred in {}, {} = {}", CurrentModuleObject, cAlphaFields(AlphaNum), Alphas(AlphaNum))); ErrorsFound = true; } for (int NodeNum = 1; NodeNum <= NumNodes; ++NodeNum) { @@ -245,7 +246,7 @@ namespace OutAirNodeManager { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting {} input.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {} input.", RoutineName, CurrentModuleObject)); } } @@ -287,12 +288,12 @@ namespace OutAirNodeManager { cAlphaFields(1)); NextFluidStreamNum += NumNodes; if (ErrInList) { - ShowContinueError(state, format("Occurred in {}, {} = {}", CurrentModuleObject, cAlphaFields(1), Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Occurred in {}, {} = {}", CurrentModuleObject, cAlphaFields(1), Alphas(1))); ErrorsFound = true; } if (NumNodes > 1) { - ShowSevereError(state, format("{}, {} = {}", CurrentModuleObject, cAlphaFields(1), Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}, {} = {}", CurrentModuleObject, cAlphaFields(1), Alphas(1))); ShowContinueError(state, "...appears to point to a node list, not a single node."); ErrorsFound = true; continue; @@ -305,8 +306,8 @@ namespace OutAirNodeManager { } TmpNums(ListSize) = NodeNums(1); } else { // Duplicates are a problem - ShowSevereError(state, format("{}, duplicate {} = {}", CurrentModuleObject, cAlphaFields(1), Alphas(1))); - ShowContinueError(state, format("Duplicate {} might be found in an OutdoorAir:NodeList.", cAlphaFields(1))); + ShowSevereError(state, EnergyPlus::format("{}, duplicate {} = {}", CurrentModuleObject, cAlphaFields(1), Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Duplicate {} might be found in an OutdoorAir:NodeList.", cAlphaFields(1))); ErrorsFound = true; continue; } @@ -345,7 +346,7 @@ namespace OutAirNodeManager { } if (NumAlphas > 8) { - ShowSevereError(state, format("{}, {} = {}", CurrentModuleObject, cAlphaFields(1), Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}, {} = {}", CurrentModuleObject, cAlphaFields(1), Alphas(1))); ShowContinueError(state, "Object Definition indicates more than 7 Alpha Objects."); ErrorsFound = true; continue; @@ -356,7 +357,7 @@ namespace OutAirNodeManager { } } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting {} input.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {} input.", RoutineName, CurrentModuleObject)); } } diff --git a/src/EnergyPlus/OutdoorAirUnit.cc b/src/EnergyPlus/OutdoorAirUnit.cc index ca5bb4aeab4..54d05764193 100644 --- a/src/EnergyPlus/OutdoorAirUnit.cc +++ b/src/EnergyPlus/OutdoorAirUnit.cc @@ -153,25 +153,26 @@ namespace OutdoorAirUnit { if (CompIndex == 0) { OAUnitNum = Util::FindItemInList(CompName, state.dataOutdoorAirUnit->OutAirUnit); if (OAUnitNum == 0) { - ShowFatalError(state, format("ZoneHVAC:OutdoorAirUnit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("ZoneHVAC:OutdoorAirUnit not found={}", CompName)); } CompIndex = OAUnitNum; } else { OAUnitNum = CompIndex; if (OAUnitNum > state.dataOutdoorAirUnit->NumOfOAUnits || OAUnitNum < 1) { ShowFatalError(state, - format("SimOutdoorAirUnit: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - OAUnitNum, - state.dataOutdoorAirUnit->NumOfOAUnits, - CompName)); + EnergyPlus::format("SimOutdoorAirUnit: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + OAUnitNum, + state.dataOutdoorAirUnit->NumOfOAUnits, + CompName)); } if (state.dataOutdoorAirUnit->CheckEquipName(OAUnitNum)) { if (CompName != state.dataOutdoorAirUnit->OutAirUnit(OAUnitNum).Name) { - ShowFatalError(state, - format("SimOutdoorAirUnit: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - OAUnitNum, - CompName, - state.dataOutdoorAirUnit->OutAirUnit(OAUnitNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimOutdoorAirUnit: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + OAUnitNum, + CompName, + state.dataOutdoorAirUnit->OutAirUnit(OAUnitNum).Name)); } state.dataOutdoorAirUnit->CheckEquipName(OAUnitNum) = false; } @@ -325,17 +326,17 @@ namespace OutdoorAirUnit { if (thisOutAirUnit.ZonePtr == 0) { if (lAlphaBlanks(3)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3), + state.dataIPShortCut->cAlphaArgs(3))); } ErrorsFound = true; } @@ -378,8 +379,9 @@ namespace OutdoorAirUnit { if (lAlphaBlanks(7)) { thisOutAirUnit.ExtFan = false; if (!state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance) { - ShowWarningError(state, - format("{}=\"{}\", {} is blank.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1), cAlphaFields(7))); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{}\", {} is blank.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1), cAlphaFields(7))); ShowContinueError(state, "Unbalanced mass flow rates between supply from outdoor air and exhaust from zone air will be introduced."); } @@ -409,12 +411,13 @@ namespace OutdoorAirUnit { if ((thisOutAirUnit.ExtFan) && (!state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance)) { if (NumArray(2) != NumArray(1)) { ShowWarningError(state, - format("{}=\"{}\", {} and {} are not equal. This may cause unbalanced flow.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(1), - cNumericFields(2))); - ShowContinueError(state, format("{}={:.3R}= and {}{:.3R}", cNumericFields(1), NumArray(1), cNumericFields(2), NumArray(2))); + EnergyPlus::format("{}=\"{}\", {} and {} are not equal. This may cause unbalanced flow.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(1), + cNumericFields(2))); + ShowContinueError(state, + EnergyPlus::format("{}={:.3R}= and {}{:.3R}", cNumericFields(1), NumArray(1), cNumericFields(2), NumArray(2))); } } // A8 @@ -431,15 +434,16 @@ namespace OutdoorAirUnit { (!state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance)) { ShowWarningError( state, - format("{}=\"{}\", different schedule inputs for outdoor air and exhaust air schedules may cause unbalanced mass flow.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format( + "{}=\"{}\", different schedule inputs for outdoor air and exhaust air schedules may cause unbalanced mass flow.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("{}={} and {}={}", - cAlphaFields(4), - state.dataIPShortCut->cAlphaArgs(4), - cAlphaFields(8), - state.dataIPShortCut->cAlphaArgs(8))); + EnergyPlus::format("{}={} and {}={}", + cAlphaFields(4), + state.dataIPShortCut->cAlphaArgs(4), + cAlphaFields(8), + state.dataIPShortCut->cAlphaArgs(8))); } SetUpCompSets( @@ -503,10 +507,10 @@ namespace OutdoorAirUnit { } else { if (thisOutAirUnit.ExtFan) { ShowSevereError(state, - format("{}=\"{}\" invalid {} cannot be blank when there is an exhaust fan.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cAlphaFields(14))); + EnergyPlus::format("{}=\"{}\" invalid {} cannot be blank when there is an exhaust fan.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cAlphaFields(14))); ErrorsFound = true; } } @@ -536,10 +540,10 @@ namespace OutdoorAirUnit { CheckAndAddAirNodeNumber(state, thisOutAirUnit.OutsideAirNode, IsValid); if (!IsValid) { ShowWarningError(state, - format("{}=\"{}\", Adding OutdoorAir:Node={}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(12))); + EnergyPlus::format("{}=\"{}\", Adding OutdoorAir:Node={}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(12))); } } @@ -815,10 +819,10 @@ namespace OutdoorAirUnit { } default: { ShowSevereError(state, - format("{}= \"{}\" invalid Outside Air Component=\"{}\".", - CurrentModuleObject, - AlphArray(1), - CompTypeNames[static_cast(thisOutAirUnit.OAEquip(CompNum).Type)])); + EnergyPlus::format("{}= \"{}\" invalid Outside Air Component=\"{}\".", + CurrentModuleObject, + AlphArray(1), + CompTypeNames[static_cast(thisOutAirUnit.OAEquip(CompNum).Type)])); ErrorsFound = true; } } @@ -899,19 +903,19 @@ namespace OutdoorAirUnit { } else { // when ListNum<0 ShowSevereError(state, - format("{} = \"{}\" invalid {}=\"{}\" not found.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cAlphaFields(16), - state.dataIPShortCut->cAlphaArgs(16))); + EnergyPlus::format("{} = \"{}\" invalid {}=\"{}\" not found.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cAlphaFields(16), + state.dataIPShortCut->cAlphaArgs(16))); ErrorsFound = true; } } else { // when Equipment list is left blanked ShowSevereError(state, - format("{} = \"{}\" invalid {} is blank and must be entered.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cAlphaFields(16))); + EnergyPlus::format("{} = \"{}\" invalid {} is blank and must be entered.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cAlphaFields(16))); ErrorsFound = true; } if (!lAlphaBlanks(17)) { @@ -920,7 +924,7 @@ namespace OutdoorAirUnit { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting {}.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {}.", RoutineName, CurrentModuleObject)); } AlphArray.deallocate(); @@ -1165,9 +1169,10 @@ namespace OutdoorAirUnit { } ShowSevereError( state, - format("InitOutdoorAirUnit: Zone Outdoor Air Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - CurrentModuleObject, - state.dataOutdoorAirUnit->OutAirUnit(Loop).Name)); + EnergyPlus::format( + "InitOutdoorAirUnit: Zone Outdoor Air Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + CurrentModuleObject, + state.dataOutdoorAirUnit->OutAirUnit(Loop).Name)); } } @@ -1409,11 +1414,14 @@ namespace OutdoorAirUnit { if ((std::abs(OutAirVolFlowDes - OutAirVolFlowUser) / OutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { BaseSizer::reportSizerOutput( state, ZoneHVACOAUnit, thisOutAirUnit.Name, "Design Size Outdoor Air Flow Rate [m3/s]", OutAirVolFlowDes); - ShowMessage(state, - format("SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit {}", - thisOutAirUnit.Name)); - ShowContinueError(state, format("User-Specified Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); - ShowContinueError(state, format("differs from Design Size Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowDes)); + ShowMessage( + state, + EnergyPlus::format("SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit {}", + thisOutAirUnit.Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1449,11 +1457,14 @@ namespace OutdoorAirUnit { if ((std::abs(ExtAirVolFlowDes - ExtAirVolFlowUser) / ExtAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { BaseSizer::reportSizerOutput( state, ZoneHVACOAUnit, thisOutAirUnit.Name, "Design Size Exhaust Air Flow Rate [m3/s]", ExtAirVolFlowDes); - ShowMessage(state, - format("SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit {}", - thisOutAirUnit.Name)); - ShowContinueError(state, format("User-Specified Exhaust Air Flow Rate of {:.5R} [m3/s]", ExtAirVolFlowUser)); - ShowContinueError(state, format("differs from Design Size Exhaust Air Flow Rate of {:.5R} [m3/s]", ExtAirVolFlowDes)); + ShowMessage( + state, + EnergyPlus::format("SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit {}", + thisOutAirUnit.Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Exhaust Air Flow Rate of {:.5R} [m3/s]", ExtAirVolFlowUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Exhaust Air Flow Rate of {:.5R} [m3/s]", ExtAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1653,14 +1664,14 @@ 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, format("Occurs in ZoneHVAC:OutdoorAirUnit Object= {}", thisOutAirUnit.Name)); + ShowContinueError(state, EnergyPlus::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."); ShowContinueErrorTimeStamp(state, - format("The outdoor mass flow rate = {:.3R} and the exhaust mass flow rate = {:.3R}.", - thisOutAirUnit.OutAirMassFlow, - thisOutAirUnit.ExtAirMassFlow)); + EnergyPlus::format("The outdoor mass flow rate = {:.3R} and the exhaust mass flow rate = {:.3R}.", + thisOutAirUnit.OutAirMassFlow, + thisOutAirUnit.ExtAirMassFlow)); thisOutAirUnit.FlowError = true; } } @@ -2190,7 +2201,7 @@ namespace OutdoorAirUnit { } } break; default: { - ShowFatalError(state, format("Invalid Outdoor Air Unit Component={}", EquipType)); // validate + ShowFatalError(state, EnergyPlus::format("Invalid Outdoor Air Unit Component={}", EquipType)); // validate } break; } } @@ -2302,7 +2313,7 @@ namespace OutdoorAirUnit { LoadMet = AirMassFlow * (PsyHFnTdbW(oaOutletNode.Temp, oaInletNode.HumRat) - PsyHFnTdbW(oaInletNode.Temp, oaInletNode.HumRat)); } break; default: - ShowFatalError(state, format("Invalid Coil Type = {}", CoilTypeNum)); // validate + ShowFatalError(state, EnergyPlus::format("Invalid Coil Type = {}", CoilTypeNum)); // validate break; } } diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index b52c376cf40..e8fb43b631b 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -201,7 +201,7 @@ namespace OutputProcessor { Constant::EndUse endUse = endUseCat2endUse[(int)endUseCat]; if (endUse == Constant::EndUse::Invalid) { - ShowSevereError(state, format("Nonexistent end use passed to addEndUseSpaceType={}", endUseCatNames[(int)endUseCat])); + ShowSevereError(state, EnergyPlus::format("Nonexistent end use passed to addEndUseSpaceType={}", endUseCatNames[(int)endUseCat])); return; } @@ -229,7 +229,7 @@ namespace OutputProcessor { Constant::EndUse endUse = endUseCat2endUse[(int)sovEndUseCat]; if (endUse == Constant::EndUse::Invalid) { - ShowSevereError(state, format("Nonexistent end use passed to addEndUseSpaceType={}", endUseCatNames[(int)sovEndUseCat])); + ShowSevereError(state, EnergyPlus::format("Nonexistent end use passed to addEndUseSpaceType={}", endUseCatNames[(int)sovEndUseCat])); return; } @@ -273,7 +273,7 @@ namespace OutputProcessor { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: // ValidateTimeStepType will throw a Fatal if not valid if (state.dataOutputProcessor->TimeValue[(int)timeStep].TimeStep != nullptr) { - ShowFatalError(state, format("SetupTimePointers was already called for {}", timeStepTypeNames[(int)timeStep])); + ShowFatalError(state, EnergyPlus::format("SetupTimePointers was already called for {}", timeStepTypeNames[(int)timeStep])); } state.dataOutputProcessor->TimeValue[(int)timeStep].TimeStep = &TimeStep; } @@ -407,8 +407,9 @@ namespace OutputProcessor { for (unsigned Loop = 0; Loop < FreqValues.size(); ++Loop) { if (FreqStringTrim == PossibleFreqs[Loop]) { if (FreqStringUpper != ExactFreqStringsUC[Loop]) { - ShowWarningError(state, format("DetermineFrequency: Entered frequency=\"{}\" is not an exact match to key strings.", FreqString)); - ShowContinueError(state, format("Frequency={} will be used.", ExactFreqStrings[Loop])); + ShowWarningError( + state, EnergyPlus::format("DetermineFrequency: Entered frequency=\"{}\" is not an exact match to key strings.", FreqString)); + ShowContinueError(state, EnergyPlus::format("Frequency={} will be used.", ExactFreqStrings[Loop])); } freq = std::max(FreqValues[Loop], state.dataOutputProcessor->minimumReportFreq); break; @@ -539,7 +540,7 @@ namespace OutputProcessor { } if (ErrorsFound) { - ShowFatalError(state, format("GetReportVariableInput:{}: errors in input.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetReportVariableInput:{}: errors in input.", cCurrentModuleObject)); } } @@ -570,12 +571,12 @@ namespace OutputProcessor { switch (freq) { case ReportFreq::Day: - return format("{:2},{:2}", Hour, Minute); + return EnergyPlus::format("{:2},{:2}", Hour, Minute); case ReportFreq::Month: - return format("{:2},{:2},{:2}", Day, Hour, Minute); + return EnergyPlus::format("{:2},{:2},{:2}", Day, Hour, Minute); case ReportFreq::Year: case ReportFreq::Simulation: - return format("{:2},{:2},{:2},{:2}", Mon, Day, Hour, Minute); + return EnergyPlus::format("{:2},{:2},{:2},{:2}", Mon, Day, Hour, Minute); default: return std::string(); } @@ -755,21 +756,22 @@ namespace OutputProcessor { // A custom meter cannot reference another custom meter if (std::find(customMeterNames.begin(), customMeterNames.end(), meterOrVarNameUC) != customMeterNames.end()) { ShowWarningError(state, - format(R"(Meter:Custom="{}", contains a reference to another Meter:Custom in field: {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - ipsc->cAlphaArgs(fldIndex + 1))); + EnergyPlus::format(R"(Meter:Custom="{}", contains a reference to another Meter:Custom in field: {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + ipsc->cAlphaArgs(fldIndex + 1))); foundBadSrc = true; break; } // A custom meter cannot reference another customDec meter if (std::find(customDecMeterNames.begin(), customDecMeterNames.end(), meterOrVarNameUC) != customDecMeterNames.end()) { - ShowWarningError(state, - 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, + 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))); foundBadSrc = true; break; } @@ -786,14 +788,15 @@ namespace OutputProcessor { } else if (units != srcMeter->units) { ShowWarningCustom(state, eoh, - format(R"(Meter:Custom="{}", differing units in {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); - ShowContinueError(state, - 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])); + 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])); foundBadSrc = true; break; } @@ -807,14 +810,15 @@ namespace OutputProcessor { if (srcDDVar->storeType != StoreType::Sum) { ShowWarningCustom(state, eoh, - format(R"(Meter:Custom="{}", variable not summed variable {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); - ShowContinueError(state, - format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", - units != Constant::Units::Invalid ? Constant::unitNames[(int)units] : "Unknown", - Constant::unitNames[(int)srcDDVar->units])); + 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={}.", + units != Constant::Units::Invalid ? Constant::unitNames[(int)units] : "Unknown", + Constant::unitNames[(int)srcDDVar->units])); foundBadSrc = true; break; } @@ -825,11 +829,12 @@ namespace OutputProcessor { // Otherwise it has to match the existing units } else if (units != srcDDVar->units) { ShowWarningCustom( - state, eoh, format("differing units in {}=\"{}\".", ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC)); - ShowContinueError(state, - 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, 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])); foundBadSrc = true; break; } @@ -864,10 +869,10 @@ namespace OutputProcessor { } else { // Cannot use ShowWarningItemNotFound because this string appears in a unit test ShowWarningError(state, - format(R"(Meter:Custom="{}", invalid {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - ipsc->cAlphaArgs(fldIndex + 1))); + EnergyPlus::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."); // Not setting the foundBadSrc flag here. } @@ -876,7 +881,7 @@ namespace OutputProcessor { // Somehow, this meter is not linked to any variables either directly or via another meter if (!itemsAssigned) { - ShowWarningError(state, format("Meter:Custom=\"{}\", no items assigned ", ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::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."); @@ -895,7 +900,7 @@ namespace OutputProcessor { bool errFlag = false; meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, meter->units, errFlag); if (errFlag) { - ShowContinueError(state, format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "..requests for IP units from this meter will be ignored."); } @@ -936,9 +941,9 @@ namespace OutputProcessor { if (std::find(meter->srcMeterNums.begin(), meter->srcMeterNums.end(), srcMeterNum) != meter->srcMeterNums.end()) { ShowWarningCustom(state, eoh, - format("{}=\"{}\" referenced multiple times, only first instance will be used", - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); + EnergyPlus::format("{}=\"{}\" referenced multiple times, only first instance will be used", + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); continue; } @@ -969,8 +974,8 @@ namespace OutputProcessor { if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { ShowWarningCustom(state, eoh, - format("Output variable \"{}\" referenced multiple times (directly or via meter)", - op->outVars[keyOutVarNum]->keyColonNameUC)); + EnergyPlus::format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); } else { meter->srcVarNums.push_back(keyOutVarNum); @@ -983,8 +988,8 @@ namespace OutputProcessor { if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { ShowWarningCustom(state, eoh, - format("Output variable \"{}\" referenced multiple times (directly or via meter)", - op->outVars[keyOutVarNum]->keyColonNameUC)); + EnergyPlus::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); @@ -1049,11 +1054,12 @@ namespace OutputProcessor { // DecMeter cannot be a Meter:Custom if (std::find(customDecMeterNames.begin(), customDecMeterNames.end(), decMeterNameUC) != customDecMeterNames.end()) { - ShowWarningError(state, - format(R"(Meter:CustomDec="{}", contains a reference to another Meter:CustomDecrement in field: {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(3), - ipsc->cAlphaArgs(3))); + 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))); ErrorsFound = true; continue; } @@ -1095,11 +1101,12 @@ namespace OutputProcessor { // A custom meter cannot reference another custom meter if (std::find(customDecMeterNames.begin(), customDecMeterNames.end(), meterOrVarNameUC) != customDecMeterNames.end()) { - ShowWarningError(state, - 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, + 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))); foundBadSrc = true; break; } @@ -1116,14 +1123,15 @@ namespace OutputProcessor { } else if (units != srcMeter->units) { ShowWarningCustom(state, eoh, - format(R"(Meter:Custom="{}", differing units in {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); - ShowContinueError(state, - 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])); + 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])); foundBadSrc = true; break; } @@ -1137,14 +1145,15 @@ namespace OutputProcessor { if (srcDDVar->storeType != StoreType::Sum) { ShowWarningCustom(state, eoh, - format(R"(Meter:Custom="{}", variable not summed variable {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); - ShowContinueError(state, - 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])); + 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])); foundBadSrc = true; break; } @@ -1155,11 +1164,12 @@ namespace OutputProcessor { // Otherwise it has to match the existing units } else if (units != srcDDVar->units) { ShowWarningCustom( - state, eoh, format("differing units in {}=\"{}\".", ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC)); - ShowContinueError(state, - 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, 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])); foundBadSrc = true; break; } @@ -1194,10 +1204,10 @@ namespace OutputProcessor { } else { // Cannot use ShowWarningItemNotFound because this string appears in a unit test ShowWarningError(state, - format(R"(Meter:Custom="{}", invalid {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - ipsc->cAlphaArgs(fldIndex + 1))); + EnergyPlus::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; @@ -1207,7 +1217,7 @@ namespace OutputProcessor { // Somehow, this meter is not linked to any variables either directly or via another meter if (!itemsAssigned) { - ShowWarningError(state, format("Meter:Custom=\"{}\", no items assigned ", ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::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."); @@ -1226,7 +1236,7 @@ namespace OutputProcessor { bool errFlag = false; meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, meter->units, errFlag); if (errFlag) { - ShowContinueError(state, format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "..requests for IP units from this meter will be ignored."); } @@ -1280,9 +1290,9 @@ namespace OutputProcessor { if (std::find(meter->srcMeterNums.begin(), meter->srcMeterNums.end(), srcMeterNum) != meter->srcMeterNums.end()) { ShowWarningCustom(state, eoh, - format("{}=\"{}\" referenced multiple times, only first instance will be used", - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); + EnergyPlus::format("{}=\"{}\" referenced multiple times, only first instance will be used", + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); continue; } @@ -1313,8 +1323,8 @@ namespace OutputProcessor { if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { ShowWarningCustom(state, eoh, - format("Output variable \"{}\" referenced multiple times (directly or via meter)", - op->outVars[keyOutVarNum]->keyColonNameUC)); + EnergyPlus::format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); } else { meter->srcVarNums.push_back(keyOutVarNum); @@ -1327,8 +1337,8 @@ namespace OutputProcessor { if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { ShowWarningCustom(state, eoh, - format("Output variable \"{}\" referenced multiple times (directly or via meter)", - op->outVars[keyOutVarNum]->keyColonNameUC)); + EnergyPlus::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); @@ -1406,7 +1416,7 @@ namespace OutputProcessor { bool errFlag = false; meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, units, errFlag); if (errFlag) { - ShowContinueError(state, format("..on Meter=\"{}\".", Name)); + ShowContinueError(state, EnergyPlus::format("..on Meter=\"{}\".", Name)); ShowContinueError(state, "..requests for IP units from this meter will be ignored."); } } @@ -1454,20 +1464,20 @@ namespace OutputProcessor { addEndUseSpaceType(state, endUseCat, SpaceType); } - std::string meterName = format("{}:Facility", resourceName); + std::string meterName = EnergyPlus::format("{}:Facility", resourceName); AddMeter(state, meterName, units, resource, EndUseCat::Invalid, "", Group::Invalid, outVarNum); if (group != Group::Invalid) { - std::string groupMeterName = format("{}:{}", resourceName, groupNames[(int)group]); + std::string groupMeterName = EnergyPlus::format("{}:{}", resourceName, groupNames[(int)group]); AddMeter(state, groupMeterName, units, resource, EndUseCat::Invalid, "", group, outVarNum); if (group == Group::Building) { if (!ZoneName.empty()) { - std::string zoneMeterName = format("{}:Zone:{}", resourceName, ZoneName); + std::string zoneMeterName = EnergyPlus::format("{}:Zone:{}", resourceName, ZoneName); AddMeter(state, zoneMeterName, units, resource, EndUseCat::Invalid, "", Group::Zone, outVarNum); } if (!SpaceType.empty()) { - std::string spaceMeterName = format("{}:SpaceType:{}", resourceName, SpaceType); + std::string spaceMeterName = EnergyPlus::format("{}:SpaceType:{}", resourceName, SpaceType); AddMeter(state, spaceMeterName, units, resource, EndUseCat::Invalid, "", Group::SpaceType, outVarNum); } } // if (Group == "Building") @@ -1476,32 +1486,33 @@ namespace OutputProcessor { //!! Following if we do EndUse by ResourceType if (endUseCat != EndUseCat::Invalid) { std::string_view endUseCatName = endUseCatNames[(int)endUseCat]; - std::string enduseMeterName = format("{}:{}", endUseCatName, resourceName); + std::string enduseMeterName = EnergyPlus::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 = format("{}:{}:Zone:{}", endUseCatName, resourceName, ZoneName); + std::string enduseZoneMeterName = EnergyPlus::format("{}:{}:Zone:{}", endUseCatName, resourceName, ZoneName); AddMeter(state, enduseZoneMeterName, units, resource, endUseCat, "", Group::Zone, outVarNum); } if (!SpaceType.empty()) { - std::string enduseSpaceMeterName = format("{}:{}:SpaceType:{}", endUseCatName, resourceName, SpaceType); + std::string enduseSpaceMeterName = EnergyPlus::format("{}:{}:SpaceType:{}", endUseCatName, resourceName, SpaceType); AddMeter(state, enduseSpaceMeterName, units, resource, endUseCat, "", Group::SpaceType, outVarNum); } } // End-Use Subcategories if (!endUseSub.empty()) { - std::string subEnduseMeterName = format("{}:{}:{}", endUseSub, endUseCatNames[(int)endUseCat], resourceName); + std::string subEnduseMeterName = EnergyPlus::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 = format("{}:{}:{}:Zone:{}", endUseSub, endUseCatName, resourceName, ZoneName); + std::string subEnduseZoneMeterName = EnergyPlus::format("{}:{}:{}:Zone:{}", endUseSub, endUseCatName, resourceName, ZoneName); AddMeter(state, subEnduseZoneMeterName, units, resource, endUseCat, endUseSub, Group::Zone, outVarNum); } if (!SpaceType.empty()) { - std::string subEnduseSpaceMeterName = format("{}:{}:{}:SpaceType:{}", endUseSub, endUseCatName, resourceName, SpaceType); + std::string subEnduseSpaceMeterName = + EnergyPlus::format("{}:{}:{}:SpaceType:{}", endUseSub, endUseCatName, resourceName, SpaceType); AddMeter(state, subEnduseSpaceMeterName, units, resource, endUseCat, endUseSub, Group::SpaceType, outVarNum); } } // if (sovGroup == Building) @@ -1592,8 +1603,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, format("DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[{}].", Constant::unitNames[(int)units])); + ShowWarningMessage(state, + EnergyPlus::format("DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[{}].", + Constant::unitNames[(int)units])); ErrorsFound = true; } return IPUnits; @@ -2199,14 +2211,14 @@ namespace OutputProcessor { assert(false); } - return format(DateFmt, Day, monthName, Hour, Minute); + return EnergyPlus::format(DateFmt, Day, monthName, Hour, Minute); } std::string OutVar::multiplierString() const { return (ZoneMult == 1 && ZoneListMult == 1) ? "" - : format(" * {} (Zone Multiplier = {}, Zone List Multiplier = {})", ZoneMult * ZoneListMult, ZoneMult, ZoneListMult); + : EnergyPlus::format(" * {} (Zone Multiplier = {}, Zone List Multiplier = {})", ZoneMult * ZoneListMult, ZoneMult, ZoneListMult); } void ReportMeterDetails(EnergyPlusData &state) @@ -2823,7 +2835,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" : format("{:f}", repVal); + NumberOut = (repVal == 0.0) ? "0.0" : EnergyPlus::format("{:f}", repVal); } if ((freq == ReportFreq::EachCall) || (freq == ReportFreq::TimeStep) || (freq == ReportFreq::Hour)) { // -1, 0, 1 @@ -2924,11 +2936,11 @@ namespace OutputProcessor { } if (meter->resource != Constant::eResource::Invalid) { - indexGroup += format(":{}", Constant::eResourceNames[(int)meter->resource]); + indexGroup += EnergyPlus::format(":{}", Constant::eResourceNames[(int)meter->resource]); } if (meter->endUseCat != EndUseCat::Invalid) { - indexGroup += format(":{}", endUseCatNames[(int)meter->endUseCat]); + indexGroup += EnergyPlus::format(":{}", endUseCatNames[(int)meter->endUseCat]); } if (len(meter->EndUseSub) > 0) { @@ -2981,7 +2993,7 @@ namespace OutputProcessor { // This function is here just for unit test purposes DDOutVar *ddVar = state.dataOutputProcessor->ddOutVars[ddNum]; Constant::Units units = ddVar->units; - return format(" [{}]", units == Constant::Units::customEMS ? ddVar->unitNameCustomEMS : Constant::unitNames[(int)units]); + return EnergyPlus::format(" [{}]", units == Constant::Units::customEMS ? ddVar->unitNameCustomEMS : Constant::unitNames[(int)units]); } // unitStringFromDDitem() } // namespace OutputProcessor @@ -3784,7 +3796,8 @@ void GenOutputVariablesAuditReport(EnergyPlusData &state) "or the requested variable is an advanced output which requires Output : Diagnostics, DisplayAdvancedReportVariables;"); state.dataOutputProcessor->Rept = true; } - ShowMessage(state, format("Key={}, VarName={}, Frequency={}", reqVar->key, reqVar->name, localReportFreqNames[(int)reqVar->freq])); + ShowMessage(state, + EnergyPlus::format("Key={}, VarName={}, Frequency={}", reqVar->key, reqVar->name, localReportFreqNames[(int)reqVar->freq])); } } // GenOutputVariablesAuditReport() @@ -3919,7 +3932,8 @@ void UpdateMeterReporting(EnergyPlusData &state) ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError(state, format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowWarningError( + state, EnergyPlus::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -3944,7 +3958,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, format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowWarningError( + state, EnergyPlus::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -3970,7 +3985,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, format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowWarningError( + state, EnergyPlus::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -3995,7 +4011,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, format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowWarningError( + state, EnergyPlus::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -4034,12 +4051,13 @@ void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state, auto &period = meter->periods[(freq == ReportFreq::EachCall) ? (int)ReportFreq::TimeStep : (int)freq]; if (!CumulativeIndicator) { if (MeterFileOnlyIndicator && period.Rpt) { - ShowWarningError(state, - 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())); + 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())); } if (!period.Rpt) { period.Rpt = true; @@ -4056,11 +4074,11 @@ void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state, } else { // !CumulativeIndicator if (MeterFileOnlyIndicator && period.accRpt) { ShowWarningError(state, - 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())); + 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())); } if (!period.accRpt) { @@ -4221,7 +4239,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, format("Index = {} Number of variables = {}", keyVarIndex, op->outVars.size())); + ShowContinueError(state, EnergyPlus::format("Index = {} Number of variables = {}", keyVarIndex, op->outVars.size())); } // must use %Which, %Value is always zero if variable is not a requested report variable @@ -4644,7 +4662,7 @@ void InitPollutionMeterReporting(EnergyPlusData &state, OutputProcessor::ReportF auto &op = state.dataOutputProcessor; for (int iResource = 0; iResource < (int)Constant::eResource::Num; ++iResource) { - std::string meterName = format("{}:Facility", Constant::eResourceNames[iResource]); + std::string meterName = EnergyPlus::format("{}:Facility", Constant::eResourceNames[iResource]); std::string meterNameUC = Util::makeUPPER(meterName); auto found = op->meterMap.find(meterNameUC); diff --git a/src/EnergyPlus/OutputReportPredefined.cc b/src/EnergyPlus/OutputReportPredefined.cc index 463aa6f0919..e36742bcbdf 100644 --- a/src/EnergyPlus/OutputReportPredefined.cc +++ b/src/EnergyPlus/OutputReportPredefined.cc @@ -1812,7 +1812,7 @@ namespace OutputReportPredefined { // something changed in FMT 7.x and "{:#12.{}F}" now outputs 13. So changing it to 11.{}F to maintain existing functionality. Likely // related to https://github.com/fmtlib/fmt/issues/1893 state.dataOutRptPredefined->tableEntry(state.dataOutRptPredefined->numTableEntry).charEntry = - format("{:#11.{}F}", tableEntryReal, sigDigitCount); + EnergyPlus::format("{:#11.{}F}", tableEntryReal, sigDigitCount); } else { // Formatting in scientific notation, zero sigDigits makes zero sense. // **for something greater than 1E+08**, one sigDigits is very unhelpful (you're having an accuracy of 0.5E+07 at best) @@ -1820,7 +1820,7 @@ namespace OutputReportPredefined { sigDigitCount = 2; } state.dataOutRptPredefined->tableEntry(state.dataOutRptPredefined->numTableEntry).charEntry = - format("{:12.{}E}", tableEntryReal, sigDigitCount); + EnergyPlus::format("{:12.{}E}", tableEntryReal, sigDigitCount); } if (state.dataOutRptPredefined->tableEntry(state.dataOutRptPredefined->numTableEntry).charEntry.size() > 12) { @@ -1909,7 +1909,7 @@ namespace OutputReportPredefined { incrementTableEntry(state); // convert the integer to a string - state.dataOutRptPredefined->tableEntry(state.dataOutRptPredefined->numTableEntry).charEntry = format("{:12}", tableEntryInt); + state.dataOutRptPredefined->tableEntry(state.dataOutRptPredefined->numTableEntry).charEntry = EnergyPlus::format("{:12}", tableEntryInt); state.dataOutRptPredefined->tableEntry(state.dataOutRptPredefined->numTableEntry).objectName = objName; state.dataOutRptPredefined->tableEntry(state.dataOutRptPredefined->numTableEntry).indexColumn = columnIndex; } diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index c8935fe6a58..8892fd93972 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -201,7 +201,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, format("OpenOutputTabularFile: Could not open file \"{}\" for output (write).", filePath)); + ShowFatalError(state, EnergyPlus::format("OpenOutputTabularFile: Could not open file \"{}\" for output (write).", filePath)); } } else { tbl_stream.setstate(std::ios_base::badbit); @@ -357,9 +357,10 @@ void GetInputTabularMonthly(EnergyPlusData &state) if (!state.dataGlobal->DoWeathSim) { ShowWarningError( state, - format("{} requested with SimulationControl Run Simulation for Weather File Run Periods set to No so {} will not be generated", - CurrentModuleObject, - CurrentModuleObject)); + EnergyPlus::format( + "{} requested with SimulationControl Run Simulation for Weather File Run Periods set to No so {} will not be generated", + CurrentModuleObject, + CurrentModuleObject)); return; } } @@ -382,16 +383,16 @@ void GetInputTabularMonthly(EnergyPlusData &state) Util::IsNameEmpty(state, AlphArray(1), CurrentModuleObject, ErrorsFound); } if (NumAlphas < 2) { - ShowSevereError(state, format("{}: No fields specified.", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: No fields specified.", CurrentModuleObject)); } // add to the data structure int const curTable = AddMonthlyReport(state, AlphArray(1), int(NumArray(1))); for (int jField = 2; jField <= NumAlphas; jField += 2) { if (AlphArray(jField).empty()) { ShowWarningError(state, - format("{}: Blank column specified in '{}', need to provide a variable or meter name ", - CurrentModuleObject, - ort->MonthlyInput(TabNum).name)); + EnergyPlus::format("{}: Blank column specified in '{}', need to provide a variable or meter name ", + CurrentModuleObject, + ort->MonthlyInput(TabNum).name)); continue; } std::string const curAggString = AlphArray(jField + 1); @@ -399,8 +400,9 @@ void GetInputTabularMonthly(EnergyPlusData &state) AggType curAggType = static_cast(getEnumValue(AggTypeNamesUC, Util::makeUPPER(curAggString))); // set accumulator values to default as appropriate for aggregation type if (curAggType == AggType::Invalid) { - ShowWarningError(state, format("{}={}, Variable name={}", CurrentModuleObject, ort->MonthlyInput(TabNum).name, AlphArray(jField))); - ShowContinueError(state, format("Invalid aggregation type=\"{}\" Defaulting to SumOrAverage.", curAggString)); + ShowWarningError( + state, EnergyPlus::format("{}={}, Variable name={}", CurrentModuleObject, ort->MonthlyInput(TabNum).name, AlphArray(jField))); + ShowContinueError(state, EnergyPlus::format("Invalid aggregation type=\"{}\" Defaulting to SumOrAverage.", curAggString)); curAggType = AggType::SumOrAvg; } AddMonthlyFieldSetInput(state, curTable, AlphArray(jField), "", curAggType); @@ -762,8 +764,10 @@ void InitializeTabularMonthly(EnergyPlusData &state) UnitsVar = ort->MonthlyFieldSetInput(FirstColumn + colNum - 1).varUnits; if (KeyCount == 0 && issueWarnings && !ort->MonthlyInput(TabNum).isNamedMonthly) { - ShowWarningError( - state, format("In Output:Table:Monthly '{}' invalid Variable or Meter Name '{}'", ort->MonthlyInput(TabNum).name, curVariMeter)); + ShowWarningError(state, + EnergyPlus::format("In Output:Table:Monthly '{}' invalid Variable or Meter Name '{}'", + ort->MonthlyInput(TabNum).name, + curVariMeter)); } for (int iKey = 1; iKey <= KeyCount; ++iKey) { found = 0; @@ -921,11 +925,14 @@ void InitializeTabularMonthly(EnergyPlusData &state) } else { // if no key corresponds to this instance of the report // fixing CR5878 removed the showing of the warning once about a specific variable. if (issueWarnings && !ort->MonthlyInput(TabNum).isNamedMonthly) { - ShowWarningError( - state, - format("In Output:Table:Monthly '{}' invalid Variable or Meter Name '{}'", ort->MonthlyInput(TabNum).name, curVariMeter)); - ShowContinueError( - state, format("..i.e., Variable name={}:{} not valid for this simulation.", UniqueKeyNames(kUniqueKey), curVariMeter)); + ShowWarningError(state, + EnergyPlus::format("In Output:Table:Monthly '{}' invalid Variable or Meter Name '{}'", + ort->MonthlyInput(TabNum).name, + curVariMeter)); + ShowContinueError(state, + EnergyPlus::format("..i.e., Variable name={}:{} not valid for this simulation.", + UniqueKeyNames(kUniqueKey), + curVariMeter)); } ort->MonthlyColumns(mColumn).varName = curVariMeter; ort->MonthlyColumns(mColumn).varNum = 0; @@ -990,15 +997,17 @@ bool isInvalidAggregationOrder(EnergyPlusData &state) } } if (missingMaxOrMinError) { - ShowSevereError(state, - format("The Output:Table:Monthly report named=\"{}\" has a valueWhenMaxMin aggregation type for a column without a " + ShowSevereError( + state, + EnergyPlus::format("The Output:Table:Monthly report named=\"{}\" has a valueWhenMaxMin aggregation type for a column without a " "previous column that uses either the minimum or maximum aggregation types. The report will not be generated.", ort->MonthlyInput(iInput).name)); foundError = true; } if (missingHourAggError) { - ShowSevereError(state, - format("The Output:Table:Monthly report named=\"{}\" has a --DuringHoursShown aggregation type for a column without a " + ShowSevereError( + state, + EnergyPlus::format("The Output:Table:Monthly report named=\"{}\" has a --DuringHoursShown aggregation type for a column without a " "previous field that uses one of the Hour-- aggregation types. The report will not be generated.", ort->MonthlyInput(iInput).name)); foundError = true; @@ -1074,9 +1083,10 @@ void GetInputTabularTimeBins(EnergyPlusData &state) if (!state.dataGlobal->DoWeathSim) { ShowWarningError( state, - format("{} requested with SimulationControl Run Simulation for Weather File Run Periods set to No so {} will not be generated", - CurrentModuleObject, - CurrentModuleObject)); + EnergyPlus::format( + "{} requested with SimulationControl Run Simulation for Weather File Run Periods set to No so {} will not be generated", + CurrentModuleObject, + CurrentModuleObject)); return; } } @@ -1111,9 +1121,10 @@ void GetInputTabularTimeBins(EnergyPlusData &state) if (len(AlphArray(4)) > 0) { if (!(Util::SameString(AlphArray(4), "ENERGY") || Util::SameString(AlphArray(4), "DEMAND") || Util::SameString(AlphArray(4), "TEMPERATURE") || Util::SameString(AlphArray(4), "FLOWRATE"))) { - ShowWarningError( - state, - format("In {} named {} the Variable Type was not energy, demand, temperature, or flowrate.", CurrentModuleObject, AlphArray(1))); + ShowWarningError(state, + EnergyPlus::format("In {} named {} the Variable Type was not energy, demand, temperature, or flowrate.", + CurrentModuleObject, + AlphArray(1))); } } ort->OutputTableBinned(iInObj).intervalStart = NumArray(1); @@ -1142,8 +1153,10 @@ void GetInputTabularTimeBins(EnergyPlusData &state) ort->OutputTableBinned(iInObj).stepType, ort->OutputTableBinned(iInObj).units); if (ort->OutputTableBinned(iInObj).typeOfVar == OutputProcessor::VariableType::Invalid) { - ShowWarningError( - state, format("{}: User specified meter or variable not found: {}", CurrentModuleObject, ort->OutputTableBinned(iInObj).varOrMeter)); + ShowWarningError(state, + EnergyPlus::format("{}: User specified meter or variable not found: {}", + CurrentModuleObject, + ort->OutputTableBinned(iInObj).varOrMeter)); } // If only a single table key is requested than only one should be counted // later will reset the numTables array pointer but for now use it to know @@ -1177,7 +1190,8 @@ void GetInputTabularTimeBins(EnergyPlusData &state) // check if valid meter or number // Why is this here? if (objVarIDs(iTable) == -1) { - ShowWarningError(state, format("{}: Specified variable or meter not found: {}", CurrentModuleObject, objNames(iTable))); + ShowWarningError(state, + EnergyPlus::format("{}: Specified variable or meter not found: {}", CurrentModuleObject, objNames(iTable))); } } } else { @@ -1226,10 +1240,10 @@ bool warningAboutKeyNotFound(EnergyPlusData &state, int foundIndex, int inObjInd { if (foundIndex == 0) { ShowWarningError(state, - format("{}: Specified key not found: {} for variable: {}", - moduleName, - state.dataOutRptTab->OutputTableBinned(inObjIndex).keyValue, - state.dataOutRptTab->OutputTableBinned(inObjIndex).varOrMeter)); + EnergyPlus::format("{}: Specified key not found: {} for variable: {}", + moduleName, + state.dataOutRptTab->OutputTableBinned(inObjIndex).keyValue, + state.dataOutRptTab->OutputTableBinned(inObjIndex).varOrMeter)); return true; } return false; @@ -1345,7 +1359,8 @@ void GetInputTabularStyle(EnergyPlusData &state) } else { ShowWarningError( state, - format("{}: Invalid {}=\"{}\". Commas will be used.", CurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), AlphArray(1))); + EnergyPlus::format( + "{}: Invalid {}=\"{}\". Commas will be used.", CurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), AlphArray(1))); ort->numStyles = 1; ort->TableStyle(1) = TableStyle::Comma; ort->del(1) = DataStringGlobals::CharComma; // comma @@ -1356,17 +1371,17 @@ void GetInputTabularStyle(EnergyPlusData &state) ort->unitsStyle_Tabular = SetUnitsStyleFromString(AlphArray(2)); if (ort->unitsStyle_Tabular == UnitsStyle::NotFound) { ShowWarningError(state, - format("{}: Invalid {}=\"{}\". No unit conversion will be performed. Normal SI units will be shown.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - AlphArray(2))); + EnergyPlus::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, format("{}: Only one instance of this object is allowed. Commas will be used.", CurrentModuleObject)); + ShowWarningError(state, EnergyPlus::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"; @@ -1678,13 +1693,14 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) } if (!nameFound) { if (Util::SameString(AlphArray(iReport), "Standard62.1Summary")) { - ShowWarningError(state, format("{} Field[{}]=\"Standard62.1Summary\", Report is not enabled.", CurrentModuleObject, iReport)); + ShowWarningError( + state, EnergyPlus::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, - format( + EnergyPlus::format( "{} Field[{}]=\"{}\", invalid report name -- will not be reported.", CurrentModuleObject, iReport, AlphArray(iReport))); // ErrorsFound=.TRUE. } @@ -1692,11 +1708,11 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) } CreatePredefinedMonthlyReports(state); } else if (NumTabularPredefined > 1) { - ShowSevereError(state, format("{}: Only one instance of this object is allowed.", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Only one instance of this object is allowed.", CurrentModuleObject)); ErrorsFound = true; } if (ErrorsFound) { - ShowFatalError(state, format("{}: Preceding errors cause termination.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::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) { @@ -1762,28 +1778,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 = format("{}:FACILITY", ort->resourceTypeNames(iResource)); + std::string meterName = EnergyPlus::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 = format("{}:{}", ort->endUseNames(jEndUse), ort->resourceTypeNames(iResource)); //// ':FACILITY' + meterName = EnergyPlus::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 = format("{}:{}:{}", - op->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub), - ort->endUseNames(jEndUse), - ort->resourceTypeNames(iResource)); + meterName = EnergyPlus::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 = format("{}:{}:SpaceType:{}", - ort->endUseNames(jEndUse), - ort->resourceTypeNames(iResource), - op->EndUseCategory(jEndUse).spaceTypeName(kEndUseSpType)); + meterName = EnergyPlus::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; } @@ -2060,18 +2076,19 @@ void InitializePredefinedMonthlyTitles(EnergyPlusData &state) ort->namedMonthly(63).title = "HeatEmissionsReportMonthly"; if (numNamedMonthly != NumMonthlyReports) { - ShowFatalError(state, - format("InitializePredefinedMonthlyTitles: Number of Monthly Reports in OutputReportTabular=[{}] does not match number in " - "DataOutputs=[{}].", - numNamedMonthly, - NumMonthlyReports)); + ShowFatalError( + state, + EnergyPlus::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, format("first mismatch at ORT [{}] =\"{}\".", numNamedMonthly, ort->namedMonthly(xcount).title)); - ShowContinueError(state, format("same location in DO =\"{}\".", MonthlyNamedReports(xcount))); + ShowContinueError(state, EnergyPlus::format("first mismatch at ORT [{}] =\"{}\".", numNamedMonthly, ort->namedMonthly(xcount).title)); + ShowContinueError(state, EnergyPlus::format("same location in DO =\"{}\".", MonthlyNamedReports(xcount))); ShowFatalError(state, "Preceding condition causes termination."); } } @@ -3322,15 +3339,15 @@ void WriteTableOfContents(EnergyPlusData &state) int const curTable = ort->OutputTableBinned(iInput).resIndex + (jTable - 1); std::string curName; if (ort->ip()) { - std::string origName = format("{} [{}]", - ort->OutputTableBinned(iInput).varOrMeter, - Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); + std::string origName = EnergyPlus::format("{} [{}]", + ort->OutputTableBinned(iInput).varOrMeter, + Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); [[maybe_unused]] int indexUnitConv = -1; LookupSItoIP(state, origName, indexUnitConv, curName); } else { - curName = format("{}[{}]", - ort->OutputTableBinned(iInput).varOrMeter, - Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); + curName = EnergyPlus::format("{}[{}]", + ort->OutputTableBinned(iInput).varOrMeter, + Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); } if (ort->OutputTableBinned(iInput).sched == nullptr) { tbl_stream << "BinObjVarID(curTable).namesOfObj) << "\">" @@ -7197,8 +7214,8 @@ void WriteMonthlyTables(EnergyPlusData &state) // do the unit conversions if (currentStyle.unitsStyle == OutputReportTabular::UnitsStyle::InchPound || currentStyle.unitsStyle == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { - varNameWithUnits = - format("{} [{}]", ort->MonthlyColumns(curCol).varName, Constant::unitNames[(int)ort->MonthlyColumns(curCol).units]); + varNameWithUnits = EnergyPlus::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")) { @@ -7562,8 +7579,8 @@ void WriteTimeBinTables(EnergyPlusData &state) for (int iInObj = 1; iInObj <= ort->OutputTableBinnedCount; ++iInObj) { int const firstReport = ort->OutputTableBinned(iInObj).resIndex; - curNameWithSIUnits = - format("{} [{}]", ort->OutputTableBinned(iInObj).varOrMeter, Constant::unitNames[(int)ort->OutputTableBinned(iInObj).units]); + curNameWithSIUnits = EnergyPlus::format( + "{} [{}]", ort->OutputTableBinned(iInObj).varOrMeter, Constant::unitNames[(int)ort->OutputTableBinned(iInObj).units]); Real64 curIntervalStart; Real64 curIntervalSize; int indexUnitConv = -1; @@ -7877,30 +7894,30 @@ void WriteBEPSTable(EnergyPlusData &state) if (currentStyle.produceTabular) { if (state.dataGlobal->createPerfLog) { - Util::appendPerfLog(state, "Electricity ABUPS Total [J]", format("{:.3R}", collapsedTotal(1))); - Util::appendPerfLog(state, "Natural Gas ABUPS Total [J]", format("{:.3R}", collapsedTotal(2))); - Util::appendPerfLog(state, "Gasoline ABUPS Total [J]", format("{:.3R}", collapsedTotal(3))); - Util::appendPerfLog(state, "Diesel ABUPS Total [J]", format("{:.3R}", collapsedTotal(4))); - Util::appendPerfLog(state, "Coal ABUPS Total [J]", format("{:.3R}", collapsedTotal(5))); - Util::appendPerfLog(state, "Fuel Oil No 1 ABUPS Total [J]", format("{:.3R}", collapsedTotal(6))); - Util::appendPerfLog(state, "Fuel Oil No 2 ABUPS Total [J]", format("{:.3R}", collapsedTotal(7))); - Util::appendPerfLog(state, "Propane ABUPS Total [J]", format("{:.3R}", collapsedTotal(8))); - Util::appendPerfLog(state, "Other Fuel 1 ABUPS Total [J]", format("{:.3R}", collapsedTotal(9))); - Util::appendPerfLog(state, "Other Fuel 2 ABUPS Total [J]", format("{:.3R}", collapsedTotal(10))); - Util::appendPerfLog(state, "District Cooling ABUPS Total [J]", format("{:.3R}", collapsedTotal(11))); - Util::appendPerfLog(state, "District Heating Water ABUPS Total [J]", format("{:.3R}", collapsedTotal(12))); - Util::appendPerfLog(state, "District Heating Steam ABUPS Total [J]", format("{:.3R}", collapsedTotal(13))); - Util::appendPerfLog(state, "Water ABUPS Total [m3]", format("{:.3R}", collapsedTotal(14))); - Util::appendPerfLog(state, "Values Gathered Over [hours]", format("{:.2R}", ort->gatherElapsedTimeBEPS)); + Util::appendPerfLog(state, "Electricity ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(1))); + Util::appendPerfLog(state, "Natural Gas ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(2))); + Util::appendPerfLog(state, "Gasoline ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(3))); + Util::appendPerfLog(state, "Diesel ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(4))); + Util::appendPerfLog(state, "Coal ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(5))); + Util::appendPerfLog(state, "Fuel Oil No 1 ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(6))); + Util::appendPerfLog(state, "Fuel Oil No 2 ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(7))); + Util::appendPerfLog(state, "Propane ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(8))); + Util::appendPerfLog(state, "Other Fuel 1 ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(9))); + Util::appendPerfLog(state, "Other Fuel 2 ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(10))); + Util::appendPerfLog(state, "District Cooling ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(11))); + Util::appendPerfLog(state, "District Heating Water ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(12))); + Util::appendPerfLog(state, "District Heating Steam ABUPS Total [J]", EnergyPlus::format("{:.3R}", collapsedTotal(13))); + Util::appendPerfLog(state, "Water ABUPS Total [m3]", EnergyPlus::format("{:.3R}", collapsedTotal(14))); + Util::appendPerfLog(state, "Values Gathered Over [hours]", EnergyPlus::format("{:.2R}", ort->gatherElapsedTimeBEPS)); Util::appendPerfLog(state, "Facility Any Zone Oscillating Temperatures Time [hours]", - format("{:.2R}", state.dataZoneTempPredictorCorrector->AnnualAnyZoneTempOscillate)); + EnergyPlus::format("{:.2R}", state.dataZoneTempPredictorCorrector->AnnualAnyZoneTempOscillate)); Util::appendPerfLog(state, "Facility Any Zone Oscillating Temperatures During Occupancy Time [hours]", - format("{:.2R}", state.dataZoneTempPredictorCorrector->AnnualAnyZoneTempOscillateDuringOccupancy)); + EnergyPlus::format("{:.2R}", state.dataZoneTempPredictorCorrector->AnnualAnyZoneTempOscillateDuringOccupancy)); Util::appendPerfLog(state, "Facility Any Zone Oscillating Temperatures in Deadband Time [hours]", - format("{:.2R}", state.dataZoneTempPredictorCorrector->AnnualAnyZoneTempOscillateInDeadband)); + EnergyPlus::format("{:.2R}", state.dataZoneTempPredictorCorrector->AnnualAnyZoneTempOscillateInDeadband)); } } for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { @@ -11706,23 +11723,24 @@ void WriteVeriSumTable(EnergyPlusData &state) ShowWarningError( state, "WriteVeriSumTable: InputVerificationsAndResultsSummary: Wall area based on [>=60,<=120] degrees (tilt) as walls"); ShowContinueError(state, - format("differs ~{:.1R}% from user entered Wall class surfaces. Degree calculation based on ASHRAE " - "90.1 wall definitions.", - pdiff * 100.0)); + EnergyPlus::format("differs ~{:.1R}% from user entered Wall class surfaces. Degree calculation based on ASHRAE " + "90.1 wall definitions.", + pdiff * 100.0)); // CALL ShowContinueError(state, format("Calculated based on degrees=[{}{}{}{}{}{}] m2, Calculated from user entered Wall // class surfaces=[{}{}{}{}{}{}", //, &, //, TRIM(ADJUSTL(RealToStr(currentStyle.formatReals, (wallAreaN + wallAreaS + // 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, - format("Total wall area by ASHRAE 90.1 definition={} m2.", - stripped(RealToStr(currentStyle.formatReals, (wallAreaN + wallAreaS + wallAreaE + wallAreaW), 3)))); - ShowContinueError(state, - format("Total exterior wall area from user entered classes={} m2.", - stripped(RealToStr(currentStyle.formatReals, totExtGrossWallArea_Multiplied, 3)))); + EnergyPlus::format("Total exterior wall area from user entered classes={} m2.", + stripped(RealToStr(currentStyle.formatReals, totExtGrossWallArea_Multiplied, 3)))); ShowContinueError(state, - format("Total ground contact wall area from user entered classes={} m2.", - stripped(RealToStr(currentStyle.formatReals, totExtGrossGroundWallArea_Multiplied, 3)))); + EnergyPlus::format("Total ground contact wall area from user entered classes={} m2.", + stripped(RealToStr(currentStyle.formatReals, totExtGrossGroundWallArea_Multiplied, 3)))); } } } @@ -12441,16 +12459,16 @@ void WriteReportHeaderReportingPeriod(EnergyPlusData &state, OutputProcessor::StoreType::Average); WriteSubtitle(state, - format("Reporting period: {} -- {}, Total Electricity Usage: {:.2R} kWh", - formatReportPeriodTimestamp(ReportPeriodInputData(periodIdx).startYear, - ReportPeriodInputData(periodIdx).startMonth, - ReportPeriodInputData(periodIdx).startDay, - ReportPeriodInputData(periodIdx).startHour), - formatReportPeriodTimestamp(ReportPeriodInputData(periodIdx).endYear, - ReportPeriodInputData(periodIdx).endMonth, - ReportPeriodInputData(periodIdx).endDay, - ReportPeriodInputData(periodIdx).endHour), - ReportPeriodInputData(periodIdx).totalElectricityUse / 3600000.0)); + EnergyPlus::format("Reporting period: {} -- {}, Total Electricity Usage: {:.2R} kWh", + formatReportPeriodTimestamp(ReportPeriodInputData(periodIdx).startYear, + ReportPeriodInputData(periodIdx).startMonth, + ReportPeriodInputData(periodIdx).startDay, + ReportPeriodInputData(periodIdx).startHour), + formatReportPeriodTimestamp(ReportPeriodInputData(periodIdx).endYear, + ReportPeriodInputData(periodIdx).endMonth, + ReportPeriodInputData(periodIdx).endDay, + ReportPeriodInputData(periodIdx).endHour), + ReportPeriodInputData(periodIdx).totalElectricityUse / 3600000.0)); } void WriteReportPeriodTimeConsumption(EnergyPlusData &state) @@ -12664,10 +12682,11 @@ void WriteThermalResilienceTablesRepPeriod(EnergyPlusData &state, int const peri if (!state.dataHeatBal->People(iPeople).Pierce) { hasPierceSET = false; if (ort->displayThermalResilienceSummaryExplicitly) { - ShowWarningError(state, - 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)); + 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)); } } } @@ -13494,10 +13513,11 @@ void WriteThermalResilienceTables(EnergyPlusData &state) if (!state.dataHeatBal->People(iPeople).Pierce) { hasPierceSET = false; if (ort->displayThermalResilienceSummaryExplicitly) { - ShowWarningError(state, - 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)); + 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)); } } } @@ -13740,10 +13760,11 @@ void WriteVisualResilienceTables(EnergyPlusData &state) for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { if (state.dataDayltg->ZoneDaylight(ZoneNum).totRefPts == 0) { if (state.dataOutRptTab->displayVisualResilienceSummaryExplicitly) { - ShowWarningError(state, - 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)); + 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)); } } } @@ -14133,7 +14154,7 @@ void WritePredefinedTables(EnergyPlusData &state) value, state.dataOutRptPredefined->tableEntry(lTableEntry).significantDigits); } else { - tableBody(colCurrent, rowCurrent) = format("{}", value); + tableBody(colCurrent, rowCurrent) = EnergyPlus::format("{}", value); } } else { tableBody(colCurrent, rowCurrent) = state.dataOutRptPredefined->tableEntry(lTableEntry).charEntry; @@ -16412,10 +16433,10 @@ void CollectPeakZoneConditions(EnergyPlusData &state, if (isCooling) { // Time of Peak Load if ((desDaySelected > 0) && ((size_t)desDaySelected <= state.dataWeather->DesDayInput.size())) { - compLoad.peakDateHrMin = format("{}/{} {}", - state.dataWeather->DesDayInput(desDaySelected).Month, - state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(state, timeOfMax)); + compLoad.peakDateHrMin = EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(desDaySelected).Month, + state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(state, timeOfMax)); } else { compLoad.peakDateHrMin = szCalcFinalSizing.CoolPeakDateHrMin; } @@ -16464,10 +16485,10 @@ void CollectPeakZoneConditions(EnergyPlusData &state, } else { // Time of Peak Load if ((size_t)desDaySelected <= state.dataWeather->DesDayInput.size()) { - compLoad.peakDateHrMin = format("{}/{} {}", - state.dataWeather->DesDayInput(desDaySelected).Month, - state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, - state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(state, timeOfMax)); + compLoad.peakDateHrMin = EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(desDaySelected).Month, + state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, + state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(state, timeOfMax)); } else { compLoad.peakDateHrMin = szCalcFinalSizing.HeatPeakDateHrMin; } @@ -18579,7 +18600,7 @@ std::string RealToStr(bool const formatReals, Real64 const RealIn, int const num if (!formatReals) { // No rounding - return format("{}", RealIn); + return EnergyPlus::format("{}", RealIn); } int nDigits = numDigits; if (RealIn < 0.0) { @@ -18593,7 +18614,7 @@ std::string RealToStr(bool const formatReals, Real64 const RealIn, int const num } if (std::abs(RealIn) > maxvalDigitsA.at(nDigits)) { - return format("{:12.6E}", RealIn); + return EnergyPlus::format("{:12.6E}", RealIn); } return format(formDigitsA.at(nDigits), RealIn); @@ -19390,7 +19411,7 @@ void LookupSItoIP(EnergyPlusData &state, std::string const &stringInWithSI, int // Add warning if units not found. if (unitConvIndex == 0 && !noBrackets) { - ShowWarningError(state, format("Unable to find a unit conversion from {} into IP units", stringInWithSI)); + ShowWarningError(state, EnergyPlus::format("Unable to find a unit conversion from {} into IP units", stringInWithSI)); ShowContinueError(state, "Applying default conversion factor of 1.0"); } } @@ -19627,7 +19648,7 @@ Real64 getSpecificUnitMultiplier(EnergyPlusData &state, std::string const &SIuni if (state.dataOutRptTab->foundGsum != 0) { getSpecificUnitMultiplier = ort->UnitConv(state.dataOutRptTab->foundGsum).mult; } else { - ShowWarningError(state, format("Unable to find a unit conversion from {} to {}", SIunit, IPunit)); + ShowWarningError(state, EnergyPlus::format("Unable to find a unit conversion from {} to {}", SIunit, IPunit)); ShowContinueError(state, "Applying default conversion factor of 1.0"); getSpecificUnitMultiplier = 1.0; } @@ -19682,7 +19703,7 @@ Real64 getSpecificUnitDivider(EnergyPlusData &state, std::string const &SIunit, if (mult != 0) { getSpecificUnitDivider = 1 / mult; } else { - ShowWarningError(state, format("Unable to find a unit conversion from {} to {}", SIunit, IPunit)); + ShowWarningError(state, EnergyPlus::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/OutputReportTabularAnnual.cc b/src/EnergyPlus/OutputReportTabularAnnual.cc index 373d4432a7e..036bcc27aa6 100644 --- a/src/EnergyPlus/OutputReportTabularAnnual.cc +++ b/src/EnergyPlus/OutputReportTabularAnnual.cc @@ -109,9 +109,10 @@ void GetInputTabularAnnual(EnergyPlusData &state) if (!state.dataGlobal->DoWeathSim) { ShowWarningError( state, - format("{} requested with SimulationControl Run Simulation for Weather File Run Periods set to No so {} will not be generated", - currentModuleObject, - currentModuleObject)); + EnergyPlus::format( + "{} requested with SimulationControl Run Simulation for Weather File Run Periods set to No so {} will not be generated", + currentModuleObject, + currentModuleObject)); return; } } @@ -126,10 +127,11 @@ void GetInputTabularAnnual(EnergyPlusData &state) for (int jAlpha = 4; jAlpha <= numAlphas; jAlpha += 2) { std::string curVarMtr = alphArray(jAlpha); if (curVarMtr.empty()) { - ShowWarningError(state, - format("{}: Blank column specified in '{}', need to provide a variable or meter or EMS variable name ", - currentModuleObject, - alphArray(1))); + ShowWarningError( + state, + EnergyPlus::format("{}: Blank column specified in '{}', need to provide a variable or meter or EMS variable name ", + currentModuleObject, + alphArray(1))); } if (jAlpha <= numAlphas) { const std::string &aggregationString = alphArray(jAlpha + 1); @@ -150,7 +152,7 @@ void GetInputTabularAnnual(EnergyPlusData &state) } annualTables.back().setupGathering(state); } else { - ShowSevereError(state, format("{}: Must enter at least the first six fields.", currentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Must enter at least the first six fields.", currentModuleObject)); } } } @@ -300,14 +302,16 @@ bool AnnualTable::invalidAggregationOrder(EnergyPlusData &state) } } if (missingMaxOrMinError) { - ShowSevereError(state, - format("The Output:Table:Annual report named=\"{}\" has a valueWhenMaxMin aggregation type for a column without a previous " + ShowSevereError( + state, + EnergyPlus::format("The Output:Table:Annual report named=\"{}\" has a valueWhenMaxMin aggregation type for a column without a previous " "column that uses either the minimum or maximum aggregation types. The report will not be generated.", m_name)); } if (missingHourAggError) { - ShowSevereError(state, - format("The Output:Table:Annual report named=\"{}\" has a --DuringHoursShown aggregation type for a column without a " + ShowSevereError( + state, + EnergyPlus::format("The Output:Table:Annual report named=\"{}\" has a --DuringHoursShown aggregation type for a column without a " "previous field that uses one of the Hour-- aggregation types. The report will not be generated.", m_name)); } @@ -714,7 +718,7 @@ void AnnualTable::writeTable(EnergyPlusData &state, OutputReportTabular::tabular switch (style.unitsStyle) { case OutputReportTabular::UnitsStyle::InchPound: case OutputReportTabular::UnitsStyle::InchPoundExceptElectricity: { - varNameWithUnits = format("{} [{}]", fldSt.m_variMeter, Constant::unitNames[static_cast(fldSt.m_varUnits)]); + varNameWithUnits = EnergyPlus::format("{} [{}]", fldSt.m_variMeter, Constant::unitNames[static_cast(fldSt.m_varUnits)]); OutputReportTabular::LookupSItoIP(state, varNameWithUnits, indexUnitConv, curUnits); OutputReportTabular::GetUnitConversion(state, indexUnitConv, curConversionFactor, curConversionOffset, curUnits); break; @@ -1177,7 +1181,7 @@ AnnualFieldSet::AggregationKind stringToAggKind(EnergyPlusData &state, std::stri outAggType = AnnualFieldSet::AggregationKind::minimumDuringHoursShown; } else { outAggType = AnnualFieldSet::AggregationKind::sumOrAvg; - ShowWarningError(state, format("Invalid aggregation type=\"{}\" Defaulting to SumOrAverage.", inString)); + ShowWarningError(state, EnergyPlus::format("Invalid aggregation type=\"{}\" Defaulting to SumOrAverage.", inString)); } return outAggType; } @@ -1366,7 +1370,8 @@ void AnnualTable::convertUnitForDeferredResults(EnergyPlusData &state, AnnualFie case OutputReportTabular::UnitsStyle::InchPound: case OutputReportTabular::UnitsStyle::InchPoundExceptElectricity: { int indexUnitConv; - const std::string varNameWithUnits = format("{} [{}]", fldSt.m_variMeter, Constant::unitNames[static_cast(fldSt.m_varUnits)]); + const std::string varNameWithUnits = + EnergyPlus::format("{} [{}]", fldSt.m_variMeter, Constant::unitNames[static_cast(fldSt.m_varUnits)]); OutputReportTabular::LookupSItoIP(state, varNameWithUnits, indexUnitConv, curUnits); OutputReportTabular::GetUnitConversion(state, indexUnitConv, curConversionFactor, curConversionOffset, curUnits); break; diff --git a/src/EnergyPlus/OutputReports.cc b/src/EnergyPlus/OutputReports.cc index ddc2b9f7346..d3d90e1fe92 100644 --- a/src/EnergyPlus/OutputReports.cc +++ b/src/EnergyPlus/OutputReports.cc @@ -142,7 +142,8 @@ void ReportSurfaces(EnergyPlusData &state) DXFOut(state, Option1, Option2); DXFDone = true; } else { - ShowWarningError(state, format("ReportSurfaces: DXF output already generated. DXF with option=[{}] will not be generated.", Option1)); + ShowWarningError( + state, EnergyPlus::format("ReportSurfaces: DXF output already generated. DXF with option=[{}] will not be generated.", Option1)); } } @@ -166,7 +167,8 @@ void ReportSurfaces(EnergyPlusData &state) VRMLOut(state, Option1, Option2); VRMLDone = true; } else { - ShowWarningError(state, format("ReportSurfaces: VRML output already generated. VRML with option=[{}] will not be generated.", Option1)); + ShowWarningError( + state, EnergyPlus::format("ReportSurfaces: VRML output already generated. VRML with option=[{}] will not be generated.", Option1)); } } @@ -203,9 +205,10 @@ void LinesOut(EnergyPlusData &state, std::string const &option) } if (state.dataOutputReports->optiondone) { - ShowWarningError(state, - format("Report of Surfaces/Lines Option has already been completed with option={}", state.dataOutputReports->lastoption)); - ShowContinueError(state, format("..option=\"{}\" will not be done this time.", option)); + ShowWarningError( + state, + EnergyPlus::format("Report of Surfaces/Lines Option has already been completed with option={}", state.dataOutputReports->lastoption)); + ShowContinueError(state, EnergyPlus::format("..option=\"{}\" will not be done this time.", option)); return; } @@ -518,7 +521,7 @@ void DXFOut(EnergyPlusData &state, ThickPolyline = false; PolylineWidth = " 0"; } else { - ShowWarningError(state, format("DXFOut: Illegal key specified for Surfaces with > 4 sides={}", PolygonAction)); + ShowWarningError(state, EnergyPlus::format("DXFOut: Illegal key specified for Surfaces with > 4 sides={}", PolygonAction)); ShowContinueError(state, R"(...Valid keys are: "ThickPolyline", "RegularPolyline", "Triangulate3DFace".)"); ShowContinueError(state, "\"Triangulate3DFace\" will be used for any surfaces with > 4 sides."); TriangulateFace = true; @@ -832,7 +835,7 @@ void DXFOut(EnergyPlusData &state, } int numRefPt = 0; for (auto const &refPt : illumMap.refPts) { - print(dxffile, Format_710, format("{}:MapRefPt:{}", state.dataHeatBal->Zone(zones).Name, ++numRefPt)); + print(dxffile, Format_710, EnergyPlus::format("{}:MapRefPt:{}", state.dataHeatBal->Zone(zones).Name, ++numRefPt)); print(dxffile, Format_709, normalizeName(state.dataHeatBal->Zone(zones).Name), @@ -922,7 +925,7 @@ void DXFOutWireFrame(EnergyPlusData &state, std::string const &ColorScheme) print(dxffile, Format_710, "Building Shading:" + thisSurface.Name); } ++surfcount; - ShadeType += format("_{}", surfcount); + ShadeType += EnergyPlus::format("_{}", surfcount); Real64 minz = 99999.0; for (int vert = 1; vert <= thisSurface.Sides; ++vert) { minz = min(minz, thisSurface.Vertex(vert).z); @@ -980,7 +983,7 @@ void DXFOutWireFrame(EnergyPlusData &state, std::string const &ColorScheme) ++surfcount; print(dxffile, Format_710, thisSurface.ZoneName + ':' + thisSurface.Name); - std::string const TempZoneName = format("{}_{}", SaveZoneName, surfcount); + std::string const TempZoneName = EnergyPlus::format("{}_{}", SaveZoneName, surfcount); Real64 minz = 99999.0; for (int vert = 1; vert <= thisSurface.Sides; ++vert) { minz = min(minz, thisSurface.Vertex(vert).z); @@ -1010,7 +1013,7 @@ void DXFOutWireFrame(EnergyPlusData &state, std::string const &ColorScheme) ++surfcount; print(dxffile, Format_710, thisSurface.ZoneName + ':' + thisSurface.Name); - std::string const TempZoneName = format("{}_{}", SaveZoneName, surfcount); + std::string const TempZoneName = EnergyPlus::format("{}_{}", SaveZoneName, surfcount); Real64 minz = 99999.0; for (int vert = 1; vert <= thisSurface.Sides; ++vert) { minz = min(minz, thisSurface.Vertex(vert).z); @@ -1146,34 +1149,36 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices if (RptType == 10) { if (thisSurface.shadowSurfSched != nullptr) { ScheduleName = thisSurface.shadowSurfSched->Name; - cSchedMin = format("{:.2R}", thisSurface.shadowSurfSched->getMinVal(state)); - cSchedMax = format("{:.2R}", thisSurface.shadowSurfSched->getMinVal(state)); + cSchedMin = EnergyPlus::format("{:.2R}", thisSurface.shadowSurfSched->getMinVal(state)); + cSchedMax = EnergyPlus::format("{:.2R}", thisSurface.shadowSurfSched->getMinVal(state)); } else { ScheduleName = ""; cSchedMin = "0.0"; cSchedMax = "0.0"; } - *eiostream << ScheduleName << "," << cSchedMin << "," << cSchedMax << "," << ' ' << "," << format("{:.2R}", thisSurface.Area) << "," - << format("{:.2R}", thisSurface.GrossArea) << "," << format("{:.2R}", thisSurface.NetAreaShadowCalc) << "," - << format("{:.2R}", thisSurface.Azimuth) << "," << format("{:.2R}", thisSurface.Tilt) << "," - << format("{:.2R}", thisSurface.Width) << "," << format("{:.2R}", thisSurface.Height) << ","; + *eiostream << ScheduleName << "," << cSchedMin << "," << cSchedMax << "," << ' ' << "," + << EnergyPlus::format("{:.2R}", thisSurface.Area) << "," << EnergyPlus::format("{:.2R}", thisSurface.GrossArea) << "," + << EnergyPlus::format("{:.2R}", thisSurface.NetAreaShadowCalc) << "," << EnergyPlus::format("{:.2R}", thisSurface.Azimuth) + << "," << EnergyPlus::format("{:.2R}", thisSurface.Tilt) << "," << EnergyPlus::format("{:.2R}", thisSurface.Width) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Height) << ","; *eiostream << ",,,,,,,,,," << fmt::to_string(thisSurface.Sides) << '\n'; } else if (RptType == 1) { *eiostream << fmt::to_string(thisSurface.Sides) << ","; } else { if (thisSurface.shadowSurfSched != nullptr) { ScheduleName = thisSurface.shadowSurfSched->Name; - cSchedMin = format("{:.2R}", thisSurface.shadowSurfSched->getMinVal(state)); - cSchedMax = format("{:.2R}", thisSurface.shadowSurfSched->getMinVal(state)); + cSchedMin = EnergyPlus::format("{:.2R}", thisSurface.shadowSurfSched->getMinVal(state)); + cSchedMax = EnergyPlus::format("{:.2R}", thisSurface.shadowSurfSched->getMinVal(state)); } else { ScheduleName = ""; cSchedMin = "0.0"; cSchedMax = "0.0"; } - *eiostream << ScheduleName << "," << cSchedMin << "," << cSchedMax << "," << ' ' << "," << format("{:.2R}", thisSurface.Area) << "," - << format("{:.2R}", thisSurface.GrossArea) << "," << format("{:.2R}", thisSurface.NetAreaShadowCalc) << "," - << format("{:.2R}", thisSurface.Azimuth) << "," << format("{:.2R}", thisSurface.Tilt) << "," - << format("{:.2R}", thisSurface.Width) << "," << format("{:.2R}", thisSurface.Height) << ","; + *eiostream << ScheduleName << "," << cSchedMin << "," << cSchedMax << "," << ' ' << "," + << EnergyPlus::format("{:.2R}", thisSurface.Area) << "," << EnergyPlus::format("{:.2R}", thisSurface.GrossArea) << "," + << EnergyPlus::format("{:.2R}", thisSurface.NetAreaShadowCalc) << "," << EnergyPlus::format("{:.2R}", thisSurface.Azimuth) + << "," << EnergyPlus::format("{:.2R}", thisSurface.Tilt) << "," << EnergyPlus::format("{:.2R}", thisSurface.Width) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Height) << ","; *eiostream << ",,,,,,,,,," << fmt::to_string(thisSurface.Sides) << ","; } if (RptType == 10) { @@ -1181,11 +1186,13 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices } for (int vert = 1; vert <= thisSurface.Sides; ++vert) { if (vert != thisSurface.Sides) { - *eiostream << format("{:.2R}", thisSurface.Vertex(vert).x) << "," << format("{:.2R}", thisSurface.Vertex(vert).y) << "," - << format("{:.2R}", thisSurface.Vertex(vert).z) << ","; + *eiostream << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).x) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).y) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).z) << ","; } else { - *eiostream << format("{:.2R}", thisSurface.Vertex(vert).x) << "," << format("{:.2R}", thisSurface.Vertex(vert).y) << "," - << format("{:.2R}", thisSurface.Vertex(vert).z) << '\n'; + *eiostream << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).x) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).y) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).z) << '\n'; } } // This shouldn't happen with shading surface -- always have vertices @@ -1264,7 +1271,7 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices } break; } if (cNominalUwithConvCoeffs.empty()) { - cNominalUwithConvCoeffs = format("{:.3R}", NominalUwithConvCoeffs); + cNominalUwithConvCoeffs = EnergyPlus::format("{:.3R}", NominalUwithConvCoeffs); } else { cNominalUwithConvCoeffs = "[invalid]"; } @@ -1277,7 +1284,7 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices SolarDiffusing = "No"; } } else { - cNominalU = format("{:.3R}", state.dataHeatBal->NominalU(thisSurface.Construction)); + cNominalU = EnergyPlus::format("{:.3R}", state.dataHeatBal->NominalU(thisSurface.Construction)); } } else { cNominalUwithConvCoeffs = "**"; @@ -1286,10 +1293,10 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices } *eiostream << ConstructionName << "," << cNominalU << "," << cNominalUwithConvCoeffs << "," << SolarDiffusing << "," - << format("{:.2R}", thisSurface.Area) << "," << format("{:.2R}", thisSurface.GrossArea) << "," - << format("{:.2R}", thisSurface.NetAreaShadowCalc) << "," << format("{:.2R}", thisSurface.Azimuth) << "," - << format("{:.2R}", thisSurface.Tilt) << "," << format("{:.2R}", thisSurface.Width) << "," - << format("{:.2R}", thisSurface.Height) << "," << format("{:.2R}", thisSurface.Reveal) << ","; + << EnergyPlus::format("{:.2R}", thisSurface.Area) << "," << EnergyPlus::format("{:.2R}", thisSurface.GrossArea) << "," + << EnergyPlus::format("{:.2R}", thisSurface.NetAreaShadowCalc) << "," << EnergyPlus::format("{:.2R}", thisSurface.Azimuth) + << "," << EnergyPlus::format("{:.2R}", thisSurface.Tilt) << "," << EnergyPlus::format("{:.2R}", thisSurface.Width) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Height) << "," << EnergyPlus::format("{:.2R}", thisSurface.Reveal) << ","; static constexpr std::array overrideTypeStrs = { "User Supplied Value", "User Supplied Schedule", "User Supplied Curve", "User Specified Model"}; @@ -1341,20 +1348,24 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices *eiostream << "NoWind" << ","; } if (RptType == 10) { - *eiostream << format("{:.2R}", thisSurface.ViewFactorGround) << "," << format("{:.2R}", thisSurface.ViewFactorSky) << "," - << format("{:.2R}", thisSurface.ViewFactorGroundIR) << "," << format("{:.2R}", thisSurface.ViewFactorSkyIR) << "," - << fmt::to_string(thisSurface.Sides) << '\n'; + *eiostream << EnergyPlus::format("{:.2R}", thisSurface.ViewFactorGround) << "," + << EnergyPlus::format("{:.2R}", thisSurface.ViewFactorSky) << "," + << EnergyPlus::format("{:.2R}", thisSurface.ViewFactorGroundIR) << "," + << EnergyPlus::format("{:.2R}", thisSurface.ViewFactorSkyIR) << "," << fmt::to_string(thisSurface.Sides) << '\n'; } else { - *eiostream << format("{:.2R}", thisSurface.ViewFactorGround) << "," << format("{:.2R}", thisSurface.ViewFactorSky) << "," - << format("{:.2R}", thisSurface.ViewFactorGroundIR) << "," << format("{:.2R}", thisSurface.ViewFactorSkyIR) << "," - << fmt::to_string(thisSurface.Sides) << ","; + *eiostream << EnergyPlus::format("{:.2R}", thisSurface.ViewFactorGround) << "," + << EnergyPlus::format("{:.2R}", thisSurface.ViewFactorSky) << "," + << EnergyPlus::format("{:.2R}", thisSurface.ViewFactorGroundIR) << "," + << EnergyPlus::format("{:.2R}", thisSurface.ViewFactorSkyIR) << "," << fmt::to_string(thisSurface.Sides) << ","; for (int vert = 1; vert <= thisSurface.Sides; ++vert) { if (vert != thisSurface.Sides) { - *eiostream << format("{:.2R}", thisSurface.Vertex(vert).x) << "," << format("{:.2R}", thisSurface.Vertex(vert).y) << "," - << format("{:.2R}", thisSurface.Vertex(vert).z) << ","; + *eiostream << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).x) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).y) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).z) << ","; } else { - *eiostream << format("{:.2R}", thisSurface.Vertex(vert).x) << "," << format("{:.2R}", thisSurface.Vertex(vert).y) << "," - << format("{:.2R}", thisSurface.Vertex(vert).z) << '\n'; + *eiostream << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).x) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).y) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).z) << '\n'; } } if (thisSurface.Sides == 0) { @@ -1368,9 +1379,10 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices AlgoName = DataSurfaces::HeatTransAlgoStrs[(int)thisSurface.HeatTransferAlgorithm]; *eiostream << "Frame/Divider Surface," << state.dataSurface->FrameDivider(fd).Name << "," << "Frame," << thisSurface.Name << "," << AlgoName << ","; - *eiostream << ",N/A,N/A,," << format("{:.2R}", state.dataSurface->SurfWinFrameArea(surf)) << "," - << format("{:.2R}", state.dataSurface->SurfWinFrameArea(surf) / thisSurface.Multiplier) << ",*" << ",N/A" - << ",N/A," << format("{:.2R}", state.dataSurface->FrameDivider(fd).FrameWidth) << ",N/A" << '\n'; + *eiostream << ",N/A,N/A,," << EnergyPlus::format("{:.2R}", state.dataSurface->SurfWinFrameArea(surf)) << "," + << EnergyPlus::format("{:.2R}", state.dataSurface->SurfWinFrameArea(surf) / thisSurface.Multiplier) << ",*" + << ",N/A" << ",N/A," << EnergyPlus::format("{:.2R}", state.dataSurface->FrameDivider(fd).FrameWidth) << ",N/A" + << '\n'; } if (state.dataSurface->FrameDivider(fd).DividerWidth > 0.0) { if (state.dataSurface->FrameDivider(fd).DividerType == DataSurfaces::FrameDividerType::DividedLite) { @@ -1380,9 +1392,10 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices *eiostream << "Frame/Divider Surface," << state.dataSurface->FrameDivider(fd).Name << "," << "Divider:Suspended," << thisSurface.Name << ",,"; } - *eiostream << ",N/A,N/A,," << format("{:.2R}", state.dataSurface->SurfWinDividerArea(surf)) << "," - << format("{:.2R}", state.dataSurface->SurfWinDividerArea(surf) / thisSurface.Multiplier) << ",*" << ",N/A" - << ",N/A," << format("{:.2R}", state.dataSurface->FrameDivider(fd).DividerWidth) << ",N/A" << '\n'; + *eiostream << ",N/A,N/A,," << EnergyPlus::format("{:.2R}", state.dataSurface->SurfWinDividerArea(surf)) << "," + << EnergyPlus::format("{:.2R}", state.dataSurface->SurfWinDividerArea(surf) / thisSurface.Multiplier) << ",*" + << ",N/A" << ",N/A," << EnergyPlus::format("{:.2R}", state.dataSurface->FrameDivider(fd).DividerWidth) << ",N/A" + << '\n'; } } } else { // RptType=1 Vertices only @@ -1399,11 +1412,13 @@ void DetailsForSurfaces(EnergyPlusData &state, int const RptType) // (1=Vertices *eiostream << fmt::to_string(thisSurface.Sides) << ","; for (int vert = 1; vert <= thisSurface.Sides; ++vert) { if (vert != thisSurface.Sides) { - *eiostream << format("{:.2R}", thisSurface.Vertex(vert).x) << "," << format("{:.2R}", thisSurface.Vertex(vert).y) << "," - << format("{:.2R}", thisSurface.Vertex(vert).z) << ","; + *eiostream << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).x) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).y) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).z) << ","; } else { - *eiostream << format("{:.2R}", thisSurface.Vertex(vert).x) << "," << format("{:.2R}", thisSurface.Vertex(vert).y) << "," - << format("{:.2R}", thisSurface.Vertex(vert).z) << '\n'; + *eiostream << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).x) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).y) << "," + << EnergyPlus::format("{:.2R}", thisSurface.Vertex(vert).z) << '\n'; } } if (thisSurface.Sides == 0) { @@ -1544,7 +1559,7 @@ void VRMLOut(EnergyPlusData &state, const std::string &PolygonAction, const std: RegularPolyline = true; PolylineWidth = " 0"; } else { - ShowWarningError(state, format("VRMLOut: Illegal key specified for Surfaces with > 4 sides={}", PolygonAction)); + ShowWarningError(state, EnergyPlus::format("VRMLOut: Illegal key specified for Surfaces with > 4 sides={}", PolygonAction)); ShowContinueError(state, "\"TRIANGULATE 3DFACE\" will be used for any surfaces with > 4 sides."); TriangulateFace = true; } diff --git a/src/EnergyPlus/OutsideEnergySources.cc b/src/EnergyPlus/OutsideEnergySources.cc index a6ff04c8f47..b4c6dfa9fda 100644 --- a/src/EnergyPlus/OutsideEnergySources.cc +++ b/src/EnergyPlus/OutsideEnergySources.cc @@ -100,7 +100,8 @@ PlantComponent *OutsideEnergySourceSpecs::factory(EnergyPlusData &state, DataPla } } // If we didn't find it, fatal - ShowFatalError(state, format("OutsideEnergySourceSpecsFactory: Error getting inputs for source named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("OutsideEnergySourceSpecsFactory: Error getting inputs for source named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -295,9 +296,9 @@ void GetOutsideEnergySourcesInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError( - state, - format("Errors found in processing input for {}, Preceding condition caused termination.", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, + EnergyPlus::format("Errors found in processing input for {}, Preceding condition caused termination.", + state.dataIPShortCut->cCurrentModuleObject)); } } @@ -368,14 +369,14 @@ void OutsideEnergySourceSpecs::size(EnergyPlusData &state) Real64 NomCapDes; if (this->EnergyType == DataPlant::PlantEquipmentType::PurchChilledWater || this->EnergyType == DataPlant::PlantEquipmentType::PurchHotWater) { - Real64 const rho = loop.glycol->getDensity(state, Constant::InitConvTemp, format("Size {}", typeName)); - Real64 const Cp = loop.glycol->getSpecificHeat(state, Constant::InitConvTemp, format("Size {}", typeName)); + Real64 const rho = loop.glycol->getDensity(state, Constant::InitConvTemp, EnergyPlus::format("Size {}", typeName)); + Real64 const Cp = loop.glycol->getSpecificHeat(state, Constant::InitConvTemp, EnergyPlus::format("Size {}", typeName)); NomCapDes = Cp * rho * state.dataSize->PlantSizData(PltSizNum).DeltaT * state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate; } else { // this->EnergyType == DataPlant::TypeOf_PurchSteam - Real64 const tempSteam = loop.steam->getSatTemperature(state, state.dataEnvrn->StdBaroPress, format("Size {}", typeName)); - Real64 const rhoSteam = loop.steam->getSatDensity(state, tempSteam, 1.0, format("Size {}", typeName)); - Real64 const EnthSteamDry = loop.steam->getSatEnthalpy(state, tempSteam, 1.0, format("Size {}", typeName)); - Real64 const EnthSteamWet = loop.steam->getSatEnthalpy(state, tempSteam, 0.0, format("Size {}", typeName)); + Real64 const tempSteam = loop.steam->getSatTemperature(state, state.dataEnvrn->StdBaroPress, EnergyPlus::format("Size {}", typeName)); + Real64 const rhoSteam = loop.steam->getSatDensity(state, tempSteam, 1.0, EnergyPlus::format("Size {}", typeName)); + Real64 const EnthSteamDry = loop.steam->getSatEnthalpy(state, tempSteam, 1.0, EnergyPlus::format("Size {}", typeName)); + Real64 const EnthSteamWet = loop.steam->getSatEnthalpy(state, tempSteam, 0.0, EnergyPlus::format("Size {}", typeName)); Real64 const LatentHeatSteam = EnthSteamDry - EnthSteamWet; NomCapDes = rhoSteam * state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate * LatentHeatSteam; } @@ -401,9 +402,9 @@ void OutsideEnergySourceSpecs::size(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(NomCapDes - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("Size {}: Potential issue with equipment sizing for {}", typeName, this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", NomCapDes)); + ShowMessage(state, EnergyPlus::format("Size {}: Potential issue with equipment sizing for {}", typeName, 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]", NomCapDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -414,8 +415,8 @@ void OutsideEnergySourceSpecs::size(EnergyPlusData &state) } } else { if (this->NomCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, format("Autosizing of {} nominal capacity requires a loop Sizing:Plant object", typeName)); - ShowContinueError(state, format("Occurs in {} object={}", typeName, this->Name)); + ShowSevereError(state, EnergyPlus::format("Autosizing of {} nominal capacity requires a loop Sizing:Plant object", typeName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} object={}", typeName, this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && this->NomCap > 0.0 && state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -548,7 +549,7 @@ void OutsideEnergySourceSpecs::oneTimeInit_new(EnergyPlusData &state) meterTypeKey = Constant::eResource::DistrictHeatingSteam; } SetupOutputVariable(state, - format("{}Energy", reportVarPrefix), + EnergyPlus::format("{}Energy", reportVarPrefix), Constant::Units::J, this->EnergyTransfer, OutputProcessor::TimeStepType::System, @@ -558,28 +559,28 @@ void OutsideEnergySourceSpecs::oneTimeInit_new(EnergyPlusData &state) OutputProcessor::Group::Plant, heatingOrCooling); SetupOutputVariable(state, - format("{}Rate", reportVarPrefix), + EnergyPlus::format("{}Rate", reportVarPrefix), Constant::Units::W, this->EnergyRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("{}Inlet Temperature", reportVarPrefix), + EnergyPlus::format("{}Inlet Temperature", reportVarPrefix), Constant::Units::C, this->InletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("{}Outlet Temperature", reportVarPrefix), + EnergyPlus::format("{}Outlet Temperature", reportVarPrefix), Constant::Units::C, this->OutletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("{}Mass Flow Rate", reportVarPrefix), + EnergyPlus::format("{}Mass Flow Rate", reportVarPrefix), Constant::Units::kg_s, this->MassFlowRate, OutputProcessor::TimeStepType::System, diff --git a/src/EnergyPlus/PCMThermalStorage.cc b/src/EnergyPlus/PCMThermalStorage.cc index 1b60d08f397..5699f18e6f0 100644 --- a/src/EnergyPlus/PCMThermalStorage.cc +++ b/src/EnergyPlus/PCMThermalStorage.cc @@ -525,8 +525,10 @@ namespace PCMStorage { int matNum = Material::GetMaterialNum(state, state.dataIPShortCut->cAlphaArgs(7)); if (matNum == 0) { - ShowSevereError( - state, format("{}: Invalid PCM material name: {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(7))); + ShowSevereError(state, + EnergyPlus::format("{}: Invalid PCM material name: {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(7))); ErrorsFound = true; } else { // Obtains conduction FD related parameters from input file @@ -538,8 +540,9 @@ namespace PCMStorage { auto *mat = state.dataMaterial->materials(matNum); if (!mat->hasPCM) { - ShowSevereError(state, - format("{}: Material {} is not a phase change material.", state.dataIPShortCut->cCurrentModuleObject, mat->Name)); + ShowSevereError( + state, + EnergyPlus::format("{}: Material {} is not a phase change material.", state.dataIPShortCut->cCurrentModuleObject, mat->Name)); ErrorsFound = true; } else { PCM.PCMMaterialNum = matNum; @@ -557,19 +560,20 @@ namespace PCMStorage { // Report warnings instead of fatal errors for design flows <= 0.0 indicating an autosize request. if (PCM.UseSideDesignFlowRate < 0.0) { - ShowWarningError(state, - format("{}={}, Use Side Design Flow Rate was entered as {:.6R}. This will be autosized during initialization.", - state.dataIPShortCut->cCurrentModuleObject, - PCM.Name, - PCM.UseSideDesignFlowRate)); + ShowWarningError( + state, + EnergyPlus::format("{}={}, Use Side Design Flow Rate was entered as {:.6R}. This will be autosized during initialization.", + state.dataIPShortCut->cCurrentModuleObject, + PCM.Name, + PCM.UseSideDesignFlowRate)); } if (PCM.PlantSideDesignFlowRate < 0.0) { ShowWarningError( state, - format("{}={}, Plant Side Design Flow Rate was entered as {:.6R}. This will be autosized during initialization.", - state.dataIPShortCut->cCurrentModuleObject, - PCM.Name, - PCM.PlantSideDesignFlowRate)); + EnergyPlus::format("{}={}, Plant Side Design Flow Rate was entered as {:.6R}. This will be autosized during initialization.", + state.dataIPShortCut->cCurrentModuleObject, + PCM.Name, + PCM.PlantSideDesignFlowRate)); } PCM.MeltingTemp = PCM.PCMmat->peakTempMelting; @@ -638,14 +642,14 @@ namespace PCMStorage { // Issue a warning to let the user know that autosizing will occur but do not halt execution. if (PCM.TankCapacity <= 0.0) { ShowWarningError(state, - format("{}={}, Tank Capacity was entered as {:.6R} and will be autosized during initialization.", - state.dataIPShortCut->cCurrentModuleObject, - PCM.Name, - PCM.TankCapacity)); + EnergyPlus::format("{}={}, Tank Capacity was entered as {:.6R} and will be autosized during initialization.", + state.dataIPShortCut->cCurrentModuleObject, + PCM.Name, + PCM.TankCapacity)); } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } } // namespace PCMStorage diff --git a/src/EnergyPlus/PVWatts.cc b/src/EnergyPlus/PVWatts.cc index 70ab2fed914..424f65b5251 100644 --- a/src/EnergyPlus/PVWatts.cc +++ b/src/EnergyPlus/PVWatts.cc @@ -111,24 +111,24 @@ namespace PVWatts { dcSystemCapacity_ = dcSystemCapacity; if (systemLosses > 1.0 || systemLosses < 0.0) { - ShowSevereError(state, format("PVWatts: Invalid system loss value {:.2R}", systemLosses)); + ShowSevereError(state, EnergyPlus::format("PVWatts: Invalid system loss value {:.2R}", systemLosses)); errorsFound = true; } systemLosses_ = systemLosses; if (geometryType_ == GeometryType::TILT_AZIMUTH) { if (tilt < 0 || tilt > 90) { - ShowSevereError(state, format("PVWatts: Invalid tilt: {:.2R}", tilt)); + ShowSevereError(state, EnergyPlus::format("PVWatts: Invalid tilt: {:.2R}", tilt)); errorsFound = true; } tilt_ = tilt; if (azimuth < 0 || azimuth >= 360) { - ShowSevereError(state, format("PVWatts: Invalid azimuth: {:.2R}", azimuth)); + ShowSevereError(state, EnergyPlus::format("PVWatts: Invalid azimuth: {:.2R}", azimuth)); } azimuth_ = azimuth; } else if (geometryType_ == GeometryType::SURFACE) { if (surfaceNum == 0 || surfaceNum > state.dataSurface->Surface.size()) { - ShowSevereError(state, format("PVWatts: SurfaceNum not in Surfaces: {}", surfaceNum)); + ShowSevereError(state, EnergyPlus::format("PVWatts: SurfaceNum not in Surfaces: {}", surfaceNum)); errorsFound = true; } else { surfaceNum_ = surfaceNum; @@ -141,7 +141,7 @@ namespace PVWatts { } if (groundCoverageRatio > 1.0 || groundCoverageRatio < 0.0) { - ShowSevereError(state, format("PVWatts: Invalid ground coverage ratio: {:.2R}", groundCoverageRatio)); + ShowSevereError(state, EnergyPlus::format("PVWatts: Invalid ground coverage ratio: {:.2R}", groundCoverageRatio)); errorsFound = true; } groundCoverageRatio_ = groundCoverageRatio; @@ -254,7 +254,7 @@ namespace PVWatts { ModuleType moduleType; auto moduleTypeIt = moduleTypeMap.find(cAlphaArgs(AlphaFields::MODULE_TYPE)); if (moduleTypeIt == moduleTypeMap.end()) { - ShowSevereError(state, format("PVWatts: Invalid Module Type: {}", cAlphaArgs(AlphaFields::MODULE_TYPE))); + ShowSevereError(state, EnergyPlus::format("PVWatts: Invalid Module Type: {}", cAlphaArgs(AlphaFields::MODULE_TYPE))); errorsFound = true; } else { moduleType = moduleTypeIt->second; @@ -268,7 +268,7 @@ namespace PVWatts { ArrayType arrayType; auto arrayTypeIt = arrayTypeMap.find(cAlphaArgs(AlphaFields::ARRAY_TYPE)); if (arrayTypeIt == arrayTypeMap.end()) { - ShowSevereError(state, format("PVWatts: Invalid Array Type: {}", cAlphaArgs(AlphaFields::ARRAY_TYPE))); + ShowSevereError(state, EnergyPlus::format("PVWatts: Invalid Array Type: {}", cAlphaArgs(AlphaFields::ARRAY_TYPE))); errorsFound = true; } else { arrayType = arrayTypeIt->second; @@ -279,7 +279,7 @@ namespace PVWatts { GeometryType geometryType; auto geometryTypeIt = geometryTypeMap.find(cAlphaArgs(AlphaFields::GEOMETRY_TYPE)); if (geometryTypeIt == geometryTypeMap.end()) { - ShowSevereError(state, format("PVWatts: Invalid Geometry Type: {}", cAlphaArgs(AlphaFields::GEOMETRY_TYPE))); + ShowSevereError(state, EnergyPlus::format("PVWatts: Invalid Geometry Type: {}", cAlphaArgs(AlphaFields::GEOMETRY_TYPE))); errorsFound = true; } else { geometryType = geometryTypeIt->second; diff --git a/src/EnergyPlus/PackagedThermalStorageCoil.cc b/src/EnergyPlus/PackagedThermalStorageCoil.cc index 5ca2c1a80f6..1efaa0cedef 100644 --- a/src/EnergyPlus/PackagedThermalStorageCoil.cc +++ b/src/EnergyPlus/PackagedThermalStorageCoil.cc @@ -133,25 +133,26 @@ void SimTESCoil(EnergyPlusData &state, if (CompIndex == 0) { TESCoilNum = Util::FindItemInList(CompName, state.dataPackagedThermalStorageCoil->TESCoil); if (TESCoilNum == 0) { - ShowFatalError(state, format("Thermal Energy Storage Cooling Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("Thermal Energy Storage Cooling Coil not found={}", CompName)); } CompIndex = TESCoilNum; } else { TESCoilNum = CompIndex; if (TESCoilNum > state.dataPackagedThermalStorageCoil->NumTESCoils || TESCoilNum < 1) { - ShowFatalError(state, - format("SimTESCoil: Invalid CompIndex passed={}, Number of Thermal Energy Storage Cooling Coil Coils={}, Coil name={}", - TESCoilNum, - state.dataPackagedThermalStorageCoil->NumTESCoils, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimTESCoil: Invalid CompIndex passed={}, Number of Thermal Energy Storage Cooling Coil Coils={}, Coil name={}", + TESCoilNum, + state.dataPackagedThermalStorageCoil->NumTESCoils, + CompName)); } if (state.dataPackagedThermalStorageCoil->CheckEquipName(TESCoilNum)) { if (!CompName.empty() && CompName != state.dataPackagedThermalStorageCoil->TESCoil(TESCoilNum).Name) { ShowFatalError(state, - format("SimTESCoil: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - TESCoilNum, - CompName, - state.dataPackagedThermalStorageCoil->TESCoil(TESCoilNum).Name)); + EnergyPlus::format("SimTESCoil: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + TESCoilNum, + CompName, + state.dataPackagedThermalStorageCoil->TESCoil(TESCoilNum).Name)); } state.dataPackagedThermalStorageCoil->CheckEquipName(TESCoilNum) = false; } @@ -254,8 +255,9 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.ModeControlType = static_cast(getEnumValue(modeControlStrings, state.dataIPShortCut->cAlphaArgs(3))); if (thisTESCoil.ModeControlType == PTSCCtrlType::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); ShowContinueError(state, "Available choices are ScheduledModes or EMSControlled"); ErrorsFound = true; } @@ -281,8 +283,9 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.glycol = Fluid::GetWater(state); break; default: - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); ShowContinueError(state, "Available choices are Ice, Water, or UserDefindedFluidType"); ErrorsFound = true; } @@ -304,8 +307,9 @@ void GetTESCoilInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(1)) { thisTESCoil.FluidStorageVolume = state.dataIPShortCut->rNumericArgs(1); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("{} cannot be blank for Water storage type", state.dataIPShortCut->cNumericFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("{} cannot be blank for Water storage type", state.dataIPShortCut->cNumericFieldNames(1))); ShowContinueError(state, "Enter fluid storage tank volume in m3/s."); ErrorsFound = true; } @@ -319,8 +323,8 @@ void GetTESCoilInput(EnergyPlusData &state) state.dataIPShortCut->rNumericArgs(2) * gigaJoulesToJoules; // input in giga joules, used as joules internally } } else if (state.dataIPShortCut->lNumericFieldBlanks(2)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("{} cannot be blank for Ice storage type", state.dataIPShortCut->cNumericFieldNames(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("{} cannot be blank for Ice storage type", state.dataIPShortCut->cNumericFieldNames(2))); ShowContinueError(state, "Enter ice storage tank capacity in GJ."); ErrorsFound = true; } @@ -385,8 +389,9 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.CoolingOnlyModeIsAvailable = false; - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -400,12 +405,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlyCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(11)); if (thisTESCoil.CoolingOnlyCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(11)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(11))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(11))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); } ErrorsFound = true; } else { @@ -422,12 +428,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlyCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(12)); if (thisTESCoil.CoolingOnlyCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(12)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(12))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(12))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(12), state.dataIPShortCut->cAlphaArgs(12))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(12), state.dataIPShortCut->cAlphaArgs(12))); } ErrorsFound = true; } else { @@ -444,12 +451,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlyEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(13)); if (thisTESCoil.CoolingOnlyEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(13)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(13))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(13))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); } ErrorsFound = true; } else { @@ -466,12 +474,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlyEIRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(14)); if (thisTESCoil.CoolingOnlyEIRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(14)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(14))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(14))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); } ErrorsFound = true; } else { @@ -488,12 +497,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlyPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(15)); if (thisTESCoil.CoolingOnlyPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(15)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(15))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(15))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); } ErrorsFound = true; } else { @@ -510,12 +520,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlySHRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(16)); if (thisTESCoil.CoolingOnlySHRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(16)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(16))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(16))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(16), state.dataIPShortCut->cAlphaArgs(16))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(16), state.dataIPShortCut->cAlphaArgs(16))); } ErrorsFound = true; } else { @@ -532,12 +543,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlySHRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(17)); if (thisTESCoil.CoolingOnlySHRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(17)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(17))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(17))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(17), state.dataIPShortCut->cAlphaArgs(17))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(17), state.dataIPShortCut->cAlphaArgs(17))); } ErrorsFound = true; } else { @@ -560,8 +572,9 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.CoolingAndChargeModeAvailable = false; - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(18), state.dataIPShortCut->cAlphaArgs(18))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(18), state.dataIPShortCut->cAlphaArgs(18))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -582,12 +595,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(19)); if (thisTESCoil.CoolingAndChargeCoolingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(19)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(19))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(19))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(19), state.dataIPShortCut->cAlphaArgs(19))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(19), state.dataIPShortCut->cAlphaArgs(19))); } ErrorsFound = true; } else { @@ -604,12 +618,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(20)); if (thisTESCoil.CoolingAndChargeCoolingCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(20)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(20))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(20))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(20), state.dataIPShortCut->cAlphaArgs(20))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(20), state.dataIPShortCut->cAlphaArgs(20))); } ErrorsFound = true; } else { @@ -625,12 +640,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(21)); if (thisTESCoil.CoolingAndChargeCoolingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(21)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(21))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(21))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(21), state.dataIPShortCut->cAlphaArgs(21))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(21), state.dataIPShortCut->cAlphaArgs(21))); } ErrorsFound = true; } else { @@ -647,12 +663,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingEIRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(22)); if (thisTESCoil.CoolingAndChargeCoolingEIRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(22)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(22))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(22))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(22), state.dataIPShortCut->cAlphaArgs(22))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(22), state.dataIPShortCut->cAlphaArgs(22))); } ErrorsFound = true; } else { @@ -669,12 +686,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(23)); if (thisTESCoil.CoolingAndChargeCoolingPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(23)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(23))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(23))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(23), state.dataIPShortCut->cAlphaArgs(23))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(23), state.dataIPShortCut->cAlphaArgs(23))); } ErrorsFound = true; } else { @@ -691,12 +709,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(24)); if (thisTESCoil.CoolingAndChargeChargingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(24)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(24))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(24))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(24), state.dataIPShortCut->cAlphaArgs(24))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(24), state.dataIPShortCut->cAlphaArgs(24))); } ErrorsFound = true; } else { @@ -713,12 +732,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingCapFEvapPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(25)); if (thisTESCoil.CoolingAndChargeChargingCapFEvapPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(25)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(25))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(25))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(25), state.dataIPShortCut->cAlphaArgs(25))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(25), state.dataIPShortCut->cAlphaArgs(25))); } ErrorsFound = true; } else { @@ -735,12 +755,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(26)); if (thisTESCoil.CoolingAndChargeChargingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(26)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(26))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(26))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(26), state.dataIPShortCut->cAlphaArgs(26))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(26), state.dataIPShortCut->cAlphaArgs(26))); } ErrorsFound = true; } else { @@ -757,12 +778,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingEIRFFLowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(27)); if (thisTESCoil.CoolingAndChargeChargingEIRFFLowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(27)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(27))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(27))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(27), state.dataIPShortCut->cAlphaArgs(27))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(27), state.dataIPShortCut->cAlphaArgs(27))); } ErrorsFound = true; } else { @@ -779,12 +801,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(28)); if (thisTESCoil.CoolingAndChargeChargingPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(28)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(28))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(28))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(28), state.dataIPShortCut->cAlphaArgs(28))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(28), state.dataIPShortCut->cAlphaArgs(28))); } ErrorsFound = true; } else { @@ -801,12 +824,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeSHRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(29)); if (thisTESCoil.CoolingAndChargeSHRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(29)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(29))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(29))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(29), state.dataIPShortCut->cAlphaArgs(29))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(29), state.dataIPShortCut->cAlphaArgs(29))); } ErrorsFound = true; } else { @@ -823,12 +847,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeSHRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(30)); if (thisTESCoil.CoolingAndChargeSHRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(30)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(30))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(30))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(30), state.dataIPShortCut->cAlphaArgs(30))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(30), state.dataIPShortCut->cAlphaArgs(30))); } ErrorsFound = true; } else { @@ -852,8 +877,9 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.CoolingAndDischargeModeAvailable = false; - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(31), state.dataIPShortCut->cAlphaArgs(31))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(31), state.dataIPShortCut->cAlphaArgs(31))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -874,12 +900,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(32)); if (thisTESCoil.CoolingAndDischargeCoolingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(32)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(32))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(32))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(32), state.dataIPShortCut->cAlphaArgs(32))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(32), state.dataIPShortCut->cAlphaArgs(32))); } ErrorsFound = true; } else { @@ -896,12 +923,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(33)); if (thisTESCoil.CoolingAndDischargeCoolingCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(33)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(33))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(33))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(33), state.dataIPShortCut->cAlphaArgs(33))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(33), state.dataIPShortCut->cAlphaArgs(33))); } ErrorsFound = true; } else { @@ -918,12 +946,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(34)); if (thisTESCoil.CoolingAndDischargeCoolingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(34)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(34))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(34))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(34), state.dataIPShortCut->cAlphaArgs(34))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(34), state.dataIPShortCut->cAlphaArgs(34))); } ErrorsFound = true; } else { @@ -940,12 +969,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingEIRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(35)); if (thisTESCoil.CoolingAndDischargeCoolingEIRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(35)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(35))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(35))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(35), state.dataIPShortCut->cAlphaArgs(35))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(35), state.dataIPShortCut->cAlphaArgs(35))); } ErrorsFound = true; } else { @@ -962,12 +992,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(36)); if (thisTESCoil.CoolingAndDischargeCoolingPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(36)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(36))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(36))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(36), state.dataIPShortCut->cAlphaArgs(36))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(36), state.dataIPShortCut->cAlphaArgs(36))); } ErrorsFound = true; } else { @@ -984,12 +1015,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(37)); if (thisTESCoil.CoolingAndDischargeDischargingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(37)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(37))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(37))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(37), state.dataIPShortCut->cAlphaArgs(37))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(37), state.dataIPShortCut->cAlphaArgs(37))); } ErrorsFound = true; } else { @@ -1006,12 +1038,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(38)); if (thisTESCoil.CoolingAndDischargeDischargingCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(38)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(38))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(38))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(38), state.dataIPShortCut->cAlphaArgs(38))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(38), state.dataIPShortCut->cAlphaArgs(38))); } ErrorsFound = true; } else { @@ -1028,12 +1061,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingCapFEvapPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(39)); if (thisTESCoil.CoolingAndDischargeDischargingCapFEvapPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(39)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(39))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(39))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(39), state.dataIPShortCut->cAlphaArgs(39))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(39), state.dataIPShortCut->cAlphaArgs(39))); } ErrorsFound = true; } else { @@ -1050,12 +1084,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(40)); if (thisTESCoil.CoolingAndDischargeDischargingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(40)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(40))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(40))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(40), state.dataIPShortCut->cAlphaArgs(40))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(40), state.dataIPShortCut->cAlphaArgs(40))); } ErrorsFound = true; } else { @@ -1072,12 +1107,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingEIRFFLowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(41)); if (thisTESCoil.CoolingAndDischargeDischargingEIRFFLowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(41)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(41))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(41))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(41), state.dataIPShortCut->cAlphaArgs(41))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(41), state.dataIPShortCut->cAlphaArgs(41))); } ErrorsFound = true; } else { @@ -1094,12 +1130,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(42)); if (thisTESCoil.CoolingAndDischargeDischargingPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(42)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(42))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(42))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(42), state.dataIPShortCut->cAlphaArgs(42))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(42), state.dataIPShortCut->cAlphaArgs(42))); } ErrorsFound = true; } else { @@ -1116,12 +1153,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeSHRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(43)); if (thisTESCoil.CoolingAndDischargeSHRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(43)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(43))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(43))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(43), state.dataIPShortCut->cAlphaArgs(43))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(43), state.dataIPShortCut->cAlphaArgs(43))); } ErrorsFound = true; } else { @@ -1138,12 +1176,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeSHRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(44)); if (thisTESCoil.CoolingAndDischargeSHRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(44)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(44))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(44))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(44), state.dataIPShortCut->cAlphaArgs(44))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(44), state.dataIPShortCut->cAlphaArgs(44))); } ErrorsFound = true; } else { @@ -1167,8 +1206,9 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.ChargeOnlyModeAvailable = false; - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(45), state.dataIPShortCut->cAlphaArgs(45))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(45), state.dataIPShortCut->cAlphaArgs(45))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -1182,12 +1222,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.ChargeOnlyChargingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(46)); if (thisTESCoil.ChargeOnlyChargingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(46)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(46))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(46))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(46), state.dataIPShortCut->cAlphaArgs(46))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(46), state.dataIPShortCut->cAlphaArgs(46))); } ErrorsFound = true; } else { @@ -1204,12 +1245,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.ChargeOnlyChargingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(47)); if (thisTESCoil.ChargeOnlyChargingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(47)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(47))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(47))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(47), state.dataIPShortCut->cAlphaArgs(47))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(47), state.dataIPShortCut->cAlphaArgs(47))); } ErrorsFound = true; } else { @@ -1233,8 +1275,9 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.DischargeOnlyModeAvailable = false; - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(48), state.dataIPShortCut->cAlphaArgs(48))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(48), state.dataIPShortCut->cAlphaArgs(48))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -1248,12 +1291,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(49)); if (thisTESCoil.DischargeOnlyCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(49)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(49))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(49))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(49), state.dataIPShortCut->cAlphaArgs(49))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(49), state.dataIPShortCut->cAlphaArgs(49))); } ErrorsFound = true; } else { @@ -1270,12 +1314,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(50)); if (thisTESCoil.DischargeOnlyCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(50)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(50))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(50))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(50), state.dataIPShortCut->cAlphaArgs(50))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(50), state.dataIPShortCut->cAlphaArgs(50))); } ErrorsFound = true; } else { @@ -1292,12 +1337,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(51)); if (thisTESCoil.DischargeOnlyEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(51)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(51))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(51))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(51), state.dataIPShortCut->cAlphaArgs(51))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(51), state.dataIPShortCut->cAlphaArgs(51))); } ErrorsFound = true; } else { @@ -1314,12 +1360,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyEIRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(52)); if (thisTESCoil.DischargeOnlyEIRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(52)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(52))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(52))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(52), state.dataIPShortCut->cAlphaArgs(52))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(52), state.dataIPShortCut->cAlphaArgs(52))); } ErrorsFound = true; } else { @@ -1336,12 +1383,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(53)); if (thisTESCoil.DischargeOnlyPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(53)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(53))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(53))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(53), state.dataIPShortCut->cAlphaArgs(53))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(53), state.dataIPShortCut->cAlphaArgs(53))); } ErrorsFound = true; } else { @@ -1358,12 +1406,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlySHRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(54)); if (thisTESCoil.DischargeOnlySHRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(54)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(54))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(54))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(54), state.dataIPShortCut->cAlphaArgs(54))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(54), state.dataIPShortCut->cAlphaArgs(54))); } ErrorsFound = true; } else { @@ -1380,12 +1429,13 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlySHRFFLowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(55)); if (thisTESCoil.DischargeOnlySHRFFLowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(55)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(55))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(55))); } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(55), state.dataIPShortCut->cAlphaArgs(55))); + state, + EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(55), state.dataIPShortCut->cAlphaArgs(55))); } ErrorsFound = true; } else { @@ -1428,8 +1478,9 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CondenserType = static_cast(getEnumValue(condenserTypesUC, state.dataIPShortCut->cAlphaArgs(58))); if (thisTESCoil.CondenserType == TESCondenserType::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(58), state.dataIPShortCut->cAlphaArgs(58))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(58), state.dataIPShortCut->cAlphaArgs(58))); ShowContinueError(state, "Available choices are AirCooled or EvaporativelyCooled."); ErrorsFound = true; } @@ -1501,8 +1552,8 @@ void GetTESCoilInput(EnergyPlusData &state) ObjectIsNotParent); } else { if (thisTESCoil.TESPlantConnectionAvailable) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, format("...{} cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(63))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(63))); ErrorsFound = true; } } @@ -1551,8 +1602,9 @@ void GetTESCoilInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, cCurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, cCurrentModuleObject)); } // setup reporting @@ -1891,22 +1943,25 @@ 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, format("InitTESCoil: Coil:Cooling:DX:SingleSpeed:ThermalStorage =\"{}\", non-matching plant nodes.", thisTESCoil.Name)); + ShowSevereError(state, + EnergyPlus::format("InitTESCoil: Coil:Cooling:DX:SingleSpeed:ThermalStorage =\"{}\", non-matching plant nodes.", + thisTESCoil.Name)); ShowContinueError(state, - format("...in Branch=\"{}\", Component referenced with:", - state.dataPlnt->PlantLoop(thisTESCoil.TESPlantLoopNum) - .LoopSide(thisTESCoil.TESPlantLoopSideNum) - .Branch(thisTESCoil.TESPlantBranchNum) - .Name)); - ShowContinueError( - state, - format("...Inlet Node=\"{}", state.dataLoopNodes->NodeID(DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumIn))); + EnergyPlus::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, - format("...Outlet Node=\"{}", state.dataLoopNodes->NodeID(DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumOut))); - ShowContinueError(state, format("...TES Inlet Node=\"{}", state.dataLoopNodes->NodeID(thisTESCoil.TESPlantInletNodeNum))); - ShowContinueError(state, format("...TES Outlet Node=\"{}", state.dataLoopNodes->NodeID(thisTESCoil.TESPlantOutletNodeNum))); + 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))); + ShowContinueError(state, + EnergyPlus::format("...TES Outlet Node=\"{}", state.dataLoopNodes->NodeID(thisTESCoil.TESPlantOutletNodeNum))); errFlag = true; } if (errFlag) { @@ -1982,8 +2037,8 @@ 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, format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); - ShowContinueError(state, format("Value returned from schedule ={:.8R}", tmpSchedValue)); + ShowContinueError(state, EnergyPlus::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"); } ShowRecurringSevereErrorAtEnd(state, @@ -2002,8 +2057,9 @@ 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, format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); - ShowContinueError(state, format("Value returned from EMS ={:.8R}", thisTESCoil.EMSControlModeValue)); + ShowContinueError(state, + EnergyPlus::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"); } ShowRecurringSevereErrorAtEnd(state, @@ -2022,7 +2078,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::CoolingOnly: if (!(thisTESCoil.CoolingOnlyModeIsAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError(state, format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError( + state, EnergyPlus::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; @@ -2031,7 +2088,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::CoolingAndCharge: if (!(thisTESCoil.CoolingAndChargeModeAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError(state, format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError( + state, EnergyPlus::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; @@ -2040,7 +2098,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::CoolingAndDischarge: if (!(thisTESCoil.CoolingAndDischargeModeAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError(state, format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError( + state, EnergyPlus::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; @@ -2049,7 +2108,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::ChargeOnly: if (!(thisTESCoil.ChargeOnlyModeAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError(state, format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError( + state, EnergyPlus::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; @@ -2058,7 +2118,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::DischargeOnly: if (!(thisTESCoil.DischargeOnlyModeAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError(state, format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError( + state, EnergyPlus::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; @@ -4245,7 +4306,7 @@ void GetTESCoilIndex( if (!CurrentModuleObject.empty()) { ShowSevereError(state, fmt::format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); } else { - ShowSevereError(state, format("GetTESCoilIndex: TES Cooling Coil not found={}", CoilName)); + ShowSevereError(state, EnergyPlus::format("GetTESCoilIndex: TES Cooling Coil not found={}", CoilName)); } ErrorsFound = true; } @@ -4282,7 +4343,7 @@ void GetTESCoilAirInletNode( } if (CoilIndex == 0) { - ShowSevereError(state, format("{}, GetTESCoilAirInletNode: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilAirInletNode: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilAirInletNode = 0; } else { @@ -4321,7 +4382,7 @@ void GetTESCoilAirOutletNode( } if (CoilIndex == 0) { - ShowSevereError(state, format("{}, GetTESCoilAirOutletNode: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilAirOutletNode: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilAirOutletNode = 0; } else { @@ -4360,7 +4421,7 @@ void GetTESCoilCoolingCapacity( } if (CoilIndex == 0) { - ShowSevereError(state, format("{}, GetTESCoilCoolingCapacity: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilCoolingCapacity: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilCoolCapacity = 0.0; } else { @@ -4407,7 +4468,7 @@ void GetTESCoilCoolingAirFlowRate( } if (CoilIndex == 0) { - ShowSevereError(state, format("{}, GetTESCoilCoolingCapacity: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, EnergyPlus::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 cec87066d7b..e43eeb3915a 100644 --- a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc +++ b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc @@ -349,25 +349,26 @@ namespace Material { auto *mat = s_mat->materials(matNum); if (mat->group != Group::Regular) { - ShowSevereCustom(state, eoh, format("Material {} is not a Regular material.", mat->Name)); + ShowSevereCustom(state, eoh, EnergyPlus::format("Material {} is not a Regular material.", mat->Name)); ErrorsFound = true; continue; } if (mat->hasPCM) { - ShowSevereCustom(state, eoh, format("Material {} already has {} properties defined.", mat->Name, s_ipsc->cCurrentModuleObject)); + ShowSevereCustom( + state, eoh, EnergyPlus::format("Material {} already has {} properties defined.", mat->Name, s_ipsc->cCurrentModuleObject)); ErrorsFound = true; continue; } if (mat->hasEMPD) { - ShowSevereCustom(state, eoh, format("Material {} already has EMPD properties defined.", mat->Name)); + ShowSevereCustom(state, eoh, EnergyPlus::format("Material {} already has EMPD properties defined.", mat->Name)); ErrorsFound = true; continue; } if (mat->hasHAMT) { - ShowSevereCustom(state, eoh, format("Material {} already has HAMT properties defined.", mat->Name)); + ShowSevereCustom(state, eoh, EnergyPlus::format("Material {} already has HAMT properties defined.", mat->Name)); ErrorsFound = true; continue; } diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 45de53afcca..4f782743feb 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -122,7 +122,7 @@ namespace PhotovoltaicThermalCollectors { } // If we didn't find it, fatal - ShowFatalError(state, format("Solar Thermal Collector Factory: Error getting inputs for object named: {}", objectName)); + ShowFatalError(state, EnergyPlus::format("Solar Thermal Collector Factory: Error getting inputs for object named: {}", objectName)); // Shut up the compiler return nullptr; } @@ -272,10 +272,10 @@ namespace PhotovoltaicThermalCollectors { int Found = Util::FindItemInList(thisTmpBIPVTperf.OSCMName, state.dataSurface->OSCM); if (Found == 0) { ShowSevereError(state, - format("GetBIPVTCollectorsInput: Invalid outside model name={}, object type={}, object name={}", - thisTmpBIPVTperf.OSCMName, - state.dataIPShortCut->cCurrentModuleObject, - thisTmpBIPVTperf.Name)); + EnergyPlus::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,47 +343,55 @@ namespace PhotovoltaicThermalCollectors { // check surface if (thisPVT.SurfNum == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(2)) { - ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError(state, "Surface name cannot be blank."); } else { - ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError(state, "Surface was not found."); } ErrorsFound = true; } else { if (!state.dataSurface->Surface(thisPVT.SurfNum).ExtSolar) { - ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); 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, - format("Suspected input problem with {} = {}", - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, "Surface used for solar collector faces down"); + EnergyPlus::format("Suspected input problem with {} = {}", + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError( state, - format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", state.dataSurface->Surface(thisPVT.SurfNum).Tilt)); + EnergyPlus::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}", + state.dataSurface->Surface(thisPVT.SurfNum).Tilt)); } } // check surface if (state.dataIPShortCut->lAlphaFieldBlanks(3)) { - ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{}, name cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(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))); ErrorsFound = true; } else { thisPVT.PVTModelName = state.dataIPShortCut->cAlphaArgs(3); @@ -401,11 +409,13 @@ namespace PhotovoltaicThermalCollectors { thisPVT.AreaCol = state.dataSurface->Surface(thisPVT.SurfNum).Area; thisPVT.ModelType = PVTModelType::BIPVT; } else { - ShowSevereError(state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError( - state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{}, was not found.", state.dataIPShortCut->cAlphaFieldNames(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("{}, was not found.", state.dataIPShortCut->cAlphaFieldNames(3))); ErrorsFound = true; } } @@ -414,10 +424,12 @@ namespace PhotovoltaicThermalCollectors { thisPVT.PVnum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(4), state.dataPhotovoltaic->PVarray); // check PV if (thisPVT.PVnum == 0) { - ShowSevereError(state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); - ShowContinueError( - state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + 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))); ErrorsFound = true; } else { thisPVT.PVname = state.dataIPShortCut->cAlphaArgs(4); @@ -434,16 +446,20 @@ namespace PhotovoltaicThermalCollectors { thisPVT.WorkingFluidType = WorkingFluidEnum::AIR; } else { if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError( - state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} field cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(5))); + 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))); + ShowContinueError(state, EnergyPlus::format("{} field cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(5))); } else { - ShowSevereError(state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError( - state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); } ErrorsFound = true; } @@ -620,15 +636,15 @@ namespace PhotovoltaicThermalCollectors { if (allocated(state.dataPhotovoltaic->PVarray)) { this->PVnum = Util::FindItemInList(this->PVname, state.dataPhotovoltaic->PVarray); if (this->PVnum == 0) { - ShowSevereError(state, format("Invalid name for photovoltaic generator = {}", this->PVname)); - ShowContinueError(state, format("Entered in flat plate photovoltaic-thermal collector = {}", this->Name)); + ShowSevereError(state, EnergyPlus::format("Invalid name for photovoltaic generator = {}", this->PVname)); + ShowContinueError(state, EnergyPlus::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, format("Needed for flat plate photovoltaic-thermal collector = {}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Needed for flat plate photovoltaic-thermal collector = {}", this->Name)); } } } @@ -641,8 +657,8 @@ namespace PhotovoltaicThermalCollectors { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, "Missing temperature setpoint for PVT outlet node "); ShowContinueError(state, - format("Add a setpoint manager to outlet node of PVT named {}", - state.dataPhotovoltaicThermalCollector->PVT(PVTindex).Name)); + EnergyPlus::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 @@ -653,8 +669,8 @@ namespace PhotovoltaicThermalCollectors { if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, "Missing temperature setpoint for PVT outlet node "); ShowContinueError(state, - format("Add a setpoint manager to outlet node of PVT named {}", - state.dataPhotovoltaicThermalCollector->PVT(PVTindex).Name)); + EnergyPlus::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"); } } @@ -800,7 +816,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, format("Occurs in PVT object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in PVT object={}", this->Name)); ErrorsFound = true; } } else { // Hardsized @@ -848,9 +864,10 @@ namespace PhotovoltaicThermalCollectors { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeSolarCollector: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Design Flow Rate of {:.5R} [W]", DesignVolFlowRateUser)); - ShowContinueError(state, format("differs from Design Size Design Flow Rate of {:.5R} [W]", DesignVolFlowRateDes)); + ShowMessage(state, EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -917,9 +934,12 @@ namespace PhotovoltaicThermalCollectors { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeSolarCollector: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Design Flow Rate of {:.5R} [W]", DesignVolFlowRateUser)); - ShowContinueError(state, format("differs from Design Size Design Flow Rate of {:.5R} [W]", DesignVolFlowRateDes)); + ShowMessage(state, + EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1873,7 +1893,8 @@ namespace PhotovoltaicThermalCollectors { if (WhichPVT != 0) { NodeNum = state.dataPhotovoltaicThermalCollector->PVT(WhichPVT).HVACInletNodeNum; } else { - ShowSevereError(state, format("GetAirInletNodeNum: Could not find SolarCollector FlatPlate PhotovoltaicThermal = \"{}\"", PVTName)); + ShowSevereError(state, + EnergyPlus::format("GetAirInletNodeNum: Could not find SolarCollector FlatPlate PhotovoltaicThermal = \"{}\"", PVTName)); ErrorsFound = true; NodeNum = 0; } @@ -1904,7 +1925,8 @@ namespace PhotovoltaicThermalCollectors { if (WhichPVT != 0) { NodeNum = state.dataPhotovoltaicThermalCollector->PVT(WhichPVT).HVACOutletNodeNum; } else { - ShowSevereError(state, format("GetAirInletNodeNum: Could not find SolarCollector FlatPlate PhotovoltaicThermal = \"{}\"", PVTName)); + ShowSevereError(state, + EnergyPlus::format("GetAirInletNodeNum: Could not find SolarCollector FlatPlate PhotovoltaicThermal = \"{}\"", PVTName)); ErrorsFound = true; NodeNum = 0; } @@ -1926,7 +1948,7 @@ namespace PhotovoltaicThermalCollectors { } // If we didn't find it, fatal - ShowFatalError(state, format("Solar Thermal Collector GetIndexFromName: Error getting inputs for object named: {}", objectName)); + ShowFatalError(state, EnergyPlus::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 50431cfb775..9f996e57dbb 100644 --- a/src/EnergyPlus/Photovoltaics.cc +++ b/src/EnergyPlus/Photovoltaics.cc @@ -169,26 +169,28 @@ namespace Photovoltaics { if (GeneratorIndex == 0) { PVnum = Util::FindItemInList(GeneratorName, state.dataPhotovoltaic->PVarray); if (PVnum == 0) { - ShowFatalError(state, format("SimPhotovoltaicGenerator: Specified PV not one of valid Photovoltaic Generators {}", GeneratorName)); + ShowFatalError( + state, EnergyPlus::format("SimPhotovoltaicGenerator: Specified PV not one of valid Photovoltaic Generators {}", GeneratorName)); } GeneratorIndex = PVnum; } else { PVnum = GeneratorIndex; if (PVnum > state.dataPhotovoltaic->NumPVs || PVnum < 1) { ShowFatalError(state, - format("SimPhotovoltaicGenerator: Invalid GeneratorIndex passed={}, Number of PVs={}, Generator name={}", - PVnum, - state.dataPhotovoltaic->NumPVs, - GeneratorName)); + EnergyPlus::format("SimPhotovoltaicGenerator: Invalid GeneratorIndex passed={}, Number of PVs={}, Generator name={}", + PVnum, + state.dataPhotovoltaic->NumPVs, + GeneratorName)); } if (state.dataPhotovoltaicState->CheckEquipName(PVnum)) { if (GeneratorName != state.dataPhotovoltaic->PVarray(PVnum).Name) { ShowFatalError( state, - format("SimPhotovoltaicGenerator: Invalid GeneratorIndex passed={}, Generator name={}, stored PV Name for that index={}", - PVnum, - GeneratorName, - state.dataPhotovoltaic->PVarray(PVnum).Name)); + EnergyPlus::format( + "SimPhotovoltaicGenerator: Invalid GeneratorIndex passed={}, Generator name={}, stored PV Name for that index={}", + PVnum, + GeneratorName, + state.dataPhotovoltaic->PVarray(PVnum).Name)); } state.dataPhotovoltaicState->CheckEquipName(PVnum) = false; } @@ -209,7 +211,7 @@ namespace Photovoltaics { CalcSandiaPV(state, PVnum, RunFlag); } break; default: { - ShowFatalError(state, format("Specified generator model type not found for PV generator = {}", GeneratorName)); + ShowFatalError(state, EnergyPlus::format("Specified generator model type not found for PV generator = {}", GeneratorName)); } break; } @@ -305,7 +307,7 @@ namespace Photovoltaics { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, pvModelNames[(int)PVModel::Sandia]); if (state.dataPhotovoltaic->NumPVs <= 0) { - ShowSevereError(state, format("Did not find any {}", cPVGeneratorObjectName)); + ShowSevereError(state, EnergyPlus::format("Did not find any {}", cPVGeneratorObjectName)); return; } @@ -338,14 +340,14 @@ namespace Photovoltaics { state.dataPhotovoltaic->PVarray(PVnum).SurfacePtr = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataSurface->Surface); // required-surface if (s_ipsc->lAlphaFieldBlanks(2)) { - ShowSevereError(state, format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {} = {}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ShowContinueError(state, "Surface name cannot be blank"); ErrorsFound = true; } if (state.dataPhotovoltaic->PVarray(PVnum).SurfacePtr == 0) { - ShowSevereError(state, format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {} = {}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } else { // Found one -- make sure has right parameters for PV @@ -353,19 +355,21 @@ namespace Photovoltaics { state.dataSurface->SurfIsPV(SurfNum) = true; if (!state.dataSurface->Surface(SurfNum).ExtSolar) { - ShowWarningError(state, format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {} = {}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(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))); ShowContinueError(state, "Surface is not exposed to solar, check surface boundary condition"); } state.dataPhotovoltaic->PVarray(PVnum).Zone = GetPVZone(state, state.dataPhotovoltaic->PVarray(PVnum).SurfacePtr); // check surface orientation, warn if upside down if ((state.dataSurface->Surface(SurfNum).Tilt < -95.0) || (state.dataSurface->Surface(SurfNum).Tilt > 95.0)) { - ShowWarningError(state, format("Suspected input problem with {} = {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {} = {}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, + EnergyPlus::format("Suspected input problem with {} = {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Surface used for solar collector faces down"); - ShowContinueError( - state, format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", state.dataSurface->Surface(SurfNum).Tilt)); + ShowContinueError(state, + EnergyPlus::format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", + state.dataSurface->Surface(SurfNum).Tilt)); } } @@ -409,41 +413,42 @@ namespace Photovoltaics { if (dupPtr != 0) { auto &thisPVarray = state.dataPhotovoltaic->PVarray(dupPtr); if (thisPVarray.CellIntegrationMode == CellIntegration::SurfaceOutsideFace) { - ShowSevereError(state, format("{}: problem detected with multiple PV arrays.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: problem detected with multiple PV arrays.", s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "When using IntegratedSurfaceOutsideFace heat transfer mode, only one PV array can be coupled"); ShowContinueError(state, - format("Both {} and {} are using surface {}", - state.dataPhotovoltaic->PVarray(PVnum).Name, - thisPVarray.Name, - state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); + EnergyPlus::format("Both {} and {} are using surface {}", + state.dataPhotovoltaic->PVarray(PVnum).Name, + thisPVarray.Name, + state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); ErrorsFound = true; } else if (thisPVarray.CellIntegrationMode == CellIntegration::TranspiredCollector) { - ShowSevereError(state, format("{}: problem detected with multiple PV arrays.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: problem detected with multiple PV arrays.", s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "When using IntegratedTranspiredCollector heat transfer mode, only one PV array can be coupled"); ShowContinueError(state, - format("Both {} and {} are using UTSC surface = {}", - state.dataPhotovoltaic->PVarray(PVnum).Name, - thisPVarray.Name, - state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); + EnergyPlus::format("Both {} and {} are using UTSC surface = {}", + state.dataPhotovoltaic->PVarray(PVnum).Name, + thisPVarray.Name, + state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); ErrorsFound = true; } else if (thisPVarray.CellIntegrationMode == CellIntegration::ExteriorVentedCavity) { - ShowSevereError(state, format("{}: problem detected with multiple PV arrays.", s_ipsc->cCurrentModuleObject)); + 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, - format("Both {} and {} are using exterior vented surface = {}", - state.dataPhotovoltaic->PVarray(PVnum).Name, - thisPVarray.Name, - state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); + EnergyPlus::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, - 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)); + 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)); ErrorsFound = true; } } @@ -631,8 +636,10 @@ namespace Photovoltaics { state.dataSurface->Surface(state.dataPhotovoltaic->PVarray(PVnum).SurfacePtr).Area * state.dataPhotovoltaic->PVarray(PVnum).SimplePVModule.ActiveFraction; } else { - ShowSevereError(state, format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); - ShowContinueError(state, format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); + 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)); ErrorsFound = true; } } break; @@ -641,8 +648,10 @@ namespace Photovoltaics { if (ThisParamObj > 0) { state.dataPhotovoltaic->PVarray(PVnum).TRNSYSPVModule = tmpTRNSYSModuleParams(ThisParamObj); // entire structure assignment } else { - ShowSevereError(state, format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); - ShowContinueError(state, format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); + 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)); ErrorsFound = true; } } break; @@ -652,8 +661,10 @@ namespace Photovoltaics { if (ThisParamObj > 0) { state.dataPhotovoltaic->PVarray(PVnum).SNLPVModule = tmpSNLModuleParams(ThisParamObj); // entire structure assignment } else { - ShowSevereError(state, format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); - ShowContinueError(state, format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); + 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)); ErrorsFound = true; } } break; @@ -718,14 +729,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, - format("Must use a surface with heat transfer for IntegratedSurfaceOutsideFace mode in {}", - state.dataPhotovoltaic->PVarray(PVnum).Name)); + EnergyPlus::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, - format("Must use a surface with internal source construction for IntegratedSurfaceOutsideFace mode in {}", + ShowSevereError( + state, + EnergyPlus::format("Must use a surface with internal source construction for IntegratedSurfaceOutsideFace mode in {}", state.dataPhotovoltaic->PVarray(PVnum).Name)); ErrorsFound = true; } @@ -997,7 +1009,7 @@ namespace Photovoltaics { thisPVarray.SNLPVModule.DT0); } break; default: { - ShowSevereError(state, format("Sandia PV Simulation Temperature Modeling Mode Error in {}", thisPVarray.Name)); + ShowSevereError(state, EnergyPlus::format("Sandia PV Simulation Temperature Modeling Mode Error in {}", thisPVarray.Name)); } break; } @@ -1628,9 +1640,9 @@ 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, format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); - ShowContinueError(state, format("VV (voltage) = {:.5R}", VV)); - ShowContinueError(state, format("II (current) = {:.5R}", II)); + ShowContinueError(state, EnergyPlus::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"); } @@ -1661,9 +1673,9 @@ 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, format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); - ShowContinueError(state, format("VV (voltage) = {:.5R}", VV)); - ShowContinueError(state, format("II (current) = {:.5R}", II)); + ShowContinueError(state, EnergyPlus::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"); } @@ -1694,9 +1706,9 @@ 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, format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); - ShowContinueError(state, format("VV (voltage) = {:.5R}", VV)); - ShowContinueError(state, format("II (current) = {:.5R}", II)); + ShowContinueError(state, EnergyPlus::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"); } @@ -2260,9 +2272,10 @@ namespace Photovoltaics { } if (!Found) { - ShowFatalError(state, - format("Did not find surface in Exterior Vented Cavity description in GetExtVentedCavityIndex, Surface name = {}", - state.dataSurface->Surface(SurfacePtr).Name)); + ShowFatalError( + state, + EnergyPlus::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 65558ef5d82..c1bb6a218d6 100644 --- a/src/EnergyPlus/PipeHeatTransfer.cc +++ b/src/EnergyPlus/PipeHeatTransfer.cc @@ -137,7 +137,7 @@ PlantComponent *PipeHTData::factory(EnergyPlusData &state, DataPlant::PlantEquip return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("PipeHTFactory: Error getting inputs for pipe named: {}", objectName)); + ShowFatalError(state, EnergyPlus::format("PipeHTFactory: Error getting inputs for pipe named: {}", objectName)); // Shut up the compiler return nullptr; } @@ -274,8 +274,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, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -291,8 +291,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).InletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -308,8 +308,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).OutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -327,8 +327,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) state.dataPipeHT->PipeHT(Item).EnvironmentPtr = EnvrnPtr::ZoneEnv; state.dataPipeHT->PipeHT(Item).EnvrZonePtr = Util::FindItemInList(s_ipsc->cAlphaArgs(6), state.dataHeatBal->Zone); if (state.dataPipeHT->PipeHT(Item).EnvrZonePtr == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -339,20 +339,20 @@ void GetPipesHeatTransfer(EnergyPlusData &state) state.dataPipeHT->PipeHT(Item).envrSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(7)); state.dataPipeHT->PipeHT(Item).envrVelSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(8)); if (state.dataPipeHT->PipeHT(Item).envrSched == nullptr) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } if (state.dataPipeHT->PipeHT(Item).envrVelSched == nullptr) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(8), s_ipsc->cAlphaArgs(8))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(8), s_ipsc->cAlphaArgs(8))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } break; default: - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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, R"(Should be "ZONE" or "SCHEDULE")"); // TODO rename point ErrorsFound = true; } @@ -360,18 +360,20 @@ void GetPipesHeatTransfer(EnergyPlusData &state) // dimensions 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, format("GetPipesHeatTransfer: invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, format("{} must be > 0.0", s_ipsc->cNumericFieldNames(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("GetPipesHeatTransfer: 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))); 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, format("GetPipesHeatTransfer: invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, format("{} must be > 0.0", s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -417,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, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -434,8 +436,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).InletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -451,8 +453,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).OutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -474,32 +476,32 @@ void GetPipesHeatTransfer(EnergyPlusData &state) ObjectIsNotParent); if (!s_ipsc->lAlphaFieldBlanks(5)) { if (!CheckOutAirNodeNumber(state, state.dataPipeHT->PipeHT(Item).EnvrAirNodeNum)) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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, "Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node"); ErrorsFound = true; } } else { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("An {} must be used ", s_ipsc->cAlphaFieldNames(5))); + 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))); ErrorsFound = true; } // dimensions 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, format("Invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, format("{} must be > 0.0", s_ipsc->cNumericFieldNames(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); 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, format("Invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, format("{} must be > 0.0", s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -547,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, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -564,8 +566,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).InletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -581,8 +583,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).OutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -597,25 +599,25 @@ void GetPipesHeatTransfer(EnergyPlusData &state) } else if (Util::SameString(s_ipsc->cAlphaArgs(5), "NOSUN")) { state.dataPipeHT->PipeHT(Item).SolarExposed = false; } else { - ShowSevereError(state, format("GetPipesHeatTransfer: invalid key for sun exposure flag for {}", s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Key should be either SunExposed or NoSun. Entered Key: {}", s_ipsc->cAlphaArgs(5))); + 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))); ErrorsFound = true; } // dimensions 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, format("Invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, format("{} must be > 0.0", s_ipsc->cNumericFieldNames(1))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); 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, format("Invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, format("{} must be > 0.0", s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -880,8 +882,9 @@ void PipeHTData::ValidatePipeConstruction(EnergyPlusData &state, this->InsulationOD = this->PipeOD + 2.0 * this->InsulationThickness; } else { - ShowSevereError( - state, format("{}: invalid {}=\"{}\", too many layers=[{}], only 1 or 2 allowed.", PipeType, FieldName, ConstructionName, TotalLayers)); + ShowSevereError(state, + EnergyPlus::format( + "{}: invalid {}=\"{}\", too many layers=[{}], only 1 or 2 allowed.", PipeType, FieldName, ConstructionName, TotalLayers)); ErrorsFound = true; } } @@ -1357,7 +1360,7 @@ void PipeHTData::CalcBuriedPipeSoil(EnergyPlusData &state) // Current Simulation for (IterationIndex = 1; IterationIndex <= MaxIterations; ++IterationIndex) { if (IterationIndex == MaxIterations) { - ShowWarningError(state, format("BuriedPipeHeatTransfer: Large number of iterations detected in object: {}", this->Name)); + ShowWarningError(state, EnergyPlus::format("BuriedPipeHeatTransfer: Large number of iterations detected in object: {}", this->Name)); } // Store computed values in T_O array @@ -1860,8 +1863,9 @@ Real64 PipeHTData::OutsidePipeHeatTransCoef(EnergyPlusData &state) if (!ViscositySet) { AirVisc = DynVisc[NumOfPropDivisions - 1]; if (AirTemp > Temperature[NumOfPropDivisions - 1]) { - ShowWarningError(state, - format("Heat Transfer Pipe = {}Viscosity out of range, air temperature too high, setting to upper limit.", this->Name)); + ShowWarningError( + state, + EnergyPlus::format("Heat Transfer Pipe = {}Viscosity out of range, air temperature too high, setting to upper limit.", this->Name)); } } @@ -1884,7 +1888,8 @@ Real64 PipeHTData::OutsidePipeHeatTransCoef(EnergyPlusData &state) Coef = CCoef[NumOfParamDivisions - 1]; rExp = mExp[NumOfParamDivisions - 1]; if (ReD > UpperBound[NumOfParamDivisions - 1]) { - ShowWarningError(state, format("Heat Transfer Pipe = {}Reynolds Number out of range, setting coefficients to upper limit.", this->Name)); + ShowWarningError( + state, EnergyPlus::format("Heat Transfer Pipe = {}Reynolds Number out of range, setting coefficients to upper limit.", this->Name)); } } diff --git a/src/EnergyPlus/Pipes.cc b/src/EnergyPlus/Pipes.cc index 6e0bf965834..faf88898045 100644 --- a/src/EnergyPlus/Pipes.cc +++ b/src/EnergyPlus/Pipes.cc @@ -89,7 +89,7 @@ PlantComponent *LocalPipeData::factory(EnergyPlusData &state, DataPlant::PlantEq } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalPipeDataFactory: Error getting inputs for pipe named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalPipeDataFactory: Error getting inputs for pipe named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -122,7 +122,7 @@ void LocalPipeData::oneTimeInit_new(EnergyPlusData &state) #pragma clang diagnostic push #pragma ide diagnostic ignored "ConstantConditionsOC" if (FoundOnLoop == 0) { - ShowFatalError(state, format("SimPipes: Pipe=\"{}\" not found on a Plant Loop.", this->Name)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("SimPipes: Pipe=\"{}\" not found on a Plant Loop.", this->Name)); // LCOV_EXCL_LINE } #pragma clang diagnostic pop if (errFlag) { diff --git a/src/EnergyPlus/Plant/EquipAndOperations.cc b/src/EnergyPlus/Plant/EquipAndOperations.cc index 4d83663ece9..ed0ddbf4d78 100644 --- a/src/EnergyPlus/Plant/EquipAndOperations.cc +++ b/src/EnergyPlus/Plant/EquipAndOperations.cc @@ -331,15 +331,17 @@ namespace DataPlant { } } if (!foundit) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " "component \"{}\" was not found on a cooling plant loop.", this->Name, this_equip.Name)); } } else if (NumSearchResults == 0) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " "component \"{}\" was not found on a plant loop.", this->Name, this_equip.Name)); @@ -419,15 +421,17 @@ namespace DataPlant { } } if (!foundit) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " "component \"{}\" was not found on a heating plant loop.", this->Name, this_equip.Name)); } } else if (NumSearchResults == 0) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " "component \"{}\" was not found on a plant loop.", this->Name, this_equip.Name)); @@ -507,15 +511,17 @@ namespace DataPlant { } } if (!foundit) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " "component \"{}\" was not found on a cooling plant loop.", this->Name, this_equip.Name)); } } else if (NumSearchResults == 0) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " "component \"{}\" was not found on a plant loop.", this->Name, this_equip.Name)); @@ -595,15 +601,17 @@ namespace DataPlant { } } if (!foundit) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " "component \"{}\" was not found on a heating plant loop.", this->Name, this_equip.Name)); } } else if (NumSearchResults == 0) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" " "component \"{}\" was not found on a plant loop.", this->Name, this_equip.Name)); @@ -771,15 +779,17 @@ namespace DataPlant { } if (!founditCooling) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" component " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" component " "\"{}\" was not found on a cooling plant loop.", this->Name, this->DedicatedHR_ChWRetControl_Name)); } if (!founditHeating) { - ShowSevereError(state, - format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" component " + ShowSevereError( + state, + EnergyPlus::format("ChillerHeaterSupervisoryOperationData::OneTimeInitChillerHeaterChangeoverOpScheme problem=\"{}\" component " "\"{}\" was not found on a heating plant loop.", this->Name, this->DedicatedHR_ChWRetControl_Name)); diff --git a/src/EnergyPlus/Plant/Loop.cc b/src/EnergyPlus/Plant/Loop.cc index ca08c36e708..4f5a33c9f98 100644 --- a/src/EnergyPlus/Plant/Loop.cc +++ b/src/EnergyPlus/Plant/Loop.cc @@ -249,13 +249,13 @@ void PlantLoopData::CheckLoopExitNode(EnergyPlusData &state, bool const FirstHVA "\", Error (CheckLoopExitNode) -- Mass Flow Rate Calculation. Outlet and Inlet differ by more than tolerance."); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("Loop inlet node={}, flowrate={:.4R} kg/s", - state.dataLoopNodes->NodeID(LoopInlet), - state.dataLoopNodes->Node(LoopInlet).MassFlowRate)); + EnergyPlus::format("Loop inlet node={}, flowrate={:.4R} kg/s", + state.dataLoopNodes->NodeID(LoopInlet), + state.dataLoopNodes->Node(LoopInlet).MassFlowRate)); ShowContinueError(state, - format("Loop outlet node={}, flowrate={:.4R} kg/s", - state.dataLoopNodes->NodeID(LoopOutlet), - state.dataLoopNodes->Node(LoopOutlet).MassFlowRate)); + EnergyPlus::format("Loop outlet node={}, flowrate={:.4R} kg/s", + state.dataLoopNodes->NodeID(LoopOutlet), + state.dataLoopNodes->Node(LoopOutlet).MassFlowRate)); ShowContinueError(state, "This loop might be helped by a bypass."); } ShowRecurringWarningErrorAtEnd( diff --git a/src/EnergyPlus/Plant/LoopSide.cc b/src/EnergyPlus/Plant/LoopSide.cc index a9f18bebb13..3cdbe8129ce 100644 --- a/src/EnergyPlus/Plant/LoopSide.cc +++ b/src/EnergyPlus/Plant/LoopSide.cc @@ -778,11 +778,12 @@ namespace DataPlant { "For example, if using SetpointManager:Scheduled:DualSetpoint, then check that the low setpoint is " "below the high setpoint."); ShowContinueError(state, "Occurs in PlantLoop=" + thisPlantLoop.Name); - ShowContinueError( - state, - format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); - ShowContinueError(state, format("Loop Heating Low Setpoint={:.2R}", LoopSetPointTemperatureLo)); - ShowContinueError(state, format("Loop Cooling High Setpoint={:.2R}", LoopSetPointTemperatureHi)); + ShowContinueError(state, + EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", + LoadToHeatingSetPoint, + LoadToCoolingSetPoint)); + ShowContinueError(state, EnergyPlus::format("Loop Heating Low Setpoint={:.2R}", LoopSetPointTemperatureLo)); + ShowContinueError(state, EnergyPlus::format("Loop Cooling High Setpoint={:.2R}", LoopSetPointTemperatureHi)); ShowFatalError(state, "Program terminates due to above conditions."); } @@ -797,11 +798,12 @@ namespace DataPlant { "DualSetPointWithDeadBand: Unanticipated combination of heating and cooling loads - report to EnergyPlus " "Development Team"); ShowContinueError(state, "occurs in PlantLoop=" + thisPlantLoop.Name); - ShowContinueError( - state, - format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); - ShowContinueError(state, format("Loop Heating Setpoint={:.2R}", LoopSetPointTemperatureLo)); - ShowContinueError(state, format("Loop Cooling Setpoint={:.2R}", LoopSetPointTemperatureHi)); + ShowContinueError(state, + EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", + LoadToHeatingSetPoint, + LoadToCoolingSetPoint)); + ShowContinueError(state, EnergyPlus::format("Loop Heating Setpoint={:.2R}", LoopSetPointTemperatureLo)); + ShowContinueError(state, EnergyPlus::format("Loop Cooling Setpoint={:.2R}", LoopSetPointTemperatureHi)); ShowFatalError(state, "Program terminates due to above conditions."); } } else { @@ -1661,9 +1663,9 @@ namespace DataPlant { // Call fatal diagnostic error. !The math should work out! ShowSevereError(state, "ResolveParallelFlows: Dev note, failed to redistribute restricted flow"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Loop side flow = {:.8R} (kg/s)", ThisLoopSideFlow)); - ShowContinueError(state, format("Flow Remaining = {:.8R} (kg/s)", FlowRemaining)); - ShowContinueError(state, format("Parallel Branch requests = {:.8R} (kg/s)", TotParallelBranchFlowReq)); + ShowContinueError(state, EnergyPlus::format("Loop side flow = {:.8R} (kg/s)", ThisLoopSideFlow)); + ShowContinueError(state, EnergyPlus::format("Flow Remaining = {:.8R} (kg/s)", FlowRemaining)); + ShowContinueError(state, EnergyPlus::format("Parallel Branch requests = {:.8R} (kg/s)", TotParallelBranchFlowReq)); } // 2) ! Reset the flow on the Mixer outlet branch diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index 8cbcb0b1e2f..08b5d10edae 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -649,11 +649,13 @@ void GetPlantLoopData(EnergyPlusData &state) ShowContinueError( state, "Invalid " + state.dataIPShortCut->cAlphaFieldNames(PressSimAlphaIndex) + "=\"" + Alpha(PressSimAlphaIndex) + "\"."); ShowContinueError(state, "Currently only options are: "); - ShowContinueError(state, " - " + format("{}", PressureSimTypeNamesUC[static_cast(DataPlant::PressSimType::NoPressure)])); - ShowContinueError(state, - " - " + format("{}", PressureSimTypeNamesUC[static_cast(DataPlant::PressSimType::PumpPowerCorrection)])); - ShowContinueError(state, - " - " + format("{}", PressureSimTypeNamesUC[static_cast(DataPlant::PressSimType::FlowCorrection)])); + ShowContinueError( + state, " - " + EnergyPlus::format("{}", PressureSimTypeNamesUC[static_cast(DataPlant::PressSimType::NoPressure)])); + ShowContinueError( + state, + " - " + EnergyPlus::format("{}", PressureSimTypeNamesUC[static_cast(DataPlant::PressSimType::PumpPowerCorrection)])); + ShowContinueError( + state, " - " + EnergyPlus::format("{}", PressureSimTypeNamesUC[static_cast(DataPlant::PressSimType::FlowCorrection)])); ErrorsFound = true; } } @@ -1430,7 +1432,7 @@ void GetPlantInput(EnergyPlusData &state) } if (this_comp.compPtr == nullptr) { - ShowFatalError(state, format(" Plant component \"{}\" was not assigned a pointer.", this_comp_type)); + ShowFatalError(state, EnergyPlus::format(" Plant component \"{}\" was not assigned a pointer.", this_comp_type)); } this_comp.Name = CompNames(CompNum); @@ -2166,9 +2168,9 @@ void fillPlantCondenserTopology(EnergyPlusData &state, DataPlant::PlantLoopData // s->pdchTopPlantCompName2 = newPreDefColumn(state, s->pdstTopPlantLoop2, "Component Name"); // s->pdchTopPlantMixName2 = newPreDefColumn(state, s->pdstTopPlantLoop2, "Mixer Name"); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopType2, format("{}", rowCounter), loopType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopName2, format("{}", rowCounter), thisLoop.Name); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantSide2, format("{}", rowCounter), loopSide); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopType2, EnergyPlus::format("{}", rowCounter), loopType); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopName2, EnergyPlus::format("{}", rowCounter), thisLoop.Name); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantSide2, EnergyPlus::format("{}", rowCounter), loopSide); ++rowCounter; // Report for first branch @@ -2223,10 +2225,10 @@ void fillPlantToplogySplitterRow2(EnergyPlusData &state, { auto &orp = state.dataOutRptPredefined; // s->pdchTopPlantSplitName2 = newPreDefColumn(state, s->pdstTopPlantLoop2, "Splitter Name"); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopType2, format("{}", rowCounter), loopType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopName2, format("{}", rowCounter), loopName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantSide2, format("{}", rowCounter), side); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantSplitName2, format("{}", rowCounter), splitterName); + 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->pdchTopPlantSplitName2, EnergyPlus::format("{}", rowCounter), splitterName); } void fillPlantToplogyMixerRow2(EnergyPlusData &state, const std::string_view &loopType, @@ -2237,10 +2239,10 @@ void fillPlantToplogyMixerRow2(EnergyPlusData &state, { auto &orp = state.dataOutRptPredefined; // s->pdchTopPlantMixName2 = newPreDefColumn(state, s->pdstTopPlantLoop2, "Mixer Name"); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopType2, format("{}", rowCounter), loopType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopName2, format("{}", rowCounter), loopName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantSide2, format("{}", rowCounter), side); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantMixName2, format("{}", rowCounter), mixerName); + 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->pdchTopPlantMixName2, EnergyPlus::format("{}", rowCounter), mixerName); } void fillPlantToplogyComponentRow2(EnergyPlusData &state, const std::string_view &loopType, @@ -2255,12 +2257,12 @@ void fillPlantToplogyComponentRow2(EnergyPlusData &state, // s->pdchTopPlantBranchName2 = newPreDefColumn(state, s->pdstTopPlantLoop2, "Branch Name"); // s->pdchTopPlantCompType2 = newPreDefColumn(state, s->pdstTopPlantLoop2, "Component Type"); // s->pdchTopPlantCompName2 = newPreDefColumn(state, s->pdstTopPlantLoop2, "Component Name"); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopType2, format("{}", rowCounter), loopType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopName2, format("{}", rowCounter), loopName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantSide2, format("{}", rowCounter), side); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantBranchName2, format("{}", rowCounter), branchName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantCompType2, format("{}", rowCounter), compType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantCompName2, format("{}", rowCounter), compName); + 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); ++rowCounter; } @@ -2285,7 +2287,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 = format("{}", row); + std::string rowS = EnergyPlus::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); @@ -2294,7 +2296,7 @@ void FillPlantEquipmentOperationLoad(EnergyPlusData &state) } else { OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbSchNm, rowS, "n/a"); } - OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbIndex, rowS, format("{}", kList)); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbIndex, rowS, EnergyPlus::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); @@ -3302,9 +3304,10 @@ void SizePlantLoop(EnergyPlusData &state, } else { loop.MaxVolFlowRate = 0.0; if (state.dataPlnt->PlantFinalSizesOkayToReport) { - ShowWarningError(state, - format("SizePlantLoop: Calculated Plant Sizing Design Volume Flow Rate=[{:.2R}] is too small. Set to 0.0", - loopSizData.DesVolFlowRate)); + ShowWarningError( + state, + EnergyPlus::format("SizePlantLoop: Calculated Plant Sizing Design Volume Flow Rate=[{:.2R}] is too small. Set to 0.0", + loopSizData.DesVolFlowRate)); ShowContinueError(state, "..occurs for PlantLoop=" + loop.Name); } } @@ -3487,9 +3490,10 @@ void ResizePlantLoopLevelSizes(EnergyPlusData &state, int const LoopNum // Suppl } else { state.dataPlnt->PlantLoop(LoopNum).MaxVolFlowRate = 0.0; if (state.dataPlnt->PlantFinalSizesOkayToReport) { - ShowWarningError(state, - format("SizePlantLoop: Calculated Plant Sizing Design Volume Flow Rate=[{:.2R}] is too small. Set to 0.0", - state.dataSize->PlantSizData(PlantSizNum).DesVolFlowRate)); + ShowWarningError( + state, + EnergyPlus::format("SizePlantLoop: Calculated Plant Sizing Design Volume Flow Rate=[{:.2R}] is too small. Set to 0.0", + state.dataSize->PlantSizData(PlantSizNum).DesVolFlowRate)); ShowContinueError(state, "..occurs for PlantLoop=" + state.dataPlnt->PlantLoop(LoopNum).Name); } } @@ -4604,19 +4608,21 @@ void CheckOngoingPlantWarnings(EnergyPlusData &state) state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_TotalTime / 2) { ShowWarningError( state, "Plant Loop: " + state.dataPlnt->PlantLoop(LoopNum).Name + " Demand Side is storing excess heat the majority of the time."); - ShowContinueError(state, - format("Excess Storage Time={:.2R}[hr], Total Loop Active Time={:.2R}[hr]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_CapExcessStorageTime, - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_TotalTime)); + ShowContinueError( + state, + EnergyPlus::format("Excess Storage Time={:.2R}[hr], Total Loop Active Time={:.2R}[hr]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_CapExcessStorageTime, + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_TotalTime)); } if (state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_CapExcessStorageTime > state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_TotalTime / 2) { ShowWarningError( state, "Plant Loop: " + state.dataPlnt->PlantLoop(LoopNum).Name + " Supply Side is storing excess heat the majority of the time."); - ShowContinueError(state, - format("Excess Storage Time={:.2R}[hr], Total Loop Active Time={:.2R}[hr]", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_CapExcessStorageTime, - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_TotalTime)); + ShowContinueError( + state, + EnergyPlus::format("Excess Storage Time={:.2R}[hr], Total Loop Active Time={:.2R}[hr]", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Supply).LoopSideInlet_CapExcessStorageTime, + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideLocation::Demand).LoopSideInlet_TotalTime)); } } } diff --git a/src/EnergyPlus/PlantCentralGSHP.cc b/src/EnergyPlus/PlantCentralGSHP.cc index b9aa9d3c0d4..b04e969e54f 100644 --- a/src/EnergyPlus/PlantCentralGSHP.cc +++ b/src/EnergyPlus/PlantCentralGSHP.cc @@ -111,7 +111,8 @@ PlantComponent *WrapperSpecs::factory(EnergyPlusData &state, std::string const & } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalPlantCentralGSHPFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalPlantCentralGSHPFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -275,14 +276,17 @@ void WrapperSpecs::SizeWrapper(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeChillerHeaterPerformanceElectricEIR: Potential issue with equipment sizing for {}", - this->ChillerHeater(NumChillerHeater).Name)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerHeaterPerformanceElectricEIR: Potential issue with equipment sizing for {}", + this->ChillerHeater(NumChillerHeater).Name)); ShowContinueError( - state, format("User-Specified Reference Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + state, + EnergyPlus::format("User-Specified Reference Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); ShowContinueError( state, - format("differs from Design Size Reference Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + EnergyPlus::format("differs from Design Size Reference Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -294,8 +298,9 @@ void WrapperSpecs::SizeWrapper(EnergyPlusData &state) if (this->ChillerHeater(NumChillerHeater).EvapVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of CGSHP Chiller Heater evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, - format("Occurs in CGSHP Chiller Heater Performance object={}", this->ChillerHeater(NumChillerHeater).Name)); + ShowContinueError( + state, + EnergyPlus::format("Occurs in CGSHP Chiller Heater Performance object={}", this->ChillerHeater(NumChillerHeater).Name)); ErrorsFound = true; } } else { @@ -372,11 +377,13 @@ void WrapperSpecs::SizeWrapper(EnergyPlusData &state) tmpNomCap = NomCapUser; if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeChillerHeaterPerformanceElectricEIR: Potential issue with equipment sizing for {}", - this->ChillerHeater(NumChillerHeater).Name)); - ShowContinueError(state, format("User-Specified Reference Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Reference Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerHeaterPerformanceElectricEIR: Potential issue with equipment sizing for {}", + this->ChillerHeater(NumChillerHeater).Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Reference Capacity of {:.2R} [W]", NomCapUser)); + 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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -387,9 +394,9 @@ void WrapperSpecs::SizeWrapper(EnergyPlusData &state) } else { if (this->ChillerHeater(NumChillerHeater).RefCapCoolingWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError( - state, - format("Size ChillerHeaterPerformance:Electric:EIR=\"{}\", autosize error.", this->ChillerHeater(NumChillerHeater).Name)); + ShowSevereError(state, + EnergyPlus::format("Size ChillerHeaterPerformance:Electric:EIR=\"{}\", autosize error.", + this->ChillerHeater(NumChillerHeater).Name)); ShowContinueError(state, "Autosizing of CGSHP Chiller Heater reference capacity requires"); ShowContinueError(state, "a cooling loop Sizing:Plant object."); ErrorsFound = true; @@ -462,14 +469,17 @@ void WrapperSpecs::SizeWrapper(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeChillerHeaterPerformanceElectricEIR: Potential issue with equipment sizing for {}", - this->ChillerHeater(NumChillerHeater).Name)); - ShowContinueError( - state, format("User-Specified Reference Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerHeaterPerformanceElectricEIR: Potential issue with equipment sizing for {}", + this->ChillerHeater(NumChillerHeater).Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Reference Condenser Water Flow Rate of {:.5R} [m3/s]", + CondVolFlowRateUser)); ShowContinueError( state, - format("differs from Design Size Reference Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + EnergyPlus::format("differs from Design Size Reference Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -480,9 +490,9 @@ void WrapperSpecs::SizeWrapper(EnergyPlusData &state) } else { if (this->ChillerHeater(NumChillerHeater).CondVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError( - state, - format("Size ChillerHeaterPerformance:Electric:EIR=\"{}\", autosize error.", this->ChillerHeater(NumChillerHeater).Name)); + ShowSevereError(state, + EnergyPlus::format("Size ChillerHeaterPerformance:Electric:EIR=\"{}\", autosize error.", + this->ChillerHeater(NumChillerHeater).Name)); ShowContinueError(state, "Autosizing of CGSHP Chiller Heater condenser flow rate requires"); ShowContinueError(state, "a condenser loop Sizing:Plant object."); ErrorsFound = true; @@ -559,7 +569,7 @@ void GetWrapperInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantCentralGSHP->numWrappers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); } state.dataPlantCentralGSHP->Wrapper.allocate(state.dataPlantCentralGSHP->numWrappers); @@ -687,9 +697,9 @@ void GetWrapperInput(EnergyPlusData &state) if (state.dataPlantCentralGSHP->Wrapper(WrapperNum).NumOfComp == 0) { ShowSevereError(state, - format("GetWrapperInput: No component names on {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataPlantCentralGSHP->Wrapper(WrapperNum).Name)); + EnergyPlus::format("GetWrapperInput: No component names on {}={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataPlantCentralGSHP->Wrapper(WrapperNum).Name)); ErrorsFound = true; } else { int Comp = 0; @@ -735,18 +745,19 @@ void GetWrapperInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError( - state, - format("GetWrapperInput: Invalid {} Input, preceding condition(s) cause termination.", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, + EnergyPlus::format("GetWrapperInput: Invalid {} Input, preceding condition(s) cause termination.", + state.dataIPShortCut->cCurrentModuleObject)); } // ALLOCATE ARRAYS if ((state.dataPlantCentralGSHP->numChillerHeaters == 0) && (state.dataPlantCentralGSHP->Wrapper(WrapperNum).ControlMode == CondenserType::SmartMixing)) { - ShowFatalError(state, - format("SmartMixing Control Mode in object {} : {} need to apply to ChillerHeaterPerformance:Electric:EIR object(s).", - state.dataIPShortCut->cCurrentModuleObject, - state.dataPlantCentralGSHP->Wrapper(WrapperNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SmartMixing Control Mode in object {} : {} need to apply to ChillerHeaterPerformance:Electric:EIR object(s).", + state.dataIPShortCut->cCurrentModuleObject, + state.dataPlantCentralGSHP->Wrapper(WrapperNum).Name)); } } @@ -767,7 +778,8 @@ void GetWrapperInput(EnergyPlusData &state) int CompIndex = Util::FindItemInList(CompName, state.dataPlantCentralGSHP->ChillerHeater); // User may enter invalid name rather than selecting one from the object list if (CompIndex <= 0) { - ShowSevereError(state, format("GetWrapperInput: Invalid Chiller Heater Modules Performance Component Name ={}", CompName)); + ShowSevereError(state, + EnergyPlus::format("GetWrapperInput: Invalid Chiller Heater Modules Performance Component Name ={}", CompName)); ShowContinueError(state, "Select the name of ChillerHeaterPerformance:Electric:EIR object(s) from the object list."); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -969,7 +981,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) for (int ChillerHeaterNum = 1; ChillerHeaterNum <= this->ChillerHeaterNums; ++ChillerHeaterNum) { SetupOutputVariable(state, - format("Chiller Heater Operation Mode Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Operation Mode Unit {}", ChillerHeaterNum), Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.CurrentMode, OutputProcessor::TimeStepType::System, @@ -977,7 +989,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Part Load Ratio Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Part Load Ratio Unit {}", ChillerHeaterNum), Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerPartLoadRatio, OutputProcessor::TimeStepType::System, @@ -985,7 +997,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Cycling Ratio Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Cycling Ratio Unit {}", ChillerHeaterNum), Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerCyclingRatio, OutputProcessor::TimeStepType::System, @@ -993,7 +1005,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Cooling Electricity Rate Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Cooling Electricity Rate Unit {}", ChillerHeaterNum), Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.CoolingPower, OutputProcessor::TimeStepType::System, @@ -1001,7 +1013,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Heating Electricity Rate Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Heating Electricity Rate Unit {}", ChillerHeaterNum), Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.HeatingPower, OutputProcessor::TimeStepType::System, @@ -1009,7 +1021,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Cooling Electricity Energy Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Cooling Electricity Energy Unit {}", ChillerHeaterNum), Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.CoolingEnergy, OutputProcessor::TimeStepType::System, @@ -1017,7 +1029,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Heating Electricity Energy Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Heating Electricity Energy Unit {}", ChillerHeaterNum), Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.HeatingEnergy, OutputProcessor::TimeStepType::System, @@ -1025,7 +1037,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Cooling Rate Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Cooling Rate Unit {}", ChillerHeaterNum), Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.QEvap, OutputProcessor::TimeStepType::System, @@ -1033,7 +1045,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Cooling Energy Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Cooling Energy Unit {}", ChillerHeaterNum), Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.EvapEnergy, OutputProcessor::TimeStepType::System, @@ -1041,7 +1053,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater False Load Heat Transfer Rate Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater False Load Heat Transfer Rate Unit {}", ChillerHeaterNum), Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.ChillerFalseLoadRate, OutputProcessor::TimeStepType::System, @@ -1049,7 +1061,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater False Load Heat Transfer Energy Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater False Load Heat Transfer Energy Unit {}", ChillerHeaterNum), Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.ChillerFalseLoad, OutputProcessor::TimeStepType::System, @@ -1057,7 +1069,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Evaporator Inlet Temperature Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Evaporator Inlet Temperature Unit {}", ChillerHeaterNum), Constant::Units::C, this->ChillerHeater(ChillerHeaterNum).Report.EvapInletTemp, OutputProcessor::TimeStepType::System, @@ -1065,7 +1077,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Evaporator Outlet Temperature Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Evaporator Outlet Temperature Unit {}", ChillerHeaterNum), Constant::Units::C, this->ChillerHeater(ChillerHeaterNum).Report.EvapOutletTemp, OutputProcessor::TimeStepType::System, @@ -1073,7 +1085,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Evaporator Mass Flow Rate Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Evaporator Mass Flow Rate Unit {}", ChillerHeaterNum), Constant::Units::kg_s, this->ChillerHeater(ChillerHeaterNum).Report.Evapmdot, OutputProcessor::TimeStepType::System, @@ -1081,7 +1093,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Condenser Heat Transfer Rate Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Condenser Heat Transfer Rate Unit {}", ChillerHeaterNum), Constant::Units::W, this->ChillerHeater(ChillerHeaterNum).Report.QCond, OutputProcessor::TimeStepType::System, @@ -1089,7 +1101,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Condenser Heat Transfer Energy Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Condenser Heat Transfer Energy Unit {}", ChillerHeaterNum), Constant::Units::J, this->ChillerHeater(ChillerHeaterNum).Report.CondEnergy, OutputProcessor::TimeStepType::System, @@ -1097,7 +1109,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater COP Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater COP Unit {}", ChillerHeaterNum), Constant::Units::W_W, this->ChillerHeater(ChillerHeaterNum).Report.ActualCOP, OutputProcessor::TimeStepType::System, @@ -1105,7 +1117,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Capacity Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Capacity Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerCapFT, OutputProcessor::TimeStepType::System, @@ -1113,7 +1125,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater EIR Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater EIR Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerEIRFT, OutputProcessor::TimeStepType::System, @@ -1121,7 +1133,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater EIR Part Load Modifier Multiplier Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater EIR Part Load Modifier Multiplier Unit {}", ChillerHeaterNum), Constant::Units::None, this->ChillerHeater(ChillerHeaterNum).Report.ChillerEIRFPLR, OutputProcessor::TimeStepType::System, @@ -1129,7 +1141,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Condenser Inlet Temperature Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Condenser Inlet Temperature Unit {}", ChillerHeaterNum), Constant::Units::C, this->ChillerHeater(ChillerHeaterNum).Report.CondInletTemp, OutputProcessor::TimeStepType::System, @@ -1137,7 +1149,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Condenser Outlet Temperature Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Condenser Outlet Temperature Unit {}", ChillerHeaterNum), Constant::Units::C, this->ChillerHeater(ChillerHeaterNum).Report.CondOutletTemp, OutputProcessor::TimeStepType::System, @@ -1145,7 +1157,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) this->ChillerHeater(ChillerHeaterNum).Name); SetupOutputVariable(state, - format("Chiller Heater Condenser Mass Flow Rate Unit {}", ChillerHeaterNum), + EnergyPlus::format("Chiller Heater Condenser Mass Flow Rate Unit {}", ChillerHeaterNum), Constant::Units::kg_s, this->ChillerHeater(ChillerHeaterNum).Report.Condmdot, OutputProcessor::TimeStepType::System, @@ -1176,7 +1188,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantCentralGSHP->numChillerHeaters <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); CHErrorsFound = true; } @@ -1214,24 +1226,30 @@ 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, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); + 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))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFTCoolingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(6)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFTCoolingIDX == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); + 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))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFPLRCoolingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(7)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFPLRCoolingIDX == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + 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))); CHErrorsFound = true; } @@ -1245,24 +1263,30 @@ 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, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + 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))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFTHeatingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(10)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFTHeatingIDX == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); + 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))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFPLRHeatingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(11)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFPLRHeatingIDX == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); + 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))); CHErrorsFound = true; } @@ -1275,8 +1299,10 @@ 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, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + 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))); ShowContinueError(state, "simulation assumes CONSTANTFLOW and continues.."); } @@ -1285,10 +1311,11 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum - 1).ConstantFlow) { state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ConstantFlow = true; ShowWarningError(state, - format("Water flow mode is different from the other chiller heater(s) {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + 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))); ShowContinueError(state, "Simulation assumes CONSTANTFLOW and continues.."); } } @@ -1296,8 +1323,10 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (Util::SameString(state.dataIPShortCut->cAlphaArgs(3), "WaterCooled")) { state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).condenserType = CondenserType::WaterCooled; } else { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + 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))); ShowContinueError(state, "Valid entries is WaterCooled"); CHErrorsFound = true; } @@ -1308,16 +1337,20 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).RefCapCoolingWasAutoSized = true; } if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).RefCOPCooling = state.dataIPShortCut->rNumericArgs(2); if (state.dataIPShortCut->rNumericArgs(2) == 0.0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); CHErrorsFound = true; } @@ -1328,17 +1361,21 @@ 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, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(6), state.dataIPShortCut->rNumericArgs(6))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(6), state.dataIPShortCut->rNumericArgs(6))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ClgHtgtoCogPowerRatio = state.dataIPShortCut->rNumericArgs(7); if (state.dataIPShortCut->rNumericArgs(7) == 0.0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(7), state.dataIPShortCut->rNumericArgs(7))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(7), state.dataIPShortCut->rNumericArgs(7))); CHErrorsFound = true; } @@ -1379,11 +1416,13 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).OpenMotorEff < 0.0 || state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).OpenMotorEff > 1.0) { - ShowSevereError(state, - format("GetCurveInput: For {}: {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.3R}", state.dataIPShortCut->cNumericFieldNames(14), state.dataIPShortCut->rNumericArgs(14))); - ShowContinueError(state, format("{} must be greater than or equal to zero", state.dataIPShortCut->cNumericFieldNames(14))); - ShowContinueError(state, format("{} must be less than or equal to one", state.dataIPShortCut->cNumericFieldNames(14))); + ShowSevereError( + state, + EnergyPlus::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))); CHErrorsFound = true; } @@ -1396,10 +1435,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, - format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } } @@ -1411,10 +1450,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, - format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } } @@ -1424,10 +1463,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, - format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } } @@ -1443,7 +1482,8 @@ void GetChillerHeaterInput(EnergyPlusData &state) } if (FoundNegValue) { ShowWarningError(state, "Energy input ratio as a function of part-load ratio curve shows negative values "); - ShowContinueError(state, format("for {}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::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"); @@ -1461,10 +1501,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, - format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } } @@ -1476,10 +1516,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, - format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } } @@ -1489,10 +1529,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, - format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Curve output at reference conditions = {:.3T}", CurveVal)); + 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)); } } @@ -1508,7 +1548,8 @@ void GetChillerHeaterInput(EnergyPlusData &state) } if (FoundNegValue) { ShowWarningError(state, "Energy input ratio as a function of part-load ratio curve shows negative values "); - ShowContinueError(state, format("for {}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::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"); @@ -1531,7 +1572,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) } if (CHErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -1616,8 +1657,8 @@ void WrapperSpecs::initialize(EnergyPlusData &state, if (state.dataLoopNodes->Node(this->CHWOutletNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->CoolSetPointErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint on cooling side for CentralHeatPumpSystem named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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, @@ -1631,8 +1672,9 @@ void WrapperSpecs::initialize(EnergyPlusData &state, state.dataLoopNodes->NodeSetpointCheck(this->CHWOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->CoolSetPointErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint on cooling side for CentralHeatPumpSystem named {}", this->Name)); + ShowWarningError( + state, + EnergyPlus::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 "); @@ -1649,8 +1691,8 @@ void WrapperSpecs::initialize(EnergyPlusData &state, if (state.dataLoopNodes->Node(this->HWOutletNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint on heating side for CentralHeatPumpSystem named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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, @@ -1664,8 +1706,9 @@ void WrapperSpecs::initialize(EnergyPlusData &state, state.dataLoopNodes->NodeSetpointCheck(this->HWOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint on heating side for CentralHeatPumpSystem named {}", this->Name)); + ShowWarningError( + state, + EnergyPlus::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 "); @@ -1894,8 +1937,8 @@ void WrapperSpecs::CalcChillerModel(EnergyPlusData &state) } if (CompNum > this->NumOfComp) { - ShowSevereError(state, format("CalcChillerModel: ChillerHeater=\"{}\", calculated component number too big.", this->Name)); - ShowContinueError(state, format("Max number of components=[{}], indicated component number=[{}].", this->NumOfComp, CompNum)); + 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)); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -2076,8 +2119,9 @@ void WrapperSpecs::CalcChillerModel(EnergyPlusData &state) Cp = this->GLHEPlantLoc.loop->glycol->getSpecificHeat(state, CondInletTemp, RoutineNameElecEIRChiller); CondOutletTemp = QCondenser / CondMassFlowRate / Cp + CondInletTemp; } else { - ShowSevereError( - state, format("CalcChillerheaterModel: Condenser flow = 0, for Chillerheater={}", this->ChillerHeater(ChillerHeaterNum).Name)); + ShowSevereError(state, + EnergyPlus::format("CalcChillerheaterModel: Condenser flow = 0, for Chillerheater={}", + this->ChillerHeater(ChillerHeaterNum).Name)); ShowContinueErrorTimeStamp(state, ""); } @@ -2274,11 +2318,12 @@ void WrapperSpecs::CalcChillerHeaterModel(EnergyPlusData &state) if (CondDeltaTemp < 0.0) { // Hot water temperature is greater than the maximum if (this->ChillerHeater(ChillerHeaterNum).ChillerEIRRefTempErrorIndex == 0) { ShowSevereMessage(state, - format("CalcChillerHeaterModel: ChillerHeaterPerformance:Electric:EIR=\"{}\", DeltaTemp < 0", - this->ChillerHeater(ChillerHeaterNum).Name)); - ShowContinueError( - state, format(" Reference Simultaneous Cooling-Heating Mode Leaving Condenser Water Temperature [{:.1R}]", CondOutletTemp)); - ShowContinueError(state, format("is below condenser inlet temperature of [{:.1R}].", CondInletTemp)); + EnergyPlus::format("CalcChillerHeaterModel: ChillerHeaterPerformance:Electric:EIR=\"{}\", DeltaTemp < 0", + this->ChillerHeater(ChillerHeaterNum).Name)); + ShowContinueError(state, + EnergyPlus::format(" Reference Simultaneous Cooling-Heating Mode Leaving Condenser Water Temperature [{:.1R}]", + CondOutletTemp)); + ShowContinueError(state, EnergyPlus::format("is below condenser inlet temperature of [{:.1R}].", CondInletTemp)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, " Reset reference temperature to one greater than the inlet temperature "); } @@ -2625,12 +2670,14 @@ 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, format("ChillerHeaterPerformance:Electric:EIR \"{}\":", this->ChillerHeater(numChillerHeater).Name)); - ShowContinueError(state, format(" ChillerHeater Capacity as a Function of Temperature curve output is negative ({:.3R}).", chillCapFT)); - ShowContinueError(state, - format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.", - evapOutletTemp, - condTemp)); + ShowWarningError(state, EnergyPlus::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( + state, + EnergyPlus::format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.", + evapOutletTemp, + condTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } else if (!state.dataGlobal->WarmupFlag) { ++this->ChillerHeater(numChillerHeater).ChillerCapFTError; diff --git a/src/EnergyPlus/PlantChillers.cc b/src/EnergyPlus/PlantChillers.cc index c56ba11d17b..d5db753bf7a 100644 --- a/src/EnergyPlus/PlantChillers.cc +++ b/src/EnergyPlus/PlantChillers.cc @@ -154,7 +154,7 @@ namespace PlantChillers { return &thisChiller; } } - ShowFatalError(state, format("Could not locate electric chiller with name: {}", chillerName)); + ShowFatalError(state, EnergyPlus::format("Could not locate electric chiller with name: {}", chillerName)); return nullptr; } @@ -181,7 +181,7 @@ namespace PlantChillers { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantChillers->NumElectricChillers <= 0) { - ShowSevereError(state, format("No {} Equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} Equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } @@ -231,8 +231,10 @@ namespace PlantChillers { case DataPlant::CondenserType::EvapCooled: break; default: { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } } @@ -242,16 +244,20 @@ namespace PlantChillers { thisChiller.NomCapWasAutoSized = true; } if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.COP = state.dataIPShortCut->rNumericArgs(2); if (state.dataIPShortCut->rNumericArgs(2) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.EvapInletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -312,9 +318,10 @@ namespace PlantChillers { bool Okay; OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondInletNodeNum, Okay); if (!Okay) { - ShowWarningError( - state, - format("{}, Adding OutdoorAir:Node={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(5))); + ShowWarningError(state, + EnergyPlus::format("{}, Adding OutdoorAir:Node={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(5))); } thisChiller.CondOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -353,14 +360,16 @@ namespace PlantChillers { "Condenser Water Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowSevereError(state, format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } else { @@ -390,14 +399,16 @@ namespace PlantChillers { "Condenser (unknown?) Nodes"); // Condenser Inlet node name is necessary if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowSevereError(state, format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -423,9 +434,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, - format("{}: Sum of Capacity Ratio Coef = 0.0, chiller={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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); @@ -442,9 +453,11 @@ namespace PlantChillers { thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(7))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + 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))); 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; @@ -468,9 +481,11 @@ namespace PlantChillers { NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -483,9 +498,11 @@ namespace PlantChillers { NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -502,11 +519,14 @@ namespace PlantChillers { if (thisChiller.CondenserType == DataPlant::CondenserType::AirCooled || thisChiller.CondenserType == DataPlant::CondenserType::EvapCooled) { if (thisChiller.CondVolFlowRate <= 0.0) { - ShowSevereError( - state, format("Invalid {}={:.6R}", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->rNumericArgs(10))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={:.6R}", + state.dataIPShortCut->cNumericFieldNames(10), + state.dataIPShortCut->rNumericArgs(10))); ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( - state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -557,9 +577,9 @@ namespace PlantChillers { } if ((!state.dataIPShortCut->lAlphaFieldBlanks(8)) || (!state.dataIPShortCut->lAlphaFieldBlanks(9))) { ShowWarningError(state, - format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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"); } } @@ -567,9 +587,9 @@ namespace PlantChillers { thisChiller.BasinHeaterPowerFTempDiff = state.dataIPShortCut->rNumericArgs(23); if (state.dataIPShortCut->rNumericArgs(23) < 0.0) { ShowSevereError(state, - format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(23)) must be >= 0", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name)); + EnergyPlus::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(23)) must be >= 0", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name)); ErrorsFound = true; } @@ -581,10 +601,10 @@ namespace PlantChillers { } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(24))); + EnergyPlus::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(24))); } } @@ -605,9 +625,11 @@ namespace PlantChillers { if (!state.dataIPShortCut->lAlphaFieldBlanks(14)) { thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(14))); if (thisChiller.thermosiphonTempCurveIndex == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); - ShowContinueError(state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); + ShowContinueError( + state, + EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); ErrorsFound = true; } } @@ -615,7 +637,7 @@ namespace PlantChillers { } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -915,7 +937,8 @@ namespace PlantChillers { if (THeatRecSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HRSPErrDone) { - ShowWarningError(state, format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); + ShowWarningError(state, + EnergyPlus::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"); @@ -931,7 +954,8 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->HRSPErrDone) { - ShowWarningError(state, format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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"); @@ -1056,9 +1080,11 @@ namespace PlantChillers { this->NomCap); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - this->NomCap) / this->NomCap) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", this->NomCap)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, + EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1071,7 +1097,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, format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { @@ -1112,12 +1138,14 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - this->EvapVolFlowRate) / this->EvapVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); + ShowMessage(state, + EnergyPlus::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, - format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1130,7 +1158,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, format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -1176,12 +1204,14 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - this->CondVolFlowRate) / this->CondVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", this->CondVolFlowRate)); - ShowContinueError( - state, - format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + ShowMessage(state, + EnergyPlus::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)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1195,7 +1225,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, format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -1244,13 +1274,15 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - this->DesignHeatRecVolFlowRate) / this->DesignHeatRecVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + EnergyPlus::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, - format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", - this->DesignHeatRecVolFlowRate)); - ShowContinueError(state, - format("differs from Design Size Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", - tmpHeatRecVolFlowRate)); + EnergyPlus::format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", + this->DesignHeatRecVolFlowRate)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", + tmpHeatRecVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1375,7 +1407,7 @@ namespace PlantChillers { ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, format("{}.", this->MsgBuffer1)); + ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -1463,13 +1495,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 = - format("CalcElectricChillerModel - Chiller:Electric \"{}\" - Air Cooled Condenser Inlet Temperature below 0C", this->Name); - this->MsgBuffer2 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -1484,13 +1516,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 = - format("CalcElectricChillerModel - Chiller:Electric \"{}\" - Evap Cooled Condenser Inlet Temperature below 10C", this->Name); - this->MsgBuffer2 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -1805,7 +1837,7 @@ namespace PlantChillers { Real64 CpCond = this->CDPlantLoc.loop->glycol->getSpecificHeat(state, condInletTemp, RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { - ShowSevereError(state, format("CalcElectricChillerModel: Condenser flow = 0, for ElectricChiller={}", this->Name)); + ShowSevereError(state, EnergyPlus::format("CalcElectricChillerModel: Condenser flow = 0, for ElectricChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } } else { // Air Cooled or Evap Cooled @@ -1840,22 +1872,27 @@ namespace PlantChillers { // first check for run away condenser loop temps (only reason yet to be observed for this?) if (condInletTemp > 70.0) { ShowSevereError( - state, format("CalcElectricChillerModel: Condenser loop inlet temperatures over 70.0 C for ElectricChiller={}", this->Name)); + state, + EnergyPlus::format("CalcElectricChillerModel: Condenser loop inlet temperatures over 70.0 C for ElectricChiller={}", + this->Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Condenser loop water temperatures are too high at{:.2R}", condInletTemp)); + 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"); - ShowContinueError(state, format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); + ShowContinueError( + state, EnergyPlus::format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); ShowFatalError(state, "Program Terminates due to previous error condition"); } } if (!state.dataGlobal->WarmupFlag) { if (AvailNomCapRat < 0.0) { // apparently the real reason energy goes negative - ShowSevereError(state, format("CalcElectricChillerModel: Capacity ratio below zero for ElectricChiller={}", this->Name)); + ShowSevereError(state, + EnergyPlus::format("CalcElectricChillerModel: Capacity ratio below zero for ElectricChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "Check input for Capacity Ratio Curve"); - ShowContinueError(state, format("Condenser inlet temperature: {:.2R}", condInletTemp)); - ShowContinueError(state, format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); + ShowContinueError(state, EnergyPlus::format("Condenser inlet temperature: {:.2R}", condInletTemp)); + ShowContinueError( + state, EnergyPlus::format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); ShowFatalError(state, "Program Terminates due to previous error condition"); } } @@ -2056,8 +2093,9 @@ namespace PlantChillers { (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, + EnergyPlus::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"); @@ -2071,8 +2109,9 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError(state, + EnergyPlus::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 "); @@ -2126,7 +2165,7 @@ namespace PlantChillers { return &thisChiller; } } - ShowFatalError(state, format("Could not locate engine driven chiller with name: {}", chillerName)); + ShowFatalError(state, EnergyPlus::format("Could not locate engine driven chiller with name: {}", chillerName)); return nullptr; } @@ -2188,7 +2227,7 @@ namespace PlantChillers { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantChillers->NumEngineDrivenChillers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } // See if load distribution manager has already gotten the input @@ -2234,17 +2273,21 @@ namespace PlantChillers { thisChiller.NomCapWasAutoSized = true; } if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.COP = state.dataIPShortCut->rNumericArgs(2); if (state.dataIPShortCut->rNumericArgs(2) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -2255,8 +2298,10 @@ namespace PlantChillers { } else if (state.dataIPShortCut->cAlphaArgs(2) == "EVAPORATIVELYCOOLED") { thisChiller.CondenserType = DataPlant::CondenserType::EvapCooled; } else { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -2318,9 +2363,9 @@ namespace PlantChillers { OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondInletNodeNum, Okay); if (!Okay) { ShowWarningError(state, - format("{}, Adding OutdoorAir:DataLoopNode::Node={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(5))); + EnergyPlus::format("{}, Adding OutdoorAir:DataLoopNode::Node={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(5))); } thisChiller.CondOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -2359,14 +2404,16 @@ namespace PlantChillers { "Condenser Water Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowSevereError(state, format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } else { @@ -2396,14 +2443,16 @@ namespace PlantChillers { "Condenser (unknown?) Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowSevereError(state, format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -2429,9 +2478,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, - format("{}: Sum of Capacity Ratio Coef = 0.0, chiller={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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); @@ -2445,36 +2494,46 @@ 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, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.RecJacHeattoFuelCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(8)); // convert curve name to number if (thisChiller.RecJacHeattoFuelCurve == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.RecLubeHeattoFuelCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(9)); // convert curve name to number if (thisChiller.RecLubeHeattoFuelCurve == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.TotExhausttoFuelCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(10)); // convert curve name to number if (thisChiller.TotExhausttoFuelCurve == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.ExhaustTempCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(11)); // convert curve name to number if (thisChiller.ExhaustTempCurve == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -2504,9 +2563,11 @@ namespace PlantChillers { NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -2519,9 +2580,11 @@ namespace PlantChillers { NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } BranchNodeConnections::TestCompSet(state, @@ -2540,11 +2603,14 @@ namespace PlantChillers { if (thisChiller.CondenserType == DataPlant::CondenserType::AirCooled || thisChiller.CondenserType == DataPlant::CondenserType::EvapCooled) { if (thisChiller.CondVolFlowRate <= 0.0) { - ShowSevereError( - state, format("Invalid {}={:.6R}", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->rNumericArgs(10))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={:.6R}", + state.dataIPShortCut->cNumericFieldNames(10), + state.dataIPShortCut->rNumericArgs(10))); ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( - state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -2562,18 +2628,20 @@ namespace PlantChillers { } if ((!state.dataIPShortCut->lAlphaFieldBlanks(13)) || (!state.dataIPShortCut->lAlphaFieldBlanks(14))) { ShowWarningError(state, - format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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"); } } thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(15))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); + 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))); 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; @@ -2589,9 +2657,9 @@ namespace PlantChillers { thisChiller.BasinHeaterPowerFTempDiff = state.dataIPShortCut->rNumericArgs(29); if (state.dataIPShortCut->rNumericArgs(29) < 0.0) { ShowSevereError(state, - format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(29)) must be >= 0", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name)); + EnergyPlus::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(29)) must be >= 0", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name)); ErrorsFound = true; } @@ -2603,10 +2671,10 @@ namespace PlantChillers { } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(30))); + EnergyPlus::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(30))); } } @@ -2631,7 +2699,7 @@ namespace PlantChillers { } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -2756,14 +2824,14 @@ namespace PlantChillers { std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, - format("Chiller {} Rate", sFuelType), + EnergyPlus::format("Chiller {} Rate", sFuelType), Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("Chiller {} Energy", sFuelType), + EnergyPlus::format("Chiller {} Energy", sFuelType), Constant::Units::J, this->FuelEnergy, OutputProcessor::TimeStepType::System, @@ -2781,7 +2849,7 @@ namespace PlantChillers { OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("Chiller {} Mass Flow Rate", sFuelType), + EnergyPlus::format("Chiller {} Mass Flow Rate", sFuelType), Constant::Units::kg_s, this->FuelMdot, OutputProcessor::TimeStepType::System, @@ -3068,9 +3136,12 @@ namespace PlantChillers { this->NomCap); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - this->NomCap) / this->NomCap) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", this->NomCap)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage( + state, + EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3083,7 +3154,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, format("Occurs in Engine Driven Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Engine Driven Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { @@ -3123,12 +3194,15 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - this->EvapVolFlowRate) / this->EvapVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, - format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3141,7 +3215,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, format("Occurs in Engine Driven Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Engine Driven Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -3190,12 +3264,15 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - this->CondVolFlowRate) / this->CondVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", this->CondVolFlowRate)); - ShowContinueError( + ShowMessage( state, - format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + EnergyPlus::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)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3209,7 +3286,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, format("Occurs in EngineDriven Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in EngineDriven Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -3265,13 +3342,16 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - DesignHeatRecVolFlowRateUser) / DesignHeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeEngineDrivenChiller: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( + ShowMessage( state, - format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", DesignHeatRecVolFlowRateUser)); + EnergyPlus::format("SizeEngineDrivenChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, - format("differs from Design Size Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", - tmpHeatRecVolFlowRate)); + EnergyPlus::format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", + DesignHeatRecVolFlowRateUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", + tmpHeatRecVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3425,7 +3505,7 @@ namespace PlantChillers { ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, format("{}.", this->MsgBuffer1)); + ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -3473,13 +3553,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 = format( + this->MsgBuffer1 = EnergyPlus::format( "CalcEngineDrivenChillerModel - Chiller:EngineDriven \"{}\" - Air Cooled Condenser Inlet Temperature below 0C", this->Name); - this->MsgBuffer2 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -3489,13 +3569,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 = format( + this->MsgBuffer1 = EnergyPlus::format( "CalcEngineDrivenChillerModel - Chiller:EngineDriven \"{}\" - Evap Cooled Condenser Inlet Temperature below 10C", this->Name); - this->MsgBuffer2 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -3820,7 +3900,8 @@ 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, format("CalcEngineDrivenChillerModel: Condenser flow = 0, for EngineDrivenChiller={}", this->Name)); + ShowSevereError(state, + EnergyPlus::format("CalcEngineDrivenChillerModel: Condenser flow = 0, for EngineDrivenChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } @@ -3918,22 +3999,26 @@ namespace PlantChillers { if (this->CondInletTemp > 70.0) { ShowSevereError( state, - format("CalcEngineDrivenChillerModel: Condenser loop inlet temperatures > 70.0 C for EngineDrivenChiller={}", this->Name)); + EnergyPlus::format("CalcEngineDrivenChillerModel: Condenser loop inlet temperatures > 70.0 C for EngineDrivenChiller={}", + this->Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Condenser loop water temperatures are too high at{:.2R}", this->CondInletTemp)); + 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"); - ShowContinueError(state, format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); + ShowContinueError( + state, EnergyPlus::format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); ShowFatalError(state, "Program Terminates due to previous error condition"); } } if (!state.dataGlobal->WarmupFlag) { if (AvailNomCapRat < 0.0) { // apparently the real reason energy goes negative - ShowSevereError(state, format("CalcEngineDrivenChillerModel: Capacity ratio below zero for EngineDrivenChiller={}", this->Name)); + ShowSevereError( + state, EnergyPlus::format("CalcEngineDrivenChillerModel: Capacity ratio below zero for EngineDrivenChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "Check input for Capacity Ratio Curve"); - ShowContinueError(state, format("Condenser inlet temperature: {:.2R}", this->CondInletTemp)); - ShowContinueError(state, format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); + ShowContinueError(state, EnergyPlus::format("Condenser inlet temperature: {:.2R}", this->CondInletTemp)); + ShowContinueError( + state, EnergyPlus::format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); ShowFatalError(state, "Program Terminates due to previous error condition"); } } @@ -4097,8 +4182,9 @@ namespace PlantChillers { (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, + EnergyPlus::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"); @@ -4112,8 +4198,9 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError(state, + EnergyPlus::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 "); @@ -4146,7 +4233,7 @@ namespace PlantChillers { return &thisChiller; } } - ShowFatalError(state, format("Could not locate gas turbine chiller with name: {}", chillerName)); + ShowFatalError(state, EnergyPlus::format("Could not locate gas turbine chiller with name: {}", chillerName)); return nullptr; } @@ -4210,7 +4297,7 @@ namespace PlantChillers { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantChillers->NumGTChillers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } // See if load distribution manager has already gotten the input @@ -4256,17 +4343,21 @@ namespace PlantChillers { thisChiller.NomCapWasAutoSized = true; } if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.COP = state.dataIPShortCut->rNumericArgs(2); if (state.dataIPShortCut->rNumericArgs(2) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -4277,8 +4368,10 @@ namespace PlantChillers { } else if (state.dataIPShortCut->cAlphaArgs(2) == "EVAPORATIVELYCOOLED") { thisChiller.CondenserType = DataPlant::CondenserType::EvapCooled; } else { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -4339,9 +4432,10 @@ namespace PlantChillers { bool Okay; OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondInletNodeNum, Okay); if (!Okay) { - ShowWarningError( - state, - format("{}, Adding OutdoorAir:Node={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(5))); + ShowWarningError(state, + EnergyPlus::format("{}, Adding OutdoorAir:Node={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(5))); } thisChiller.CondOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -4380,14 +4474,16 @@ namespace PlantChillers { "Condenser (unknown?) Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowSevereError(state, format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -4414,9 +4510,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, - format("{}: Sum of Capacity Ratio Coef = 0.0, chiller={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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); @@ -4479,9 +4575,11 @@ namespace PlantChillers { NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -4494,9 +4592,11 @@ namespace PlantChillers { NodeInputManager::CompFluidStream::Tertiary, DataLoopNode::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } BranchNodeConnections::TestCompSet(state, @@ -4516,11 +4616,14 @@ namespace PlantChillers { if (thisChiller.CondenserType == DataPlant::CondenserType::AirCooled || thisChiller.CondenserType == DataPlant::CondenserType::EvapCooled) { if (thisChiller.CondVolFlowRate <= 0.0) { - ShowSevereError( - state, format("Invalid {}={:.6R}", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->rNumericArgs(10))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={:.6R}", + state.dataIPShortCut->cNumericFieldNames(10), + state.dataIPShortCut->rNumericArgs(10))); ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( - state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -4532,9 +4635,9 @@ namespace PlantChillers { thisChiller.HeatRecOutletNodeNum = 0; if ((!state.dataIPShortCut->lAlphaFieldBlanks(7)) || (!state.dataIPShortCut->lAlphaFieldBlanks(8))) { ShowWarningError(state, - format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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 || @@ -4545,9 +4648,11 @@ namespace PlantChillers { thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(9))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + 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))); 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; @@ -4556,8 +4661,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, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError( state, "Valid choices are Electricity, NaturalGas, Propane, Diesel, Gasoline, FuelOilNo1, FuelOilNo2,OtherFuel1 or OtherFuel2"); ErrorsFound = true; @@ -4573,10 +4680,10 @@ namespace PlantChillers { thisChiller.BasinHeaterPowerFTempDiff = state.dataIPShortCut->rNumericArgs(48); if (state.dataIPShortCut->rNumericArgs(48) < 0.0) { ShowSevereError(state, - format("{}=\"{}\"{} must be >= 0", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(48))); + EnergyPlus::format("{}=\"{}\"{} must be >= 0", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(48))); ErrorsFound = true; } @@ -4588,10 +4695,10 @@ namespace PlantChillers { } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(49))); + EnergyPlus::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(49))); } } @@ -4626,7 +4733,7 @@ namespace PlantChillers { } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -4769,7 +4876,7 @@ namespace PlantChillers { std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, - format("Chiller {} Rate", sFuelType), + EnergyPlus::format("Chiller {} Rate", sFuelType), Constant::Units::W, this->FuelEnergyUsedRate, OutputProcessor::TimeStepType::System, @@ -4777,7 +4884,7 @@ namespace PlantChillers { this->Name); SetupOutputVariable(state, - format("Chiller {} Energy", sFuelType), + EnergyPlus::format("Chiller {} Energy", sFuelType), Constant::Units::J, this->FuelEnergyUsed, OutputProcessor::TimeStepType::System, @@ -4788,14 +4895,14 @@ namespace PlantChillers { OutputProcessor::EndUseCat::Cooling); SetupOutputVariable(state, - format("Chiller {} Mass Flow Rate", sFuelType), + EnergyPlus::format("Chiller {} Mass Flow Rate", sFuelType), Constant::Units::kg_s, this->FuelMassUsedRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - format("Chiller {} Mass", sFuelType), + EnergyPlus::format("Chiller {} Mass", sFuelType), Constant::Units::kg, this->FuelMassUsed, OutputProcessor::TimeStepType::System, @@ -5016,9 +5123,10 @@ namespace PlantChillers { this->NomCap); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - this->NomCap) / this->NomCap) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", this->NomCap)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage(state, EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -5031,7 +5139,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, format("Occurs in Gas Turbine Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Gas Turbine Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { @@ -5075,12 +5183,13 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - this->EvapVolFlowRate) / this->EvapVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); + ShowMessage(state, EnergyPlus::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, - format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -5093,7 +5202,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, format("Occurs in Gas Turbine Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Gas Turbine Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -5144,12 +5253,13 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - this->CondVolFlowRate) / this->CondVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", this->CondVolFlowRate)); - ShowContinueError( - state, - format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + ShowMessage(state, EnergyPlus::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)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -5163,7 +5273,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, format("Occurs in Gas Turbine Chiller object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Gas Turbine Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -5202,10 +5312,11 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(GTEngineCapacityDes - this->GTEngineCapacity) / this->GTEngineCapacity) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Gas Turbine Engine Capacity of {:.2R} [W]", this->GTEngineCapacity)); + ShowMessage(state, EnergyPlus::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, - format("differs from Design Size Gas Turbine Engine Capacity of {:.2R} [W]", GTEngineCapacityDes)); + EnergyPlus::format("User-Specified Gas Turbine Engine Capacity of {:.2R} [W]", this->GTEngineCapacity)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Gas Turbine Engine Capacity of {:.2R} [W]", GTEngineCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -5256,13 +5367,15 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - DesignHeatRecVolFlowRateUser) / DesignHeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeGasTurbineChiller: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage( + state, EnergyPlus::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)); ShowContinueError( state, - format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", DesignHeatRecVolFlowRateUser)); - ShowContinueError(state, - format("differs from Design Size Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", - tmpHeatRecVolFlowRate)); + EnergyPlus::format("differs from Design Size Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", + tmpHeatRecVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -5403,7 +5516,7 @@ namespace PlantChillers { ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, format("{}.", this->MsgBuffer1)); + ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -5454,11 +5567,11 @@ namespace PlantChillers { this->PrintMessage = true; this->MsgBuffer1 = "CalcGasTurbineChillerModel - Chiller:CombustionTurbine \"" + this->Name + "\" - Air Cooled Condenser Inlet Temperature below 0C"; - this->MsgBuffer2 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -5470,11 +5583,11 @@ namespace PlantChillers { this->PrintMessage = true; this->MsgBuffer1 = "CalcGasTurbineChillerModel - Chiller:CombustionTurbine \"" + this->Name + "\" - Evap Cooled Condenser Inlet Temperature below 10C"; - this->MsgBuffer2 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -5778,7 +5891,7 @@ namespace PlantChillers { Real64 CpCond = this->CDPlantLoc.loop->glycol->getSpecificHeat(state, condInletTemp, RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { - ShowSevereError(state, format("CalcGasTurbineChillerModel: Condenser flow = 0, for GasTurbineChiller={}", this->Name)); + ShowSevereError(state, EnergyPlus::format("CalcGasTurbineChillerModel: Condenser flow = 0, for GasTurbineChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } @@ -5907,22 +6020,25 @@ 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, format("CalcGTChillerModel: Condenser loop inlet temperatures over 70.0 C for GTChiller={}", this->Name)); + ShowSevereError( + state, EnergyPlus::format("CalcGTChillerModel: Condenser loop inlet temperatures over 70.0 C for GTChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Condenser loop water temperatures are too high at{:.2R}", condInletTemp)); + 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"); - ShowContinueError(state, format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); + ShowContinueError( + state, EnergyPlus::format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); ShowFatalError(state, "Program Terminates due to previous error condition"); } } if (!state.dataGlobal->WarmupFlag) { if (AvailNomCapRat < 0.0) { // apparently the real reason energy goes negative - ShowSevereError(state, format("CalcGTChillerModel: Capacity ratio below zero for GTChiller={}", this->Name)); + ShowSevereError(state, EnergyPlus::format("CalcGTChillerModel: Capacity ratio below zero for GTChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "Check input for Capacity Ratio Curve"); - ShowContinueError(state, format("Condenser inlet temperature: {:.2R}", condInletTemp)); - ShowContinueError(state, format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); + ShowContinueError(state, EnergyPlus::format("Condenser inlet temperature: {:.2R}", condInletTemp)); + ShowContinueError( + state, EnergyPlus::format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); ShowFatalError(state, "Program Terminates due to previous error condition"); } } @@ -6045,8 +6161,9 @@ namespace PlantChillers { (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, + EnergyPlus::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"); @@ -6060,8 +6177,9 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError(state, + EnergyPlus::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 "); @@ -6094,7 +6212,7 @@ namespace PlantChillers { return &thisChiller; } } - ShowFatalError(state, format("Could not locate constant COP chiller with name: {}", chillerName)); + ShowFatalError(state, EnergyPlus::format("Could not locate constant COP chiller with name: {}", chillerName)); return nullptr; } @@ -6149,7 +6267,7 @@ namespace PlantChillers { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantChillers->NumConstCOPChillers <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } @@ -6193,16 +6311,20 @@ namespace PlantChillers { thisChiller.NomCapWasAutoSized = true; } if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } thisChiller.COP = state.dataIPShortCut->rNumericArgs(2); if (state.dataIPShortCut->rNumericArgs(2) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -6214,8 +6336,10 @@ namespace PlantChillers { } else if (state.dataIPShortCut->cAlphaArgs(6) == "WATERCOOLED") { thisChiller.CondenserType = DataPlant::CondenserType::WaterCooled; } else { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -6294,9 +6418,9 @@ namespace PlantChillers { OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondInletNodeNum, Okay); if (!Okay) { ShowWarningError(state, - format("{}, Adding OutdoorAir:DataLoopNode::Node={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(4))); + EnergyPlus::format("{}, Adding OutdoorAir:DataLoopNode::Node={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(4))); } thisChiller.CondOutletNodeNum = NodeInputManager::GetOnlySingleNode(state, @@ -6335,14 +6459,16 @@ namespace PlantChillers { "Condenser Water Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { - ShowSevereError(state, format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(4))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(4))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } else { @@ -6372,23 +6498,27 @@ namespace PlantChillers { "Condenser (unknown?) Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { - ShowSevereError(state, format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(4))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(4))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); - ShowContinueError(state, - format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowContinueError( + state, + EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(7))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, - format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + 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))); 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; @@ -6398,9 +6528,9 @@ namespace PlantChillers { thisChiller.BasinHeaterPowerFTempDiff = state.dataIPShortCut->rNumericArgs(6); if (state.dataIPShortCut->rNumericArgs(6) < 0.0) { ShowSevereError(state, - format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(6)) must be >= 0", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name)); + EnergyPlus::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(6)) must be >= 0", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name)); ErrorsFound = true; } @@ -6412,10 +6542,10 @@ namespace PlantChillers { } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(7))); + EnergyPlus::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(7))); } } @@ -6431,9 +6561,10 @@ namespace PlantChillers { if (!state.dataIPShortCut->lAlphaFieldBlanks(9)) { thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(9))); if (thisChiller.thermosiphonTempCurveIndex == 0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); - ShowContinueError(state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); + ShowContinueError( + state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); ErrorsFound = true; } } @@ -6454,7 +6585,7 @@ namespace PlantChillers { } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -6759,9 +6890,12 @@ namespace PlantChillers { NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); - ShowContinueError(state, format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); + ShowMessage( + state, + EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -6774,7 +6908,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, format("Occurs in Chiller:ConstantCOP object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { @@ -6819,12 +6953,15 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, - format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowMessage( + state, + EnergyPlus::format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, - format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", tmpEvapVolFlowRate)); + EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Design Chilled Water Flow Rate of {:.5R} [m3/s]", + tmpEvapVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -6837,7 +6974,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, format("Occurs in Chiller:ConstantCOP object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -6887,13 +7024,16 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError( - state, format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); + ShowMessage( + state, + EnergyPlus::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)); ShowContinueError( state, - format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", tmpCondVolFlowRate)); + EnergyPlus::format("differs from Design Size Design Condenser Water Flow Rate of {:.5R} [m3/s]", + tmpCondVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); @@ -6908,7 +7048,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, format("Occurs in Chiller:ConstantCOP object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -7107,7 +7247,7 @@ namespace PlantChillers { ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, format("{}.", this->MsgBuffer1)); + ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -7129,11 +7269,11 @@ namespace PlantChillers { this->PrintMessage = true; this->MsgBuffer1 = "CalcConstCOPChillerModel - Chiller:ConstantCOP \"" + this->Name + "\" - Air Cooled Condenser Inlet Temperature below 0C"; - this->MsgBuffer2 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -7145,11 +7285,11 @@ namespace PlantChillers { this->PrintMessage = true; this->MsgBuffer1 = "CalcConstCOPChillerModel - Chiller:ConstantCOP \"" + this->Name + "\" - Evap Cooled Condenser Inlet Temperature below 10C"; - this->MsgBuffer2 = 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 = 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->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -7370,7 +7510,7 @@ namespace PlantChillers { if (this->CondMassFlowRate > DataBranchAirLoopPlant::MassFlowTolerance) { this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + CondInletTemp; } else { - ShowSevereError(state, format("CalcConstCOPChillerModel: Condenser flow = 0, for CONST COP Chiller={}", this->Name)); + ShowSevereError(state, EnergyPlus::format("CalcConstCOPChillerModel: Condenser flow = 0, for CONST COP Chiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } } else { // Air Cooled or Evap Cooled @@ -7391,11 +7531,14 @@ namespace PlantChillers { // first check for run away condenser loop temps (only reason yet to be observed for this?) if (CondInletTemp > 70.0) { ShowSevereError( - state, format("CalcConstCOPChillerModel: Condenser loop inlet temperatures over 70.0 C for ConstCOPChiller={}", this->Name)); + state, + EnergyPlus::format("CalcConstCOPChillerModel: Condenser loop inlet temperatures over 70.0 C for ConstCOPChiller={}", + this->Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Condenser loop water temperatures are too high at{:.2R}", CondInletTemp)); + 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"); - ShowContinueError(state, format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); + ShowContinueError( + state, EnergyPlus::format("Evaporator inlet temperature: {:.2R}", state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp)); ShowFatalError(state, "Program Terminates due to previous error condition"); } @@ -7480,8 +7623,9 @@ namespace PlantChillers { (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError( + state, + EnergyPlus::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"); @@ -7495,8 +7639,9 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError(state, + EnergyPlus::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/PlantComponentTemperatureSources.cc b/src/EnergyPlus/PlantComponentTemperatureSources.cc index e98a0db25f3..0fbcad8b231 100644 --- a/src/EnergyPlus/PlantComponentTemperatureSources.cc +++ b/src/EnergyPlus/PlantComponentTemperatureSources.cc @@ -103,8 +103,9 @@ namespace PlantComponentTemperatureSources { } } // If we didn't find it, fatal - ShowFatalError(state, - format("LocalTemperatureSourceFactory: Error getting inputs for temperature source named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError( + state, + EnergyPlus::format("LocalTemperatureSourceFactory: Error getting inputs for temperature source named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -311,12 +312,14 @@ namespace PlantComponentTemperatureSources { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpVolFlowRate - DesVolFlowRateUser) / DesVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( + ShowMessage(state, + EnergyPlus::format( + "SizePlantComponentTemperatureSource: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError( + state, EnergyPlus::format("User-Specified Design Fluid Flow Rate of {:.5R} [m3/s]", DesVolFlowRateUser)); + ShowContinueError( state, - format("SizePlantComponentTemperatureSource: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, format("User-Specified Design Fluid Flow Rate of {:.5R} [m3/s]", DesVolFlowRateUser)); - ShowContinueError(state, - format("differs from Design Size Design Fluid Flow Rate of {:.5R} [m3/s]", tmpVolFlowRate)); + EnergyPlus::format("differs from Design Size Design Fluid Flow Rate of {:.5R} [m3/s]", tmpVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -329,7 +332,7 @@ namespace PlantComponentTemperatureSources { } else { if (this->DesVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of plant component temperature source flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in PlantComponent:TemperatureSource object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in PlantComponent:TemperatureSource object={}", this->Name)); ErrorsFound = true; } if (!this->DesVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -418,7 +421,7 @@ namespace PlantComponentTemperatureSources { PlantUtilities::ScanPlantLoopsForObject( state, this->Name, DataPlant::PlantEquipmentType::WaterSource, this->plantLoc, errFlag, _, _, _, this->InletNodeNum, _); if (errFlag) { - ShowFatalError(state, format("{}: Program terminated due to previous condition(s).", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}: Program terminated due to previous condition(s).", RoutineName)); } this->MyFlag = false; } @@ -461,7 +464,7 @@ namespace PlantComponentTemperatureSources { state.dataPlantCompTempSrc->NumSources = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (state.dataPlantCompTempSrc->NumSources <= 0) { - ShowSevereError(state, format("No {} equipment specified in input file", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", cCurrentModuleObject)); ErrorsFound = true; } @@ -535,16 +538,17 @@ namespace PlantComponentTemperatureSources { ErrorsFound = true; } } else { - ShowSevereError(state, format("Input error for {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format(R"(Invalid temperature specification type. Expected either "Constant" or "Scheduled". Encountered {})", - state.dataIPShortCut->cAlphaArgs(4))); + ShowSevereError(state, EnergyPlus::format("Input error for {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format(R"(Invalid temperature specification type. Expected either "Constant" or "Scheduled". Encountered {})", + state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", cCurrentModuleObject)); } } diff --git a/src/EnergyPlus/PlantCondLoopOperation.cc b/src/EnergyPlus/PlantCondLoopOperation.cc index 93bbfe7b924..c009af9fe7f 100644 --- a/src/EnergyPlus/PlantCondLoopOperation.cc +++ b/src/EnergyPlus/PlantCondLoopOperation.cc @@ -239,8 +239,8 @@ void ManagePlantLoadDistribution(EnergyPlusData &state, default: { // No controls specified. This is a fatal error ShowFatalError(state, - format("Invalid Operation Scheme Type Requested={}, in ManagePlantLoadDistribution", - state.dataPlnt->PlantLoop(plantLoc.loopNum).OpScheme(CurSchemePtr).TypeOf)); + EnergyPlus::format("Invalid Operation Scheme Type Requested={}, in ManagePlantLoadDistribution", + state.dataPlnt->PlantLoop(plantLoc.loopNum).OpScheme(CurSchemePtr).TypeOf)); } } @@ -450,12 +450,12 @@ void GetPlantOperationInput(EnergyPlusData &state, bool &GetInputOK) state.dataPlnt->PlantLoop(LoopNum).OpScheme(Num).Type = OpScheme::Uncontrolled; } else { // invalid op scheme type for plant loop ShowSevereError(state, - format("{}Invalid {}={}, entered in {}={}", - RoutineName, - state.dataIPShortCut->cAlphaFieldNames(Num * 3 - 1), - state.dataIPShortCut->cAlphaArgs(Num * 3 - 1), - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}Invalid {}={}, entered in {}={}", + RoutineName, + state.dataIPShortCut->cAlphaFieldNames(Num * 3 - 1), + state.dataIPShortCut->cAlphaArgs(Num * 3 - 1), + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -471,24 +471,25 @@ void GetPlantOperationInput(EnergyPlusData &state, bool &GetInputOK) } } else { ShowSevereError(state, - format("{} = \"{}\", requires at least {}, {} and {} to be specified.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaFieldNames(4))); + EnergyPlus::format("{} = \"{}\", requires at least {}, {} and {} to be specified.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaFieldNames(3), + state.dataIPShortCut->cAlphaFieldNames(4))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}{}={} is expecting", RoutineName, PlantLoopObject, state.dataPlnt->PlantLoop(LoopNum).Name)); - ShowContinueError(state, format("{}={}, but not found.", CurrentModuleObject, PlantOpSchemeName)); + ShowSevereError(state, EnergyPlus::format("{}{}={} is expecting", RoutineName, PlantLoopObject, state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError(state, EnergyPlus::format("{}={}, but not found.", CurrentModuleObject, PlantOpSchemeName)); ErrorsFound = true; } } if (ErrorsFound) { - ShowFatalError( - state, format("{}Errors found in getting input for PlantEquipmentOperationSchemes or CondenserEquipmentOperationSchemes", RoutineName)); + ShowFatalError(state, + EnergyPlus::format("{}Errors found in getting input for PlantEquipmentOperationSchemes or CondenserEquipmentOperationSchemes", + RoutineName)); } } @@ -741,10 +742,10 @@ void GetOperationSchemeInput(EnergyPlusData &state) } else { // invalid op scheme type for plant loop // Seems like the alpha args below is incorrect.... ShowSevereError(state, - format("Invalid operation scheme type = \"{}\", entered in {}={}", - state.dataIPShortCut->cAlphaArgs(Num * 3 - 1), - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Invalid operation scheme type = \"{}\", entered in {}={}", + state.dataIPShortCut->cAlphaArgs(Num * 3 - 1), + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -760,7 +761,7 @@ void GetOperationSchemeInput(EnergyPlusData &state) // Validate that component names/types in each list correspond to a valid component in input file if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } } @@ -839,11 +840,11 @@ void FindRangeBasedOrUncontrolledInput(EnergyPlusData &state, } if (Num == NumSchemes) { ShowSevereError(state, - format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; SchemeNameFound = false; } @@ -851,7 +852,7 @@ void FindRangeBasedOrUncontrolledInput(EnergyPlusData &state, if (SchemeNameFound) { state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).NumEquipLists = (NumAlphas - 1); if (state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).NumEquipLists <= 0) { - ShowSevereError(state, format("{} = \"{}\", specified without equipment list.", CurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("{} = \"{}\", specified without equipment list.", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { int ListNum; @@ -876,11 +877,11 @@ void FindRangeBasedOrUncontrolledInput(EnergyPlusData &state, if (state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(ListNum).RangeLowerLimit > state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(ListNum).RangeUpperLimit) { ShowSevereError(state, - format("{} = \"{}\", found a lower limit that is higher than an upper limit in {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", found a lower limit that is higher than an upper limit in {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; } @@ -899,36 +900,36 @@ void FindRangeBasedOrUncontrolledInput(EnergyPlusData &state, // Check if inner list has a lower limit that is between an outer's lower and upper limit if (InnerListNumLowerLimit > OuterListNumLowerLimit && InnerListNumLowerLimit < OuterListNumUpperLimit) { ShowWarningError(state, - format("{} = \"{}\", detected overlapping ranges in {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", detected overlapping ranges in {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ShowContinueError(state, - format("Range # {} Lower limit = {:.1R} lies within the Range # {} ({:.1R} to {:.1R}).", - InnerListNum, - InnerListNumLowerLimit, - ListNum, - OuterListNumLowerLimit, - OuterListNumUpperLimit)); + EnergyPlus::format("Range # {} Lower limit = {:.1R} lies within the Range # {} ({:.1R} to {:.1R}).", + InnerListNum, + InnerListNumLowerLimit, + ListNum, + OuterListNumLowerLimit, + OuterListNumUpperLimit)); ShowContinueError(state, "Check that input for load range limit values do not overlap, and the simulation continues..."); } // Check if inner list has an upper limit that is between an outer's lower and upper limit if (InnerListNumUpperLimit > OuterListNumLowerLimit && InnerListNumUpperLimit < OuterListNumUpperLimit) { ShowWarningError(state, - format("{} = \"{}\", detected overlapping ranges in {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", detected overlapping ranges in {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ShowContinueError(state, - format("Range # {} Upper limit = {:.1R} lies within Range # {} ({:.1R} to {:.1R}).", - InnerListNum, - InnerListNumUpperLimit, - ListNum, - OuterListNumLowerLimit, - OuterListNumUpperLimit)); + EnergyPlus::format("Range # {} Upper limit = {:.1R} lies within Range # {} ({:.1R} to {:.1R}).", + InnerListNum, + InnerListNumUpperLimit, + ListNum, + OuterListNumLowerLimit, + OuterListNumUpperLimit)); ShowContinueError(state, "Check that input for load range limit values do not overlap, and the simulation continues..."); } @@ -939,11 +940,11 @@ void FindRangeBasedOrUncontrolledInput(EnergyPlusData &state, } } else { ShowSevereError(state, - format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; } @@ -1029,11 +1030,11 @@ void FindDeltaTempRangeInput(EnergyPlusData &state, } if (Num == NumSchemes) { ShowSevereError(state, - format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - cmoStr, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + cmoStr, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; SchemeNameFound = false; } @@ -1041,7 +1042,7 @@ void FindDeltaTempRangeInput(EnergyPlusData &state, if (SchemeNameFound) { state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).NumEquipLists = (NumAlphas - 2); if (state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).NumEquipLists <= 0) { - ShowSevereError(state, format("{} = \"{}\", specified without equipment list.", cmoStr, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("{} = \"{}\", specified without equipment list.", cmoStr, AlphArray(1))); ErrorsFound = true; } else { state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList.allocate( @@ -1066,11 +1067,11 @@ void FindDeltaTempRangeInput(EnergyPlusData &state, if (state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(ListNum).RangeLowerLimit > state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(ListNum).RangeUpperLimit) { ShowSevereError(state, - format("{} = \"{}\", found a lower limit that is higher than an upper limit in {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - cmoStr, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", found a lower limit that is higher than an upper limit in {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + cmoStr, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; } LoadEquipList(state, LoopNum, SchemeNum, ListNum, ErrorsFound); @@ -1079,11 +1080,11 @@ void FindDeltaTempRangeInput(EnergyPlusData &state, } } else { ShowSevereError(state, - format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - cmoStr, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + cmoStr, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; } @@ -1164,21 +1165,22 @@ void LoadEquipList(EnergyPlusData &state, if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum) || state.dataIPShortCut->lAlphaFieldBlanks(MachineNum + 1)) { bool firstblank = false; if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum)) { - ShowSevereError( - state, - format("{}=\"{}\", invalid component specification.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid component specification.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum))); firstblank = true; ErrorsFound = true; } if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum + 1)) { if (!firstblank) { ShowSevereError(state, - format("{}=\"{}\", invalid component specification.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}=\"{}\", invalid component specification.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } - ShowContinueError(state, format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum + 1))); + ShowContinueError(state, EnergyPlus::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum + 1))); ErrorsFound = true; } } else { @@ -1188,7 +1190,8 @@ void LoadEquipList(EnergyPlusData &state, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("{}=\"{}\", Input Error.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, EnergyPlus::format("{}=\"{}\", Input Error.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -1220,21 +1223,22 @@ void LoadEquipList(EnergyPlusData &state, if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum) || state.dataIPShortCut->lAlphaFieldBlanks(MachineNum + 1)) { bool firstblank = false; if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum)) { - ShowSevereError( - state, - format("{}=\"{}\", invalid component specification.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid component specification.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum))); firstblank = true; ErrorsFound = true; } if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum + 1)) { if (!firstblank) { ShowSevereError(state, - format("{}=\"{}\", invalid component specification.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}=\"{}\", invalid component specification.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } - ShowContinueError(state, format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum + 1))); + ShowContinueError(state, EnergyPlus::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum + 1))); ErrorsFound = true; } } else { @@ -1244,7 +1248,8 @@ void LoadEquipList(EnergyPlusData &state, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("{}=\"{}\", Input Error.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, EnergyPlus::format("{}=\"{}\", Input Error.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -1330,10 +1335,10 @@ void LoadEquipList(EnergyPlusData &state, "HEATPUMP:AIRTOWATER:COOLING"; } else { ShowSevereError(state, - format("Equipment type={} with Name={} not found on PlantLoop={}.", - type_str, - machineName, - state.dataPlnt->PlantLoop(LoopNum).Name)); + EnergyPlus::format("Equipment type={} with Name={} not found on PlantLoop={}.", + type_str, + machineName, + state.dataPlnt->PlantLoop(LoopNum).Name)); ErrorsFound = true; } } @@ -1350,8 +1355,8 @@ void LoadEquipList(EnergyPlusData &state, if (!FoundIntendedList) { ShowSevereError(state, - format("LoadEquipList: Failed to find PlantEquipmentList or CondenserEquipmentList object named = {}", - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(ListNum).Name)); + EnergyPlus::format("LoadEquipList: Failed to find PlantEquipmentList or CondenserEquipmentList object named = {}", + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(ListNum).Name)); ErrorsFound = true; } } @@ -1422,11 +1427,11 @@ void FindCompSPInput(EnergyPlusData &state, } if (Num == NumSchemes) { ShowSevereError(state, - format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; SchemeNameFound = false; } @@ -1517,7 +1522,7 @@ void FindCompSPInput(EnergyPlusData &state, BaseSizer::reportSizerOutput(state, CurrentModuleObject, state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name, - format("Design Water Flow Rate [m3/s] Equipment # {}", Num), + EnergyPlus::format("Design Water Flow Rate [m3/s] Equipment # {}", Num), CompFlowRate); } @@ -1529,7 +1534,7 @@ void FindCompSPInput(EnergyPlusData &state, if (CurrentModuleObject == "PlantEquipmentOperation:ThermalEnergyStorage") { ShowSevereError( state, - format( + EnergyPlus::format( "Equipment Operation Mode cannot be HEATING for any equipment found in {} in thermal energy storage control", state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; @@ -1543,9 +1548,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, - format("Equipment Operation Mode should be either HEATING or COOLING or DUAL mode, for {}={}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Equipment Operation Mode should be either HEATING or COOLING or DUAL mode, for {}={}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } if (CurrentModuleObject == "PlantEquipmentOperation:ThermalEnergyStorage") { @@ -1556,13 +1561,13 @@ void FindCompSPInput(EnergyPlusData &state, (state.dataIPShortCut->cAlphaArgs(CompNumA + 1) != "DUAL")) { ShowWarningError(state, - format("Equipment Operation Mode was reset to 'DUAL' for Component '{}' in {}='{}'.", - state.dataIPShortCut->cAlphaArgs(CompNumA - 2), - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Equipment Operation Mode was reset to 'DUAL' for Component '{}' in {}='{}'.", + state.dataIPShortCut->cAlphaArgs(CompNumA - 2), + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("Equipment Operation Mode can only be 'DUAL' for {} objects.", - state.dataIPShortCut->cAlphaArgs(CompNumA - 3))); + EnergyPlus::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; } @@ -1602,17 +1607,19 @@ void FindCompSPInput(EnergyPlusData &state, ->Node(state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeNum) .TempSetPoint == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError( - state, - format("Missing temperature setpoint for {} named {}", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Missing temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - format("A temperature setpoint is needed at the node named {}", - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); + EnergyPlus::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, - format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=SingleSetpoint", - state.dataPlnt->PlantLoop(LoopNum).Name)); + EnergyPlus::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 } @@ -1628,17 +1635,18 @@ void FindCompSPInput(EnergyPlusData &state, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(state, - format("Missing temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Missing temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - format("A temperature setpoint is needed at the node named {}", - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); + EnergyPlus::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, - format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=SingleSetpoint", - state.dataPlnt->PlantLoop(LoopNum).Name)); + EnergyPlus::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 } @@ -1657,17 +1665,19 @@ void FindCompSPInput(EnergyPlusData &state, .TempSetPointHi == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("Missing temperature high setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Missing temperature high setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - format("A temperature high setpoint is needed at the node named {}", - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); + EnergyPlus::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, - format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError( + state, + EnergyPlus::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 } @@ -1683,18 +1693,19 @@ void FindCompSPInput(EnergyPlusData &state, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(state, - format("Missing high temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Missing high temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - format( + EnergyPlus::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, - format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError( + state, + EnergyPlus::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 } @@ -1711,17 +1722,19 @@ void FindCompSPInput(EnergyPlusData &state, .TempSetPointLo == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("Missing temperature low setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Missing temperature low setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - format("A temperature low setpoint is needed at the node named {}", - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); + EnergyPlus::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, - format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError( + state, + EnergyPlus::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 } @@ -1742,18 +1755,19 @@ void FindCompSPInput(EnergyPlusData &state, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(state, - format("Missing low temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Missing low temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - format( + EnergyPlus::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, - format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError( + state, + EnergyPlus::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 } @@ -1772,17 +1786,19 @@ void FindCompSPInput(EnergyPlusData &state, .TempSetPointLo == SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - format("Missing temperature dual setpoints for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Missing temperature dual setpoints for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - format("A dual temperaturesetpoint is needed at the node named {}", - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); + EnergyPlus::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, - format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError( + state, + EnergyPlus::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 } @@ -1798,18 +1814,19 @@ void FindCompSPInput(EnergyPlusData &state, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(state, - format("Missing dual temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("Missing dual temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - format( + EnergyPlus::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, - format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError( + state, + EnergyPlus::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 } @@ -1827,18 +1844,19 @@ void FindCompSPInput(EnergyPlusData &state, } } } else { - ShowSevereError(state, - format("{} = \"{}\", specified without any machines.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("{} = \"{}\", specified without any machines.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } } else { ShowSevereError(state, - format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; } } @@ -2013,8 +2031,9 @@ void GetChillerHeaterChangeoverOpSchemeInput(EnergyPlusData &state, } if (!allocated(scheme.CoolingOnlyEquipList)) { // never found a match - ShowSevereError(state, - format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " + ShowSevereError( + state, + EnergyPlus::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " "=\"{}\", PlantEquipmentOperation:CoolingLoad name = \"{}\" was not found.", scheme.Name, coolingOnlyLoadOpName)); @@ -2119,8 +2138,9 @@ void GetChillerHeaterChangeoverOpSchemeInput(EnergyPlusData &state, } if (!allocated(scheme.HeatingOnlyEquipList)) { // never found a match - ShowSevereError(state, - format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " + ShowSevereError( + state, + EnergyPlus::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " "=\"{}\", PlantEquipmentOperation:HeatingLoad name = \"{}\" was not found.", scheme.Name, heatingOnlyLoadOpName)); @@ -2234,8 +2254,9 @@ void GetChillerHeaterChangeoverOpSchemeInput(EnergyPlusData &state, } if (scheme.PlantOps.SimulHeatCoolCoolingOpInput && !allocated(scheme.SimultHeatCoolCoolingEquipList)) { - ShowSevereError(state, - format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " + ShowSevereError( + state, + EnergyPlus::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " "=\"{}\", PlantEquipmentOperation:CoolingLoad name = \"{}\" was not found.", scheme.Name, simulHeatCoolCoolingOpName)); @@ -2348,8 +2369,9 @@ void GetChillerHeaterChangeoverOpSchemeInput(EnergyPlusData &state, } } if (scheme.PlantOps.SimultHeatCoolHeatingOpInput && !allocated(scheme.SimultHeatCoolHeatingEquipList)) { - ShowSevereError(state, - format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " + ShowSevereError( + state, + EnergyPlus::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " "=\"{}\", PlantEquipmentOperation:HeatingLoad name = \"{}\" was not found.", scheme.Name, simultHeatCoolHeatingOpName)); @@ -2448,11 +2470,11 @@ void GetUserDefinedOpSchemeInput(EnergyPlusData &state, } if (Num == NumSchemes) { // did not find it ShowSevereError(state, - format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; SchemeNameFound = false; } @@ -2498,8 +2520,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, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(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))); ShowContinueError(state, "Not found as either an EMS Program Manager or a Python Plugin instance."); ErrorsFound = true; } @@ -2512,9 +2535,10 @@ 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, - format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(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))); ShowContinueError(state, "Not found as either an EMS Program Manager or a Python Plugin instance."); ErrorsFound = true; } @@ -2531,11 +2555,11 @@ void GetUserDefinedOpSchemeInput(EnergyPlusData &state, } else { ShowSevereError(state, - format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; } } @@ -2609,9 +2633,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, format("Operation Scheme name = {}", this_op_scheme.Name)); - ShowContinueError(state, format("Loop name = {}", this_plant_loop.Name)); - ShowContinueError(state, format("Component name = {}", this_equip.Name)); + 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)); ShowFatalError(state, "InitLoadDistribution: Simulation terminated because of error in operation scheme."); } @@ -2622,32 +2646,33 @@ void InitLoadDistribution(EnergyPlusData &state, bool const FirstHVACIteration) if (ValidLoopEquipTypes[static_cast(Type)] == LoopType::Plant && this_plant_loop.TypeOfLoop == LoopType::Condenser) { ShowSevereError(state, - format("InitLoadDistribution: CondenserLoop=\"{}\", Operation Scheme=\"{}\",", - this_plant_loop.Name, - this_plant_loop.OperationScheme)); - ShowContinueError(state, - format("Scheme type={}, Name=\"{}\" includes equipment that is not valid on a Condenser Loop", - this_op_scheme.TypeOf, - this_op_scheme.Name)); + 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)); ShowContinueError(state, - format("Component {} not allowed as supply equipment on this type of loop.", - PlantEquipTypeNames[static_cast(Type)])); - ShowContinueError(state, format("Component name = {}", this_equip.Name)); + 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)); errFlag2 = true; } if (ValidLoopEquipTypes[static_cast(Type)] == LoopType::Condenser && this_plant_loop.TypeOfLoop == LoopType::Plant) { ShowSevereError(state, - format("InitLoadDistribution: PlantLoop=\"{}\", Operation Scheme=\"{}\",", - this_plant_loop.Name, - this_plant_loop.OperationScheme)); + EnergyPlus::format("InitLoadDistribution: PlantLoop=\"{}\", Operation Scheme=\"{}\",", + this_plant_loop.Name, + this_plant_loop.OperationScheme)); ShowContinueError(state, - format("Scheme type={}, Name=\"{}\" includes equipment that is not valid on a Plant Loop", - this_op_scheme.TypeOf, - this_op_scheme.Name)); + EnergyPlus::format("Scheme type={}, Name=\"{}\" includes equipment that is not valid on a Plant Loop", + this_op_scheme.TypeOf, + this_op_scheme.Name)); ShowContinueError(state, - format("Component {} not allowed as supply equipment on this type of loop.", - PlantEquipTypeNames[static_cast(Type)])); - ShowContinueError(state, format("Component name = {}", this_equip.Name)); + 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)); errFlag2 = true; } @@ -2666,8 +2691,9 @@ void InitLoadDistribution(EnergyPlusData &state, bool const FirstHVACIteration) if (found) { this_op_scheme.ChillerHeaterSupervisoryOperation->OneTimeInitChillerHeaterChangeoverOpScheme(state); } else { - ShowSevereError(state, - format("InitLoadDistribution: PlantLoop=\"{}\", Operation Scheme=\"{}\", was not found, check input", + ShowSevereError( + state, + EnergyPlus::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."); @@ -2756,10 +2782,11 @@ 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, - format("InitLoadDistribution: no operation scheme index found for component on PlantLoop={}", + ShowSevereError( + state, + EnergyPlus::format("InitLoadDistribution: no operation scheme index found for component on PlantLoop={}", this_plant_loop.Name)); - ShowContinueError(state, format("Component name = {}", this_component.Name)); + ShowContinueError(state, EnergyPlus::format("Component name = {}", this_component.Name)); errFlag2 = true; } DataPlant::OpScheme SchemeType{}; @@ -2896,7 +2923,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, format("Problem component name = {}", this_op_scheme.EquipList(ListNum).Comp(CompNum).Name)); + ShowContinueError( + state, EnergyPlus::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; } @@ -3268,8 +3296,8 @@ void DistributePlantLoad(EnergyPlusData &state, PlantCapacity += this_component.MaxLoad; if (this_component.MaxLoad < SmallLoad) { - ShowWarningMessage(state, - format("Plant component {} has zero available capacity. Check component controls.", this_component.Name)); + ShowWarningMessage( + state, EnergyPlus::format("Plant component {} has zero available capacity. Check component controls.", this_component.Name)); MinCompPLR = 0.0; } else { MinCompPLR = this_component.MinLoad / this_component.MaxLoad; @@ -3308,7 +3336,8 @@ void DistributePlantLoad(EnergyPlusData &state, if (PlantCapacity > 0.0) { PlantPLR = min(1.0, std::abs(RemLoopDemand) / PlantCapacity); } else { - ShowWarningError(state, format("Zero available plant capacity for Plant Loop = {}", state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowWarningError(state, + EnergyPlus::format("Zero available plant capacity for Plant Loop = {}", state.dataPlnt->PlantLoop(LoopNum).Name)); } // Distribute load to each machine @@ -3378,8 +3407,8 @@ void DistributePlantLoad(EnergyPlusData &state, PlantCapacity += this_component.MaxLoad; if (this_component.MaxLoad < SmallLoad) { - ShowWarningMessage(state, - format("Plant component {} has zero available capacity. Check component controls.", this_component.Name)); + ShowWarningMessage( + state, EnergyPlus::format("Plant component {} has zero available capacity. Check component controls.", this_component.Name)); MinCompPLR = 0.0; } else { MinCompPLR = this_component.MinLoad / this_component.MaxLoad; @@ -3399,7 +3428,8 @@ void DistributePlantLoad(EnergyPlusData &state, if (PlantCapacity > 0.0) { PlantPLR = min(1.0, std::abs(RemLoopDemand) / PlantCapacity); } else { - ShowWarningError(state, format("Zero available plant capacity for Plant Loop = {}", state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowWarningError(state, + EnergyPlus::format("Zero available plant capacity for Plant Loop = {}", state.dataPlnt->PlantLoop(LoopNum).Name)); } // Distribute load to each machine @@ -4209,9 +4239,10 @@ void SetupPlantEMSActuators(EnergyPlusData &state) } for (int CompNum = 1; CompNum <= state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).TotalComponents; ++CompNum) { - ActuatorName = format("Plant Component {}", - PlantEquipTypeNames[static_cast( - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Comp(CompNum).Type)]); + ActuatorName = + EnergyPlus::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 3d444717ac1..a7983a8f1cb 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -149,7 +149,7 @@ PlantComponent *HeatExchangerStruct::factory(EnergyPlusData &state, std::string } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalPlantFluidHXFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalPlantFluidHXFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -353,8 +353,8 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) } } else { if (state.dataPlantHXFluidToFluid->FluidHX(CompLoop).HeatExchangeModelType != FluidHXType::Ideal) { - ShowSevereError(state, format("{}{}=\"{}\", invalid entry.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Missing entry for {}", cNumericFieldNames(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid entry.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Missing entry for {}", cNumericFieldNames(3))); ErrorsFound = true; } } @@ -388,8 +388,9 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) if (state.dataLoopNodes->Node(state.dataPlantHXFluidToFluid->FluidHX(CompLoop).SetPointNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, format("{} Missing temperature setpoint for DataLoopNode::Node = {}", RoutineName, cAlphaArgs(9))); - ShowContinueError(state, format("Occurs for {}=\"{}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("{} Missing temperature setpoint for DataLoopNode::Node = {}", RoutineName, cAlphaArgs(9))); + ShowContinueError(state, EnergyPlus::format("Occurs for {}=\"{}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, " Use a setpoint manager to place a single temperature setpoint on the node"); ErrorsFound = true; } else { @@ -400,8 +401,9 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) HVAC::CtrlVarType::Temp, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { - ShowSevereError(state, format("{} Missing temperature setpoint for node = {}", RoutineName, cAlphaArgs(9))); - ShowContinueError(state, format("Occurs for {}=\"{}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{} Missing temperature setpoint for node = {}", RoutineName, cAlphaArgs(9))); + ShowContinueError(state, EnergyPlus::format("Occurs for {}=\"{}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Use a setpoint manager or EMS actuator to place a single temperature setpoint on the node"); ErrorsFound = true; } @@ -414,8 +416,9 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) (state.dataLoopNodes->Node(state.dataPlantHXFluidToFluid->FluidHX(CompLoop).SetPointNodeNum).TempSetPointLo == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, format("{} Missing dual temperature setpoints for node = {}", RoutineName, cAlphaArgs(9))); - ShowContinueError(state, format("Occurs for {}=\"{}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{} Missing dual temperature setpoints for node = {}", RoutineName, cAlphaArgs(9))); + ShowContinueError(state, EnergyPlus::format("Occurs for {}=\"{}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, " Use a setpoint manager to place a dual temperature setpoint on the node"); ErrorsFound = true; } else { @@ -430,8 +433,9 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) HVAC::CtrlVarType::Temp, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { - ShowSevereError(state, format("{} Missing temperature setpoint for node = {}", RoutineName, cAlphaArgs(9))); - ShowContinueError(state, format("Occurs for {}=\"{}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{} Missing temperature setpoint for node = {}", RoutineName, cAlphaArgs(9))); + ShowContinueError(state, EnergyPlus::format("Occurs for {}=\"{}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Use a setpoint manager or EMS actuators to place a dual temperature setpoints on the node"); ErrorsFound = true; } @@ -448,8 +452,8 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) (state.dataPlantHXFluidToFluid->FluidHX(CompLoop).controlMode == ControlType::DualDeadBandSetPointModulated) || (state.dataPlantHXFluidToFluid->FluidHX(CompLoop).controlMode == ControlType::DualDeadBandSetPointOnOff) || (state.dataPlantHXFluidToFluid->FluidHX(CompLoop).controlMode == ControlType::CoolingSetPointOnOffWithComponentOverride)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid entry.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Missing entry for {}", cAlphaFieldNames(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid entry.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Missing entry for {}", cAlphaFieldNames(9))); ErrorsFound = true; } } @@ -474,7 +478,8 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) } else { ShowWarningError( state, - format("{} = {}, {} is an invalid value for {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(10), cAlphaFieldNames(10))); + EnergyPlus::format( + "{} = {}, {} is an invalid value for {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(10), cAlphaFieldNames(10))); ErrorsFound = true; } @@ -491,8 +496,8 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) DataLoopNode::ObjectIsNotParent); } else { if (state.dataPlantHXFluidToFluid->FluidHX(CompLoop).controlMode == ControlType::CoolingSetPointOnOffWithComponentOverride) { - ShowSevereError(state, format("{}{}=\"{}\", invalid entry.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Missing entry for {}", cAlphaFieldNames(11))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid entry.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Missing entry for {}", cAlphaFieldNames(11))); ErrorsFound = true; } } @@ -510,8 +515,8 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) DataLoopNode::ObjectIsNotParent); } else { if (state.dataPlantHXFluidToFluid->FluidHX(CompLoop).controlMode == ControlType::CoolingSetPointOnOffWithComponentOverride) { - ShowSevereError(state, format("{}{}=\"{}\", invalid entry.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Missing entry for {}", cAlphaFieldNames(12))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid entry.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Missing entry for {}", cAlphaFieldNames(12))); ErrorsFound = true; } } @@ -548,7 +553,7 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in processing {} input.", RoutineName, cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in processing {} input.", RoutineName, cCurrentModuleObject)); } } @@ -741,7 +746,7 @@ void HeatExchangerStruct::size(EnergyPlusData &state) } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "SizeFluidHeatExchanger: Autosizing of requires a loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in heat exchanger object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in heat exchanger object={}", this->Name)); } } } @@ -844,7 +849,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, format("Occurs in heat exchanger object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in heat exchanger object={}", this->Name)); } } } @@ -1739,10 +1744,12 @@ void HeatExchangerStruct::findDemandSideLoopFlow(EnergyPlusData &state, Real64 c if (!state.dataGlobal->WarmupFlag) { if (this->DmdSideModulatSolvNoConvergeErrorCount < 1) { ++this->DmdSideModulatSolvNoConvergeErrorCount; - ShowWarningError( - state, - format("{} named {} - Iteration Limit exceeded calculating demand side loop flow rate", ComponentClassName, this->Name)); - ShowContinueError(state, format("Simulation continues with calculated demand side mass flow rate = {:.7R}", DmdSideMdot)); + ShowWarningError(state, + EnergyPlus::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)); } ShowRecurringWarningErrorAtEnd(state, ComponentClassName + " named " + this->Name + @@ -1757,9 +1764,11 @@ void HeatExchangerStruct::findDemandSideLoopFlow(EnergyPlusData &state, Real64 c if (!state.dataGlobal->WarmupFlag) { if (this->DmdSideModulatSolvFailErrorCount < 1) { ++this->DmdSideModulatSolvFailErrorCount; - ShowWarningError( - state, format("{} named {} - Solver failed to calculate demand side loop flow rate", ComponentClassName, this->Name)); - ShowContinueError(state, format("Simulation continues with estimated demand side mass flow rate = {:.7R}", DmdSideMdot)); + ShowWarningError(state, + EnergyPlus::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)); } ShowRecurringWarningErrorAtEnd(state, ComponentClassName + " named " + this->Name + @@ -1801,10 +1810,12 @@ void HeatExchangerStruct::findDemandSideLoopFlow(EnergyPlusData &state, Real64 c if (!state.dataGlobal->WarmupFlag) { if (this->DmdSideModulatSolvNoConvergeErrorCount < 1) { ++this->DmdSideModulatSolvNoConvergeErrorCount; - ShowWarningError( - state, - format("{} named {} - Iteration Limit exceeded calculating demand side loop flow rate", ComponentClassName, this->Name)); - ShowContinueError(state, format("Simulation continues with calculated demand side mass flow rate = {:.7R}", DmdSideMdot)); + ShowWarningError(state, + EnergyPlus::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)); } ShowRecurringWarningErrorAtEnd(state, ComponentClassName + " named " + this->Name + @@ -1819,9 +1830,11 @@ void HeatExchangerStruct::findDemandSideLoopFlow(EnergyPlusData &state, Real64 c if (!state.dataGlobal->WarmupFlag) { if (this->DmdSideModulatSolvFailErrorCount < 1) { ++this->DmdSideModulatSolvFailErrorCount; - ShowWarningError( - state, format("{} named {} - Solver failed to calculate demand side loop flow rate", ComponentClassName, this->Name)); - ShowContinueError(state, format("Simulation continues with estimated demand side mass flow rate = {:.7R}", DmdSideMdot)); + ShowWarningError(state, + EnergyPlus::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)); } ShowRecurringWarningErrorAtEnd(state, ComponentClassName + " named " + this->Name + @@ -1879,8 +1892,9 @@ void HeatExchangerStruct::oneTimeInit(EnergyPlusData &state) _); if (this->DemandSideLoop.loopSideNum != DataPlant::LoopSideLocation::Demand) { // throw error - ShowSevereError(state, - format("{} Invalid connections for {} name = \"{}\"", + ShowSevereError( + state, + EnergyPlus::format("{} Invalid connections for {} name = \"{}\"", RoutineName, DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], this->Name)); @@ -1900,8 +1914,9 @@ void HeatExchangerStruct::oneTimeInit(EnergyPlusData &state) _); if (this->SupplySideLoop.loopSideNum != DataPlant::LoopSideLocation::Supply) { // throw error - ShowSevereError(state, - format("{} Invalid connections for {} name = \"{}\"", + ShowSevereError( + state, + EnergyPlus::format("{} Invalid connections for {} name = \"{}\"", RoutineName, DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], this->Name)); @@ -1911,8 +1926,9 @@ void HeatExchangerStruct::oneTimeInit(EnergyPlusData &state) // 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, - format("{} Invalid connections for {} name = \"{}\"", + ShowSevereError( + state, + EnergyPlus::format("{} Invalid connections for {} name = \"{}\"", RoutineName, DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], this->Name)); @@ -1994,7 +2010,7 @@ void HeatExchangerStruct::oneTimeInit(EnergyPlusData &state) } if (errFlag) { - ShowFatalError(state, format("{} Program terminated due to previous condition(s).", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{} Program terminated due to previous condition(s).", RoutineName)); } this->MyFlag = false; } diff --git a/src/EnergyPlus/PlantLoadProfile.cc b/src/EnergyPlus/PlantLoadProfile.cc index db516703dc2..4d53364739b 100644 --- a/src/EnergyPlus/PlantLoadProfile.cc +++ b/src/EnergyPlus/PlantLoadProfile.cc @@ -104,7 +104,7 @@ PlantComponent *PlantProfileData::factory(EnergyPlusData &state, std::string con return thisObj; } // If we didn't find it, fatal - ShowFatalError(state, format("PlantLoadProfile::factory: Error getting inputs for pipe named: {}", objectName)); + ShowFatalError(state, EnergyPlus::format("PlantLoadProfile::factory: Error getting inputs for pipe named: {}", objectName)); // Shut up the compiler return nullptr; } @@ -599,7 +599,7 @@ void GetPlantProfileInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("Errors in {} input.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors in {} input.", cCurrentModuleObject)); } } // ProfileNum diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc index 467e00c49ce..f9e585bb91d 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc @@ -875,22 +875,25 @@ void EIRPlantLoopHeatPump::capModFTCurveCheck(EnergyPlusData &state, const Real6 { if (capacityModifierFuncTemp < 0.0) { if (this->capModFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, - format(" Capacity Modifier curve (function of Temperatures) output is negative ({:.3T}).", capacityModifierFuncTemp)); - ShowContinueError(state, - format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", - loadSideOutletSetpointTemp, - this->sourceSideInletTemp)); + 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)); + ShowContinueError( + state, + EnergyPlus::format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", + loadSideOutletSetpointTemp, + this->sourceSideInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\": Capacity Modifier curve (function of Temperatures) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), - this->capModFTErrorIndex, - capacityModifierFuncTemp, - capacityModifierFuncTemp); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} \"{}\": Capacity Modifier curve (function of Temperatures) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), + this->capModFTErrorIndex, + capacityModifierFuncTemp, + capacityModifierFuncTemp); capacityModifierFuncTemp = 0.0; } } @@ -901,22 +904,25 @@ void EIRPlantLoopHeatPump::heatRecoveryCapModFTCurveCheck(EnergyPlusData &state, { if (capacityModifierFuncTemp < 0.0) { if (this->heatRecCapModFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, - format(" Heat Recovery mode Capacity Modifier curve (function of Temperatures) output is negative ({:.3T}).", - capacityModifierFuncTemp)); - ShowContinueError(state, - format(" Negative value occurs using a load side water temperature of {:.2T}C and heat recovery entering water " - "temperature of {:.2T}C.", - loadSideOutletSetpointTemp, - this->heatRecoveryInletTemp)); + 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}).", + 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.", + loadSideOutletSetpointTemp, + this->heatRecoveryInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Heat Recovery mode Capacity Modifier curve (function of Temperatures) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + EnergyPlus::format( + "{} \"{}\": Heat Recovery mode Capacity Modifier curve (function of Temperatures) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->heatRecCapModFTErrorIndex, capacityModifierFuncTemp, capacityModifierFuncTemp); @@ -928,21 +934,24 @@ void EIRPlantLoopHeatPump::eirModCurveCheck(EnergyPlusData &state, Real64 &eirMo { if (eirModifierFuncTemp < 0.0) { if (this->eirModFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, format(" EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirModifierFuncTemp)); + ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError(state, - format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", - this->loadSideOutletTemp, - this->sourceSideInletTemp)); + 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.", + this->loadSideOutletTemp, + this->sourceSideInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } - ShowRecurringWarningErrorAtEnd(state, - 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, + 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); eirModifierFuncTemp = 0.0; } } @@ -951,21 +960,23 @@ void EIRPlantLoopHeatPump::heatRecoveryEIRModCurveCheck(EnergyPlusData &state, R { if (eirModifierFuncTemp < 0.0) { if (this->heatRecEIRModFTErrorIndex == 0 && heatRecoveryEIRFTempCurveIndex > 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError( - state, format(" Heat Recovery mode EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirModifierFuncTemp)); + ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError(state, - format(" Negative value occurs using a load side water temperature of {:.2T}C and heat recovery entering water " - "temperature of {:.2T}C.", - this->loadSideOutletTemp, - this->heatRecoveryInletTemp)); + EnergyPlus::format(" Heat Recovery mode EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", + 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.", + this->loadSideOutletTemp, + this->heatRecoveryInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Heat Recovery mode EIR Modifier curve (function of Temperatures) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + EnergyPlus::format("{} \"{}\": Heat Recovery mode EIR Modifier curve (function of Temperatures) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->eirModFTErrorIndex, eirModifierFuncTemp, eirModifierFuncTemp); @@ -977,15 +988,15 @@ void EIRPlantLoopHeatPump::eirModFPLRCurveCheck(EnergyPlusData &state, Real64 &e { if (eirModifierFuncPLR < 0.0) { if (this->eirModFPLRErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, format(" EIR Modifier curve (function of PLR) output is negative ({:.3T}).", eirModifierFuncPLR)); - ShowContinueError(state, format(" Negative value occurs using a Part Load Ratio of {:.2T}", this->partLoadRatio)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\": EIR Modifier curve (function of PLR) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + EnergyPlus::format("{} \"{}\": EIR Modifier curve (function of PLR) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->eirModFPLRErrorIndex, eirModifierFuncPLR, eirModifierFuncPLR); @@ -1161,7 +1172,7 @@ void HeatPumpAirToWater::reportEquipmentSummary(EnergyPlusData &state) } else if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterCooling) { modeKeyWord = "Cooling"; } - objectName = format("{} {} Component", this->name, modeKeyWord); + objectName = EnergyPlus::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); @@ -1393,10 +1404,11 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) // we can warn here if there is a bit mismatch between hard- and auto-sized if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCapacity - hardSizedCapacity) / hardSizedCapacity) > state.dataSize->AutoVsHardSizingThreshold) { - ShowWarningMessage(state, - format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); - ShowContinueError(state, format("User-Specified {} of {:.2R} [W]", capacityKW, hardSizedCapacity)); - ShowContinueError(state, format("differs from Design Size {} of {:.2R} [W]", capacityKW, tmpCapacity)); + ShowWarningMessage( + state, + EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1429,9 +1441,12 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpLoadVolFlow - hardSizedLoadSideFlow) / hardSizedLoadSideFlow) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); - ShowContinueError(state, format("User-Specified {} of {:.2R} [m3/s]", flowRateKW, hardSizedLoadSideFlow)); - ShowContinueError(state, format("differs from Design Size {} of {:.2R} [m3/s]", flowRateKW, tmpLoadVolFlow)); + ShowMessage( + state, + EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1473,7 +1488,7 @@ 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, format("Occurs in HeatPump:PlantLoop:EquationFit:Cooling object = {}", this->name)); + ShowContinueError(state, EnergyPlus::format("Occurs in HeatPump:PlantLoop:EquationFit:Cooling object = {}", this->name)); errorsFound = true; } } @@ -1567,9 +1582,12 @@ void EIRPlantLoopHeatPump::sizeSrcSideWSHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpSourceVolFlow - hardSizedSourceSideFlow) / hardSizedSourceSideFlow) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); - ShowContinueError(state, format("User-Specified Source Side Volume Flow Rate of {:.2R} [m3/s]", hardSizedSourceSideFlow)); - ShowContinueError(state, format("differs from Design Size Source Side Volume Flow Rate of {:.2R} [m3/s]", tmpSourceVolFlow)); + ShowMessage(state, + EnergyPlus::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( + state, EnergyPlus::format("differs from Design Size Source Side Volume Flow Rate of {:.2R} [m3/s]", tmpSourceVolFlow)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1658,9 +1676,9 @@ void EIRPlantLoopHeatPump::sizeSrcSideASHP(EnergyPlusData &state) // fatal out just in case errorsFound = true; // LCOV_EXCL_LINE ShowSevereError(state, - format("Invalid condenser flow rate for EIR PLHP (name={}; entered value: {}", - this->name, - this->sourceSideDesignVolFlowRate)); // LCOV_EXCL_LINE + EnergyPlus::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 @@ -1795,11 +1813,14 @@ void EIRPlantLoopHeatPump::sizeHeatRecoveryASHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecoveryVolFlow - hardSizedHeatRecoveryFlow) / hardSizedHeatRecoveryFlow) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); - ShowContinueError(state, - format("User-Specified Heat Recovery Side Volume Flow Rate of {:.2R} [m3/s]", hardSizedHeatRecoveryFlow)); + ShowMessage(state, + EnergyPlus::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); ShowContinueError( - state, format("differs from Design Size Heat Recovery Side Volume Flow Rate of {:.2R} [m3/s]", tmpHeatRecoveryVolFlow)); + state, + EnergyPlus::format("User-Specified Heat Recovery Side Volume Flow Rate of {:.2R} [m3/s]", hardSizedHeatRecoveryFlow)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Heat Recovery Side Volume Flow Rate of {:.2R} [m3/s]", + tmpHeatRecoveryVolFlow)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1823,7 +1844,7 @@ PlantComponent *EIRPlantLoopHeatPump::factory(EnergyPlusData &state, DataPlant:: } } - ShowFatalError(state, format("EIR Plant Loop Heat Pump factory: Error getting inputs for PLHP named: {}", hp_name)); + ShowFatalError(state, EnergyPlus::format("EIR Plant Loop Heat Pump factory: Error getting inputs for PLHP named: {}", hp_name)); return nullptr; // LCOV_EXCL_LINE } @@ -1843,7 +1864,8 @@ void EIRPlantLoopHeatPump::pairUpCompanionCoils(EnergyPlusData &state) } if (potentialCompanionName == targetCompanionName) { if (thisCoilType == potentialCompanionType) { - ShowSevereError(state, format("Invalid companion specification for EIR Plant Loop Heat Pump named \"{}\"", thisCoilName)); + ShowSevereError( + state, EnergyPlus::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"); } @@ -1853,8 +1875,8 @@ void EIRPlantLoopHeatPump::pairUpCompanionCoils(EnergyPlusData &state) } if (thisHP.companionHeatPumpCoil == nullptr) { ShowSevereError(state, "Could not find matching companion heat pump coil."); - ShowContinueError(state, format("Base coil: {}", thisCoilName)); - ShowContinueError(state, format("Looking for companion coil named: {}", targetCompanionName)); + ShowContinueError(state, EnergyPlus::format("Base coil: {}", thisCoilName)); + ShowContinueError(state, EnergyPlus::format("Looking for companion coil named: {}", targetCompanionName)); ShowFatalError(state, "Simulation aborts due to previous severe error"); } } @@ -1955,7 +1977,8 @@ 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, format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, capFtName)); + ShowSevereError(state, + EnergyPlus::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, capFtName)); errorsFound = true; } @@ -1963,7 +1986,8 @@ 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, format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, eirFtName)); + ShowSevereError(state, + EnergyPlus::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, eirFtName)); errorsFound = true; } @@ -1971,7 +1995,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, format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, eirFplrName)); + ShowSevereError( + state, EnergyPlus::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, eirFplrName)); errorsFound = true; } @@ -2001,10 +2026,10 @@ void EIRPlantLoopHeatPump::processInputForEIRPLHP(EnergyPlusData &state) thisPLHP.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(thermosiphonTempCurveName.value().get())); if (thisPLHP.thermosiphonTempCurveIndex == 0) { - ShowSevereError(state, format("{} =\"{}\"", state.dataIPShortCut->cCurrentModuleObject, thisPLHP.name)); + ShowSevereError(state, EnergyPlus::format("{} =\"{}\"", state.dataIPShortCut->cCurrentModuleObject, thisPLHP.name)); ShowContinueError(state, - format("Invalid Thermosiphon Capacity Fraction Curve Name = {}", - thermosiphonTempCurveName.value().get())); + EnergyPlus::format("Invalid Thermosiphon Capacity Fraction Curve Name = {}", + thermosiphonTempCurveName.value().get())); errorsFound = true; } } @@ -2132,15 +2157,17 @@ void EIRPlantLoopHeatPump::processInputForEIRPLHP(EnergyPlusData &state) condenserNodeConnectionType_Inlet = DataLoopNode::ConnectionType::Inlet; condenserNodeConnectionType_Outlet = DataLoopNode::ConnectionType::Outlet; if (sourceSideInletNodeName == sourceSideOutletNodeName) { - ShowSevereError(state, format("PlantLoopHeatPump {} has the same inlet and outlet node.", thisObjectName)); - ShowContinueError(state, format("Node Name: {}", sourceSideInletNodeName)); + ShowSevereError(state, EnergyPlus::format("PlantLoopHeatPump {} has the same inlet and outlet node.", thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Node Name: {}", sourceSideInletNodeName)); errorsFound = true; } } else { // Again, this should be protected by the input processor - ShowErrorMessage( - state, format("Invalid heat pump condenser type (name={}; entered type: {}", thisPLHP.name, condenserType)); // LCOV_EXCL_LINE - errorsFound = true; // LCOV_EXCL_LINE + ShowErrorMessage(state, + EnergyPlus::format("Invalid heat pump condenser type (name={}; entered type: {}", + thisPLHP.name, + condenserType)); // LCOV_EXCL_LINE + errorsFound = true; // LCOV_EXCL_LINE } thisPLHP.sourceSideNodes.inlet = NodeInputManager::GetOnlySingleNode(state, sourceSideInletNodeName, @@ -2335,28 +2362,28 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) // setup output variables SetupOutputVariable(state, - format("Heat Pump Part Load Ratio{}", suffix), + EnergyPlus::format("Heat Pump Part Load Ratio{}", suffix), Constant::Units::None, this->partLoadRatio, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Cycling Ratio{}", suffix), + EnergyPlus::format("Heat Pump Cycling Ratio{}", suffix), Constant::Units::None, this->cyclingRatio, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Load Side Heat Transfer Rate{}", suffix), + EnergyPlus::format("Heat Pump Load Side Heat Transfer Rate{}", suffix), Constant::Units::W, this->loadSideHeatTransfer, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Load Side Heat Transfer Energy{}", suffix), + EnergyPlus::format("Heat Pump Load Side Heat Transfer Energy{}", suffix), Constant::Units::J, this->loadSideEnergy, OutputProcessor::TimeStepType::System, @@ -2365,49 +2392,49 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) Constant::eResource::EnergyTransfer, OutputProcessor::Group::Plant); SetupOutputVariable(state, - format("Heat Pump Source Side Heat Transfer Rate{}", suffix), + EnergyPlus::format("Heat Pump Source Side Heat Transfer Rate{}", suffix), Constant::Units::W, this->sourceSideHeatTransfer, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Source Side Heat Transfer Energy{}", suffix), + EnergyPlus::format("Heat Pump Source Side Heat Transfer Energy{}", suffix), Constant::Units::J, this->sourceSideEnergy, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Sum, this->name); SetupOutputVariable(state, - format("Heat Pump Load Side Inlet Temperature{}", suffix), + EnergyPlus::format("Heat Pump Load Side Inlet Temperature{}", suffix), Constant::Units::C, this->loadSideInletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Load Side Outlet Temperature{}", suffix), + EnergyPlus::format("Heat Pump Load Side Outlet Temperature{}", suffix), Constant::Units::C, this->loadSideOutletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Source Side Inlet Temperature{}", suffix), + EnergyPlus::format("Heat Pump Source Side Inlet Temperature{}", suffix), Constant::Units::C, this->sourceSideInletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Source Side Outlet Temperature{}", suffix), + EnergyPlus::format("Heat Pump Source Side Outlet Temperature{}", suffix), Constant::Units::C, this->sourceSideOutletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Electricity Rate{}", suffix), + EnergyPlus::format("Heat Pump Electricity Rate{}", suffix), Constant::Units::W, this->powerUsage, OutputProcessor::TimeStepType::System, @@ -2416,7 +2443,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, - format("Heat Pump Electricity Energy{}", suffix), + EnergyPlus::format("Heat Pump Electricity Energy{}", suffix), Constant::Units::J, this->powerEnergy, OutputProcessor::TimeStepType::System, @@ -2436,7 +2463,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, - format("Heat Pump Electricity Energy{}", suffix), + EnergyPlus::format("Heat Pump Electricity Energy{}", suffix), Constant::Units::J, this->powerEnergy, OutputProcessor::TimeStepType::System, @@ -2482,14 +2509,14 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) } } SetupOutputVariable(state, - format("Heat Pump Load Side Mass Flow Rate{}", suffix), + EnergyPlus::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, - format("Heat Pump Source Side Mass Flow Rate{}", suffix), + EnergyPlus::format("Heat Pump Source Side Mass Flow Rate{}", suffix), Constant::Units::kg_s, this->sourceSideMassFlowRate, OutputProcessor::TimeStepType::System, @@ -2558,18 +2585,18 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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, - format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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; } @@ -2581,18 +2608,18 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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, - format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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; } @@ -2600,10 +2627,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, - format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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 { @@ -2618,18 +2645,18 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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, - format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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; } @@ -2637,10 +2664,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, - format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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 { @@ -2658,10 +2685,10 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->SetpointSetToLoopErrDone) { ShowWarningError(state, - format("{}: Missing temperature setpoint for Setpoint Controlled {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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; @@ -2674,10 +2701,10 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (fatalError) { if (!this->SetpointSetToLoopErrDone) { ShowWarningError(state, - format("{}: Missing temperature setpoint for Setpoint Controlled {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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 "); @@ -2695,7 +2722,7 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) } if (errFlag) { - ShowFatalError(state, format("{}: Program terminated due to previous condition(s).", routineName)); + ShowFatalError(state, EnergyPlus::format("{}: Program terminated due to previous condition(s).", routineName)); } this->oneTimeInitFlag = false; } @@ -2719,14 +2746,14 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterHeating || this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterCooling) { SetupOutputVariable(state, - format("Heat Pump Total {} Rate", mode_keyword), + EnergyPlus::format("Heat Pump Total {} Rate", mode_keyword), Constant::Units::W, this->loadSideHeatTransfer, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Number Of {} Unit On", mode_keyword), + EnergyPlus::format("Heat Pump Number Of {} Unit On", mode_keyword), Constant::Units::None, this->operatingMode, OutputProcessor::TimeStepType::System, @@ -2734,35 +2761,35 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) this->name); // note this is 1-indexed SetupOutputVariable(state, - format("Heat Pump Speed Level in {} Mode", mode_keyword), + EnergyPlus::format("Heat Pump Speed Level in {} Mode", mode_keyword), Constant::Units::None, this->speedLevel, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Speed Ratio in {} Mode", mode_keyword), + EnergyPlus::format("Heat Pump Speed Ratio in {} Mode", mode_keyword), Constant::Units::None, this->speedRatio, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - format("Heat Pump Air Flow Rate in {} Mode", mode_keyword), + EnergyPlus::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, - format("Heat Pump Inlet Air Temperature in {} Mode", mode_keyword), + EnergyPlus::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, - format("Heat Pump Outlet Air Temperature in {} Mode", mode_keyword), + EnergyPlus::format("Heat Pump Outlet Air Temperature in {} Mode", mode_keyword), Constant::Units::C, this->sourceSideOutletTemp, OutputProcessor::TimeStepType::System, @@ -2770,7 +2797,7 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) this->name); // fixme add these variables and compute their values SetupOutputVariable(state, - format("Heat Pump Capacity Temperature Modifier in {} Mode", mode_keyword), + EnergyPlus::format("Heat Pump Capacity Temperature Modifier in {} Mode", mode_keyword), Constant::Units::None, this->capFuncTempCurveValue, OutputProcessor::TimeStepType::System, @@ -2778,14 +2805,14 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) this->name); // fixme add these variables and compute their values SetupOutputVariable(state, - format("Heat Pump EIR Temperature Modifier in {} Mode", mode_keyword), + EnergyPlus::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, - format("Heat Pump EIR PLR Modifier in {} Mode", mode_keyword), + EnergyPlus::format("Heat Pump EIR PLR Modifier in {} Mode", mode_keyword), Constant::Units::None, this->eirFuncPLRModifierValue, OutputProcessor::TimeStepType::System, @@ -2812,7 +2839,7 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) OutputProcessor::Group::HVAC, OutputProcessor::EndUseCat::Cooling); SetupOutputVariable(state, - format("Heat Pump {} COP", mode_keyword), + EnergyPlus::format("Heat Pump {} COP", mode_keyword), Constant::Units::None, this->heatingCOP, OutputProcessor::TimeStepType::System, @@ -2820,7 +2847,7 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) this->name); } else if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterCooling) { SetupOutputVariable(state, - format("Heat Pump {} COP", mode_keyword), + EnergyPlus::format("Heat Pump {} COP", mode_keyword), Constant::Units::None, this->coolingCOP, OutputProcessor::TimeStepType::System, @@ -2959,22 +2986,25 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (capacityModifierFuncTemp < 0.0) { if (this->capModFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, - format(" Capacity Modifier curve (function of Temperatures) output is negative ({:.3T}).", capacityModifierFuncTemp)); - ShowContinueError(state, - format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", - waterTempforCurve, - oaTempforCurve)); + 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)); + ShowContinueError( + state, + EnergyPlus::format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", + waterTempforCurve, + oaTempforCurve)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\": Capacity Modifier curve (function of Temperatures) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), - this->capModFTErrorIndex, - capacityModifierFuncTemp, - capacityModifierFuncTemp); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("{} \"{}\": Capacity Modifier curve (function of Temperatures) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), + this->capModFTErrorIndex, + capacityModifierFuncTemp, + capacityModifierFuncTemp); capacityModifierFuncTemp = 0.0; } @@ -3003,21 +3033,24 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirModifierFuncTemp < 0.0) { if (this->eirModFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, format(" EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirModifierFuncTemp)); + ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError(state, - format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", - waterTempforCurve, - oaTempforCurve)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } - ShowRecurringWarningErrorAtEnd(state, - 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, + 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); eirModifierFuncTemp = 0.0; } @@ -3030,15 +3063,15 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirModifierFuncPLR < 0.0) { if (this->eirModFPLRErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, format(" EIR Modifier curve (function of PLR) output is negative ({:.3T}).", eirModifierFuncPLR)); - ShowContinueError(state, format(" Negative value occurs using a Part Load Ratio of {:.2T}", PLFf)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\": EIR Modifier curve (function of PLR) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + EnergyPlus::format("{} \"{}\": EIR Modifier curve (function of PLR) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->eirModFPLRErrorIndex, eirModifierFuncPLR, eirModifierFuncPLR); @@ -3058,19 +3091,21 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirDefrost < 1.0) { if (this->eirDefrostFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, - format(" EIR defrost Modifier curve (function of Temperature) output is less than 1.0 ({:.3T}).", eirDefrost)); - ShowContinueError(state, format(" Negative value occurs using an outdoor air temperature of {:.2T}", oaTemp2)); + 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)); ShowContinueErrorTimeStamp(state, " Resetting curve output to 1.0 and continuing simulation."); } - ShowRecurringWarningErrorAtEnd(state, - 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, + 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); eirDefrost = 1.0; } } @@ -3101,20 +3136,22 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirAuxElecFuncTemp < 0.0) { if (this->eirAuxElecFTErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, - format(" Auxiliary EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirAuxElecFuncTemp)); - ShowContinueError(state, - format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", - waterTempforCurve, - oaTempforCurve)); + 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)); + ShowContinueError( + state, + EnergyPlus::format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", + waterTempforCurve, + oaTempforCurve)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - format("{} \"{}\": Auxiliary EIR Modifier curve (function of Temperatures) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + EnergyPlus::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); @@ -3128,19 +3165,21 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirAuxElecFuncPLR < 0.0) { if (this->eirAuxElecFPLRErrorIndex == 0) { - ShowSevereMessage(state, format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, - format(" Auxiliary EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirAuxElecFuncPLR)); - ShowContinueError(state, format(" Negative value occurs using a Part Load Ratio of {:.2T}.", partLoadRatio)); + 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}).", eirAuxElecFuncPLR)); + ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a Part Load Ratio of {:.2T}.", partLoadRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } - ShowRecurringWarningErrorAtEnd(state, - 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); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::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); eirAuxElecFuncPLR = 0.0; } @@ -3217,9 +3256,9 @@ void EIRFuelFiredHeatPump::sizeSrcSideASHP(EnergyPlusData &state) // fatal out just in case errorsFound = true; // LCOV_EXCL_LINE ShowSevereError(state, - format("Invalid condenser flow rate for EIR PLHP (name={}; entered value: {}", - this->name, - this->sourceSideDesignVolFlowRate)); // LCOV_EXCL_LINE + EnergyPlus::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 @@ -3271,7 +3310,7 @@ PlantComponent *EIRFuelFiredHeatPump::factory(EnergyPlusData &state, DataPlant:: } } - ShowFatalError(state, format("EIR Fuel-Fired Heat Pump factory: Error getting inputs for PLFFHP named: {}.", hp_name)); + ShowFatalError(state, EnergyPlus::format("EIR Fuel-Fired Heat Pump factory: Error getting inputs for PLFFHP named: {}.", hp_name)); return nullptr; // LCOV_EXCL_LINE } @@ -3297,7 +3336,7 @@ PlantComponent *HeatPumpAirToWater::factory( } } - ShowFatalError(state, format("Air To Water Heat Pump factory: Error getting inputs for AWHP named: {}.", hp_name)); + ShowFatalError(state, EnergyPlus::format("Air To Water Heat Pump factory: Error getting inputs for AWHP named: {}.", hp_name)); return nullptr; // LCOV_EXCL_LINE } @@ -3317,8 +3356,9 @@ void EIRFuelFiredHeatPump::pairUpCompanionCoils(EnergyPlusData &state) } if (potentialCompanionName == targetCompanionName) { if (thisCoilType == potentialCompanionType) { - ShowSevereError(state, - format("Invalid companion specification for EIR Plant Loop Fuel-Fired Heat Pump named \"{}\"", thisCoilName)); + ShowSevereError( + state, + EnergyPlus::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"); } @@ -3328,8 +3368,8 @@ void EIRFuelFiredHeatPump::pairUpCompanionCoils(EnergyPlusData &state) } if (thisHP.companionHeatPumpCoil == nullptr) { ShowSevereError(state, "Could not find matching companion heat pump coil."); - ShowContinueError(state, format("Base coil: {}", thisCoilName)); - ShowContinueError(state, format("Looking for companion coil named: {}", targetCompanionName)); + ShowContinueError(state, EnergyPlus::format("Base coil: {}", thisCoilName)); + ShowContinueError(state, EnergyPlus::format("Looking for companion coil named: {}", targetCompanionName)); ShowFatalError(state, "Simulation aborts due to previous severe error"); } } @@ -3426,7 +3466,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 = format("{}_SOURCE_SIDE_OUTLET_NODE", thisPLHP.name); + std::string sourceSideOutletNodeName = EnergyPlus::format("{}_SOURCE_SIDE_OUTLET_NODE", thisPLHP.name); // A5 auto compCoilFound = fields.find(companionCoilFieldTag); @@ -3440,8 +3480,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, format("{}{}=\"{}\",", RoutineName, cCurrentModuleObject, thisPLHP.name)); - ShowContinueError(state, format("Invalid Fuel Type = {}", tempRsrStr)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, cCurrentModuleObject, thisPLHP.name)); + ShowContinueError(state, EnergyPlus::format("Invalid Fuel Type = {}", tempRsrStr)); ShowContinueError(state, "Reset the Fuel Type to \"NaturalGas\"."); thisPLHP.fuelType = Constant::eFuel::NaturalGas; errorsFound = true; @@ -3523,7 +3563,8 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) thisPLHP.capFuncTempCurveIndex = Curve::GetCurveIndex(state, capFtName); if (thisPLHP.capFuncTempCurveIndex == 0) { - ShowSevereError(state, format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, capFtName)); + ShowSevereError(state, + EnergyPlus::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, capFtName)); errorsFound = true; } @@ -3532,14 +3573,16 @@ 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, format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, eirFtName)); + ShowSevereError(state, + EnergyPlus::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, format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, eirFplrName)); + ShowSevereError(state, + EnergyPlus::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, eirFplrName)); errorsFound = true; } @@ -3568,8 +3611,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, format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, eirDefrostCurveName)); + ShowSevereError(state, + EnergyPlus::format( + "Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, eirDefrostCurveName)); errorsFound = true; } } else { @@ -3586,9 +3630,10 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) if (thisPLHP.defrostType == DefrostType::Invalid) { thisPLHP.defrostType = DefrostType::OnDemand; // set to default thisPLHP.defrostOpTimeFrac = 0.0; - ShowWarningError(state, format("Invalid Defrost Control Type for EIR PLFFHP ({} name={})", cCurrentModuleObject, thisPLHP.name)); - ShowContinueError(state, - format("The Input Variable is reset to: {}", DefrostTypeNamesUC[static_cast(thisPLHP.defrostType)])); + 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)])); } } @@ -3637,8 +3682,9 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) std::string const cycRatioCurveName = Util::makeUPPER(crfCurveFound.value().get()); thisPLHP.cycRatioCurveIndex = Curve::GetCurveIndex(state, cycRatioCurveName); if (thisPLHP.cycRatioCurveIndex == 0) { - ShowSevereError(state, - format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {})", thisPLHP.name, cycRatioCurveName)); + ShowSevereError( + state, + EnergyPlus::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {})", thisPLHP.name, cycRatioCurveName)); errorsFound = true; } } else { @@ -3659,7 +3705,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, format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, auxEIRFTName)); + ShowSevereError( + state, EnergyPlus::format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, auxEIRFTName)); errorsFound = true; } } else { @@ -3672,7 +3719,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, format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, auxEIRFPLRName)); + ShowSevereError( + state, EnergyPlus::format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, auxEIRFPLRName)); errorsFound = true; } } else { @@ -3900,7 +3948,7 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) } else { thisAWHP.availSchedName = Util::makeUPPER(fields.at(format("availability_schedule_name_{}", modeKeyWord)).get()); if ((thisAWHP.availSched = Sched::GetSchedule(state, thisAWHP.availSchedName)) == nullptr) { - ShowSevereItemNotFound(state, eoh, format("availability_schedule_name_{}", modeKeyWord), thisAWHP.availSchedName); + ShowSevereItemNotFound(state, eoh, EnergyPlus::format("availability_schedule_name_{}", modeKeyWord), thisAWHP.availSchedName); errorsFound = true; } } @@ -3933,19 +3981,19 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) thisAWHP.sourceSideDesignInletTemp = 8.0; } thisAWHP.sourceSideDesignVolFlowRate = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, format("rated_air_flow_rate_in_{}_mode", modeKeyWord)); + fields, schemaProps, EnergyPlus::format("rated_air_flow_rate_in_{}_mode", modeKeyWord)); if (thisAWHP.sourceSideDesignVolFlowRate == DataSizing::AutoSize) { thisAWHP.sourceSideDesignVolFlowRateWasAutoSized = true; } auto ratedLeavingWaterTemperature = fields.find(format("rated_leaving_water_temperature_in_{}_mode", modeKeyWord)); if (ratedLeavingWaterTemperature != fields.end()) { thisAWHP.ratedLeavingWaterTemperature = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, format("rated_leaving_water_temperature_in_{}_mode", modeKeyWord)); + fields, schemaProps, EnergyPlus::format("rated_leaving_water_temperature_in_{}_mode", modeKeyWord)); } else { thisAWHP.ratedLeavingWaterTemperature = 40.0; } thisAWHP.loadSideDesignVolFlowRate = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, format("rated_water_flow_rate_in_{}_mode", modeKeyWord)); + fields, schemaProps, EnergyPlus::format("rated_water_flow_rate_in_{}_mode", modeKeyWord)); if (thisAWHP.loadSideDesignVolFlowRate == DataSizing::AutoSize) { thisAWHP.loadSideDesignVolFlowRateWasAutoSized = true; } @@ -3954,7 +4002,7 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) thisAWHP.minSourceTempLimit = -30.0; // default value } else { thisAWHP.minSourceTempLimit = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, format("minimum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); + fields, schemaProps, EnergyPlus::format("minimum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); } auto maxSourceTempLimit = fields.find(format("maximum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); if (maxSourceTempLimit != fields.end()) { @@ -3968,9 +4016,9 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) Curve::GetCurveIndex(state, Util::makeUPPER(minLeavingWaterTempCurveName.value().get())); if (thisAWHP.minSupplyWaterTempCurveIndex == 0) { ShowSevereError(state, - format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {})", - thisAWHP.name, - minLeavingWaterTempCurveName.value().get())); + EnergyPlus::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {})", + thisAWHP.name, + minLeavingWaterTempCurveName.value().get())); errorsFound = true; } } @@ -3980,14 +4028,14 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) Curve::GetCurveIndex(state, Util::makeUPPER(maxLeavingWaterTempCurveName.value().get())); if (thisAWHP.maxSupplyWaterTempCurveIndex == 0) { ShowSevereError(state, - format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {})", - thisAWHP.name, - maxLeavingWaterTempCurveName.value().get())); + EnergyPlus::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, format("sizing_factor_for_{}", modeKeyWord)); + thisAWHP.sizingFactor = state.dataInputProcessing->inputProcessor->getRealFieldValue( + fields, schemaProps, EnergyPlus::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()); @@ -4120,123 +4168,134 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) thisAWHP.calcQsource = classToInput.calcQsource; thisAWHP.calcSourceOutletTemp = classToInput.calcSourceOutletTemp; - thisAWHP.numSpeeds = - state.dataInputProcessing->inputProcessor->getRealFieldValue(fields, schemaProps, format("number_of_speeds_for_{}", modeKeyWord)); + thisAWHP.numSpeeds = state.dataInputProcessing->inputProcessor->getRealFieldValue( + fields, schemaProps, EnergyPlus::format("number_of_speeds_for_{}", modeKeyWord)); for (int i = 0; i < thisAWHP.numSpeeds; i++) { - auto capFtFieldName = format("normalized_{}_capacity_function_of_temperature_curve_name_at_speed_{}", modeKeyWord, i + 1); + auto capFtFieldName = + EnergyPlus::format("normalized_{}_capacity_function_of_temperature_curve_name_at_speed_{}", modeKeyWord, i + 1); if (fields.find(capFtFieldName) == fields.end()) { ShowSevereError(state, - format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", - i + 1, - thisAWHP.name, - capFtFieldName)); + EnergyPlus::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, format("rated_{}_capacity_at_speed_{}", modeKeyWord, i + 1)); + fields, schemaProps, EnergyPlus::format("rated_{}_capacity_at_speed_{}", modeKeyWord, i + 1)); if (i != thisAWHP.numSpeeds - 1 && thisAWHP.ratedCapacity[i] == DataSizing::AutoSize) { ShowSevereError(state, - format("cannot autosize capacity below maximum speed (name={}, field={})", - thisAWHP.name, - format("rated_{}_capacity_at_speed_{}", modeKeyWord, i + 1))); + EnergyPlus::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, format("rated_cop_for_{}_at_speed_{}", modeKeyWord, i + 1)); + fields, schemaProps, EnergyPlus::format("rated_cop_for_{}_at_speed_{}", modeKeyWord, i + 1)); thisAWHP.capFuncTempCurveIndex[i] = Curve::GetCurveIndex(state, capFtName); if (thisAWHP.capFuncTempCurveIndex[i] == 0) { - ShowSevereError( - state, format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, capFtName)); + ShowSevereError(state, + EnergyPlus::format( + "Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, capFtName)); errorsFound = true; } - auto eirFtFieldName = format("{}_energy_input_ratio_function_of_temperature_curve_name_at_speed_{}", modeKeyWord, i + 1); + auto eirFtFieldName = + EnergyPlus::format("{}_energy_input_ratio_function_of_temperature_curve_name_at_speed_{}", modeKeyWord, i + 1); if (fields.find(eirFtFieldName) == fields.end()) { ShowSevereError(state, - format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", - i + 1, - thisAWHP.name, - eirFtFieldName)); + EnergyPlus::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, format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFtName)); + ShowSevereError(state, + EnergyPlus::format( + "Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFtName)); errorsFound = true; } - auto eirFplrFieldName = format("{}_energy_input_ratio_function_of_plr_curve_name_at_speed_{}", modeKeyWord, i + 1); + auto eirFplrFieldName = EnergyPlus::format("{}_energy_input_ratio_function_of_plr_curve_name_at_speed_{}", modeKeyWord, i + 1); if (fields.find(eirFplrFieldName) == fields.end()) { ShowSevereError(state, - format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", - i + 1, - thisAWHP.name, - eirFplrFieldName)); + EnergyPlus::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, format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFplrName)); + ShowSevereError(state, + EnergyPlus::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", + thisAWHP.name, + eirFplrName)); errorsFound = true; } } if (thisAWHP.boosterOn) { thisAWHP.numSpeeds += 1; - auto capFtFieldName = format("normalized_{}_capacity_function_of_temperature_curve_name_in_booster_mode", modeKeyWord); + auto capFtFieldName = + EnergyPlus::format("normalized_{}_capacity_function_of_temperature_curve_name_in_booster_mode", modeKeyWord); if (fields.find(capFtFieldName) == fields.end()) { ShowSevereError(state, - format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", - thisAWHP.name, - capFtFieldName)); + EnergyPlus::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, format("rated_{}_capacity_in_booster_mode", modeKeyWord)); + fields, schemaProps, EnergyPlus::format("rated_{}_capacity_in_booster_mode", modeKeyWord)); thisAWHP.ratedCOP[speedLevelBooster] = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, format("rated_{}_cop_in_booster_mode", modeKeyWord)); + fields, schemaProps, EnergyPlus::format("rated_{}_cop_in_booster_mode", modeKeyWord)); thisAWHP.capFuncTempCurveIndex[speedLevelBooster] = Curve::GetCurveIndex(state, capFtName); if (thisAWHP.capFuncTempCurveIndex[speedLevelBooster] == 0) { - ShowSevereError( - state, format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, capFtName)); + ShowSevereError(state, + EnergyPlus::format( + "Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, capFtName)); errorsFound = true; } - auto eirFtFieldName = format("{}_energy_input_ratio_function_of_temperature_curve_name_in_booster_mode", modeKeyWord); + auto eirFtFieldName = EnergyPlus::format("{}_energy_input_ratio_function_of_temperature_curve_name_in_booster_mode", modeKeyWord); if (fields.find(eirFtFieldName) == fields.end()) { ShowSevereError(state, - format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", - thisAWHP.name, - eirFtFieldName)); + EnergyPlus::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, format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFtName)); + ShowSevereError(state, + EnergyPlus::format( + "Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFtName)); errorsFound = true; } - auto eirFplrFieldName = format("{}_energy_input_ratio_function_of_plr_curve_name_in_booster_mode", modeKeyWord); + auto eirFplrFieldName = EnergyPlus::format("{}_energy_input_ratio_function_of_plr_curve_name_in_booster_mode", modeKeyWord); if (fields.find(eirFplrFieldName) == fields.end()) { ShowSevereError(state, - format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", - thisAWHP.name, - eirFplrFieldName)); + EnergyPlus::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, format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFplrName)); + ShowSevereError(state, + EnergyPlus::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", + thisAWHP.name, + eirFplrName)); errorsFound = true; } } @@ -4421,18 +4480,18 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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, - format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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; } @@ -4444,18 +4503,18 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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, - format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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; } @@ -4463,10 +4522,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, - format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + EnergyPlus::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 { @@ -4478,7 +4537,7 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) } if (errFlag) { - ShowFatalError(state, format("{}: Program terminated due to previous condition(s).", routineName)); + ShowFatalError(state, EnergyPlus::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 7af70f0e002..b025bdbe24c 100644 --- a/src/EnergyPlus/PlantPipingSystemsManager.cc +++ b/src/EnergyPlus/PlantPipingSystemsManager.cc @@ -157,7 +157,7 @@ namespace PlantPipingSystemsManager { } } // If we didn't find it, fatal - ShowFatalError(state, format("PipeCircuitInfoFactory: Error getting inputs for circuit named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("PipeCircuitInfoFactory: Error getting inputs for circuit named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -443,7 +443,7 @@ namespace PlantPipingSystemsManager { // Report errors that are purely input problems if (ErrorsFound) { - ShowFatalError(state, format("{}: Preceding input errors cause program termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}: Preceding input errors cause program termination.", RoutineName)); } // Setup output variables @@ -483,14 +483,16 @@ namespace PlantPipingSystemsManager { for (auto const &thisSegment : thisCircuit->pipeSegments) { if ((thisSegment->PipeLocation.X > thisDomain.Extents.xMax) || (thisSegment->PipeLocation.X < 0.0) || (thisSegment->PipeLocation.Y > thisDomain.Extents.yMax) || (thisSegment->PipeLocation.Y < 0.0)) { - ShowSevereError(state, - format("PipingSystems::{}: A pipe was outside of the domain extents after performing corrections for " + ShowSevereError( + state, + EnergyPlus::format("PipingSystems::{}: A pipe was outside of the domain extents after performing corrections for " "basement or burial depth.", RoutineName)); - ShowContinueError(state, format("Pipe segment name:{}", thisSegment->Name)); - ShowContinueError( - state, - format("Corrected pipe location: ( x,y )=( {:.2T},{:.2T} )", thisSegment->PipeLocation.X, thisSegment->PipeLocation.Y)); + ShowContinueError(state, EnergyPlus::format("Pipe segment name:{}", thisSegment->Name)); + ShowContinueError(state, + EnergyPlus::format("Corrected pipe location: ( x,y )=( {:.2T},{:.2T} )", + thisSegment->PipeLocation.X, + thisSegment->PipeLocation.Y)); } } // segment loop } // circuit loop @@ -499,7 +501,7 @@ namespace PlantPipingSystemsManager { // If we encountered any other errors that we couldn't handle separately than stop now if (ErrorsFound) { - ShowFatalError(state, format("{}:{}: Errors found in input.", RoutineName, ObjName_ug_GeneralDomain)); + ShowFatalError(state, EnergyPlus::format("{}:{}: Errors found in input.", RoutineName, ObjName_ug_GeneralDomain)); } } @@ -558,8 +560,8 @@ namespace PlantPipingSystemsManager { } else if (meshDistribution == "SYMMETRICGEOMETRIC") { thisDomain.Mesh.X.thisMeshDistribution = MeshDistribution::SymmetricGeometric; if (mod(thisDomain.Mesh.X.RegionMeshCount, 2) != 0) { - ShowWarningError(state, format("PipingSystems:{}: Invalid mesh type-count combination.", routineName)); - ShowContinueError(state, format("Instance:{}={}", ObjName_ug_GeneralDomain, thisDomain.Name)); + ShowWarningError(state, EnergyPlus::format("PipingSystems:{}: Invalid mesh type-count combination.", routineName)); + ShowContinueError(state, EnergyPlus::format("Instance:{}={}", ObjName_ug_GeneralDomain, thisDomain.Name)); ShowContinueError(state, "An ODD-valued X mesh count was found in the input for symmetric geometric configuration."); ShowContinueError(state, "This is invalid, mesh count incremented UP by one to next EVEN value."); ++thisDomain.Mesh.X.RegionMeshCount; @@ -588,8 +590,8 @@ namespace PlantPipingSystemsManager { } else if (meshDistribution == "SYMMETRICGEOMETRIC") { thisDomain.Mesh.Y.thisMeshDistribution = MeshDistribution::SymmetricGeometric; if (mod(thisDomain.Mesh.Y.RegionMeshCount, 2) != 0) { - ShowWarningError(state, format("PipingSystems:{}: Invalid mesh type-count combination.", routineName)); - ShowContinueError(state, format("Instance:{}={}", ObjName_ug_GeneralDomain, thisDomain.Name)); + ShowWarningError(state, EnergyPlus::format("PipingSystems:{}: Invalid mesh type-count combination.", routineName)); + ShowContinueError(state, EnergyPlus::format("Instance:{}={}", ObjName_ug_GeneralDomain, thisDomain.Name)); ShowContinueError(state, "An ODD-valued Y mesh count was found in the input for symmetric geometric configuration."); ShowContinueError(state, "This is invalid, mesh count incremented UP by one to next EVEN value."); ++thisDomain.Mesh.Y.RegionMeshCount; @@ -618,8 +620,8 @@ namespace PlantPipingSystemsManager { } else if (meshDistribution == "SYMMETRICGEOMETRIC") { thisDomain.Mesh.Z.thisMeshDistribution = MeshDistribution::SymmetricGeometric; if (mod(thisDomain.Mesh.Z.RegionMeshCount, 2) != 0) { - ShowWarningError(state, format("PipingSystems:{}: Invalid mesh type-count combination.", routineName)); - ShowContinueError(state, format("Instance:{}={}", ObjName_ug_GeneralDomain, thisDomain.Name)); + ShowWarningError(state, EnergyPlus::format("PipingSystems:{}: Invalid mesh type-count combination.", routineName)); + ShowContinueError(state, EnergyPlus::format("Instance:{}={}", ObjName_ug_GeneralDomain, thisDomain.Name)); ShowContinueError(state, "An ODD-valued Z mesh count was found in the input for symmetric geometric configuration."); ShowContinueError(state, "This is invalid, mesh count incremented UP by one to next EVEN value."); ++thisDomain.Mesh.Z.RegionMeshCount; @@ -667,8 +669,9 @@ namespace PlantPipingSystemsManager { if (state.dataIPShortCut->lNumericFieldBlanks(15) || state.dataIPShortCut->lNumericFieldBlanks(16) || state.dataIPShortCut->lAlphaFieldBlanks(8) || state.dataIPShortCut->lAlphaFieldBlanks(9) || state.dataIPShortCut->lAlphaFieldBlanks(10)) { - ShowSevereError(state, - format("Erroneous basement inputs for {}={}", ObjName_ug_GeneralDomain, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("Erroneous basement inputs for {}={}", ObjName_ug_GeneralDomain, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Object specified to have a basement, while at least one basement input was left blank."); ErrorsFound = true; } @@ -960,8 +963,8 @@ namespace PlantPipingSystemsManager { } else if (thisDomain.HorizIns == HorizInsulation::Perimeter) { // Horizontal insulation perimeter width if (thisDomain.HorizInsWidth <= 0.0) { - ShowSevereError(state, format("Invalid {}", s_ipsc->cNumericFieldNames(10))); - ShowContinueError(state, format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {}", s_ipsc->cNumericFieldNames(10))); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } } @@ -998,8 +1001,8 @@ namespace PlantPipingSystemsManager { // vertical insulation depth if (thisDomain.VertInsDepth > thisDomain.Extents.yMax || thisDomain.VertInsDepth <= 0.0) { - ShowSevereError(state, format("Invalid {}", s_ipsc->cNumericFieldNames(11))); - ShowContinueError(state, format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {}", s_ipsc->cNumericFieldNames(11))); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } } @@ -1012,8 +1015,8 @@ namespace PlantPipingSystemsManager { } else if (Util::SameString(s_ipsc->cAlphaArgs(12), "HOURLY")) { thisDomain.SimHourlyFlag = true; } else { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); - ShowContinueError(state, format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } #endif // GET_OUT @@ -1069,10 +1072,10 @@ namespace PlantPipingSystemsManager { if (thisDomain.HorizIns == HorizInsulation::Perimeter && ThisArea > 0.0) { if (2 * (thisDomain.HorizInsWidth + thisDomain.VertInsThickness) > thisDomain.SlabWidth || 2 * (thisDomain.HorizInsWidth + thisDomain.VertInsThickness) > thisDomain.SlabLength) { - ShowContinueError(state, format("{}: Perimeter insulation width is too large.", routineName)); + 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, format("Found in: {}", thisDomain.Name)); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); thisDomain.HorizIns = HorizInsulation::Full; } } @@ -1206,7 +1209,8 @@ 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, format("Erroneous basement inputs for {}={}", ObjName_ZoneCoupled_Basement, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Erroneous basement inputs for {}={}", ObjName_ZoneCoupled_Basement, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "At least one basement input was left blank."); ErrorsFound = true; } @@ -1215,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, format("Invalid {}", s_ipsc->cNumericFieldNames(CurIndex))); - ShowContinueError(state, format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {}", s_ipsc->cNumericFieldNames(CurIndex))); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } @@ -1355,8 +1359,8 @@ namespace PlantPipingSystemsManager { } else if (thisDomain.HorizIns == HorizInsulation::Perimeter) { // Horizontal insulation perimeter width if (thisDomain.HorizInsWidth <= 0.0) { - ShowSevereError(state, format("Invalid {}", s_ipsc->cNumericFieldNames(10))); - ShowContinueError(state, format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {}", s_ipsc->cNumericFieldNames(10))); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } } @@ -1377,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, format("Invalid {}", s_ipsc->cNumericFieldNames(12))); - ShowContinueError(state, format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {}", s_ipsc->cNumericFieldNames(12))); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } thisDomain.VertInsMaterialNum = Material::GetMaterialNum(state, s_ipsc->cAlphaArgs(10)); @@ -1406,8 +1410,8 @@ namespace PlantPipingSystemsManager { } else if (Util::SameString(s_ipsc->cAlphaArgs(11), "HOURLY")) { thisDomain.SimHourlyFlag = true; } else { - ShowSevereError(state, format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); - ShowContinueError(state, format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } #endif // GET_OUT @@ -1441,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, format("{}: Perimeter insulation width is too large.", routineName)); + 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, format("Found in: {}", thisDomain.Name)); + ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); thisDomain.HorizIns = HorizInsulation::Full; } } @@ -1476,10 +1480,10 @@ namespace PlantPipingSystemsManager { std::string const &ObjectName) { - ShowSevereError(state, format("Invalid {}={} was found in: {}", FieldName, UserInputField, ObjectName)); + ShowSevereError(state, EnergyPlus::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, format(" {} or {}", ObjName_ZoneCoupled_Slab, ObjName_ZoneCoupled_Basement)); + ShowContinueError(state, EnergyPlus::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."); } @@ -1672,11 +1676,12 @@ namespace PlantPipingSystemsManager { // Issue a severe if Inner >= Outer diameter if (thisCircuit.PipeSize.InnerDia >= thisCircuit.PipeSize.OuterDia) { - ShowSevereError(state, format("{}: {}=\"{}\" has invalid pipe diameters.", routineName, ObjName_HorizTrench, s_ipsc->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("{}: {}=\"{}\" has invalid pipe diameters.", routineName, ObjName_HorizTrench, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("Outer diameter [{:.3T}] must be greater than inner diameter [{:.3T}].", - thisCircuit.PipeSize.OuterDia, - thisCircuit.PipeSize.InnerDia)); + EnergyPlus::format("Outer diameter [{:.3T}] must be greater than inner diameter [{:.3T}].", + thisCircuit.PipeSize.OuterDia, + thisCircuit.PipeSize.InnerDia)); ErrorsFound = true; } @@ -1735,7 +1740,8 @@ namespace PlantPipingSystemsManager { } } // If we didn't find it, fatal - ShowFatalError(state, format("PipeSegmentInfoFactory: Error getting inputs for segment named: {}", segmentName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("PipeSegmentInfoFactory: Error getting inputs for segment named: {}", segmentName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -1753,7 +1759,8 @@ namespace PlantPipingSystemsManager { } } // If we didn't find it, fatal - ShowFatalError(state, format("PipeCircuitInfoFactory: Error getting inputs for circuit named: {}", circuitName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("PipeCircuitInfoFactory: Error getting inputs for circuit named: {}", circuitName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -1892,7 +1899,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 = format("HorizontalTrenchDomain{:4}", HorizontalGHXCtr); + thisDomain.Name = EnergyPlus::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); @@ -1938,7 +1945,7 @@ namespace PlantPipingSystemsManager { //******* Then we'll do the segments *******! for (int ThisCircuitPipeSegmentCounter = 1; ThisCircuitPipeSegmentCounter <= NumPipeSegments; ++ThisCircuitPipeSegmentCounter) { Segment segment; - segment.Name = format("HorizontalTrenchCircuit{}Segment{}", HorizontalGHXCtr, ThisCircuitPipeSegmentCounter); + segment.Name = EnergyPlus::format("HorizontalTrenchCircuit{}Segment{}", HorizontalGHXCtr, ThisCircuitPipeSegmentCounter); segment.IsActuallyPartOfAHorizontalTrench = true; segment.PipeLocation = PointF(ThisCircuitPipeSegmentCounter * thisInterPipeSpacing, thisBurialDepth); @@ -2152,7 +2159,7 @@ namespace PlantPipingSystemsManager { bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(state, thisCircuit->Name, TypeToLookFor, thisCircuit->plantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowFatalError(state, format("PipingSystems:{}: Program terminated due to previous condition(s).", RoutineName)); + ShowFatalError(state, EnergyPlus::format("PipingSystems:{}: Program terminated due to previous condition(s).", RoutineName)); } // Once we find ourselves on the plant loop, we can do other things @@ -2169,7 +2176,7 @@ namespace PlantPipingSystemsManager { for (auto const &thisDomainCircuit : this->circuits) { for (auto const &segment : thisDomainCircuit->pipeSegments) { if (!segment->PipeCellCoordinatesSet) { - ShowSevereError(state, format("PipingSystems:{}:Pipe segment index not set.", RoutineName)); + ShowSevereError(state, EnergyPlus::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"); @@ -2255,7 +2262,9 @@ namespace PlantPipingSystemsManager { // RE-ENGINEERED na ShowSevereError( - state, format("{}:{}=\"{}\", invalid {}=\"{}\", Condition: {}", RoutineName, ObjectName, InstanceName, FieldName, FieldEntry, Condition)); + state, + EnergyPlus::format( + "{}:{}=\"{}\", invalid {}=\"{}\", Condition: {}", RoutineName, ObjectName, InstanceName, FieldName, FieldEntry, Condition)); ErrorsFound = true; } @@ -2277,7 +2286,8 @@ namespace PlantPipingSystemsManager { ShowSevereError( state, - format(R"({}:{}="{}", invalid {}="{:.3T}", Condition: {})", RoutineName, ObjectName, InstanceName, FieldName, FieldEntry, Condition)); + EnergyPlus::format( + R"({}:{}="{}", invalid {}="{:.3T}", Condition: {})", RoutineName, ObjectName, InstanceName, FieldName, FieldEntry, Condition)); ErrorsFound = true; } @@ -3082,8 +3092,8 @@ namespace PlantPipingSystemsManager { // check to make sure this location is valid if (CellLeft < 0.0 || CellRight > DirExtentMax) { - ShowSevereError(state, format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); - ShowContinueError(state, format("Occurs during mesh development for domain={}", this->Name)); + ShowSevereError(state, EnergyPlus::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); + ShowContinueError(state, EnergyPlus::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."); } @@ -3096,8 +3106,8 @@ namespace PlantPipingSystemsManager { if (IsInRange_BasementModel(CellLeft, thisPartitionRegionSubIndex.Min, thisPartitionRegionSubIndex.Max) || IsInRangeReal(CellRight, thisPartitionRegionSubIndex.Min, thisPartitionRegionSubIndex.Max)) { - ShowSevereError(state, format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); - ShowContinueError(state, format("Occurs during mesh development for domain={}", this->Name)); + ShowSevereError(state, EnergyPlus::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); + ShowContinueError(state, EnergyPlus::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."); @@ -3109,8 +3119,8 @@ namespace PlantPipingSystemsManager { if (IsInRangeReal(CellLeft, thisPartitionRegionSubIndex.Min, thisPartitionRegionSubIndex.Max) || IsInRangeReal(CellRight, thisPartitionRegionSubIndex.Min, thisPartitionRegionSubIndex.Max)) { - ShowSevereError(state, format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); - ShowContinueError(state, format("Occurs during mesh development for domain={}", this->Name)); + ShowSevereError(state, EnergyPlus::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); + ShowContinueError(state, EnergyPlus::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."); @@ -5860,17 +5870,20 @@ namespace PlantPipingSystemsManager { bool OutOfRange = this->CheckForOutOfRangeTemps(); if (OutOfRange) { if (this->HasZoneCoupledSlab) { - ShowSevereError(state, format("Site:GroundDomain:Slab{}: Out of range temperatures detected in the ground domain.", RoutineName)); + ShowSevereError( + state, EnergyPlus::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, format("Site:GroundDomain:Basement{}: Out of range temperatures detected in the ground domain.", RoutineName)); + ShowSevereError( + state, EnergyPlus::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, format("PipingSystems:{}: Out of range temperatures detected in piping system simulation.", RoutineName)); + ShowSevereError(state, + EnergyPlus::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/PlantPressureSystem.cc b/src/EnergyPlus/PlantPressureSystem.cc index 50d0649e550..7d13acedc3e 100644 --- a/src/EnergyPlus/PlantPressureSystem.cc +++ b/src/EnergyPlus/PlantPressureSystem.cc @@ -259,7 +259,7 @@ void InitPressureDrop(EnergyPlusData &state, int const LoopNum, bool const First state.dataPlantPressureSys->FullParallelBranchSetFound[static_cast(LoopSideNum)] = true; } else { // we aren't ok - ShowSevereError(state, format("Pressure drop component configuration error detected on loop: {}", loop.Name)); + ShowSevereError(state, EnergyPlus::format("Pressure drop component configuration error detected on loop: {}", loop.Name)); ShowContinueError(state, "Pressure drop components must be on ALL or NONE of the parallel branches."); ShowContinueError(state, "Partial distribution is not allowed."); ErrorsFound = true; @@ -276,7 +276,7 @@ void InitPressureDrop(EnergyPlusData &state, int const LoopNum, bool const First SeriesPressureComponentFound) { // we are fine, either way we will always have a path with at least one pressure component hit } else { - ShowSevereError(state, format("Pressure drop component configuration error detected on loop: {}", loop.Name)); + ShowSevereError(state, EnergyPlus::format("Pressure drop component configuration error detected on loop: {}", loop.Name)); ShowContinueError(state, "The loop has at least one fluid path which does not encounter a pressure component."); ShowContinueError(state, "Either use at least one serial component for pressure drop OR all possible parallel paths"); ShowContinueError(state, "must be pressure drop components."); @@ -292,13 +292,13 @@ void InitPressureDrop(EnergyPlusData &state, int const LoopNum, bool const First // Also issue one time warning if there is a mismatch between plant loop simulation type and whether objects were entered if (loop.HasPressureComponents && (loop.PressureSimType == DataPlant::PressSimType::NoPressure)) { // Then we found pressure components on the branches, but the plant loop said it didn't want to do pressure simulation - ShowWarningError(state, format("Error for pressure simulation on plant loop: {}", loop.Name)); + ShowWarningError(state, EnergyPlus::format("Error for pressure simulation on plant loop: {}", loop.Name)); ShowContinueError(state, "Plant loop contains pressure simulation components on the branches,"); ShowContinueError(state, " yet in the PlantLoop object, there is no pressure simulation specified."); ShowContinueError(state, "Simulation continues, ignoring pressure simulation data."); } else if ((!loop.HasPressureComponents) && (loop.PressureSimType != DataPlant::PressSimType::NoPressure)) { // Then we don't have any pressure components on the branches, yet the plant loop wants to do some sort of pressure simulation - ShowWarningError(state, format("Error for pressure simulation on plant loop: {}", loop.Name)); + ShowWarningError(state, EnergyPlus::format("Error for pressure simulation on plant loop: {}", loop.Name)); ShowContinueError(state, "Plant loop is requesting a pressure simulation,"); ShowContinueError(state, " yet there are no pressure simulation components detected on any of the branches in that loop."); ShowContinueError(state, "Simulation continues, ignoring pressure simulation data."); @@ -340,7 +340,7 @@ void InitPressureDrop(EnergyPlusData &state, int const LoopNum, bool const First if (loop.CommonPipeType != DataPlant::CommonPipeType::No) { // There is a common pipe! if (!state.dataPlantPressureSys->CommonPipeErrorEncountered) { - ShowSevereError(state, format("Invalid pressure simulation configuration for Plant Loop={}", loop.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid pressure simulation configuration for Plant Loop={}", loop.Name)); ShowContinueError(state, "Currently pressure simulations cannot be performed for loops with common pipes."); ShowContinueError(state, "To repair, either remove the common pipe simulation, or remove the pressure simulation."); ShowContinueError(state, "The simulation will continue, but the pump power is not updated with pressure drop data."); @@ -420,8 +420,8 @@ void BranchPressureDrop(EnergyPlusData &state, ++state.dataPlantPressureSys->ErrorCounter; if (state.dataPlantPressureSys->ErrorCounter == 1) { ShowSevereError(state, "Plant pressure simulation encountered a branch which contains invalid branch pressure curve type."); - ShowContinueError(state, - format("Occurs for branch: {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Name)); + ShowContinueError( + state, EnergyPlus::format("Occurs for branch: {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Name)); ShowContinueError(state, "This error will be issued only once, although other branches may encounter the same problem"); ShowContinueError(state, "For now, pressure drop on this branch will be set to zero."); ShowContinueError(state, "Verify all pressure inputs and pressure drop output variables to ensure proper simulation"); @@ -672,15 +672,16 @@ void DistributePressureOnBranch(EnergyPlusData &state, state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Comp(NumCompsOnBranch).Type)]) { PumpFound = true; if (TempBranchPressureDrop != 0.0) { - ShowSevereError(state, format("Error in plant pressure simulation for plant loop: {}", state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowSevereError(state, + EnergyPlus::format("Error in plant pressure simulation for plant loop: {}", state.dataPlnt->PlantLoop(LoopNum).Name)); if (LoopSideNum == DataPlant::LoopSideLocation::Demand) { - ShowContinueError( - state, - format("Occurs for demand side, branch: {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs for demand side, branch: {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Name)); } else if (LoopSideNum == DataPlant::LoopSideLocation::Supply) { - ShowContinueError( - state, - format("Occurs for supply side, branch: {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Name)); + ShowContinueError(state, + EnergyPlus::format("Occurs for supply side, branch: {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Name)); } ShowContinueError(state, "Branch contains only a single pump component, yet also a pressure drop component."); ShowContinueError(state, "Either add a second component to this branch after the pump, or move pressure drop data."); @@ -881,7 +882,7 @@ Real64 ResolveLoopFlowVsPressure(EnergyPlusData &state, ++state.dataPlantPressureSys->ZeroKWarningCounter; if (state.dataPlantPressureSys->ZeroKWarningCounter == 1) { ShowWarningError(state, "Pump pressure-flow resolution attempted, but invalid loop conditions encountered."); - ShowContinueError(state, format("Loop being calculated: {}", state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError(state, EnergyPlus::format("Loop being calculated: {}", state.dataPlnt->PlantLoop(LoopNum).Name)); ShowContinueError(state, "An invalid pressure/flow condition existed which resulted in the approximation of"); ShowContinueError(state, "the pressure coefficient K to be zero. The pressure simulation will use the requested (design)"); ShowContinueError(state, "pump flow in order to proceed with the simulation. This warning is only issued once."); @@ -950,7 +951,7 @@ Real64 ResolveLoopFlowVsPressure(EnergyPlusData &state, ++state.dataPlantPressureSys->MaxIterWarningCounter; if (state.dataPlantPressureSys->MaxIterWarningCounter == 1) { ShowWarningError(state, "Pump pressure-flow resolution attempted, but iteration loop did not converge."); - ShowContinueError(state, format("Loop being calculated: {}", state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError(state, EnergyPlus::format("Loop being calculated: {}", state.dataPlnt->PlantLoop(LoopNum).Name)); ShowContinueError(state, "A mismatch between the pump curve entered and the pressure drop components"); ShowContinueError(state, "on the loop may be the cause. The pressure simulation will use the requested (design)"); ShowContinueError(state, "pump flow in order to proceed with the simulation. This warning is only issued once."); diff --git a/src/EnergyPlus/PlantUtilities.cc b/src/EnergyPlus/PlantUtilities.cc index 9d07365f90f..1cb86a97154 100644 --- a/src/EnergyPlus/PlantUtilities.cc +++ b/src/EnergyPlus/PlantUtilities.cc @@ -140,8 +140,8 @@ void SetComponentFlowRate(EnergyPlusData &state, if (plantLoc.loopNum == 0) { // protect from hard crash below if (InletNode > 0) { ShowSevereError(state, - format("SetComponentFlowRate: trapped plant loop index = 0, check component with inlet node named={}", - state.dataLoopNodes->NodeID(InletNode))); + EnergyPlus::format("SetComponentFlowRate: trapped plant loop index = 0, check component with inlet node named={}", + state.dataLoopNodes->NodeID(InletNode))); } else { ShowSevereError(state, "SetComponentFlowRate: trapped plant loop node id = 0"); } @@ -176,10 +176,12 @@ void SetComponentFlowRate(EnergyPlusData &state, if (!state.dataGlobal->SysSizingCalc && state.dataPlnt->PlantFirstSizesOkayToFinalize) { // throw error for developers, need to change a component model to set hardware limits on inlet if (!state.dataLoopNodes->Node(InletNode).plantNodeErrorMsgIssued) { - ShowSevereError(state, - format("SetComponentFlowRate: check component model implementation for component with inlet node named={}", + ShowSevereError( + state, + EnergyPlus::format("SetComponentFlowRate: check component model implementation for component with inlet node named={}", state.dataLoopNodes->NodeID(InletNode))); - ShowContinueError(state, format("Inlet node MassFlowRatMax = {:.8R}", state.dataLoopNodes->Node(InletNode).MassFlowRateMax)); + ShowContinueError(state, + EnergyPlus::format("Inlet node MassFlowRatMax = {:.8R}", state.dataLoopNodes->Node(InletNode).MassFlowRateMax)); state.dataLoopNodes->Node(InletNode).plantNodeErrorMsgIssued = true; } } @@ -390,14 +392,14 @@ void SetActuatedBranchFlowRate(EnergyPlusData &state, (a_node.MassFlowRateMinAvail - CompFlow > DataBranchAirLoopPlant::MassFlowTolerance)) { ShowSevereError(state, "SetActuatedBranchFlowRate: Flow rate is out of range"); // DEBUG error...should never get here ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("Component flow rate [kg/s] = {:.8R}", CompFlow)); - ShowContinueError(state, format("Node maximum flow rate available [kg/s] = {:.8R}", a_node.MassFlowRateMaxAvail)); - ShowContinueError(state, format("Node minimum flow rate available [kg/s] = {:.8R}", a_node.MassFlowRateMinAvail)); + ShowContinueError(state, EnergyPlus::format("Component flow rate [kg/s] = {:.8R}", CompFlow)); + ShowContinueError(state, EnergyPlus::format("Node maximum flow rate available [kg/s] = {:.8R}", a_node.MassFlowRateMaxAvail)); + ShowContinueError(state, EnergyPlus::format("Node minimum flow rate available [kg/s] = {:.8R}", a_node.MassFlowRateMinAvail)); } } else { ShowFatalError(state, - format("SetActuatedBranchFlowRate: Flowlock out of range, value={}", - loop_side.FlowLock)); // DEBUG error...should never get here LCOV_EXCL_LINE + EnergyPlus::format("SetActuatedBranchFlowRate: Flowlock out of range, value={}", + loop_side.FlowLock)); // DEBUG error...should never get here LCOV_EXCL_LINE } Real64 const a_node_MasFlowRate(a_node.MassFlowRate); @@ -555,16 +557,20 @@ void CheckPlantMixerSplitterConsistency(EnergyPlusData &state, if (state.dataPlnt->PlantLoop(LoopNum).MFErrIndex1 == 0) { ShowSevereMessage(state, "Plant flows do not resolve -- splitter inlet flow does not match mixer outlet flow "); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("PlantLoop name= {}", state.dataPlnt->PlantLoop(LoopNum).Name)); - ShowContinueError(state, - format("Plant Connector:Mixer name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Mixer.Name)); - ShowContinueError( - state, format("Mixer outlet mass flow rate= {:.6R} {{kg/s}}", state.dataLoopNodes->Node(MixerOutletNode).MassFlowRate)); + ShowContinueError(state, EnergyPlus::format("PlantLoop name= {}", state.dataPlnt->PlantLoop(LoopNum).Name)); ShowContinueError( - state, format("Plant Connector:Splitter name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Splitter.Name)); + state, + EnergyPlus::format("Plant Connector:Mixer name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Mixer.Name)); ShowContinueError( - state, format("Splitter inlet mass flow rate= {:.6R} {{kg/s}}", state.dataLoopNodes->Node(SplitterInletNode).MassFlowRate)); - ShowContinueError(state, format("Difference in two mass flow rates= {:.6R} {{kg/s}}", AbsDifference)); + state, + EnergyPlus::format("Mixer outlet mass flow rate= {:.6R} {{kg/s}}", state.dataLoopNodes->Node(MixerOutletNode).MassFlowRate)); + ShowContinueError(state, + EnergyPlus::format("Plant Connector:Splitter name= {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Splitter.Name)); + ShowContinueError(state, + EnergyPlus::format("Splitter inlet mass flow rate= {:.6R} {{kg/s}}", + state.dataLoopNodes->Node(SplitterInletNode).MassFlowRate)); + ShowContinueError(state, EnergyPlus::format("Difference in two mass flow rates= {:.6R} {{kg/s}}", AbsDifference)); } ShowRecurringSevereErrorAtEnd(state, "Plant Flows (Loop=" + state.dataPlnt->PlantLoop(LoopNum).Name + @@ -578,16 +584,20 @@ void CheckPlantMixerSplitterConsistency(EnergyPlusData &state, if (AbsDifference > DataBranchAirLoopPlant::MassFlowTolerance * 10.0) { ShowSevereError(state, "Plant flows do not resolve -- splitter inlet flow does not match mixer outlet flow "); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("PlantLoop name= {}", state.dataPlnt->PlantLoop(LoopNum).Name)); - ShowContinueError(state, - format("Plant Connector:Mixer name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Mixer.Name)); - ShowContinueError( - state, format("Mixer outlet mass flow rate= {:.6R} {{kg/s}}", state.dataLoopNodes->Node(MixerOutletNode).MassFlowRate)); + ShowContinueError(state, EnergyPlus::format("PlantLoop name= {}", state.dataPlnt->PlantLoop(LoopNum).Name)); ShowContinueError( - state, format("Plant Connector:Splitter name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Splitter.Name)); + state, + EnergyPlus::format("Plant Connector:Mixer name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Mixer.Name)); ShowContinueError( - state, format("Splitter inlet mass flow rate= {:.6R} {{kg/s}}", state.dataLoopNodes->Node(SplitterInletNode).MassFlowRate)); - ShowContinueError(state, format("Difference in two mass flow rates= {:.6R} {{kg/s}}", AbsDifference)); + state, + EnergyPlus::format("Mixer outlet mass flow rate= {:.6R} {{kg/s}}", state.dataLoopNodes->Node(MixerOutletNode).MassFlowRate)); + ShowContinueError(state, + EnergyPlus::format("Plant Connector:Splitter name= {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Splitter.Name)); + ShowContinueError(state, + EnergyPlus::format("Splitter inlet mass flow rate= {:.6R} {{kg/s}}", + state.dataLoopNodes->Node(SplitterInletNode).MassFlowRate)); + ShowContinueError(state, EnergyPlus::format("Difference in two mass flow rates= {:.6R} {{kg/s}}", AbsDifference)); ShowFatalError(state, "CheckPlantMixerSplitterConsistency: Simulation terminated because of problems in plant flow resolver"); } } @@ -610,15 +620,18 @@ void CheckPlantMixerSplitterConsistency(EnergyPlusData &state, if (state.dataPlnt->PlantLoop(LoopNum).MFErrIndex2 == 0) { ShowSevereMessage(state, "Plant flows do not resolve -- splitter inlet flow does not match branch outlet flows"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("PlantLoop name= {}", state.dataPlnt->PlantLoop(LoopNum).Name)); - ShowContinueError(state, - format("Plant Connector:Mixer name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Mixer.Name)); - ShowContinueError(state, format("Sum of Branch outlet mass flow rates= {:.6R} {{kg/s}}", SumOutletFlow)); - ShowContinueError( - state, format("Plant Connector:Splitter name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Splitter.Name)); + ShowContinueError(state, EnergyPlus::format("PlantLoop name= {}", state.dataPlnt->PlantLoop(LoopNum).Name)); ShowContinueError( - state, format("Splitter inlet mass flow rate= {:.6R} {{kg/s}}", state.dataLoopNodes->Node(SplitterInletNode).MassFlowRate)); - ShowContinueError(state, format("Difference in two mass flow rates= {:.6R} {{kg/s}}", AbsDifference)); + state, + EnergyPlus::format("Plant Connector:Mixer name= {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Mixer.Name)); + ShowContinueError(state, EnergyPlus::format("Sum of Branch outlet mass flow rates= {:.6R} {{kg/s}}", SumOutletFlow)); + ShowContinueError(state, + EnergyPlus::format("Plant Connector:Splitter name= {}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Splitter.Name)); + ShowContinueError(state, + EnergyPlus::format("Splitter inlet mass flow rate= {:.6R} {{kg/s}}", + state.dataLoopNodes->Node(SplitterInletNode).MassFlowRate)); + ShowContinueError(state, EnergyPlus::format("Difference in two mass flow rates= {:.6R} {{kg/s}}", AbsDifference)); } ShowRecurringSevereErrorAtEnd(state, "Plant Flows (Loop=" + state.dataPlnt->PlantLoop(LoopNum).Name + @@ -716,15 +729,16 @@ void CheckForRunawayPlantTemps(EnergyPlusData &state, int const LoopNum, const D } if (makefatalerror) { - ShowSevereError(state, format("Plant temperatures are getting far too {}, check controls and relative loads and capacities", hotcold)); + ShowSevereError(state, + EnergyPlus::format("Plant temperatures are getting far too {}, check controls and relative loads and capacities", hotcold)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format("PlantLoop Name ({} Side) = {}", - DataPlant::DemandSupplyNames[static_cast(LoopSideNum)], - state.dataPlnt->PlantLoop(LoopNum).Name)); + EnergyPlus::format("PlantLoop Name ({} Side) = {}", + DataPlant::DemandSupplyNames[static_cast(LoopSideNum)], + state.dataPlnt->PlantLoop(LoopNum).Name)); ShowContinueError(state, - format("PlantLoop Setpoint Temperature={:.1R} {{C}}", - state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(LoopNum).TempSetPointNodeNum).TempSetPoint)); + EnergyPlus::format("PlantLoop Setpoint Temperature={:.1R} {{C}}", + state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(LoopNum).TempSetPointNodeNum).TempSetPoint)); if (state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Supply).InletNodeSetPt) { ShowContinueError(state, "PlantLoop Inlet Node (LoopSideLocation::Supply) has a Setpoint."); } else { @@ -746,38 +760,40 @@ void CheckForRunawayPlantTemps(EnergyPlusData &state, int const LoopNum, const D ShowContinueError(state, "PlantLoop Outlet Node (LoopSideLocation::Demand) does not have a Setpoint."); } ShowContinueError(state, - format("PlantLoop Outlet Node ({}Side) \"{}\" has temperature={:.1R} {{C}}", - DataPlant::DemandSupplyNames[static_cast(LoopSideNum)], - state.dataLoopNodes->NodeID(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumOut), - state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumOut).Temp)); + EnergyPlus::format("PlantLoop Outlet Node ({}Side) \"{}\" has temperature={:.1R} {{C}}", + DataPlant::DemandSupplyNames[static_cast(LoopSideNum)], + state.dataLoopNodes->NodeID(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumOut), + state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumOut).Temp)); ShowContinueError(state, - format("PlantLoop Inlet Node ({}Side) \"{}\" has temperature={:.1R} {{C}}", - DataPlant::DemandSupplyNames[static_cast(LoopSideNum)], - state.dataLoopNodes->NodeID(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumIn), - state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumIn).Temp)); - ShowContinueError(state, format("PlantLoop Minimum Temperature={:.1R} {{C}}", state.dataPlnt->PlantLoop(LoopNum).MinTemp)); - ShowContinueError(state, format("PlantLoop Maximum Temperature={:.1R} {{C}}", state.dataPlnt->PlantLoop(LoopNum).MaxTemp)); + EnergyPlus::format("PlantLoop Inlet Node ({}Side) \"{}\" has temperature={:.1R} {{C}}", + DataPlant::DemandSupplyNames[static_cast(LoopSideNum)], + state.dataLoopNodes->NodeID(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumIn), + state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumIn).Temp)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Minimum Temperature={:.1R} {{C}}", state.dataPlnt->PlantLoop(LoopNum).MinTemp)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Maximum Temperature={:.1R} {{C}}", state.dataPlnt->PlantLoop(LoopNum).MaxTemp)); ShowContinueError(state, - format("PlantLoop Flow Request (LoopSideLocation::Supply)={:.1R} {{kg/s}}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Supply).FlowRequest)); + EnergyPlus::format("PlantLoop Flow Request (LoopSideLocation::Supply)={:.1R} {{kg/s}}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Supply).FlowRequest)); ShowContinueError(state, - format("PlantLoop Flow Request (LoopSideLocation::Demand)={:.1R} {{kg/s}}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Demand).FlowRequest)); + EnergyPlus::format("PlantLoop Flow Request (LoopSideLocation::Demand)={:.1R} {{kg/s}}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Demand).FlowRequest)); + ShowContinueError( + state, + EnergyPlus::format("PlantLoop Node ({}Side) \"{}\" has mass flow rate ={:.1R} {{kg/s}}", + DataPlant::DemandSupplyNames[static_cast(LoopSideNum)], + state.dataLoopNodes->NodeID(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumOut), + state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumOut).MassFlowRate)); ShowContinueError(state, - format("PlantLoop Node ({}Side) \"{}\" has mass flow rate ={:.1R} {{kg/s}}", - DataPlant::DemandSupplyNames[static_cast(LoopSideNum)], - state.dataLoopNodes->NodeID(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumOut), - state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).NodeNumOut).MassFlowRate)); + EnergyPlus::format("PlantLoop PumpHeat (LoopSideLocation::Supply)={:.1R} {{W}}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Supply).TotalPumpHeat)); ShowContinueError(state, - format("PlantLoop PumpHeat (LoopSideLocation::Supply)={:.1R} {{W}}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Supply).TotalPumpHeat)); + EnergyPlus::format("PlantLoop PumpHeat (LoopSideLocation::Demand)={:.1R} {{W}}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Demand).TotalPumpHeat)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Cooling Demand={:.1R} {{W}}", state.dataPlnt->PlantLoop(LoopNum).CoolingDemand)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Heating Demand={:.1R} {{W}}", state.dataPlnt->PlantLoop(LoopNum).HeatingDemand)); ShowContinueError(state, - format("PlantLoop PumpHeat (LoopSideLocation::Demand)={:.1R} {{W}}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(DataPlant::LoopSideLocation::Demand).TotalPumpHeat)); - ShowContinueError(state, format("PlantLoop Cooling Demand={:.1R} {{W}}", state.dataPlnt->PlantLoop(LoopNum).CoolingDemand)); - ShowContinueError(state, format("PlantLoop Heating Demand={:.1R} {{W}}", state.dataPlnt->PlantLoop(LoopNum).HeatingDemand)); - ShowContinueError(state, format("PlantLoop Demand not Dispatched={:.1R} {{W}}", state.dataPlnt->PlantLoop(LoopNum).DemandNotDispatched)); - ShowContinueError(state, format("PlantLoop Unmet Demand={:.1R} {{W}}", state.dataPlnt->PlantLoop(LoopNum).UnmetDemand)); + EnergyPlus::format("PlantLoop Demand not Dispatched={:.1R} {{W}}", state.dataPlnt->PlantLoop(LoopNum).DemandNotDispatched)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Unmet Demand={:.1R} {{W}}", state.dataPlnt->PlantLoop(LoopNum).UnmetDemand)); LoopCapacity = 0.0; DispatchedCapacity = 0.0; @@ -796,15 +812,17 @@ void CheckForRunawayPlantTemps(EnergyPlusData &state, int const LoopNum, const D LoopSupplySideDispatchedCapacity = DispatchedCapacity - LoopDemandSideDispatchedCapacity; } } - ShowContinueError(state, format("PlantLoop Capacity={:.1R} {{W}}", LoopCapacity)); - ShowContinueError(state, format("PlantLoop Capacity (LoopSideLocation::Supply)={:.1R} {{W}}", LoopSupplySideCapacity)); - ShowContinueError(state, format("PlantLoop Capacity (LoopSideLocation::Demand)={:.1R} {{W}}", LoopDemandSideCapacity)); - ShowContinueError(state, format("PlantLoop Operation Scheme={}", state.dataPlnt->PlantLoop(LoopNum).OperationScheme)); - ShowContinueError(state, format("PlantLoop Operation Dispatched Load = {:.1R} {{W}}", DispatchedCapacity)); - ShowContinueError(state, - format("PlantLoop Operation Dispatched Load (LoopSideLocation::Supply)= {:.1R} {{W}}", LoopSupplySideDispatchedCapacity)); - ShowContinueError(state, - format("PlantLoop Operation Dispatched Load (LoopSideLocation::Demand)= {:.1R} {{W}}", LoopDemandSideDispatchedCapacity)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Capacity={:.1R} {{W}}", LoopCapacity)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Capacity (LoopSideLocation::Supply)={:.1R} {{W}}", LoopSupplySideCapacity)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Capacity (LoopSideLocation::Demand)={:.1R} {{W}}", LoopDemandSideCapacity)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Operation Scheme={}", state.dataPlnt->PlantLoop(LoopNum).OperationScheme)); + ShowContinueError(state, EnergyPlus::format("PlantLoop Operation Dispatched Load = {:.1R} {{W}}", DispatchedCapacity)); + ShowContinueError( + state, + EnergyPlus::format("PlantLoop Operation Dispatched Load (LoopSideLocation::Supply)= {:.1R} {{W}}", LoopSupplySideDispatchedCapacity)); + ShowContinueError( + state, + EnergyPlus::format("PlantLoop Operation Dispatched Load (LoopSideLocation::Demand)= {:.1R} {{W}}", LoopDemandSideDispatchedCapacity)); ShowContinueError(state, "Branches on the Loop."); ShowBranchesOnLoop(state, LoopNum); ShowContinueError(state, "*************************"); @@ -814,7 +832,8 @@ void CheckForRunawayPlantTemps(EnergyPlusData &state, int const LoopNum, const D ShowContinueError(state, " lots of node time series data to see what is going wrong."); ShowContinueError(state, " If this is happening during Warmup, you can use Output:Diagnostics,ReportDuringWarmup;"); ShowContinueError(state, " This is detected at the loop level, but the typical problems are in the components."); - ShowFatalError(state, format("CheckForRunawayPlantTemps: Simulation terminated because of run away plant temperatures, too {}", hotcold)); + ShowFatalError( + state, EnergyPlus::format("CheckForRunawayPlantTemps: Simulation terminated because of run away plant temperatures, too {}", hotcold)); } } @@ -1704,31 +1723,34 @@ void ScanPlantLoopsForObject(EnergyPlusData &state, if (CompType != DataPlant::PlantEquipmentType::Invalid && CompType != DataPlant::PlantEquipmentType::Num) { if (!present(SingleLoopSearch)) { ShowSevereError(state, - format("Plant Component {} called \"{}\" was not found on any plant loops.", - DataPlant::PlantEquipTypeNames[static_cast(CompType)], - std::string{CompName})); + EnergyPlus::format("Plant Component {} called \"{}\" was not found on any plant loops.", + DataPlant::PlantEquipTypeNames[static_cast(CompType)], + std::string{CompName})); AuditBranches(state, true, DataPlant::PlantEquipTypeNames[static_cast(CompType)], CompName); } else { ShowSevereError(state, - format("Plant Component {} called \"{}\" was not found on plant loop=\"{}\".", - DataPlant::PlantEquipTypeNames[static_cast(CompType)], - std::string{CompName}, - state.dataPlnt->PlantLoop(SingleLoopSearch).Name)); + EnergyPlus::format("Plant Component {} called \"{}\" was not found on plant loop=\"{}\".", + DataPlant::PlantEquipTypeNames[static_cast(CompType)], + std::string{CompName}, + state.dataPlnt->PlantLoop(SingleLoopSearch).Name)); } if (present(InletNodeNumber)) { if (FoundCompName) { - ShowContinueError(state, format("Looking for matching inlet Node=\"{}\".", state.dataLoopNodes->NodeID(InletNodeNumber))); + ShowContinueError(state, + EnergyPlus::format("Looking for matching inlet Node=\"{}\".", state.dataLoopNodes->NodeID(InletNodeNumber))); } } if (present(SingleLoopSearch)) { - ShowContinueError(state, format("Look at Operation Scheme=\"{}\".", state.dataPlnt->PlantLoop(SingleLoopSearch).OperationScheme)); + ShowContinueError( + state, EnergyPlus::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, format("ScanPlantLoopsForObject: Invalid CompType passed [{}], Name={}", CompType, CompName)); - ShowContinueError(state, format("Valid CompTypes are in the range [0 - {}].", static_cast(DataPlant::PlantEquipmentType::Num))); + 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))); ShowFatalError(state, "Previous error causes program termination"); } } @@ -1810,14 +1832,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, format("Node Name=\"{}\"", state.dataLoopNodes->NodeID(NodeNum))); + ShowContinueError(state, EnergyPlus::format("Node Name=\"{}\"", state.dataLoopNodes->NodeID(NodeNum))); if (!state.dataGlobal->DoingSizing) { - ShowContinueError(state, format("called by {}", CallerName)); + ShowContinueError(state, EnergyPlus::format("called by {}", CallerName)); } else { - ShowContinueError(state, format("during sizing: called by {}", CallerName)); + ShowContinueError(state, EnergyPlus::format("during sizing: called by {}", CallerName)); } if (outFoundCount > 0) { - ShowContinueError(state, format("Node was found as outlet node (for component) {} time(s).", outFoundCount)); + ShowContinueError(state, EnergyPlus::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? @@ -1928,15 +1950,15 @@ void ShowBranchesOnLoop(EnergyPlusData &state, int const LoopNum) // Loop number int CpN; // Component (on branch) counter for (DataPlant::LoopSideLocation LSN : DataPlant::LoopSideKeys) { - ShowContinueError(state, format("{} Branches:", DataPlant::DemandSupplyNames[static_cast(LSN)])); + ShowContinueError(state, EnergyPlus::format("{} Branches:", DataPlant::DemandSupplyNames[static_cast(LSN)])); for (BrN = 1; BrN <= state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).TotalBranches; ++BrN) { - ShowContinueError(state, format(" {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Name)); + ShowContinueError(state, EnergyPlus::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, - format(" {}:{}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Comp(CpN).TypeOf, - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Comp(CpN).Name)); + EnergyPlus::format(" {}:{}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Comp(CpN).TypeOf, + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Comp(CpN).Name)); } } } @@ -1993,15 +2015,16 @@ int MyPlantSizingIndex(EnergyPlusData &state, } if (MyPltSizNum == 0) { if (PrintErrorFlag) { - ShowSevereError( - state, format("MyPlantSizingIndex: Could not find {} in Sizing:Plant objects.", state.dataPlnt->PlantLoop(MyPltLoopNum).Name)); - ShowContinueError(state, format("...reference Component Type=\"{}\", Name=\"{}\".", CompType, CompName)); + 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)); } ErrorsFound = true; } } else { if (PrintErrorFlag) { - ShowWarningError(state, format("MyPlantSizingIndex: Could not find {} with name {} on any plant loop", CompType, CompName)); + ShowWarningError(state, EnergyPlus::format("MyPlantSizingIndex: Could not find {} with name {} on any plant loop", CompType, CompName)); } ErrorsFound = true; } diff --git a/src/EnergyPlus/PlantValves.cc b/src/EnergyPlus/PlantValves.cc index b471cdc2f15..5202deb3af0 100644 --- a/src/EnergyPlus/PlantValves.cc +++ b/src/EnergyPlus/PlantValves.cc @@ -98,7 +98,7 @@ namespace PlantValves { } } // If we didn't find it, fatal - ShowFatalError(state, format("TemperValveDataFactory: Error getting inputs for valve named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("TemperValveDataFactory: Error getting inputs for valve named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -239,7 +239,7 @@ namespace PlantValves { } if (ErrorsFound) { - ShowFatalError(state, format("GetPlantValvesInput: {} Errors found in input", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetPlantValvesInput: {} Errors found in input", CurrentModuleObject)); } } @@ -398,7 +398,7 @@ namespace PlantValves { ErrorsFound = true; } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in input, TemperingValve object {}", this->Name)); + ShowFatalError(state, EnergyPlus::format("Errors found in input, TemperingValve object {}", this->Name)); } this->compDelayedInitFlag = false; } // my two time flag for input checking diff --git a/src/EnergyPlus/PluginManager.cc b/src/EnergyPlus/PluginManager.cc index d27326429a2..9e79bad3300 100644 --- a/src/EnergyPlus/PluginManager.cc +++ b/src/EnergyPlus/PluginManager.cc @@ -194,7 +194,8 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) if (outputVarInstances > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(sOutputVariable); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", sOutputVariable)); // LCOV_EXCL_LINE + ShowSevereError(state, + EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", sOutputVariable)); // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); for (auto instance = instancesValue.begin(); instance != instancesValue.end(); ++instance) { @@ -216,7 +217,7 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) int variableHandle = EnergyPlus::PluginManagement::PluginManager::getGlobalVariableHandle(state, varName); if (variableHandle == -1) { ShowSevereError(state, "Failed to match Python Plugin Output Variable"); - ShowContinueError(state, format("Trying to create output instance for variable name \"{}\"", varName)); + ShowContinueError(state, EnergyPlus::format("Trying to create output instance for variable name \"{}\"", varName)); ShowContinueError(state, "No match found, make sure variable is listed in PythonPlugin:Variables object"); ShowFatalError(state, "Python Plugin Output Variable problem causes program termination"); } @@ -272,7 +273,7 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) // We are doing a metered type, we need to get the extra stuff // Resource Type if (fields.find("resource_type") == fields.end()) { - ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); + ShowSevereError(state, EnergyPlus::format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); ShowContinueError(state, "The variable was marked as metered, but did not define a resource type"); ShowContinueError(state, "For metered variables, the resource type, group type, and end use category must be defined"); ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); @@ -299,13 +300,14 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) resource = Constant::eResource::SolarAir; } else if ((resource = static_cast(getEnumValue(Constant::eResourceNamesUC, resourceType))) == Constant::eResource::Invalid) { - ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected Resource Type = {}", resourceType)); + ShowSevereError(state, + EnergyPlus::format("Invalid input for PythonPlugin:OutputVariable, unexpected Resource Type = {}", resourceType)); ShowFatalError(state, "Python plugin output variable input problem causes program termination"); } // Group Type if (fields.find("group_type") == fields.end()) { - ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); + ShowSevereError(state, EnergyPlus::format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); ShowContinueError(state, "The variable was marked as metered, but did not define a group type"); ShowContinueError(state, "For metered variables, the resource type, group type, and end use category must be defined"); ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); @@ -313,13 +315,14 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) std::string const groupType = EnergyPlus::Util::makeUPPER(fields.at("group_type").get()); auto group = static_cast(getEnumValue(OutputProcessor::groupNamesUC, groupType)); if (group == OutputProcessor::Group::Invalid) { - ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected Group Type = {}", groupType)); + ShowSevereError(state, + EnergyPlus::format("Invalid input for PythonPlugin:OutputVariable, unexpected Group Type = {}", groupType)); ShowFatalError(state, "Python plugin output variable input problem causes program termination"); } // End Use Type if (fields.find("end_use_category") == fields.end()) { - ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); + ShowSevereError(state, EnergyPlus::format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); ShowContinueError(state, "The variable was marked as metered, but did not define an end-use category"); ShowContinueError(state, "For metered variables, the resource type, group type, and end use category must be defined"); ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); @@ -328,7 +331,8 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) auto endUseCat = static_cast(getEnumValue(OutputProcessor::endUseCatNamesUC, endUse)); if (endUseCat == OutputProcessor::EndUseCat::Invalid) { - ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected End-use Subcategory = {}", endUse)); + ShowSevereError(state, + EnergyPlus::format("Invalid input for PythonPlugin:OutputVariable, unexpected End-use Subcategory = {}", endUse)); ShowFatalError(state, "Python plugin output variable input problem causes program termination"); } @@ -338,8 +342,9 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) endUseCat == OutputProcessor::EndUseCat::Chillers || endUseCat == OutputProcessor::EndUseCat::Boilers || endUseCat == OutputProcessor::EndUseCat::Baseboard || endUseCat == OutputProcessor::EndUseCat::HeatRecoveryForCooling || endUseCat == OutputProcessor::EndUseCat::HeatRecoveryForHeating)) { - ShowWarningError(state, format("Inconsistent resource type input for PythonPlugin:OutputVariable = {}", thisObjectName)); - ShowContinueError(state, format("For end use subcategory = {}, resource type must be EnergyTransfer", endUse)); + ShowWarningError(state, + EnergyPlus::format("Inconsistent resource type input for PythonPlugin:OutputVariable = {}", thisObjectName)); + ShowContinueError(state, EnergyPlus::format("For end use subcategory = {}, resource type must be EnergyTransfer", endUse)); ShowContinueError(state, "Resource type is being reset to EnergyTransfer and the simulation continues..."); resource = Constant::eResource::EnergyTransfer; } @@ -643,7 +648,7 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s if (globalVarInstances > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(sGlobals); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", sGlobals)); // LCOV_EXCL_LINE + ShowSevereError(state, EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", sGlobals)); // LCOV_EXCL_LINE } std::set uniqueNames; auto &instancesValue = instances.value(); @@ -658,8 +663,8 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s this->addGlobalVariable(state, varNameToAdd); uniqueNames.insert(varNameToAdd); } else { - ShowWarningMessage(state, - format("Found duplicate variable name in PythonPLugin:Variables objects, ignoring: \"{}\"", varNameToAdd)); + ShowWarningMessage( + state, EnergyPlus::format("Found duplicate variable name in PythonPLugin:Variables objects, ignoring: \"{}\"", varNameToAdd)); } } } @@ -684,7 +689,7 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s if (trendInstances > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(sTrends); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { - ShowSevereError(state, format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", sTrends)); // LCOV_EXCL_LINE + ShowSevereError(state, EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", sTrends)); // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); for (auto instance = instancesValue.begin(); instance != instancesValue.end(); ++instance) { @@ -786,7 +791,7 @@ void PluginInstance::reportPythonError([[maybe_unused]] EnergyPlusData &state) if (!traceback_line.empty() && traceback_line[traceback_line.length() - 1] == '\n') { traceback_line.erase(traceback_line.length() - 1); } - ShowContinueError(state, format(" >>> {}", traceback_line)); + ShowContinueError(state, EnergyPlus::format(" >>> {}", traceback_line)); } // PyList_GetItem returns a borrowed reference, do not decrement } @@ -817,14 +822,14 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) pModuleName = PyUnicode_FromString(s.c_str()); // New reference } if (pModuleName == nullptr) { - ShowFatalError(state, format("Failed to convert the Module Path \"{:g}\" for import", this->modulePath)); + ShowFatalError(state, EnergyPlus::format("Failed to convert the Module Path \"{:g}\" for import", this->modulePath)); } this->pModule = PyImport_Import(pModuleName); Py_DECREF(pModuleName); if (this->pModule == nullptr) { - ShowSevereError(state, format("Failed to import module \"{:g}\"", this->modulePath)); - ShowContinueError(state, format("Current sys.path={}", PluginManager::currentPythonPath())); + ShowSevereError(state, EnergyPlus::format("Failed to import module \"{:g}\"", this->modulePath)); + ShowContinueError(state, EnergyPlus::format("Current sys.path={}", PluginManager::currentPythonPath())); // ONLY call PyErr_Print if PyErr has occurred, otherwise it will cause other problems if (PyErr_Occurred() != nullptr) { reportPythonError(state); @@ -835,7 +840,7 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) } PyObject *pModuleDict = PyModule_GetDict(this->pModule); if (pModuleDict == nullptr) { - ShowSevereError(state, format("Failed to read module dictionary from module \"{:g}\"", this->modulePath)); + ShowSevereError(state, EnergyPlus::format("Failed to read module dictionary from module \"{:g}\"", this->modulePath)); if (PyErr_Occurred() != nullptr) { reportPythonError(state); } else { @@ -852,12 +857,12 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) } else { const char *zStr = PyUnicode_AsUTF8(pFullPath); std::string sHere(zStr); - ShowMessage(state, format("PythonPlugin: Class {} imported from: {}", className, sHere)); + ShowMessage(state, EnergyPlus::format("PythonPlugin: Class {} imported from: {}", className, sHere)); } PyObject *pClass = PyDict_GetItemString(pModuleDict, className.c_str()); // Py_DECREF(pModuleDict); // PyModule_GetDict returns a borrowed reference, DO NOT decrement if (pClass == nullptr) { - ShowSevereError(state, format(R"(Failed to get class type "{}" from module "{:g}")", className, modulePath)); + ShowSevereError(state, EnergyPlus::format(R"(Failed to get class type "{}" from module "{:g}")", className, modulePath)); if (PyErr_Occurred() != nullptr) { reportPythonError(state); } else { @@ -866,7 +871,7 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) ShowFatalError(state, "Python class import error causes program termination"); } if (PyCallable_Check(pClass) == 0) { - ShowSevereError(state, format("Got class type \"{}\", but it cannot be called/instantiated", className)); + ShowSevereError(state, EnergyPlus::format("Got class type \"{}\", but it cannot be called/instantiated", className)); if (PyErr_Occurred() != nullptr) { reportPythonError(state); } else { @@ -877,7 +882,7 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) this->pClassInstance = PyObject_CallObject(pClass, nullptr); // Py_DECREF(pClass); // PyDict_GetItemString returns a borrowed reference, DO NOT decrement if (this->pClassInstance == nullptr) { - ShowSevereError(state, format("Something went awry calling class constructor for class \"{}\"", className)); + ShowSevereError(state, EnergyPlus::format("Something went awry calling class constructor for class \"{}\"", className)); if (PyErr_Occurred() != nullptr) { reportPythonError(state); } else { @@ -896,7 +901,8 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) if ((detectFunction == nullptr) || (PyCallable_Check(detectFunction) == 0)) { ShowSevereError( state, - format(R"(Could not find or call function "{}" on class "{:g}.{}")", detectOverriddenFunctionName, this->modulePath, this->className)); + EnergyPlus::format( + R"(Could not find or call function "{}" on class "{:g}.{}")", detectOverriddenFunctionName, this->modulePath, this->className)); if (PyErr_Occurred() != nullptr) { reportPythonError(state); } else { @@ -907,23 +913,24 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) PyObject *pFunctionResponse = PyObject_CallFunction(detectFunction, nullptr); Py_DECREF(detectFunction); // PyObject_GetAttrString returns a new reference, decrement it if (pFunctionResponse == nullptr) { - ShowSevereError(state, format("Call to _detect_overridden() on {} failed!", this->stringIdentifier)); + ShowSevereError(state, EnergyPlus::format("Call to _detect_overridden() on {} failed!", this->stringIdentifier)); if (PyErr_Occurred() != nullptr) { reportPythonError(state); } else { ShowContinueError(state, "This is available on the base class and should not be overridden...strange."); } - ShowFatalError(state, format("Program terminates after call to _detect_overridden() on {} failed!", this->stringIdentifier)); + ShowFatalError(state, EnergyPlus::format("Program terminates after call to _detect_overridden() on {} failed!", this->stringIdentifier)); } if (!PyList_Check(pFunctionResponse)) { // NOLINT(hicpp-signed-bitwise) - ShowFatalError(state, format("Invalid return from _detect_overridden() on class \"{}\", this is weird", this->stringIdentifier)); + ShowFatalError(state, EnergyPlus::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, - format("Python plugin \"{}\" did not override any base class methods; must override at least one", this->stringIdentifier)); + ShowFatalError( + state, + EnergyPlus::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); @@ -1167,28 +1174,30 @@ 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, format("Call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); + ShowSevereError(state, EnergyPlus::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, format("Program terminates after call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); + ShowFatalError(state, + EnergyPlus::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, format("Python Plugin \"{}\" returned 1 to indicate EnergyPlus should abort", this->stringIdentifier)); + ShowFatalError(state, EnergyPlus::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, - format("Invalid return from {}() on class \"{}, make sure it returns an integer exit code, either zero (success) or one (failure)", - functionNameAsString, - this->stringIdentifier)); + EnergyPlus::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) { @@ -1236,7 +1245,7 @@ void PluginManager::addToPythonPath(EnergyPlusData &state, const fs::path &inclu unicodeIncludePath = PyUnicode_FromString(s.c_str()); // New reference } if (unicodeIncludePath == nullptr) { - ShowFatalError(state, format("ERROR converting the path \"{:g}\" for addition to the sys.path in Python", includePath)); + ShowFatalError(state, EnergyPlus::format("ERROR converting the path \"{:g}\" for addition to the sys.path in Python", includePath)); } PyObject *sysPath = PySys_GetObject("path"); // Borrowed reference @@ -1247,11 +1256,11 @@ void PluginManager::addToPythonPath(EnergyPlusData &state, const fs::path &inclu if (PyErr_Occurred() != nullptr) { PluginInstance::reportPythonError(state); } - ShowFatalError(state, format("ERROR adding \"{:g}\" to the sys.path in Python", includePath)); + ShowFatalError(state, EnergyPlus::format("ERROR adding \"{:g}\" to the sys.path in Python", includePath)); } if (userDefinedPath) { - ShowMessage(state, format("Successfully added path \"{:g}\" to the sys.path in Python", includePath)); + ShowMessage(state, EnergyPlus::format("Successfully added path \"{:g}\" to the sys.path in Python", includePath)); } // PyRun_SimpleString)("print(' EPS : ' + str(sys.path))"); @@ -1295,9 +1304,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, format("Name looked up: \"{}\", available names: ", varNameUC)); + ShowContinueError(state, EnergyPlus::format("Name looked up: \"{}\", available names: ", varNameUC)); for (auto const &gvName : gVarNames) { - ShowContinueError(state, format(" \"{}\"", gvName)); + ShowContinueError(state, EnergyPlus::format(" \"{}\"", gvName)); } ShowFatalError(state, "Plugin global variable problem causes program termination"); return -1; // hush the compiler warning @@ -1469,8 +1478,9 @@ 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, format("Tried to access plugin global variable value at index {}", handle)); - ShowContinueError(state, format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); + 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)); ShowFatalError(state, "Plugin global variable problem causes program termination"); } return 0.0; @@ -1493,8 +1503,9 @@ 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, format("Tried to set plugin global variable value at index {}", handle)); - ShowContinueError(state, format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); + 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)); ShowFatalError(state, "Plugin global variable problem causes program termination"); } } @@ -1562,7 +1573,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, format("Invalid PythonPlugin object type: {}", objToFind)); + ShowContinueError(state, EnergyPlus::format("Invalid PythonPlugin object type: {}", objToFind)); } } return numTotalThings > 0; diff --git a/src/EnergyPlus/PollutionModule.cc b/src/EnergyPlus/PollutionModule.cc index 8b3c71f366c..25c666bba3e 100644 --- a/src/EnergyPlus/PollutionModule.cc +++ b/src/EnergyPlus/PollutionModule.cc @@ -177,7 +177,7 @@ void SetupPollutionCalculations(EnergyPlusData &state) (freq = static_cast( getEnumValue(OutputProcessor::reportFreqNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(1))))) == OutputProcessor::ReportFreq::Invalid) { - ShowSevereError(state, format("Invalid reporting frequency {}", state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid reporting frequency {}", state.dataIPShortCut->cAlphaArgs(1))); continue; } @@ -231,7 +231,7 @@ void GetPollutionFactorInput(EnergyPlusData &state) ipsc->cAlphaFieldNames, ipsc->cNumericFieldNames); } else if (pm->PollutionReportSetup) { - ShowWarningError(state, format("{}: not entered. Values will be defaulted.", ipsc->cCurrentModuleObject)); + ShowWarningError(state, EnergyPlus::format("{}: not entered. Values will be defaulted.", ipsc->cCurrentModuleObject)); } pm->PurchHeatEffic = 0.3; @@ -297,8 +297,10 @@ void GetPollutionFactorInput(EnergyPlusData &state) Constant::eFuel fuel = pollFuel2fuel[(int)pollFuel]; if (pollCoeff.used) { - ShowWarningError( - state, format("{}: {} already entered. Previous entry will be used.", ipsc->cCurrentModuleObject, Constant::eFuelNames[(int)fuel])); + ShowWarningError(state, + EnergyPlus::format("{}: {} already entered. Previous entry will be used.", + ipsc->cCurrentModuleObject, + Constant::eFuelNames[(int)fuel])); continue; } @@ -334,8 +336,9 @@ void GetPollutionFactorInput(EnergyPlusData &state) if (!pm->pollCoeffs[(int)PollFuel::Electricity].used && ((pm->facilityMeterNums[(int)PollFacilityMeter::Electricity] > 0) || (pm->facilityMeterNums[(int)PollFacilityMeter::ElectricityProduced] > 0) || (pm->facilityMeterNums[(int)PollFacilityMeter::CoolPurchased] > 0))) { - ShowSevereError(state, - format("{} Not Found or Fuel not specified For Pollution Calculation for ELECTRICITY", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, + EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for ELECTRICITY", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -343,50 +346,59 @@ void GetPollutionFactorInput(EnergyPlusData &state) if (!pm->pollCoeffs[(int)PollFuel::NaturalGas].used && ((pm->facilityMeterNums[(int)PollFacilityMeter::NaturalGas] > 0) || (pm->facilityMeterNums[(int)PollFacilityMeter::HeatPurchased] > 0) || (pm->facilityMeterNums[(int)PollFacilityMeter::Steam] > 0))) { - ShowSevereError(state, - format("{} Not Found or Fuel not specified For Pollution Calculation for NATURAL GAS", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, + EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for NATURAL GAS", ipsc->cCurrentModuleObject)); ErrorsFound = true; } // Check for FuelOilNo2 (Residual Oil) if (!pm->pollCoeffs[(int)PollFuel::FuelOil2].used && (pm->facilityMeterNums[(int)PollFacilityMeter::FuelOil2] > 0)) { - ShowSevereError(state, - format("{} Not Found or Fuel not specified For Pollution Calculation for FUEL OIL #2", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, + EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for FUEL OIL #2", ipsc->cCurrentModuleObject)); ErrorsFound = true; } // Check for FuelOilNo1 (Distillate Oil) if (!pm->pollCoeffs[(int)PollFuel::FuelOil1].used && (pm->facilityMeterNums[(int)PollFacilityMeter::FuelOil1] > 0)) { - ShowSevereError(state, - format("{} Not Found or Fuel not specified For Pollution Calculation for FUEL OIL #1", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, + EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for FUEL OIL #1", ipsc->cCurrentModuleObject)); ErrorsFound = true; } // Check for Coal if (!pm->pollCoeffs[(int)PollFuel::Coal].used && (pm->facilityMeterNums[(int)PollFacilityMeter::Coal] > 0)) { - ShowSevereError(state, format("{} Not Found or Fuel not specified For Pollution Calculation for COAL", ipsc->cCurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for COAL", ipsc->cCurrentModuleObject)); ErrorsFound = true; } // Check for Gasoline if (!pm->pollCoeffs[(int)PollFuel::Gasoline].used && (pm->facilityMeterNums[(int)PollFacilityMeter::Gasoline] > 0)) { - ShowSevereError(state, format("{} Not Found or Fuel not specified For Pollution Calculation for GASOLINE", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for GASOLINE", ipsc->cCurrentModuleObject)); ErrorsFound = true; } // Check for Propane if (!pm->pollCoeffs[(int)PollFuel::Propane].used && (pm->facilityMeterNums[(int)PollFacilityMeter::Propane] > 0)) { - ShowSevereError(state, format("{} Not Found or Fuel not specified For Pollution Calculation for PROPANE", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for PROPANE", ipsc->cCurrentModuleObject)); ErrorsFound = true; } // Check for Diesel if (!pm->pollCoeffs[(int)PollFuel::Diesel].used && (pm->facilityMeterNums[(int)PollFacilityMeter::Diesel] > 0)) { - ShowSevereError(state, format("{} Not Found or Fuel not specified For Pollution Calculation for DIESEL", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for DIESEL", ipsc->cCurrentModuleObject)); ErrorsFound = true; } // Check for OtherFuel1 if (!pm->pollCoeffs[(int)PollFuel::OtherFuel1].used && (pm->facilityMeterNums[(int)PollFacilityMeter::OtherFuel1] > 0)) { - ShowSevereError(state, format("{} Not Found or Fuel not specified For Pollution Calculation for OTHERFUEL1", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for OTHERFUEL1", ipsc->cCurrentModuleObject)); ErrorsFound = true; } // Check for OtherFuel2 if (!pm->pollCoeffs[(int)PollFuel::OtherFuel2].used && (pm->facilityMeterNums[(int)PollFacilityMeter::OtherFuel2] > 0)) { - ShowSevereError(state, format("{} Not Found or Fuel not specified For Pollution Calculation for OTHERFUEL2", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, EnergyPlus::format("{} Not Found or Fuel not specified For Pollution Calculation for OTHERFUEL2", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -450,7 +462,7 @@ void SetupPollutionMeterReporting(EnergyPlusData &state) // Need to check whether this fuel is used? SetupOutputVariable(state, - format("Environmental Impact {} Source Energy", Constant::eFuelNames[(int)fuel]), + EnergyPlus::format("Environmental Impact {} Source Energy", Constant::eFuelNames[(int)fuel]), Constant::Units::J, pollComp.sourceVal, OutputProcessor::TimeStepType::System, @@ -462,7 +474,7 @@ void SetupPollutionMeterReporting(EnergyPlusData &state) for (int iPollutant = 0; iPollutant < (int)Pollutant::Num; ++iPollutant) { SetupOutputVariable(state, - format("Environmental Impact {} {}", Constant::eFuelNames[(int)fuel], poll2outVarStrs[iPollutant]), + EnergyPlus::format("Environmental Impact {} {}", Constant::eFuelNames[(int)fuel], poll2outVarStrs[iPollutant]), pollUnits[iPollutant], pollComp.pollutantVals[iPollutant], OutputProcessor::TimeStepType::System, diff --git a/src/EnergyPlus/PondGroundHeatExchanger.cc b/src/EnergyPlus/PondGroundHeatExchanger.cc index ba586cbd1a7..a6120e92d1f 100644 --- a/src/EnergyPlus/PondGroundHeatExchanger.cc +++ b/src/EnergyPlus/PondGroundHeatExchanger.cc @@ -138,7 +138,7 @@ PlantComponent *PondGroundHeatExchangerData::factory(EnergyPlusData &state, std: } } // If we didn't find it, fatal - ShowFatalError(state, format("Pond Heat Exchanger Factory: Error getting inputs for GHX named: {}", objectName)); + ShowFatalError(state, EnergyPlus::format("Pond Heat Exchanger Factory: Error getting inputs for GHX named: {}", objectName)); // Shut up the compiler return nullptr; } @@ -229,8 +229,10 @@ void GetPondGroundHeatExchanger(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (state.dataPondGHE->PondGHE(Item).InletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -247,8 +249,10 @@ void GetPondGroundHeatExchanger(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (state.dataPondGHE->PondGHE(Item).OutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } @@ -263,14 +267,18 @@ void GetPondGroundHeatExchanger(EnergyPlusData &state) state.dataPondGHE->PondGHE(Item).Depth = state.dataIPShortCut->rNumericArgs(1); state.dataPondGHE->PondGHE(Item).Area = state.dataIPShortCut->rNumericArgs(2); if (state.dataIPShortCut->rNumericArgs(1) <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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, "Value must be greater than 0.0"); ErrorsFound = true; } if (state.dataIPShortCut->rNumericArgs(2) <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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, "Value must be greater than 0.0"); ErrorsFound = true; } @@ -280,25 +288,29 @@ void GetPondGroundHeatExchanger(EnergyPlusData &state) state.dataPondGHE->PondGHE(Item).TubeOutDiameter = state.dataIPShortCut->rNumericArgs(4); if (state.dataIPShortCut->rNumericArgs(3) <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(3), state.dataIPShortCut->rNumericArgs(3))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(3), state.dataIPShortCut->rNumericArgs(3))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } if (state.dataIPShortCut->rNumericArgs(4) <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(4), state.dataIPShortCut->rNumericArgs(4))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(4), state.dataIPShortCut->rNumericArgs(4))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } if (state.dataIPShortCut->rNumericArgs(3) > state.dataIPShortCut->rNumericArgs(4)) { // error - ShowSevereError(state, format("For {}: {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("For {}: {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("{} [{:.2R}] > {} [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(3), - state.dataIPShortCut->rNumericArgs(3), - state.dataIPShortCut->cNumericFieldNames(4), - state.dataIPShortCut->rNumericArgs(4))); + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(3), + state.dataIPShortCut->rNumericArgs(3), + state.dataIPShortCut->cNumericFieldNames(4), + state.dataIPShortCut->rNumericArgs(4))); ErrorsFound = true; } @@ -307,14 +319,18 @@ void GetPondGroundHeatExchanger(EnergyPlusData &state) state.dataPondGHE->PondGHE(Item).GrndConductivity = state.dataIPShortCut->rNumericArgs(6); if (state.dataIPShortCut->rNumericArgs(5) <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.4R}", state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={:.4R}", state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } if (state.dataIPShortCut->rNumericArgs(6) <= 0.0) { - ShowSevereError(state, format("Invalid {}={:.4R}", state.dataIPShortCut->cNumericFieldNames(6), state.dataIPShortCut->rNumericArgs(6))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={:.4R}", state.dataIPShortCut->cNumericFieldNames(6), state.dataIPShortCut->rNumericArgs(6))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } @@ -323,15 +339,19 @@ void GetPondGroundHeatExchanger(EnergyPlusData &state) state.dataPondGHE->PondGHE(Item).NumCircuits = state.dataIPShortCut->rNumericArgs(7); if (state.dataIPShortCut->rNumericArgs(7) <= 0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(7), state.dataIPShortCut->rNumericArgs(7))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(7), state.dataIPShortCut->rNumericArgs(7))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } state.dataPondGHE->PondGHE(Item).CircuitLength = state.dataIPShortCut->rNumericArgs(8); if (state.dataIPShortCut->rNumericArgs(8) <= 0) { - ShowSevereError(state, format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(8), state.dataIPShortCut->rNumericArgs(8))); - ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(8), state.dataIPShortCut->rNumericArgs(8))); + ShowContinueError( + state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } @@ -340,14 +360,14 @@ void GetPondGroundHeatExchanger(EnergyPlusData &state) // final error check if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } if (!state.dataEnvrn->GroundTempInputs[(int)DataEnvironment::GroundTempType::Deep]) { ShowWarningError(state, "GetPondGroundHeatExchanger: No \"Site:GroundTemperature:Deep\" were input."); ShowContinueError(state, - format("Defaults, constant throughout the year of ({:.1R}) will be used.", - state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::Deep])); + EnergyPlus::format("Defaults, constant throughout the year of ({:.1R}) will be used.", + state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::Deep])); } } @@ -782,10 +802,11 @@ Real64 PondGroundHeatExchangerData::CalcEffectiveness(EnergyPlusData &state, if (PondTemperature < 0.0) { ++this->ConsecutiveFrozen; if (this->FrozenErrIndex == 0) { - ShowWarningMessage(state, - format("GroundHeatExchanger:Pond=\"{}\", is frozen; Pond model not valid. Calculated Pond Temperature=[{:.2R}] C", - this->Name, - PondTemperature)); + ShowWarningMessage( + state, + EnergyPlus::format("GroundHeatExchanger:Pond=\"{}\", is frozen; Pond model not valid. Calculated Pond Temperature=[{:.2R}] C", + this->Name, + PondTemperature)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -797,8 +818,9 @@ Real64 PondGroundHeatExchangerData::CalcEffectiveness(EnergyPlusData &state, "[C]", "[C]"); if (this->ConsecutiveFrozen >= state.dataGlobal->TimeStepsInHour * 30) { - ShowFatalError(state, - format("GroundHeatExchanger:Pond=\"{}\" has been frozen for 30 consecutive hours. Program terminates.", this->Name)); + ShowFatalError( + state, + EnergyPlus::format("GroundHeatExchanger:Pond=\"{}\" has been frozen for 30 consecutive hours. Program terminates.", this->Name)); } } else { this->ConsecutiveFrozen = 0; diff --git a/src/EnergyPlus/PoweredInductionUnits.cc b/src/EnergyPlus/PoweredInductionUnits.cc index 8d78e010955..62d7e5e8634 100644 --- a/src/EnergyPlus/PoweredInductionUnits.cc +++ b/src/EnergyPlus/PoweredInductionUnits.cc @@ -159,25 +159,25 @@ void SimPIU(EnergyPlusData &state, if (CompIndex == 0) { PIUNum = Util::FindItemInList(CompName, state.dataPowerInductionUnits->PIU); if (PIUNum == 0) { - ShowFatalError(state, format("SimPIU: PIU Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimPIU: PIU Unit not found={}", CompName)); } CompIndex = PIUNum; } else { PIUNum = CompIndex; if (PIUNum > state.dataPowerInductionUnits->NumPIUs || PIUNum < 1) { ShowFatalError(state, - format("SimPIU: Invalid CompIndex passed={}, Number of PIU Units={}, PIU Unit name={}", - CompIndex, - state.dataPowerInductionUnits->NumPIUs, - CompName)); + EnergyPlus::format("SimPIU: Invalid CompIndex passed={}, Number of PIU Units={}, PIU Unit name={}", + CompIndex, + state.dataPowerInductionUnits->NumPIUs, + CompName)); } if (state.dataPowerInductionUnits->CheckEquipName(PIUNum)) { if (CompName != state.dataPowerInductionUnits->PIU(PIUNum).Name) { ShowFatalError(state, - format("SimPIU: Invalid CompIndex passed={}, PIU Unit name={}, stored PIU Unit Name for that index={}", - CompIndex, - CompName, - state.dataPowerInductionUnits->PIU(PIUNum).Name)); + EnergyPlus::format("SimPIU: Invalid CompIndex passed={}, PIU Unit name={}, stored PIU Unit Name for that index={}", + CompIndex, + CompName, + state.dataPowerInductionUnits->PIU(PIUNum).Name)); } state.dataPowerInductionUnits->CheckEquipName(PIUNum) = false; } @@ -204,8 +204,8 @@ void SimPIU(EnergyPlusData &state, break; } default: - ShowSevereError(state, format("Illegal PI Unit Type used={}", state.dataPowerInductionUnits->PIU(PIUNum).UnitType)); - ShowContinueError(state, format("Occurs in PI Unit={}", state.dataPowerInductionUnits->PIU(PIUNum).Name)); + ShowSevereError(state, EnergyPlus::format("Illegal PI Unit Type used={}", state.dataPowerInductionUnits->PIU(PIUNum).UnitType)); + ShowContinueError(state, EnergyPlus::format("Occurs in PI Unit={}", state.dataPowerInductionUnits->PIU(PIUNum).Name)); ShowFatalError(state, "Preceding condition causes termination."); break; } @@ -331,7 +331,7 @@ void GetPIUs(EnergyPlusData &state) thisPIU.HCoil_PlantType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; thisPIU.HCoil_fluid = Fluid::GetSteam(state); if (thisPIU.HCoil_fluid == nullptr) { - ShowSevereError(state, format("{} Steam Properties for {} not found.", RoutineName, thisPIU.Name)); + ShowSevereError(state, EnergyPlus::format("{} Steam Properties for {} not found.", RoutineName, thisPIU.Name)); if (SteamMessageNeeded) { ShowContinueError(state, "Steam Fluid Properties should have been included in the input file."); } @@ -341,8 +341,8 @@ void GetPIUs(EnergyPlusData &state) break; } default: { - ShowSevereError(state, format("Illegal Reheat Coil Type = {}", thisPIU.HCoilType)); - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisPIU.Name)); + ShowSevereError(state, EnergyPlus::format("Illegal Reheat Coil Type = {}", thisPIU.HCoilType)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisPIU.Name)); ErrorsFound = true; } } @@ -446,7 +446,7 @@ void GetPIUs(EnergyPlusData &state) ValidateComponent( state, HCoilNamesUC[static_cast(thisPIU.HCoilType)], thisPIU.HCoil, IsNotOK, cCurrentModuleObject + " - Heating Coil"); if (IsNotOK) { - ShowContinueError(state, format("In {} = {}", cCurrentModuleObject, thisPIU.Name)); + ShowContinueError(state, EnergyPlus::format("In {} = {}", cCurrentModuleObject, thisPIU.Name)); ErrorsFound = true; } thisPIU.MaxVolHotWaterFlow = ip->getRealFieldValue(fields, objectSchemaProps, "maximum_hot_water_or_steam_flow_rate"); @@ -462,15 +462,15 @@ void GetPIUs(EnergyPlusData &state) thisPIU.fanControlType = static_cast(getEnumValue(fanCntrlTypeNamesUC, Util::makeUPPER(fan_control_type))); if (thisPIU.fanControlType == FanCntrlType::Invalid) { - ShowSevereError(state, format("Illegal Fan Control Type = {}", fan_control_type)); - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisPIU.Name)); + ShowSevereError(state, EnergyPlus::format("Illegal Fan Control Type = {}", fan_control_type)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisPIU.Name)); ErrorsFound = true; } if (thisPIU.fanControlType == FanCntrlType::VariableSpeedFan) { if (thisPIU.fanType != HVAC::FanType::SystemModel) { ErrorsFound = true; - ShowSevereError(state, format("Fan type must be Fan:SystemModel when Fan Control Type = {}", fan_control_type)); - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisPIU.Name)); + ShowSevereError(state, EnergyPlus::format("Fan type must be Fan:SystemModel when Fan Control Type = {}", fan_control_type)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisPIU.Name)); } // Heating Control Type is only applicable for variable speed fans thisPIU.heatingControlType = static_cast(getEnumValue( @@ -478,7 +478,7 @@ void GetPIUs(EnergyPlusData &state) if (thisPIU.heatingControlType == HeatCntrlBehaviorType::Invalid) { ShowSevereError(state, "Heating Control Type should either be Staged or Modulated"); - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisPIU.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisPIU.Name)); ErrorsFound = true; } } @@ -531,9 +531,10 @@ void GetPIUs(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (thisPIU.ADUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for PIU = [{},{}].", RoutineName, thisPIU.UnitType, thisPIU.Name)); - ShowContinueError(state, format("...should have outlet node = {}", state.dataLoopNodes->NodeID(thisPIU.OutAirNode))); + ShowSevereError( + state, + EnergyPlus::format("{}No matching Air Distribution Unit, for PIU = [{},{}].", RoutineName, thisPIU.UnitType, thisPIU.Name)); + ShowContinueError(state, EnergyPlus::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(thisPIU.OutAirNode))); ErrorsFound = true; } else { @@ -558,9 +559,10 @@ void GetPIUs(EnergyPlusData &state) } } if (!AirNodeFound) { - ShowSevereError(state, format("The outlet air node from the {} Unit = {}", cCurrentModuleObject, thisPIU.Name)); + ShowSevereError(state, EnergyPlus::format("The outlet air node from the {} Unit = {}", cCurrentModuleObject, thisPIU.Name)); ShowContinueError( - state, format("did not have a matching Zone Equipment Inlet Node, Node = {}", state.dataIPShortCut->cAlphaArgs(5))); + state, + EnergyPlus::format("did not have a matching Zone Equipment Inlet Node, Node = {}", state.dataIPShortCut->cAlphaArgs(5))); ErrorsFound = true; } } @@ -573,22 +575,23 @@ void GetPIUs(EnergyPlusData &state) if (!damperLeakageFractionCurveName.empty() && thisPIU.leakFracCurve == 0) { ShowSevereError(state, - format("The air leakage fraction curve for the {} {} is missing. No air leakage will be modeled.", - cCurrentModuleObject, - thisPIU.Name)); + EnergyPlus::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, - format("The air leakage zone name for the {} {} is missing. No air leakage will be modeled.", - cCurrentModuleObject, - thisPIU.Name)); + EnergyPlus::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, - format("Air leakage for the {} {} won't be simulated as both the control zone and leakage " + 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)); @@ -610,13 +613,14 @@ void GetPIUs(EnergyPlusData &state) } } if (leakToPlenumZoneNum > 0 && leakToPlenumZoneNum != zoneNum) { - ShowWarningMessage(state, - 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)); + 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)); } state.dataHeatBal->Zone(zoneNum).leakageParallelPIUNums.push_back(PIUNum); thisPIU.damperLeakageZoneNum = zoneNum; @@ -629,7 +633,7 @@ void GetPIUs(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{} Errors found in getting input. Preceding conditions cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{} Errors found in getting input. Preceding conditions cause termination.", RoutineName)); } for (int PIURpt = 1; PIURpt <= state.dataPowerInductionUnits->NumPIUs; ++PIURpt) { @@ -790,12 +794,12 @@ void InitPIU(EnergyPlusData &state, continue; } ShowSevereError(state, - format("InitPIU: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - state.dataDefineEquipment->AirDistUnit(state.dataPowerInductionUnits->PIU(Loop).ADUNum).Name)); + EnergyPlus::format("InitPIU: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", + state.dataDefineEquipment->AirDistUnit(state.dataPowerInductionUnits->PIU(Loop).ADUNum).Name)); ShowContinueError(state, - format("...PIU=[{},{}] will not be simulated.", - state.dataPowerInductionUnits->PIU(Loop).UnitType, - state.dataPowerInductionUnits->PIU(Loop).Name)); + EnergyPlus::format("...PIU=[{},{}] will not be simulated.", + state.dataPowerInductionUnits->PIU(Loop).UnitType, + state.dataPowerInductionUnits->PIU(Loop).Name)); } } @@ -995,9 +999,13 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxPriAirVolFlowDes - MaxPriAirVolFlowUser) / MaxPriAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); - ShowContinueError(state, format("User-Specified Primary Air Flow Rate of {:.5R} [m3/s]", MaxPriAirVolFlowUser)); - ShowContinueError(state, format("differs from Design Size Primary Air Flow Rate of {:.5R} [m3/s]", MaxPriAirVolFlowDes)); + ShowMessage( + state, + EnergyPlus::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( + state, EnergyPlus::format("differs from Design Size Primary Air Flow Rate of {:.5R} [m3/s]", MaxPriAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1042,9 +1050,13 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxTotAirVolFlowDes - MaxTotAirVolFlowUser) / MaxTotAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); - ShowContinueError(state, format("User-Specified Maximum Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowUser)); - ShowContinueError(state, format("differs from Design Size Maximum Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowDes)); + ShowMessage( + state, + EnergyPlus::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( + state, EnergyPlus::format("differs from Design Size Maximum Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1108,10 +1120,14 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxSecAirVolFlowDes - MaxSecAirVolFlowUser) / MaxSecAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); - ShowContinueError(state, format("User-Specified Maximum Secondary Air Flow Rate of {:.5R} [m3/s]", MaxSecAirVolFlowUser)); + ShowMessage( + state, + EnergyPlus::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( - state, format("differs from Design Size Maximum Secondary Air Flow Rate of {:.5R} [m3/s]", MaxSecAirVolFlowDes)); + state, + EnergyPlus::format("differs from Design Size Maximum Secondary Air Flow Rate of {:.5R} [m3/s]", MaxSecAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1151,21 +1167,24 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (MinPriAirFlowFracDes > 1.0 && IsMaxPriFlowAutoSize) { thisPIU.MaxPriAirVolFlow *= MinPriAirFlowFracDes; MinPriAirFlowFracDes = 1.0; - ShowWarningError(state, - 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)); + 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)); } else if (MinPriAirFlowFracDes > 1.0) { ShowWarningError( state, - format("SingleDuctSystem:SizeSys: Maximum primary air flow rate for {} is potentially too low.", thisPIU.Name)); + EnergyPlus::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:"); - ShowContinueError(state, format(" User-specified maximum primary air flow rate: {:.3R} m3/s.", thisPIU.MaxPriAirVolFlow)); ShowContinueError( - state, - format(" Calculated minimum primary air flow rate: {:.3R} m3/s.", thisPIU.MaxPriAirVolFlow * MinPriAirFlowFracDes)); + state, EnergyPlus::format(" User-specified maximum primary air flow rate: {:.3R} m3/s.", thisPIU.MaxPriAirVolFlow)); + ShowContinueError(state, + EnergyPlus::format(" Calculated minimum primary air flow rate: {:.3R} m3/s.", + thisPIU.MaxPriAirVolFlow * MinPriAirFlowFracDes)); MinPriAirFlowFracDes = 1.0; } } @@ -1194,10 +1213,14 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MinPriAirFlowFracDes - MinPriAirFlowFracUser) / MinPriAirFlowFracUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); - ShowContinueError(state, format("User-Specified Minimum Primary Air Flow Fraction of {:.1R}", MinPriAirFlowFracUser)); - ShowContinueError(state, - format("differs from Design Size Minimum Primary Air Flow Fraction of {:.1R}", MinPriAirFlowFracDes)); + ShowMessage( + state, + EnergyPlus::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( + state, + EnergyPlus::format("differs from Design Size Minimum Primary Air Flow Fraction of {:.1R}", MinPriAirFlowFracDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1245,9 +1268,11 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) FanOnFlowFracUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(FanOnFlowFracDes - FanOnFlowFracUser) / FanOnFlowFracUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); - ShowContinueError(state, format("User-Specified Fan On Flow Fraction of {:.1R}", FanOnFlowFracUser)); - ShowContinueError(state, format("differs from Design Size Fan On Flow Fraction of {:.1R}", FanOnFlowFracDes)); + ShowMessage( + state, + EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1302,7 +1327,7 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) } } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in{} Object={}", thisPIU.UnitType, thisPIU.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in{} Object={}", thisPIU.UnitType, thisPIU.Name)); ErrorsFound = true; } thisPIU.MaxVolHotWaterFlow = MaxVolHotWaterFlowDes; @@ -1332,12 +1357,15 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); - ShowContinueError(state, - format("User-Specified Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + ShowMessage( + state, + EnergyPlus::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); ShowContinueError( - state, format("differs from Design Size Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", MaxVolHotWaterFlowDes)); + state, + EnergyPlus::format("User-Specified Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", + MaxVolHotWaterFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1393,7 +1421,7 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in{} Object={}", thisPIU.UnitType, thisPIU.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in{} Object={}", thisPIU.UnitType, thisPIU.Name)); ErrorsFound = true; } thisPIU.MaxVolHotSteamFlow = MaxVolHotSteamFlowDes; @@ -1412,11 +1440,14 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser) / MaxVolHotSteamFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); - ShowContinueError(state, format("User-Specified Maximum Reheat Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowUser)); + ShowMessage( + state, + EnergyPlus::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( - state, format("differs from Design Size Maximum Reheat Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowDes)); + state, + EnergyPlus::format("differs from Design Size Maximum Reheat Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1710,7 +1741,7 @@ void CalcSeriesPIU(EnergyPlusData &state, } } else { ShowSevereError(state, "Incorrect series PIU heating operation."); - ShowFatalError(state, format("Series PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, EnergyPlus::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 @@ -2083,7 +2114,7 @@ void CalcParallelPIU(EnergyPlusData &state, } } else { ShowSevereError(state, "Incorrect parallel PIU heating operation."); - ShowFatalError(state, format("Parallel PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, EnergyPlus::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 @@ -2279,13 +2310,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, format("Series PIU control failed for {}:{} ", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, EnergyPlus::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, format("Zone Load to Cooling Setpoint = {:.2R} [W]", zoneLoad)); - ShowContinueError(state, format("Load Delivered to Zone at Minimum Fan Speed = {:.2R} [W]", qdotDelivMinPrim)); + 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, format("Series PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, EnergyPlus::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; @@ -2367,11 +2398,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, format("PIU control failed for {}:{} ", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, EnergyPlus::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, format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, EnergyPlus::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); @@ -2498,11 +2529,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, format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, EnergyPlus::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, format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, EnergyPlus::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 0e89d79a4d6..e9719d3cd73 100644 --- a/src/EnergyPlus/Psychrometrics.cc +++ b/src/EnergyPlus/Psychrometrics.cc @@ -206,10 +206,10 @@ namespace Psychrometrics { // Using/Aliasing if (rhoair < 0.0) { - ShowSevereError(state, format("PsyRhoAirFnPbTdbW: RhoAir (Density of Air) is calculated <= 0 [{:.5R}].", rhoair)); - ShowContinueError(state, format("pb =[{:.2R}], tdb=[{:.2R}], w=[{:.7R}].", pb, tdb, dw)); + ShowSevereError(state, EnergyPlus::format("PsyRhoAirFnPbTdbW: RhoAir (Density of Air) is calculated <= 0 [{:.5R}].", rhoair)); + ShowContinueError(state, EnergyPlus::format("pb =[{:.2R}], tdb=[{:.2R}], w=[{:.7R}].", pb, tdb, dw)); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -229,11 +229,11 @@ namespace Psychrometrics { if (RHValue > 1.01) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbRhovLBnd0C)] == 0) { - state.dataPsychrometrics->String = - format(" Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); + state.dataPsychrometrics->String = EnergyPlus::format( + " Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbRhovLBnd0C) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -252,11 +252,11 @@ namespace Psychrometrics { } else if (RHValue < -0.05) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbRhovLBnd0C)] == 0) { - state.dataPsychrometrics->String = - format(" Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); + state.dataPsychrometrics->String = EnergyPlus::format( + " Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbRhovLBnd0C) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -412,11 +412,11 @@ namespace Psychrometrics { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TwbFnTdbWPb)] == 0) { ShowWarningMessage(state, "Temperature out of range [-100. to 200.] (PsyTwbFnTdbWPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, format(" Input Temperature={:.2T}", TDB)); + ShowContinueError(state, EnergyPlus::format(" Input Temperature={:.2T}", TDB)); FlagError = true; } ShowRecurringWarningErrorAtEnd(state, @@ -437,16 +437,17 @@ namespace Psychrometrics { if (W <= -0.0001) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TwbFnTdbWPb2)] == 0) { - state.dataPsychrometrics->String = format(" Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Pressure= {:.2T}", TDB, W, Patm); + state.dataPsychrometrics->String = + EnergyPlus::format(" Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Pressure= {:.2T}", TDB, W, Patm); ShowWarningMessage(state, "Entered Humidity Ratio invalid (PsyTwbFnTdbWPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = format("Humidity Ratio= {:.4T}", W); - ShowContinueError(state, format("{} ... Humidity Ratio set to .00001", state.dataPsychrometrics->String)); + state.dataPsychrometrics->String = EnergyPlus::format("Humidity Ratio= {:.4T}", W); + ShowContinueError(state, EnergyPlus::format("{} ... Humidity Ratio set to .00001", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, "Entered Humidity Ratio invalid (PsyTwbFnTdbWPb)", @@ -525,15 +526,15 @@ namespace Psychrometrics { if (iter > itmax) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TwbFnTdbWPb3)] == 0) { - ShowWarningMessage(state, format("WetBulb not converged after {} iterations(PsyTwbFnTdbWPb)", iter)); + ShowWarningMessage(state, EnergyPlus::format("WetBulb not converged after {} iterations(PsyTwbFnTdbWPb)", iter)); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={},", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={},", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, format(" Input Temperature = {:.2T}", TDB)); - ShowContinueError(state, format(" Input Humidity Ratio= {:.6T}", W)); - ShowContinueError(state, format(" Input Pressure = {:.2T}", Patm)); + 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)); FlagError = true; } ShowRecurringWarningErrorAtEnd(state, @@ -548,7 +549,7 @@ namespace Psychrometrics { #ifdef EP_psych_errors if (FlagError) { - ShowContinueError(state, format(" Resultant Temperature= {:.2T}", WBT)); + ShowContinueError(state, EnergyPlus::format(" Resultant Temperature= {:.2T}", WBT)); } #endif @@ -576,16 +577,17 @@ namespace Psychrometrics { if (V <= -0.01) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::VFnTdbWPb)] == 0) { - state.dataPsychrometrics->String = format(" Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Pressure= {:.2T}", TDB, w, PB); + state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Pressure= {:.2T}", TDB, w, PB); ShowWarningMessage(state, "Calculated Specific Volume out of range (PsyVFnTdbWPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = format("Calculated Volume= {:.3T}", V); - ShowContinueError(state, format("{} ... Since Calculated Volume < 0.0, it is set to .83", 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)); } ShowRecurringWarningErrorAtEnd(state, "Calculated Specific Volume out of range (PsyVFnTdbWPb)", @@ -611,16 +613,16 @@ namespace Psychrometrics { if (W < -0.0001) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::WFnTdbH)] == 0) { - state.dataPsychrometrics->String = format(" Dry-Bulb= {:.2T} Enthalpy= {:.3T}", TDB, H); + state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2T} Enthalpy= {:.3T}", TDB, H); ShowWarningMessage(state, "Calculated Humidity Ratio invalid (PsyWFnTdbH)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = format("Calculated Humidity Ratio= {:.4T}", W); - ShowContinueError(state, format("{} ... Humidity Ratio set to .00001", 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)); } ShowRecurringWarningErrorAtEnd(state, "Calculated Humidity Ratio invalid (PsyWFnTdbH)", @@ -701,11 +703,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, format(" Routine={},", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={},", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, format(" Input Temperature={:.2T}", T)); + ShowContinueError(state, EnergyPlus::format(" Input Temperature={:.2T}", T)); } ShowRecurringWarningErrorAtEnd(state, "Temperature out of range [-100. to 200.] (PsyPsatFnTemp)", @@ -791,17 +793,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 = format(" Dry-Bulb= {:.2T} Pressure= {:.2T}", TDB, PB); + state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2T} Pressure= {:.2T}", TDB, PB); ShowWarningMessage(state, "Given Wet Bulb Temperature invalid (PsyWFnTdbTwbPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = format("Calculated Wet-Bulb= {:.2T}", TWB); - ShowContinueError(state, - format("{} ... Since Dry Bulb < Wet Bulb, Wet Bulb set = to Dry Bulb", 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)); } ShowRecurringWarningErrorAtEnd(state, "Given Wet Bulb Temperature invalid (PsyWFnTdbTwbPb)", @@ -829,17 +831,18 @@ 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 = format(" Dry-Bulb= {:.2T} Wet-Bulb= {:.2T} Pressure= {:.2T}", TDB, TWB, PB); + state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2T} Wet-Bulb= {:.2T} Pressure= {:.2T}", TDB, TWB, PB); ShowWarningMessage(state, "Calculated Humidity Ratio Invalid (PsyWFnTdbTwbPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = format("Calculated Humidity Ratio= {:.4T}, will recalculate Humidity Ratio", W); + state.dataPsychrometrics->String = EnergyPlus::format("Calculated Humidity Ratio= {:.4T}, will recalculate Humidity Ratio", W); ShowContinueError( - state, format("{} using Relative Humidity .01% (and Dry-Bulb and Pressure as shown)", state.dataPsychrometrics->String)); + state, + EnergyPlus::format("{} using Relative Humidity .01% (and Dry-Bulb and Pressure as shown)", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, "Calculated Humidity Ratio Invalid (PsyWFnTdbTwbPb)", @@ -869,15 +872,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, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } state.dataPsychrometrics->String = - format(" Dry-bulb={:.2T} Wet-Bulb (WB)= {:.2T} Pressure= {:.2T} Humidity Ratio={:.3T}", TDB, TWB, PB, W); + EnergyPlus::format(" Dry-bulb={:.2T} Wet-Bulb (WB)= {:.2T} Pressure= {:.2T} Humidity Ratio={:.3T}", TDB, TWB, PB, W); ShowContinueError(state, state.dataPsychrometrics->String); state.dataPsychrometrics->String = - format(" Calculated Dew Point Temperature (DPT)= {:.2T}; Since DPT > WB, DPT will be set to WB", TDP); + EnergyPlus::format(" Calculated Dew Point Temperature (DPT)= {:.2T}; Since DPT > WB, DPT will be set to WB", TDP); ShowContinueError(state, state.dataPsychrometrics->String); } ShowRecurringWarningErrorAtEnd(state, @@ -956,11 +959,11 @@ namespace Psychrometrics { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TsatFnHPb)] == 0) { ShowWarningMessage(state, "Enthalpy out of range (PsyTsatFnHPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={},", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={},", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - state.dataPsychrometrics->String = format(" Enthalpy={:.5T} Pressure= {:.2T}", HH, PB); + state.dataPsychrometrics->String = EnergyPlus::format(" Enthalpy={:.5T} Pressure= {:.2T}", HH, PB); ShowContinueError(state, state.dataPsychrometrics->String); FlagError = true; } @@ -1024,7 +1027,7 @@ namespace Psychrometrics { #ifdef EP_psych_errors if (FlagError) { - ShowContinueError(state, format(" Initial Resultant Temperature= {:.2T}", T)); + ShowContinueError(state, EnergyPlus::format(" Initial Resultant Temperature= {:.2T}", T)); } #endif if (std::abs(PB - 1.0133e5) / 1.0133e5 > 0.01) { @@ -1054,12 +1057,12 @@ namespace Psychrometrics { if (FlagError && IterCount > 30) { ShowSevereError(state, "Temperature did not converge (PsyTsatFnHPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - state.dataPsychrometrics->String = format(" Enthalpy={:.5T} Pressure= {:.2T}", HH, PB); - ShowContinueError(state, format("{} Last T={:.2T}", state.dataPsychrometrics->String, T)); + state.dataPsychrometrics->String = EnergyPlus::format(" Enthalpy={:.5T} Pressure= {:.2T}", HH, PB); + ShowContinueError(state, EnergyPlus::format("{} Last T={:.2T}", state.dataPsychrometrics->String, T)); } #endif } @@ -1079,11 +1082,11 @@ namespace Psychrometrics { if (RHValue > 1.01) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbRhov)] == 0) { - state.dataPsychrometrics->String = - format(" Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); + state.dataPsychrometrics->String = EnergyPlus::format( + " Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbRhov) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -1102,11 +1105,11 @@ namespace Psychrometrics { } else if (RHValue < -0.05) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbRhov)] == 0) { - state.dataPsychrometrics->String = - format(" Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); + state.dataPsychrometrics->String = EnergyPlus::format( + " Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbRhov) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -1137,11 +1140,11 @@ namespace Psychrometrics { if (RHValue > 1.01) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbWPb)] == 0) { - state.dataPsychrometrics->String = - format(" Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Calculated Relative Humidity [%]= {:.2T}", TDB, W, RHValue * 100.0); + state.dataPsychrometrics->String = EnergyPlus::format( + " Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Calculated Relative Humidity [%]= {:.2T}", TDB, W, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbWPb) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -1160,11 +1163,11 @@ namespace Psychrometrics { } else if (RHValue < -0.05) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbWPb)] == 0) { - state.dataPsychrometrics->String = - format(" Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Calculated Relative Humidity [%]= {:.2T}", TDB, W, RHValue * 100.0); + state.dataPsychrometrics->String = EnergyPlus::format( + " Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Calculated Relative Humidity [%]= {:.2T}", TDB, W, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbWPb) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -1195,19 +1198,19 @@ namespace Psychrometrics { { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::WFnTdpPb)] == 0) { - state.dataPsychrometrics->String = format(" Dew-Point= {:.2T} Barometric Pressure= {:.2T}", TDP, PB); + state.dataPsychrometrics->String = EnergyPlus::format(" Dew-Point= {:.2T} Barometric Pressure= {:.2T}", 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, format(" Routine={},", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={},", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = - format("Instead, calculated Humidity Ratio at {:.1T} ({} degree less) = {:.4T}", TDP - DeltaT, static_cast(DeltaT), W); - ShowContinueError(state, format("{} will be used. Simulation continues.", 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)); } ShowRecurringWarningErrorAtEnd(state, "Entered Humidity Ratio invalid (PsyWFnTdpPb)", @@ -1234,16 +1237,16 @@ namespace Psychrometrics { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::WFnTdbRhPb)] == 0) { state.dataPsychrometrics->String = - format(" Dry-Bulb= {:.2T} Relative Humidity [%]= {:.2T} Pressure= {:.2T}", TDB, RH * 100.0, PB); + EnergyPlus::format(" Dry-Bulb= {:.2T} Relative Humidity [%]= {:.2T} Pressure= {:.2T}", TDB, RH * 100.0, PB); ShowWarningMessage(state, "Calculated Humidity Ratio is invalid (PsyWFnTdbRhPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = format("Calculated Humidity Ratio= {:.4T}", W); - ShowContinueError(state, format("{} ... Humidity Ratio set to .00001", 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)); } ShowRecurringWarningErrorAtEnd(state, "Calculated Humidity Ratio Invalid (PsyWFnTdbTwbPb)", @@ -1323,11 +1326,11 @@ namespace Psychrometrics { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TsatFnPb)] == 0) { ShowWarningMessage(state, "Pressure out of range (PsyTsatFnPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, format(" Input Pressure= {:.2T}", Press)); + ShowContinueError(state, EnergyPlus::format(" Input Pressure= {:.2T}", Press)); FlagError = true; } ShowRecurringWarningErrorAtEnd(state, @@ -1413,13 +1416,13 @@ namespace Psychrometrics { if (iter > itmax) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TsatFnPb2)] == 0) { - ShowWarningMessage(state, format("Saturation Temperature not converged after {} iterations (PsyTsatFnPb)", iter)); + ShowWarningMessage(state, EnergyPlus::format("Saturation Temperature not converged after {} iterations (PsyTsatFnPb)", iter)); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, format(" Input Pressure= {:.2T}", Press)); + ShowContinueError(state, EnergyPlus::format(" Input Pressure= {:.2T}", Press)); FlagError = true; } ShowRecurringWarningErrorAtEnd(state, @@ -1439,7 +1442,7 @@ namespace Psychrometrics { #ifdef EP_psych_errors if (FlagError) { - ShowContinueError(state, format(" Resultant Temperature= {:.2T}", Temp)); + ShowContinueError(state, EnergyPlus::format(" Resultant Temperature= {:.2T}", Temp)); } #endif diff --git a/src/EnergyPlus/Pumps.cc b/src/EnergyPlus/Pumps.cc index 99105a84f5e..27cf4f5e5ba 100644 --- a/src/EnergyPlus/Pumps.cc +++ b/src/EnergyPlus/Pumps.cc @@ -146,7 +146,7 @@ void SimPumps(EnergyPlusData &state, if (PumpIndex == 0) { PumpNum = Util::FindItemInList(PumpName, state.dataPumps->PumpEquip); // Determine which pump to simulate if (PumpNum == 0) { - ShowFatalError(state, format("ManagePumps: Pump requested not found ={}", PumpName)); // Catch any bad names before crashing + ShowFatalError(state, EnergyPlus::format("ManagePumps: Pump requested not found ={}", PumpName)); // Catch any bad names before crashing } PumpIndex = PumpNum; } else { @@ -155,15 +155,15 @@ void SimPumps(EnergyPlusData &state, if (PumpNum > state.dataPumps->NumPumps || PumpNum < 1) { ShowFatalError( state, - format( + EnergyPlus::format( "ManagePumps: Invalid PumpIndex passed={}, Number of Pumps={}, Pump name={}", PumpNum, state.dataPumps->NumPumps, PumpName)); } if (PumpName != state.dataPumps->PumpEquip(PumpNum).Name) { ShowFatalError(state, - format("ManagePumps: Invalid PumpIndex passed={}, Pump name={}, stored Pump Name for that index={}", - PumpNum, - PumpName, - state.dataPumps->PumpEquip(PumpNum).Name)); + EnergyPlus::format("ManagePumps: Invalid PumpIndex passed={}, Pump name={}, stored Pump Name for that index={}", + PumpNum, + PumpName, + state.dataPumps->PumpEquip(PumpNum).Name)); } state.dataPumps->PumpEquip(PumpNum).CheckEquipName = false; } @@ -313,11 +313,13 @@ void GetPumpInput(EnergyPlusData &state) thisPump.PumpControl = static_cast(getEnumValue(pumpCtrlTypeNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(4)))); if (thisPump.PumpControl == PumpControlType::Invalid) { - ShowWarningError(state, - format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); - ShowContinueError( + ShowWarningError( state, - format("Entered Value=[{}]. {} has been set to Continuous for this pump.", thisInput->cAlphaArgs(4), thisInput->cAlphaFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); + ShowContinueError(state, + EnergyPlus::format("Entered Value=[{}]. {} has been set to Continuous for this pump.", + thisInput->cAlphaArgs(4), + thisInput->cAlphaFieldNames(4))); thisPump.PumpControl = PumpControlType::Continuous; } @@ -349,15 +351,17 @@ void GetPumpInput(EnergyPlusData &state) } else if (!thisPump.NomVolFlowRateWasAutoSized && (thisPump.MinVolFlowRate > (minToMaxRatioMax * thisPump.NomVolFlowRate))) { // Check that the minimum isn't greater than the maximum ShowWarningError( - state, format("{}{}=\"{}\", Invalid '{}'", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cNumericFieldNames(10))); - ShowContinueError(state, - format("Entered Value=[{:.5T}] is above or too close (equal) to the {}=[{:.5T}].", - thisPump.MinVolFlowRate, - thisInput->cNumericFieldNames(1), - thisPump.NomVolFlowRate)); - ShowContinueError( state, - format("Resetting value of '{}' to the value of 99% of '{}'.", thisInput->cNumericFieldNames(10), thisInput->cNumericFieldNames(1))); + 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}].", + thisPump.MinVolFlowRate, + thisInput->cNumericFieldNames(1), + thisPump.NomVolFlowRate)); + ShowContinueError(state, + EnergyPlus::format("Resetting value of '{}' to the value of 99% of '{}'.", + thisInput->cNumericFieldNames(10), + thisInput->cNumericFieldNames(1))); // Set min to roughly max, but not quite, otherwise it can't turn on, ever thisPump.MinVolFlowRate = minToMaxRatioMax * thisPump.NomVolFlowRate; } @@ -452,10 +456,10 @@ void GetPumpInput(EnergyPlusData &state) default: { ShowSevereError(state, - format("{}{}=\"{}\", VFD Control type entered is invalid. Use one of the key choice entries.", - RoutineName, - cCurrentModuleObject, - thisPump.Name)); + EnergyPlus::format("{}{}=\"{}\", VFD Control type entered is invalid. Use one of the key choice entries.", + RoutineName, + cCurrentModuleObject, + thisPump.Name)); ErrorsFound = true; } break; } @@ -470,11 +474,11 @@ void GetPumpInput(EnergyPlusData &state) } } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - thisPump.Name, - thisInput->cAlphaFieldNames(13), - thisInput->cAlphaArgs(13))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + cCurrentModuleObject, + thisPump.Name, + thisInput->cAlphaFieldNames(13), + thisInput->cAlphaArgs(13))); ErrorsFound = true; } } @@ -484,10 +488,10 @@ void GetPumpInput(EnergyPlusData &state) static_cast(getEnumValue(powerSizingMethodNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(14)))); if (thisPump.powerSizingMethod == PowerSizingMethod::Invalid) { ShowSevereError(state, - format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", - RoutineName, - cCurrentModuleObject, - thisPump.Name)); + EnergyPlus::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", + RoutineName, + cCurrentModuleObject, + thisPump.Name)); ErrorsFound = true; } } @@ -586,11 +590,13 @@ void GetPumpInput(EnergyPlusData &state) thisPump.PumpControl = static_cast(getEnumValue(pumpCtrlTypeNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(4)))); if (thisPump.PumpControl == PumpControlType::Invalid) { - ShowWarningError(state, - format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); - ShowContinueError( + ShowWarningError( state, - format("Entered Value=[{}]. {} has been set to Continuous for this pump.", thisInput->cAlphaArgs(4), thisInput->cAlphaFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); + ShowContinueError(state, + EnergyPlus::format("Entered Value=[{}]. {} has been set to Continuous for this pump.", + thisInput->cAlphaArgs(4), + thisInput->cAlphaFieldNames(4))); thisPump.PumpControl = PumpControlType::Continuous; } @@ -638,11 +644,11 @@ void GetPumpInput(EnergyPlusData &state) } } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - thisPump.Name, - thisInput->cAlphaFieldNames(7), - thisInput->cAlphaArgs(7))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + cCurrentModuleObject, + thisPump.Name, + thisInput->cAlphaFieldNames(7), + thisInput->cAlphaArgs(7))); ErrorsFound = true; } } @@ -652,10 +658,10 @@ void GetPumpInput(EnergyPlusData &state) static_cast(getEnumValue(powerSizingMethodNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(8)))); if (thisPump.powerSizingMethod == PowerSizingMethod::Invalid) { ShowSevereError(state, - format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", - RoutineName, - cCurrentModuleObject, - thisPump.Name)); + EnergyPlus::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", + RoutineName, + cCurrentModuleObject, + thisPump.Name)); ErrorsFound = true; } } @@ -756,11 +762,11 @@ void GetPumpInput(EnergyPlusData &state) } } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - thisPump.Name, - thisInput->cAlphaFieldNames(5), - thisInput->cAlphaArgs(5))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + cCurrentModuleObject, + thisPump.Name, + thisInput->cAlphaFieldNames(5), + thisInput->cAlphaArgs(5))); ErrorsFound = true; } } @@ -784,10 +790,10 @@ void GetPumpInput(EnergyPlusData &state) static_cast(getEnumValue(powerSizingMethodNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(6)))); if (thisPump.powerSizingMethod == PowerSizingMethod::Invalid) { ShowSevereError(state, - format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", - RoutineName, - cCurrentModuleObject, - thisPump.Name)); + EnergyPlus::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", + RoutineName, + cCurrentModuleObject, + thisPump.Name)); ErrorsFound = true; } } @@ -861,21 +867,25 @@ void GetPumpInput(EnergyPlusData &state) } else if (Util::SameString(thisInput->cAlphaArgs(4), "SupplyEquipmentAssigned")) { thisPump.SequencingScheme = PumpBankControlSeq::UserDefined; } else { - ShowWarningError(state, - format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); - ShowContinueError( + ShowWarningError( state, - format("Entered Value=[{}]. {} has been set to Sequential for this pump.", thisInput->cAlphaArgs(4), thisInput->cAlphaFieldNames(4))); + 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))); thisPump.SequencingScheme = PumpBankControlSeq::SequentialScheme; } thisPump.PumpControl = static_cast(getEnumValue(pumpCtrlTypeNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(5)))); if (thisPump.PumpControl == PumpControlType::Invalid) { - ShowWarningError(state, - format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(5))); - ShowContinueError( + ShowWarningError( state, - format("Entered Value=[{}]. {} has been set to Continuous for this pump.", thisInput->cAlphaArgs(5), thisInput->cAlphaFieldNames(5))); + EnergyPlus::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))); thisPump.PumpControl = PumpControlType::Continuous; } @@ -914,11 +924,11 @@ void GetPumpInput(EnergyPlusData &state) } } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - thisPump.Name, - thisInput->cAlphaFieldNames(7), - thisInput->cAlphaArgs(7))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + cCurrentModuleObject, + thisPump.Name, + thisInput->cAlphaFieldNames(7), + thisInput->cAlphaArgs(7))); ErrorsFound = true; } } @@ -928,10 +938,10 @@ void GetPumpInput(EnergyPlusData &state) static_cast(getEnumValue(powerSizingMethodNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(8)))); if (thisPump.powerSizingMethod == PowerSizingMethod::Invalid) { ShowSevereError(state, - format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", - RoutineName, - cCurrentModuleObject, - thisPump.Name)); + EnergyPlus::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", + RoutineName, + cCurrentModuleObject, + thisPump.Name)); ErrorsFound = true; } } @@ -1005,22 +1015,26 @@ void GetPumpInput(EnergyPlusData &state) } else if (Util::SameString(thisInput->cAlphaArgs(4), "Sequential")) { thisPump.SequencingScheme = PumpBankControlSeq::SequentialScheme; } else { - ShowWarningError(state, - format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); - ShowContinueError( + ShowWarningError( state, - format("Entered Value=[{}]. {} has been set to Sequential for this pump.", thisInput->cAlphaArgs(4), thisInput->cAlphaFieldNames(4))); + 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))); thisPump.SequencingScheme = PumpBankControlSeq::SequentialScheme; } thisPump.PumpControl = static_cast(getEnumValue(pumpCtrlTypeNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(5)))); if (thisPump.PumpControl == PumpControlType::Invalid) { - ShowWarningError(state, - format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(5))); - ShowContinueError( + ShowWarningError( state, - format("Entered Value=[{}]. {} has been set to Continuous for this pump.", thisInput->cAlphaArgs(5), thisInput->cAlphaFieldNames(5))); + EnergyPlus::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))); thisPump.PumpControl = PumpControlType::Continuous; } @@ -1057,11 +1071,11 @@ void GetPumpInput(EnergyPlusData &state) } } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - thisPump.Name, - thisInput->cAlphaFieldNames(7), - thisInput->cAlphaArgs(7))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + cCurrentModuleObject, + thisPump.Name, + thisInput->cAlphaFieldNames(7), + thisInput->cAlphaArgs(7))); ErrorsFound = true; } } @@ -1070,10 +1084,10 @@ void GetPumpInput(EnergyPlusData &state) static_cast(getEnumValue(powerSizingMethodNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(8)))); if (thisPump.powerSizingMethod == PowerSizingMethod::Invalid) { ShowSevereError(state, - format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", - RoutineName, - cCurrentModuleObject, - thisPump.Name)); + EnergyPlus::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", + RoutineName, + cCurrentModuleObject, + thisPump.Name)); ErrorsFound = true; } } @@ -1380,20 +1394,22 @@ void InitializePumps(EnergyPlusData &state, int const PumpNum) if (plloopnum > 0 && lsnum != DataPlant::LoopSideLocation::Invalid && brnum > 0 && cpnum > 0) { auto &thisPumpLoc = state.dataPlnt->PlantLoop(plloopnum).LoopSide(lsnum).Branch(brnum); if (thisPumpLoc.Comp(cpnum).NodeNumIn != InletNode || thisPumpLoc.Comp(cpnum).NodeNumOut != OutletNode) { - ShowSevereError( - state, - format("InitializePumps: {}=\"{}\", non-matching nodes.", pumpTypeIDFNames[static_cast(thisPump.pumpType)], thisPump.Name)); - ShowContinueError(state, format("...in Branch={}, Component referenced with:", thisPumpLoc.Name)); - ShowContinueError(state, format("...Inlet Node={}", state.dataLoopNodes->NodeID(thisPumpLoc.Comp(cpnum).NodeNumIn))); - ShowContinueError(state, format("...Outlet Node={}", state.dataLoopNodes->NodeID(thisPumpLoc.Comp(cpnum).NodeNumOut))); - ShowContinueError(state, format("...Pump Inlet Node={}", state.dataLoopNodes->NodeID(InletNode))); - ShowContinueError(state, format("...Pump Outlet Node={}", state.dataLoopNodes->NodeID(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:", thisPumpLoc.Name)); + ShowContinueError(state, EnergyPlus::format("...Inlet Node={}", state.dataLoopNodes->NodeID(thisPumpLoc.Comp(cpnum).NodeNumIn))); + ShowContinueError(state, EnergyPlus::format("...Outlet Node={}", state.dataLoopNodes->NodeID(thisPumpLoc.Comp(cpnum).NodeNumOut))); + ShowContinueError(state, EnergyPlus::format("...Pump Inlet Node={}", state.dataLoopNodes->NodeID(InletNode))); + ShowContinueError(state, EnergyPlus::format("...Pump Outlet Node={}", state.dataLoopNodes->NodeID(OutletNode))); errFlag = true; } } else { // CR9292 - ShowSevereError( - state, - format("InitializePumps: {}=\"{}\", component missing.", pumpTypeIDFNames[static_cast(thisPump.pumpType)], thisPump.Name)); + ShowSevereError(state, + EnergyPlus::format("InitializePumps: {}=\"{}\", component missing.", + pumpTypeIDFNames[static_cast(thisPump.pumpType)], + thisPump.Name)); errFlag = true; // should have received warning/severe earlier, will reiterate } @@ -1412,57 +1428,61 @@ void InitializePumps(EnergyPlusData &state, int const PumpNum) thisPump.PumpEffic = TotalEffic / thisPump.MotorEffic; if (thisPump.PumpEffic < 0.50) { ShowWarningError(state, - format("Check input. Calculated Pump Efficiency={:.2R}% which is less than 50%, for pump={}", - thisPump.PumpEffic * 100.0, - thisPump.Name)); + EnergyPlus::format("Check input. Calculated Pump Efficiency={:.2R}% which is less than 50%, for pump={}", + thisPump.PumpEffic * 100.0, + thisPump.Name)); ShowContinueError(state, - format("Calculated Pump_Efficiency % =Total_Efficiency % [{:.1R}] / Motor_Efficiency % [{:.1R}]", - TotalEffic * 100.0, - thisPump.MotorEffic * 100.0)); + EnergyPlus::format("Calculated Pump_Efficiency % =Total_Efficiency % [{:.1R}] / Motor_Efficiency % [{:.1R}]", + TotalEffic * 100.0, + thisPump.MotorEffic * 100.0)); ShowContinueError( state, - format("Total_Efficiency % =(Rated_Volume_Flow_Rate [{:.3R}] * Rated_Pump_Head [{:.1R}] / Rated_Power_Use [{:.1R}]) * 100.", - thisPump.NomVolFlowRate, - thisPump.NomPumpHead, - thisPump.NomPowerUse)); + EnergyPlus::format( + "Total_Efficiency % =(Rated_Volume_Flow_Rate [{:.3R}] * Rated_Pump_Head [{:.1R}] / Rated_Power_Use [{:.1R}]) * 100.", + thisPump.NomVolFlowRate, + thisPump.NomPumpHead, + thisPump.NomPowerUse)); } else if ((thisPump.PumpEffic > 0.95) && (thisPump.PumpEffic <= 1.0)) { ShowWarningError(state, - format("Check input. Calculated Pump Efficiency={:.2R}% is approaching 100%, for pump={}", - thisPump.PumpEffic * 100.0, - thisPump.Name)); + EnergyPlus::format("Check input. Calculated Pump Efficiency={:.2R}% is approaching 100%, for pump={}", + thisPump.PumpEffic * 100.0, + thisPump.Name)); ShowContinueError(state, - format("Calculated Pump_Efficiency % =Total_Efficiency % [{:.1R}] / Motor_Efficiency % [{:.1R}]", - TotalEffic * 100.0, - thisPump.MotorEffic * 100.0)); + EnergyPlus::format("Calculated Pump_Efficiency % =Total_Efficiency % [{:.1R}] / Motor_Efficiency % [{:.1R}]", + TotalEffic * 100.0, + thisPump.MotorEffic * 100.0)); ShowContinueError( state, - format("Total_Efficiency % =(Rated_Volume_Flow_Rate [{:.3R}] * Rated_Pump_Head [{:.1R}] / Rated_Power_Use [{:.1R}]) * 100.", - thisPump.NomVolFlowRate, - thisPump.NomPumpHead, - thisPump.NomPowerUse)); + EnergyPlus::format( + "Total_Efficiency % =(Rated_Volume_Flow_Rate [{:.3R}] * Rated_Pump_Head [{:.1R}] / Rated_Power_Use [{:.1R}]) * 100.", + thisPump.NomVolFlowRate, + thisPump.NomPumpHead, + thisPump.NomPowerUse)); } else if (thisPump.PumpEffic > 1.0) { ShowSevereError(state, - format("Check input. Calculated Pump Efficiency={:.3R}% which is bigger than 100%, for pump={}", - thisPump.PumpEffic * 100.0, - thisPump.Name)); + EnergyPlus::format("Check input. Calculated Pump Efficiency={:.3R}% which is bigger than 100%, for pump={}", + thisPump.PumpEffic * 100.0, + thisPump.Name)); ShowContinueError(state, - format("Calculated Pump_Efficiency % =Total_Efficiency % [{:.1R}] / Motor_Efficiency % [{:.1R}]", - TotalEffic * 100.0, - thisPump.MotorEffic * 100.0)); + EnergyPlus::format("Calculated Pump_Efficiency % =Total_Efficiency % [{:.1R}] / Motor_Efficiency % [{:.1R}]", + TotalEffic * 100.0, + thisPump.MotorEffic * 100.0)); ShowContinueError( state, - format("Total_Efficiency % =(Rated_Volume_Flow_Rate [{:.3R}] * Rated_Pump_Head [{:.1R}] / Rated_Power_Use [{:.1R}]) * 100.", - thisPump.NomVolFlowRate, - thisPump.NomPumpHead, - thisPump.NomPowerUse)); + EnergyPlus::format( + "Total_Efficiency % =(Rated_Volume_Flow_Rate [{:.3R}] * Rated_Pump_Head [{:.1R}] / Rated_Power_Use [{:.1R}]) * 100.", + thisPump.NomVolFlowRate, + thisPump.NomPumpHead, + thisPump.NomPowerUse)); ShowFatalError(state, "Errors found in Pump input"); } } else { - ShowWarningError(state, format("Check input. Pump nominal power or motor efficiency is set to 0, for pump={}", thisPump.Name)); + ShowWarningError(state, + EnergyPlus::format("Check input. Pump nominal power or motor efficiency is set to 0, for pump={}", thisPump.Name)); } if (thisPump.NomVolFlowRate <= SmallWaterVolFlow) { - ShowWarningError(state, format("Check input. Pump nominal flow rate is set or calculated = 0, for pump={}", thisPump.Name)); + ShowWarningError(state, EnergyPlus::format("Check input. Pump nominal flow rate is set or calculated = 0, for pump={}", thisPump.Name)); } if (thisPump.PumpControl == PumpControlType::Continuous) { @@ -1906,16 +1926,19 @@ void CalcPumps(EnergyPlusData &state, int const PumpNum, Real64 const FlowReques if (thisPump.PowerErrIndex1 == 0) { ShowWarningMessage( state, - format("{} Calculated Pump Power < 0, Type={}, Name={}", RoutineName, pumpTypeIDFNames[static_cast(pumpType)], thisPump.Name)); + EnergyPlus::format( + "{} Calculated Pump Power < 0, Type={}, Name={}", RoutineName, pumpTypeIDFNames[static_cast(pumpType)], thisPump.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("...PartLoadRatio=[{:.4R}], Fraction Full Load Power={:.4R}]", PartLoadRatio, FracFullLoadPower)); + ShowContinueError(state, + EnergyPlus::format("...PartLoadRatio=[{:.4R}], Fraction Full Load Power={:.4R}]", PartLoadRatio, FracFullLoadPower)); ShowContinueError(state, "...Power is set to 0 for continuing the simulation."); ShowContinueError(state, "...Pump coefficients should be checked for producing this negative value."); } daPumps->Power = 0.0; ShowRecurringWarningErrorAtEnd( state, - format("{} Calculated Pump Power < 0, {}, Name={}, PLR=", RoutineName, pumpTypeIDFNames[static_cast(pumpType)], thisPump.Name), + EnergyPlus::format( + "{} Calculated Pump Power < 0, {}, Name={}, PLR=", RoutineName, pumpTypeIDFNames[static_cast(pumpType)], thisPump.Name), thisPump.PowerErrIndex1, PartLoadRatio, PartLoadRatio); @@ -1933,8 +1956,9 @@ 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, - format("{} Plant pressure simulation encountered a pump with zero efficiency: {}", RoutineName, thisPump.Name)); + ShowSevereError( + state, + EnergyPlus::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."); } @@ -1947,7 +1971,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, format("{} Plant pump simulation encountered a pump with zero efficiency: {}", RoutineName, thisPump.Name)); + ShowSevereError(state, + EnergyPlus::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."); } @@ -2081,10 +2106,10 @@ void SizePump(EnergyPlusData &state, int const PumpNum) } else { if (thisOkToReport) { thisPump.NomVolFlowRate = 0.0; - ShowWarningError( - state, - format("SizePump: Calculated Pump Nominal Volume Flow Rate=[{:.2R}] is too small. Set to 0.0", thisPlantSize.DesVolFlowRate)); - ShowContinueError(state, format("..occurs for Pump={}", thisPump.Name)); + 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)); } } if (thisOkToReport) { @@ -2101,7 +2126,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, format("Occurs in plant pump object={}", thisPump.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in plant pump object={}", thisPump.Name)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/PurchasedAirManager.cc b/src/EnergyPlus/PurchasedAirManager.cc index 353cd3589a7..c22bba488aa 100644 --- a/src/EnergyPlus/PurchasedAirManager.cc +++ b/src/EnergyPlus/PurchasedAirManager.cc @@ -174,25 +174,25 @@ void SimPurchasedAir(EnergyPlusData &state, if (CompIndex == 0) { PurchAirNum = Util::FindItemInList(PurchAirName, state.dataPurchasedAirMgr->PurchAir); if (PurchAirNum == 0) { - ShowFatalError(state, format("SimPurchasedAir: Unit not found={}", PurchAirName)); + ShowFatalError(state, EnergyPlus::format("SimPurchasedAir: Unit not found={}", PurchAirName)); } CompIndex = PurchAirNum; } else { PurchAirNum = CompIndex; if (PurchAirNum > state.dataPurchasedAirMgr->NumPurchAir || PurchAirNum < 1) { ShowFatalError(state, - format("SimPurchasedAir: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - PurchAirNum, - state.dataPurchasedAirMgr->NumPurchAir, - PurchAirName)); + EnergyPlus::format("SimPurchasedAir: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + PurchAirNum, + state.dataPurchasedAirMgr->NumPurchAir, + PurchAirName)); } if (state.dataPurchasedAirMgr->CheckEquipName(PurchAirNum)) { if (PurchAirName != state.dataPurchasedAirMgr->PurchAir(PurchAirNum).Name) { ShowFatalError(state, - format("SimPurchasedAir: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - PurchAirNum, - PurchAirName, - state.dataPurchasedAirMgr->PurchAir(PurchAirNum).Name)); + EnergyPlus::format("SimPurchasedAir: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + PurchAirNum, + PurchAirName, + state.dataPurchasedAirMgr->PurchAir(PurchAirNum).Name)); } state.dataPurchasedAirMgr->CheckEquipName(PurchAirNum) = false; } @@ -422,8 +422,9 @@ void GetPurchasedAir(EnergyPlusData &state) } if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningEmptyField(state, eoh, cAlphaFieldName); - ShowContinueError(state, format("{} is blank, but there is outdoor air requested for this system.", cAlphaFieldName)); - ShowContinueError(state, format("Creating node name ={}", oaInletNodeName)); + ShowContinueError(state, + EnergyPlus::format("{} is blank, but there is outdoor air requested for this system.", cAlphaFieldName)); + ShowContinueError(state, EnergyPlus::format("Creating node name ={}", oaInletNodeName)); } } // Register OA node @@ -440,9 +441,10 @@ void GetPurchasedAir(EnergyPlusData &state) bool IsOANodeListed; // Flag for OA node name listed in OutdoorAir:Node or Nodelist CheckAndAddAirNodeNumber(state, PurchAir.OutdoorAirNodeNum, IsOANodeListed); if ((!IsOANodeListed) && state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, format("{}{}=\"{} missing data", RoutineName, s_ipsc->cCurrentModuleObject, PurchAir.Name)); - ShowContinueError(state, format("{} does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", oaInletNodeName)); - ShowContinueError(state, format("Adding OutdoorAir:Node={}", oaInletNodeName)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{} missing data", RoutineName, s_ipsc->cCurrentModuleObject, PurchAir.Name)); + ShowContinueError(state, + EnergyPlus::format("{} does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", oaInletNodeName)); + ShowContinueError(state, EnergyPlus::format("Adding OutdoorAir:Node={}", oaInletNodeName)); } UniqueNodeError = false; CheckUniqueNodeNames(state, cAlphaFieldName, UniqueNodeError, oaInletNodeName, PurchAir.Name); @@ -456,9 +458,10 @@ void GetPurchasedAir(EnergyPlusData &state) if (PurchAir.DCVType == DCV::CO2SetPoint) { if (!state.dataContaminantBalance->Contaminant.CO2Simulation) { PurchAir.DCVType = DCV::None; - ShowWarningError(state, format("{}{}=\"{} invalid data", RoutineName, s_ipsc->cCurrentModuleObject, PurchAir.Name)); - ShowContinueError(state, format("{}={} but CO2 simulation is not active.", cAlphaFieldName, fieldValue)); - ShowContinueError(state, format("Resetting {} to NoDCV", cAlphaFieldName)); + ShowWarningError(state, + EnergyPlus::format("{}{}=\"{} invalid data", RoutineName, s_ipsc->cCurrentModuleObject, PurchAir.Name)); + ShowContinueError(state, EnergyPlus::format("{}={} but CO2 simulation is not active.", cAlphaFieldName, fieldValue)); + ShowContinueError(state, EnergyPlus::format("Resetting {} to NoDCV", cAlphaFieldName)); ShowContinueError(state, "To activate CO2 simulation, use ZoneAirContaminantBalance object and specify \"Carbon Dioxide " "Concentration\"=\"Yes\"."); @@ -1055,7 +1058,7 @@ void GetPurchasedAir(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding conditions cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding conditions cause termination.", RoutineName)); } } @@ -1103,9 +1106,9 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co InitializePlenumArrays(state, Loop); } else { ShowSevereError(state, - format("InitPurchasedAir: {} = {} cannot find ZoneHVAC:ReturnPlenum. It will not be simulated.", - PurchAirLoop.cObjectName, - PurchAirLoop.Name)); + EnergyPlus::format("InitPurchasedAir: {} = {} cannot find ZoneHVAC:ReturnPlenum. It will not be simulated.", + PurchAirLoop.cObjectName, + PurchAirLoop.Name)); } } @@ -1113,9 +1116,9 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co continue; } ShowSevereError(state, - format("InitPurchasedAir: {} = {} is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - PurchAirLoop.cObjectName, - PurchAirLoop.Name)); + EnergyPlus::format("InitPurchasedAir: {} = {} is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + PurchAirLoop.cObjectName, + PurchAirLoop.Name)); } } @@ -1132,12 +1135,12 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).InletNode, state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumInletNodes); if (NodeIndex == 0) { - ShowSevereError(state, format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); - ShowContinueError(state, - format("Zone Supply Air Node Name={} is not a zone inlet node.", state.dataLoopNodes->NodeID(SupplyNodeNum))); + ShowSevereError(state, EnergyPlus::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); ShowContinueError( - state, - format("Check ZoneHVAC:EquipmentConnections for zone={}", state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ZoneName)); + state, EnergyPlus::format("Zone Supply Air Node Name={} is not a zone inlet node.", state.dataLoopNodes->NodeID(SupplyNodeNum))); + ShowContinueError(state, + EnergyPlus::format("Check ZoneHVAC:EquipmentConnections for zone={}", + state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ZoneName)); ShowFatalError(state, "Preceding condition causes termination."); } } @@ -1152,12 +1155,13 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ExhaustNode, state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumExhaustNodes); if (NodeIndex == 0) { - ShowSevereError(state, format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); - ShowContinueError(state, - format("Zone Exhaust Air Node Name={} is not a zone exhaust node.", state.dataLoopNodes->NodeID(ExhaustNodeNum))); + ShowSevereError(state, EnergyPlus::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); ShowContinueError( state, - format("Check ZoneHVAC:EquipmentConnections for zone={}", state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ZoneName)); + 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)); ShowContinueError(state, "Zone return air node will be used for ideal loads recirculation air."); UseReturnNode = true; } else { @@ -1170,14 +1174,15 @@ 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, format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowWarningError(state, EnergyPlus::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, - format("Using the first return air node ={}", - state.dataLoopNodes->NodeID(state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ReturnNode(1)))); + ShowContinueError( + state, + EnergyPlus::format("Using the first return air node ={}", + state.dataLoopNodes->NodeID(state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ReturnNode(1)))); } else { - ShowFatalError(state, format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowFatalError(state, EnergyPlus::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."); @@ -1187,7 +1192,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, format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowSevereError(state, EnergyPlus::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 " @@ -1246,19 +1251,20 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co if (UnitOn && CoolOn) { if (PurchAir.CoolErrIndex == 0) { ShowSevereError(state, - format("InitPurchasedAir: For {} = {} serving Zone {}", - PurchAir.cObjectName, - PurchAir.Name, - state.dataHeatBal->Zone(ControlledZoneNum).Name)); - ShowContinueError(state, - format("..the minimum supply air temperature for cooling [{:.2R}] is greater than the zone cooling mean air " - "temperature (MAT) setpoint [{:.2R}].", - PurchAir.MinCoolSuppAirTemp, - zoneTstatSetpt.setptHi)); + EnergyPlus::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 " + "temperature (MAT) setpoint [{:.2R}].", + PurchAir.MinCoolSuppAirTemp, + zoneTstatSetpt.setptHi)); 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, format("Limit Cooling Capacity Type={}", limitTypeNames[(int)PurchAir.CoolingLimit])); + ShowContinueError(state, EnergyPlus::format("Limit Cooling Capacity Type={}", limitTypeNames[(int)PurchAir.CoolingLimit])); // could check for optemp control or comfort control here ShowContinueErrorTimeStamp(state, ""); } @@ -1294,19 +1300,20 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co if (UnitOn && HeatOn) { if (PurchAir.HeatErrIndex == 0) { ShowSevereMessage(state, - format("InitPurchasedAir: For {} = {} serving Zone {}", - PurchAir.cObjectName, - PurchAir.Name, - state.dataHeatBal->Zone(ControlledZoneNum).Name)); - ShowContinueError(state, - format("..the maximum supply air temperature for heating [{:.2R}] is less than the zone mean air temperature " - "heating setpoint [{:.2R}].", - PurchAir.MaxHeatSuppAirTemp, - zoneTstatSetpt.setptLo)); + EnergyPlus::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 " + "heating setpoint [{:.2R}].", + PurchAir.MaxHeatSuppAirTemp, + zoneTstatSetpt.setptLo)); 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, format("Limit Heating Capacity Type={}", limitTypeNames[(int)PurchAir.HeatingLimit])); + ShowContinueError(state, EnergyPlus::format("Limit Heating Capacity Type={}", limitTypeNames[(int)PurchAir.HeatingLimit])); // could check for optemp control or comfort control here ShowContinueErrorTimeStamp(state, ""); } @@ -1530,12 +1537,15 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) MaxHeatSensCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxHeatSensCapDes - MaxHeatSensCapUser) / MaxHeatSensCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", PurchAir.cObjectName, PurchAir.Name)); - ShowContinueError(state, format("...User-Specified Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapUser)); + ShowMessage(state, + EnergyPlus::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", + PurchAir.cObjectName, + PurchAir.Name)); ShowContinueError( - state, format("...differs from Design Size Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapDes)); + state, EnergyPlus::format("...User-Specified Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapUser)); + ShowContinueError( + state, + EnergyPlus::format("...differs from Design Size Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1680,12 +1690,14 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) MaxCoolTotCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxCoolTotCapDes - MaxCoolTotCapUser) / MaxCoolTotCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", PurchAir.cObjectName, PurchAir.Name)); - ShowContinueError(state, format("User-Specified Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapUser)); + ShowMessage(state, + EnergyPlus::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", + PurchAir.cObjectName, + PurchAir.Name)); ShowContinueError(state, - format("differs from Design Size Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapDes)); + EnergyPlus::format("User-Specified Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1760,12 +1772,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, format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowWarningError(state, EnergyPlus::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, - format("Check the outdoor air specifications in the Sizing:Zone object for zone {}.", - state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).ZoneName)); + EnergyPlus::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) { @@ -1779,12 +1791,15 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) MaxHeatSensCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxHeatSensCapDes - MaxHeatSensCapUser) / MaxHeatSensCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", PurchAir.cObjectName, PurchAir.Name)); - ShowContinueError(state, format("...User-Specified Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapUser)); + ShowMessage(state, + EnergyPlus::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( - state, format("...differs from Design Size Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapDes)); + state, + EnergyPlus::format("...differs from Design Size Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1862,12 +1877,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, format("SizePurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowWarningError(state, EnergyPlus::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, - format("Check the outdoor air specifications in the Sizing:Zone object for zone {}.", - state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).ZoneName)); + EnergyPlus::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) { @@ -1881,12 +1896,14 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) MaxCoolTotCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxCoolTotCapDes - MaxCoolTotCapUser) / MaxCoolTotCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", PurchAir.cObjectName, PurchAir.Name)); - ShowContinueError(state, format("User-Specified Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapUser)); + ShowMessage(state, + EnergyPlus::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", + PurchAir.cObjectName, + PurchAir.Name)); ShowContinueError(state, - format("differs from Design Size Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapDes)); + EnergyPlus::format("User-Specified Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2053,12 +2070,13 @@ void CalcPurchAirLoads(EnergyPlusData &state, if (PurchAir.OAFlowMaxCoolOutputError < 1) { ++PurchAir.OAFlowMaxCoolOutputError; ShowWarningError(state, - format("{} \"{}\" Requested outdoor air flow rate = {:.5T} [m3/s] exceeds limit.", - PurchAir.cObjectName, - PurchAir.Name, - OAVolFlowRate)); - ShowContinueError(state, - format(" Will be reduced to the Maximum Cooling Air Flow Rate = {:.5T} [m3/s]", PurchAir.MaxCoolVolFlowRate)); + EnergyPlus::format("{} \"{}\" Requested outdoor air flow rate = {:.5T} [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)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -2357,12 +2375,13 @@ void CalcPurchAirLoads(EnergyPlusData &state, if (PurchAir.OAFlowMaxHeatOutputError < 1) { ++PurchAir.OAFlowMaxHeatOutputError; ShowWarningError(state, - format("{} \"{}\" Requested outdoor air flow rate = {:.5T} [m3/s] exceeds limit.", - PurchAir.cObjectName, - PurchAir.Name, - OAVolFlowRate)); - ShowContinueError(state, - format(" Will be reduced to the Maximum Heating Air Flow Rate = {:.5T} [m3/s]", PurchAir.MaxHeatVolFlowRate)); + EnergyPlus::format("{} \"{}\" Requested outdoor air flow rate = {:.5T} [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)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -2615,11 +2634,11 @@ void CalcPurchAirLoads(EnergyPlusData &state, if (PurchAir.SaturationOutputError < 1) { ++PurchAir.SaturationOutputError; ShowWarningError(state, - format("{} \"{}\" Supply humidity ratio = {:.5T} exceeds saturation limit {:.5T} [kgWater/kgDryAir]", - PurchAir.cObjectName, - PurchAir.Name, - SupplyHumRatOrig, - SupplyHumRatSat)); + EnergyPlus::format("{} \"{}\" Supply humidity ratio = {:.5T} exceeds saturation limit {:.5T} [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 813cb9cf7e2..9d2f50d4423 100644 --- a/src/EnergyPlus/PythonEngine.cc +++ b/src/EnergyPlus/PythonEngine.cc @@ -162,7 +162,7 @@ namespace Python { if (!traceback_line.empty() && traceback_line[traceback_line.length() - 1] == '\n') { traceback_line.erase(traceback_line.length() - 1); } - EnergyPlus::ShowContinueError(state, format(" >>> {}", traceback_line)); + EnergyPlus::ShowContinueError(state, EnergyPlus::format(" >>> {}", traceback_line)); } // PyList_GetItem returns a borrowed reference, do not decrement } @@ -194,7 +194,7 @@ namespace Python { } if (unicodeIncludePath == nullptr) { EnergyPlus::ShowFatalError( - state, format("ERROR converting the path \"{}\" for addition to the sys.path in Python", includePath.generic_string())); + state, EnergyPlus::format("ERROR converting the path \"{}\" for addition to the sys.path in Python", includePath.generic_string())); } PyObject *sysPath = PySys_GetObject("path"); // Borrowed reference @@ -205,11 +205,12 @@ namespace Python { if (PyErr_Occurred() != nullptr) { reportPythonError(state); } - EnergyPlus::ShowFatalError(state, format("ERROR adding \"{}\" to the sys.path in Python", includePath.generic_string())); + EnergyPlus::ShowFatalError(state, EnergyPlus::format("ERROR adding \"{}\" to the sys.path in Python", includePath.generic_string())); } if (userDefinedPath) { - EnergyPlus::ShowMessage(state, format("Successfully added path \"{}\" to the sys.path in Python", includePath.generic_string())); + EnergyPlus::ShowMessage(state, + EnergyPlus::format("Successfully added path \"{}\" to the sys.path in Python", includePath.generic_string())); } // PyRun_SimpleString)("print(' EPS : ' + str(sys.path))"); diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index e85223272f8..b4e566195fb 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -734,12 +734,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(CaseNum).ActualZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cAlphaFieldNames(3), - Alphas(3))); + EnergyPlus::format("{}{}=\"{}\", invalid {} not valid: {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cAlphaFieldNames(3), + Alphas(3))); ErrorsFound = true; } else { state.dataRefrigCase->RefrigPresentInZone(RefrigCase(CaseNum).ActualZoneNum) = true; @@ -750,22 +750,22 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).RatedAmbientTemp = Numbers(1); if (Numbers(1) <= 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than 0 C", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(1))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than 0 C", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } RefrigCase(CaseNum).RatedAmbientRH = Numbers(2); if (Numbers(2) <= 0.0 || Numbers(2) >= 100.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than 0% and less than 100%", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than 0% and less than 100%", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } RefrigCase(CaseNum).RatedAmbientDewPoint = Psychrometrics::PsyTdpFnWPb( @@ -777,11 +777,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).RateTotCapPerLength = Numbers(3); if (Numbers(3) <= 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than 0 W/m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } @@ -789,7 +789,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Numbers(4) < 0.0 || Numbers(4) > 1.0) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", {} must be >= 0 and <= 1", RoutineName, CurrentModuleObject, RefrigCase(CaseNum).Name, cNumericFieldNames(4))); ErrorsFound = true; } @@ -797,34 +797,34 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).RatedRTF = Numbers(5); if (Numbers(5) <= 0.0 || Numbers(5) > 1.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be > 0 and <= to 1", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(5))); + EnergyPlus::format("{}{}=\"{}\", {} must be > 0 and <= to 1", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(5))); ErrorsFound = true; } RefrigCase(CaseNum).Length = Numbers(6); if (Numbers(6) <= 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than 0 m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(6))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than 0 m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(6))); ErrorsFound = true; } RefrigCase(CaseNum).Temperature = Numbers(7); if (RefrigCase(CaseNum).Temperature >= RefrigCase(CaseNum).RatedAmbientTemp) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be below {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(7), - cNumericFieldNames(1))); + EnergyPlus::format("{}{}=\"{}\", {} must be below {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(7), + cNumericFieldNames(1))); ErrorsFound = true; } @@ -853,11 +853,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).STDFanPower = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } else { // blank use default of 75 W/m @@ -869,11 +869,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).OperatingFanPower = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } else { // if blank set = to std fan power @@ -885,11 +885,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).RatedLightingPower = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } else { // blank input - use default of 90 W/m @@ -901,11 +901,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).LightingPower = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } else { // blank input so set lighting power equal to rated/std lighting power @@ -930,11 +930,11 @@ void GetRefrigerationInput(EnergyPlusData &state) // check lighting fraction to case input if (RefrigCase(CaseNum).LightingFractionToCase < 0.0 || RefrigCase(CaseNum).LightingFractionToCase > 1.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} has a value outside the valid range", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} has a value outside the valid range", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ShowContinueError(state, " Minimum should be >= 0.0 and Maximum should be <= 1.0"); ErrorsFound = true; } @@ -943,11 +943,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).AntiSweatPower = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -955,11 +955,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).MinimumASPower = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -975,12 +975,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(CaseNum).Temperature >= RefrigCase(CaseNum).RatedAmbientDewPoint && RefrigCase(CaseNum).AntiSweatControlType == ASHtrCtrlType::DewPoint) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be below the Rated Ambient Dew Point when {} is Dew Point Method", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(7), - cAlphaFieldNames(7))); + EnergyPlus::format("{}{}=\"{}\", {} must be below the Rated Ambient Dew Point when {} is Dew Point Method", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(7), + cAlphaFieldNames(7))); ErrorsFound = true; } @@ -992,13 +992,13 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(CaseNum).HumAtZeroAS >= RefrigCase(CaseNum).RatedAmbientRH && RefrigCase(CaseNum).AntiSweatControlType == ASHtrCtrlType::Linear) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be less than {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cNumericFieldNames(2))); - ShowContinueError(state, format(" for Linear {}.", cAlphaFieldNames(7))); + EnergyPlus::format("{}{}=\"{}\", {} must be less than {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum), + cNumericFieldNames(2))); + ShowContinueError(state, EnergyPlus::format(" for Linear {}.", cAlphaFieldNames(7))); ErrorsFound = true; } @@ -1006,23 +1006,23 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).Height = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than or equal to 0 m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::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, - format("{}{}=\"{}\", {} must be greater than 0 when {} is Heat Balance Method.", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cAlphaFieldNames(7))); - ShowContinueError(state, format("..given {} was: {:.3R}", cNumericFieldNames(NumNum), RefrigCase(CaseNum).Height)); + EnergyPlus::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; } @@ -1040,14 +1040,16 @@ void GetRefrigerationInput(EnergyPlusData &state) } RefrigCase(CaseNum).Rcase = max(0.0, Rcase); if (RefrigCase(CaseNum).Rcase == 0.0) { - ShowWarningError(state, - format("{}=\"{}\" A case thermal resistance of 0 was calculated for anti-sweat heater performance using the", - CurrentModuleObject, - RefrigCase(CaseNum).Name)); - ShowContinueError(state, - format(" Heat Balance Method control type. Anti-sweat heater performance cannot be calculated and {} will be " - "set to None and simulation continues.", - cAlphaFieldNames(7))); + ShowWarningError( + state, + EnergyPlus::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))); ShowContinueError(state, " See Engineering Documentation for anti-sweat heater control of refrigerated cases."); } } @@ -1056,11 +1058,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).ASHeaterFractionToCase = Numbers(NumNum); if (Numbers(NumNum) < 0.0 || Numbers(NumNum) > 1.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be >= 0 and <= 1", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be >= 0 and <= 1", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -1083,22 +1085,22 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).DefrostPower = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::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, - format("{}=\"{}\", {} for {} None or Off-Cycle will be set to 0 and simulation continues.", - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cAlphaFieldNames(8))); + EnergyPlus::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; @@ -1109,13 +1111,13 @@ void GetRefrigerationInput(EnergyPlusData &state) DefType == RefCaseDefrostType::ElectricTerm) && RefrigCase(CaseNum).DefrostPower <= 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than 0 W/m for {} {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cAlphaFieldNames(8), - Alphas(8))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than 0 W/m for {} {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum), + cAlphaFieldNames(8), + Alphas(8))); ErrorsFound = true; } @@ -1200,11 +1202,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(CaseNum).defrostType != RefCaseDefrostType::ElectricTerm && RefrigCase(CaseNum).defrostType != RefCaseDefrostType::HotFluidTerm) { ShowWarningError(state, - format("{}=\"{}\", invalid {} is only applicable to Defrost Temperature Termination types.", - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cAlphaFieldNames(12))); - ShowContinueError(state, format("{} will be disregarded and simulation continues.", cAlphaFieldNames(12))); + 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))); } } @@ -1212,11 +1214,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).RAFrac = Numbers(NumNum); if (Numbers(NumNum) < 0.0 || Numbers(NumNum) > 1.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be >= 0 or <= 1 ", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be >= 0 or <= 1 ", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -1235,24 +1237,24 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(CaseNum).ActualZoneNum >= 0) { if (RefrigCase(CaseNum).ZoneNodeNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", System Node Number not found for {} = {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cAlphaFieldNames(3), - Alphas(3))); + EnergyPlus::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, - format("{}{}=\"{}\", Under Case HVAC Return Air Node number not found for {} = {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cAlphaFieldNames(3), - Alphas(3))); + EnergyPlus::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."); @@ -1268,11 +1270,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, - format("{}{}=\"{}\", {} not applicable to zones without return air systems.", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(19))); + EnergyPlus::format("{}{}=\"{}\", {} not applicable to zones without return air systems.", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(19))); ErrorsFound = true; } @@ -1305,10 +1307,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (DesignSensibleCap < CaseHeatGain) { ShowSevereError( state, - format("{}{}=\"{}\", the sum of lighting, fan, and anti-sweat heater energy is greater than refrigerated case sensible capacity", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name)); + EnergyPlus::format( + "{}{}=\"{}\", the sum of lighting, fan, and anti-sweat heater energy is greater than refrigerated case sensible capacity", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name)); ErrorsFound = true; } @@ -1334,12 +1337,12 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).EvapTempDesign = Numbers(NumNum); if (RefrigCase(CaseNum).EvapTempDesign >= RefrigCase(CaseNum).Temperature) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be below {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cNumericFieldNames(7))); + EnergyPlus::format("{}{}=\"{}\" {} must be below {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum), + cNumericFieldNames(7))); ErrorsFound = true; } } else { @@ -1353,11 +1356,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).DesignRefrigInventory = RefrigCase(CaseNum).RefrigInventory * RefrigCase(CaseNum).Length; if (RefrigCase(CaseNum).RefrigInventory < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be a positive number.", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\" {} must be a positive number.", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } else { @@ -1403,7 +1406,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Numbers(1) <= 0.0) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", {} must be greater than 0 W", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(1))); ErrorsFound = true; } @@ -1444,11 +1447,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).CoilFanPower = Numbers(5); } else { ShowWarningError(state, - 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))); + 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))); WalkIn(WalkInID).CoilFanPower = 375.0; // default value = 1/2 hp } @@ -1458,11 +1461,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).CircFanPower = Numbers(6); if (Numbers(7) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than >= 0 W", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(6))); + EnergyPlus::format("{}{}=\"{}\", {} must be greater than >= 0 W", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + cNumericFieldNames(6))); ErrorsFound = true; } } @@ -1537,13 +1540,13 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { // have electric or hot gas/brine defrost if ((lNumericBlanks(8)) || (Numbers(8) <= 0.0)) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and greater than or equal to 0 W for {} {}", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(8), - cAlphaFieldNames(5), - Alphas(5))); + 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))); ErrorsFound = true; } else { WalkIn(WalkInID).DefrostCapacity = Numbers(8); @@ -1560,11 +1563,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!lNumericBlanks(9)) { if ((Numbers(9) > 1.0) || (Numbers(9) < 0.0)) { ShowWarningError(state, - format("{}{}=\"{}\", {} must be between 0 and 1, default values will be used.", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(9))); + EnergyPlus::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 @@ -1588,7 +1591,9 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).FloorArea = Numbers(11); } else { ShowSevereError( - state, format("{}{}=\"{}\", {} must be input", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(11))); + state, + EnergyPlus::format( + "{}{}=\"{}\", {} must be input", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(11))); ErrorsFound = true; } @@ -1599,7 +1604,8 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Numbers(12) <= 0.0) { ShowSevereError( state, - format("{}{}=\"{}\", {} must be > 0.", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(12))); + EnergyPlus::format( + "{}{}=\"{}\", {} must be > 0.", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(12))); ErrorsFound = true; } } @@ -1719,12 +1725,12 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).SurfaceArea(ZoneID) = Numbers(NStart); } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input for Zone: {}", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(NStart), - WalkIn(WalkInID).ZoneName(ZoneID))); + EnergyPlus::format("{}{}=\"{}\", {} must be input for Zone: {}", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + cNumericFieldNames(NStart), + WalkIn(WalkInID).ZoneName(ZoneID))); ErrorsFound = true; } @@ -1734,12 +1740,12 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).UValue(ZoneID) = Numbers(NStart + 1); if (Numbers(NStart + 1) <= 0.0) { ShowSevereError(state, - format(R"({}{}="{}", Zone="{}", {} must be > 0.)", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - WalkIn(WalkInID).ZoneName(ZoneID), - cNumericFieldNames(NStart + 1))); + EnergyPlus::format(R"({}{}="{}", Zone="{}", {} must be > 0.)", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + WalkIn(WalkInID).ZoneName(ZoneID), + cNumericFieldNames(NStart + 1))); ErrorsFound = true; } } @@ -1884,11 +1890,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).UnitLoadFactorSens = Numbers(NumNum); } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W/C", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W/C", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1905,22 +1911,22 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { if (Numbers(NumNum) <= 0.0 || Numbers(NumNum) >= 100.0) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be greater than 0% and less than 100%", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::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, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1933,11 +1939,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 1; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1951,11 +1957,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 1; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1968,11 +1974,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 2; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1986,11 +1992,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 2; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2003,11 +2009,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 3; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2021,11 +2027,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 3; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2038,11 +2044,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 4; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2056,11 +2062,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 4; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2073,11 +2079,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 5; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2091,11 +2097,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 5; } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2112,7 +2118,7 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", {} must be input", RoutineName, CurrentModuleObject, WarehouseCoil(CoilID).Name, cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -2124,7 +2130,7 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", {} must be input", RoutineName, CurrentModuleObject, WarehouseCoil(CoilID).Name, cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -2137,11 +2143,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { WarehouseCoil(CoilID).MaxTemperatureDif = 1.3 * WarehouseCoil(CoilID).RatedTemperatureDif; ShowWarningError(state, - format("{}{}=\"{}\", {} not entered, default 1.3 times rated temperature difference will be used.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::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 @@ -2183,18 +2189,18 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SHRCorrType = SHRCorrectionType::TabularRH_DT1_TRoom; if (!(Util::SameString(Alphas(AlphaNum), "TabularRHxDT1xTRoom"))) { ShowWarningError(state, - format(R"({}{}="{}", invalid {}="{}".)", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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, - format( + EnergyPlus::format( R"(the "TabularRHxDT1xTRoom" correction curve. Verify that a valid "TabularRHxDT1xTRoom" curve is specified in "{}".)", cAlphaFieldNames(AlphaNum + 1))); } @@ -2216,20 +2222,20 @@ void GetRefrigerationInput(EnergyPlusData &state) if (WarehouseCoil(CoilID).SHRCorrection60 > 1.67) { WarehouseCoil(CoilID).SHRCorrection60 = 1.67; ShowWarningError(state, - format("{}{}=\"{}\", {} must be between 1 and 1.67, 1.67 will be used.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::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, - format("{}{}=\"{}\", {} must be between 1 and 1.67, 1.00 will be used.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} must be between 1 and 1.67, 1.00 will be used.", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); } } break; case SHRCorrectionType::European: { @@ -2257,15 +2263,16 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SHRCorrectionCurvePtr = Curve::GetCurveIndex(state, Alphas(AlphaNum)); // convert curve name to number if (lAlphaBlanks(AlphaNum)) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} is blank, required.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cAlphaFieldNames(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", invalid {} is blank, required.", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cAlphaFieldNames(AlphaNum))); ErrorsFound = true; } else if (WarehouseCoil(CoilID).SHRCorrectionCurvePtr == 0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid ", RoutineName, CurrentModuleObject, WarehouseCoil(CoilID).Name)); - ShowContinueError(state, format("...invalid curve {}=\"{}\".", cAlphaFieldNames(AlphaNum), Alphas(AlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", invalid ", RoutineName, CurrentModuleObject, WarehouseCoil(CoilID).Name)); + ShowContinueError(state, EnergyPlus::format("...invalid curve {}=\"{}\".", cAlphaFieldNames(AlphaNum), Alphas(AlphaNum))); ErrorsFound = true; } ErrorsFound |= Curve::CheckCurveDims(state, @@ -2319,11 +2326,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).RatedFanPower = Numbers(NumNum); } else { ShowSevereError(state, - format("{}{}=\"{}\", {} was not input or was less than 0 ", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} was not input or was less than 0 ", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } // coil fan power @@ -2332,11 +2339,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).RatedAirVolumeFlow = Numbers(NumNum); } else { ShowSevereError(state, - format("{}{}=\"{}\", {} is required and was not input or was less than 0 ", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}{}=\"{}\", {} is required and was not input or was less than 0 ", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); } // air volume flow ++NumNum; // N13 @@ -2397,13 +2404,13 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { // have electric or hot gas/brine defrost if ((lNumericBlanks(NumNum)) || (Numbers(NumNum) <= 0.0)) { ShowSevereError(state, - format("{}{}=\"{}\", {} must be input and greater than or equal to 0 W for {} {}", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum), - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + 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))); ErrorsFound = true; } else { WarehouseCoil(CoilID).DefrostCapacity = Numbers(NumNum); @@ -2422,11 +2429,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!lNumericBlanks(NumNum)) { if ((Numbers(NumNum) > 1.0) || (Numbers(NumNum) < 0.0)) { ShowWarningError(state, - format("{}{}=\"{}\", {} must be between 0 and 1, default values will be used.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::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 @@ -2496,23 +2503,23 @@ void GetRefrigerationInput(EnergyPlusData &state) if (AirChillerSet(SetID).ZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - AirChillerSet(SetID).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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, - format("{}{}=\"{}\" System Node Number not found for {} = {}", - RoutineName, - CurrentModuleObject, - AirChillerSet(SetID).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -2521,13 +2528,14 @@ void GetRefrigerationInput(EnergyPlusData &state) ++AlphaNum; if (!lAlphaBlanks(AlphaNum)) { - ShowMessage(state, - 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))); + 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))); // Node identification reserved for future use. Currently exchange energy directly with zone outside any air system // AirChillerSet(SetID)%NodeNumInlet = & // NodeInputManager::GetOnlySingleNode(state, Alphas(AlphaNum),ErrorsFound,TRIM(CurrentModuleObject), & @@ -2536,13 +2544,14 @@ void GetRefrigerationInput(EnergyPlusData &state) ++AlphaNum; if (!lAlphaBlanks(AlphaNum)) { - ShowMessage(state, - 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))); + 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))); // Node identification reserved for future use. Currently exchange energy directly with zone outside any air system // AirChillerSet(SetID)%NodeNumOutlet = & // NodeInputManager::GetOnlySingleNode(state, Alphas(AlphaNum),ErrorsFound,TRIM(CurrentModuleObject), & @@ -2563,12 +2572,12 @@ void GetRefrigerationInput(EnergyPlusData &state) int CoilNum = Util::FindItemInList(Alphas(AlphaListNum), WarehouseCoil); if (CoilNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid {} defined as {}", - RoutineName, - CurrentModuleObject, - AirChillerSet(SetID).Name, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid {} defined as {}", + RoutineName, + CurrentModuleObject, + AirChillerSet(SetID).Name, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } // == 0 AirChillerSet(SetID).CoilNum(ChillerIndex) = CoilNum; @@ -2635,19 +2644,19 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((LoadWalkInNum == 0) && (LoadCaseNum == 0) && (LoadCoilNum == 0)) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid value of {}", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid value of {}", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } else if ((LoadWalkInNum != 0) && (LoadCaseNum != 0) && (LoadCoilNum != 0)) { ShowSevereError(state, - format("{}{}=\"{}\", {} Case and WalkIns and Refrigerated Coils cannot have the same name.", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + EnergyPlus::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; @@ -2664,7 +2673,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (LoadCount == 0) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}, \"{}\" : degenerate list All entries were blank.", RoutineName, CurrentModuleObject, CaseAndWalkInList(ListNum).Name)); ErrorsFound = true; } // loadcount == 0 @@ -2717,11 +2726,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigRack(RackNum).RatedCOP <= 0.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be greater than 0.0", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(1))); + EnergyPlus::format("{}{}=\"{}\" {} must be greater than 0.0", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } @@ -2742,23 +2751,23 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigRack(RackNum).CondenserFanPower = Numbers(2); if (Numbers(2) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be greater than or equal to 0 Watts.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(2))); + EnergyPlus::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, - format("{}{}=\"{}\", invalid {} not found:{}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(4), - Alphas(4))); + EnergyPlus::format("{}{}=\"{}\", invalid {} not found:{}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(4), + Alphas(4))); ErrorsFound = true; } @@ -2782,13 +2791,13 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Water) { if (RefrigRack(RackNum).HeatRejectionLocation == HeatRejLocation::Zone) { ShowWarningError(state, - format("{}=\"{}\" {}=\"{}\" not available with {} = Zone.", - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(5), - Alphas(5), - cAlphaFieldNames(2))); - ShowContinueError(state, format("{} reset to Air Cooled and simulation continues.", cAlphaFieldNames(5))); + 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))); RefrigRack(RackNum).CondenserType = DataHeatBalance::RefrigCondenserType::Air; } } else if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Cascade || @@ -2844,12 +2853,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, - format("{}{}=\"{}\" {} > {}.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(3), - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\" {} > {}.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(3), + cNumericFieldNames(4))); ShowContinueError(state, "Revise flow rates."); ErrorsFound = true; } @@ -2873,11 +2882,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigRack(RackNum).EvapEffect = Numbers(7); if (RefrigRack(RackNum).EvapEffect < 0.0 || RefrigRack(RackNum).EvapEffect > 1.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} cannot be less than zero or greater than 1.0.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(7))); + EnergyPlus::format("{}{}=\"{}\" {} cannot be less than zero or greater than 1.0.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(7))); ErrorsFound = true; } @@ -2885,11 +2894,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Evap && RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && RefrigRack(RackNum).CondenserAirFlowRate != Constant::AutoCalculate) { ShowSevereError(state, - format("{}{}=\"{}\", {} cannot be less than or equal to zero.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(8))); + EnergyPlus::format("{}{}=\"{}\", {} cannot be less than or equal to zero.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(8))); ErrorsFound = true; } @@ -2897,7 +2906,9 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigRack(RackNum).BasinHeaterPowerFTempDiff = Numbers(9); if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Evap && Numbers(9) < 0.0) { ShowSevereError( - state, format("{}{}=\"{}\", {} must be >= 0", RoutineName, CurrentModuleObject, RefrigRack(RackNum).Name, cNumericFieldNames(9))); + state, + EnergyPlus::format( + "{}{}=\"{}\", {} must be >= 0", RoutineName, CurrentModuleObject, RefrigRack(RackNum).Name, cNumericFieldNames(9))); ErrorsFound = true; } @@ -2905,21 +2916,21 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Evap && RefrigRack(RackNum).BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - format("{}=\"{}\", {} is less than 2 deg C. Freezing could occur.", - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(10))); + EnergyPlus::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, - format("{}{}=\"{}\", {} cannot be less than zero.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(11))); + EnergyPlus::format("{}{}=\"{}\", {} cannot be less than zero.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(11))); ErrorsFound = true; } @@ -2954,12 +2965,12 @@ void GetRefrigerationInput(EnergyPlusData &state) DataLoopNode::ObjectIsParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, RefrigRack(RackNum).OutsideAirNodeNum)) { ShowSevereError(state, - format("{}{}=\"{}\", {} not found: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(12), - Alphas(12))); + EnergyPlus::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; } @@ -2983,11 +2994,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (lAlphaBlanks(AlphaNum)) { // No cases or walkins or coils specified, ie, rack has no load ShowSevereError(state, - format("{}{}=\"{}\" : has no loads, must have at least one of: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(14))); + EnergyPlus::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 @@ -3025,20 +3036,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - format("{}{}=\"{}\" : has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\" : has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - format("{}{}=\"{}\" : has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -3100,8 +3111,9 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(RefrigRack(RackNum).CaseNum(caseIndex)).ActualZoneNum == ZoneNum) { continue; } - ShowSevereError(state, - format(R"({}{}="{}" : All cases attached to a rack must be in the same zone when {} equals "Zone".)", + 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, @@ -3139,11 +3151,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (lAlphaBlanks(15)) { ShowSevereError( state, - format("{}{}=\"{}{} must be input if walkins or AirChillers connected to rack and heat rejection location = zone.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(15))); + EnergyPlus::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); @@ -3151,12 +3164,12 @@ void GetRefrigerationInput(EnergyPlusData &state) DataZoneEquipment::GetSystemNodeNumberForZone(state, RefrigRack(RackNum).HeatRejectionZoneNum); if (RefrigRack(RackNum).HeatRejectionZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(15), - Alphas(15))); + EnergyPlus::format("{}{}=\"{}\", invalid {} not valid: {}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(15), + Alphas(15))); ErrorsFound = true; } else { state.dataRefrigCase->RefrigPresentInZone(RefrigRack(RackNum).HeatRejectionZoneNum) = true; @@ -3232,12 +3245,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, - format("{}{}=\"{}\", invalid {} not found:{}", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cAlphaFieldNames(2), - Alphas(2))); + EnergyPlus::format("{}{}=\"{}\", invalid {} not found:{}", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cAlphaFieldNames(2), + Alphas(2))); ErrorsFound = true; } @@ -3267,8 +3280,9 @@ 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, - format("{}{}=\"{}\" Condenser capacity curve per ARI 460 must be input and must be greater than 0 Watts at " + 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, @@ -3295,11 +3309,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((lNumericBlanks(2)) || (Numbers(2) < 0.0)) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be input greater than or equal to 0 Watts.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\" {} must be input greater than or equal to 0 Watts.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } @@ -3336,12 +3350,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Condenser(CondNum).InletAirNodeNum)) { // not outside and not a zone ShowSevereError(state, - format("{}{}=\"{}\", {} not found: {}", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cAlphaFieldNames(4), - Alphas(4))); + EnergyPlus::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 @@ -3409,11 +3423,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedCapacity = Numbers(1); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} per ARI 490 must be input and must be greater than 0 Watts.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(1))); + EnergyPlus::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 @@ -3436,11 +3450,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedFanPower = Numbers(3); if (Numbers(3) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be greater than or equal to 0 Watts.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\" {} must be greater than or equal to 0 Watts.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } @@ -3464,10 +3478,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).EvapCoeff1 = Numbers(NumNum); } else { ShowWarningError(state, - format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::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 @@ -3476,10 +3490,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).EvapCoeff2 = Numbers(NumNum); } else { ShowWarningError(state, - format("{}=\"{}\", {} is less than or equal to 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}=\"{}\", {} is less than or equal to 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 7; @@ -3488,10 +3502,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).EvapCoeff3 = Numbers(NumNum); } else { ShowWarningError(state, - format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 8; @@ -3500,10 +3514,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).EvapCoeff4 = Numbers(NumNum); } else { ShowWarningError(state, - format("{}=\"{}\", {} is less than -20 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}=\"{}\", {} is less than -20 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 9; @@ -3512,10 +3526,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).MinCapFacEvap = Numbers(NumNum); } else { ShowWarningError(state, - format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 10; @@ -3524,10 +3538,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).MaxCapFacEvap = Numbers(NumNum); } else { ShowWarningError(state, - format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } @@ -3547,12 +3561,12 @@ void GetRefrigerationInput(EnergyPlusData &state) DataLoopNode::ObjectIsParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Condenser(CondNum).InletAirNodeNum)) { ShowSevereError(state, - format("{}{}=\"{}\", {} not found: {}", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cAlphaFieldNames(3), - Alphas(3))); + EnergyPlus::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; } @@ -3569,7 +3583,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Numbers(NumNum) < 0.0) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}\", {} must be >= 0", RoutineName, CurrentModuleObject, Condenser(CondNum).Name, cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -3581,10 +3595,10 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Condenser(CondNum).BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - format("{}=\"{}\", {} is less than 2 deg C. Freezing could occur.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + EnergyPlus::format("{}=\"{}\", {} is less than 2 deg C. Freezing could occur.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } NumNum = 14; @@ -3679,11 +3693,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedCapacity = Numbers(1); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} per ARI 450 must be input and must be greater than 0 Watts.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(1))); + EnergyPlus::format("{}{}=\"{}\" {} per ARI 450 must be input and must be greater than 0 Watts.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } @@ -3691,11 +3705,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedTCondense = Numbers(2); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} per ARI 450 must be input and must be greater than 0 C.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\" {} per ARI 450 must be input and must be greater than 0 C.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } @@ -3704,11 +3718,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedSubcool = Numbers(3); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be greater than or equal to zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\" {} must be greater than or equal to zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } } else { @@ -3720,11 +3734,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedApproachT = Condenser(CondNum).RatedTCondense - Numbers(4); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be input and greater than zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\" {} must be input and greater than zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(4))); ErrorsFound = true; } @@ -3774,11 +3788,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).VolFlowRate = Numbers(5); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be greater than zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(5))); + EnergyPlus::format("{}{}=\"{}\" {} must be greater than zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(5))); ShowContinueError(state, "Revise flow rates."); ErrorsFound = true; } @@ -3791,22 +3805,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, - format("{}{}=\"{}\" {} > {} .", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(5), - cNumericFieldNames(6))); + EnergyPlus::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, - format("{}{}=\"{}\" {} must be greater than zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(6))); + EnergyPlus::format("{}{}=\"{}\" {} must be greater than zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(6))); ErrorsFound = true; } @@ -3877,7 +3891,8 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - format("{}{}=\"{}\" {} must be input.", RoutineName, CurrentModuleObject, Condenser(CondNum).Name, cNumericFieldNames(1))); + EnergyPlus::format( + "{}{}=\"{}\" {} must be input.", RoutineName, CurrentModuleObject, Condenser(CondNum).Name, cNumericFieldNames(1))); ErrorsFound = true; } @@ -3886,11 +3901,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedApproachT = Numbers(2); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be greater than or equal to zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\" {} must be greater than or equal to zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } } else { @@ -3901,11 +3916,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedCapacity = Numbers(3); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be in put and must be greater than or equal to zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\" {} must be in put and must be greater than or equal to zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } @@ -3987,10 +4002,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - format("{}{}=\"{}\" Gas Cooler capacity curve must be input and must be greater than 0 Watts at 3C temperature difference.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name)); + EnergyPlus::format( + "{}{}=\"{}\" Gas Cooler capacity curve must be input and must be greater than 0 Watts at 3C temperature difference.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name)); ErrorsFound = true; } @@ -4010,11 +4026,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Numbers(1) < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be input greater than or equal to 0 Watts.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(1))); + EnergyPlus::format("{}{}=\"{}\" {} must be input greater than or equal to 0 Watts.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } @@ -4025,11 +4041,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((GasCooler(GCNum).FanMinAirFlowRatio < 0.0) || (GasCooler(GCNum).FanMinAirFlowRatio > 1.0)) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be a value between zero and one. The default value (0.2) will be used.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(2))); + 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))); GasCooler(GCNum).FanMinAirFlowRatio = 0.2; } @@ -4039,22 +4055,24 @@ void GetRefrigerationInput(EnergyPlusData &state) GasCooler(GCNum).TransitionTemperature = Numbers(3); } if (GasCooler(GCNum).TransitionTemperature < 2.5e1) { - ShowWarningError(state, - 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, + 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))); } if (GasCooler(GCNum).TransitionTemperature > 30.978) { ShowWarningError( state, - format("{}{}=\"{}\" {} is greater than the critical temperature of carbon dioxide. The default value (27C) will be used.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(3))); + EnergyPlus::format( + "{}{}=\"{}\" {} is greater than the critical temperature of carbon dioxide. The default value (27C) will be used.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(3))); GasCooler(GCNum).TransitionTemperature = 2.7e1; } @@ -4065,11 +4083,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (GasCooler(GCNum).GasCoolerApproachT < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be greater than 0C.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\" {} must be greater than 0C.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(4))); ErrorsFound = true; } @@ -4080,11 +4098,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (GasCooler(GCNum).SubcriticalTempDiff < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be greater than 0C.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(5))); + EnergyPlus::format("{}{}=\"{}\" {} must be greater than 0C.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(5))); ErrorsFound = true; } @@ -4095,11 +4113,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (GasCooler(GCNum).MinCondTemp > 30.9) { ShowSevereError(state, - format("{}{}=\"{}\" {} must be less than the critical temperature of carbon dioxide (31C).", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(6))); + EnergyPlus::format("{}{}=\"{}\" {} must be less than the critical temperature of carbon dioxide (31C).", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(6))); ErrorsFound = true; } @@ -4195,11 +4213,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (lAlphaBlanks(AlphaNum)) { // No cases or walkins specified, ie, secondary has no load ShowSevereError(state, - format("{}{}=\"{}\", has no loads, must have at least one of: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", has no loads, must have at least one of: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum))); ErrorsFound = true; } else { // (.NOT. lAlphaBlanks(AlphaNum)) @@ -4238,20 +4256,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -4379,11 +4397,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).TEvapDesign = Numbers(3); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } // blank on N3 @@ -4391,11 +4409,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).TApproachDifRated = Numbers(4); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(4))); ErrorsFound = true; } // blank on N4 @@ -4403,10 +4421,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, - format("{}{}=\"{}\", Program terminated due to previous condition(s).", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name)); + EnergyPlus::format("{}{}=\"{}\", Program terminated due to previous condition(s).", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name)); } // ErrorsFound Real64 CpBrineRated = 0.0; @@ -4420,12 +4438,12 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).TRangeDifRated = Numbers(5); } else { ShowSevereError(state, - format("{}{}=\"{}\", {} must be specified.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(5))); - ShowContinueError(state, format("...when {}=\"FluidAlwaysLiquid\".", cAlphaFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\", {} must be specified.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(5))); + ShowContinueError(state, EnergyPlus::format("...when {}=\"FluidAlwaysLiquid\".", cAlphaFieldNames(3))); ErrorsFound = true; } // blank on N5 @@ -4451,14 +4469,15 @@ void GetRefrigerationInput(EnergyPlusData &state) Real64 NominalSecondaryCapacity = FlowMassRated * CpBrineRated * Secondary(SecondaryNum).TRangeDifRated; Real64 TestDelta = (NominalSecondaryCapacity - Secondary(SecondaryNum).CoolingLoadRated) / NominalSecondaryCapacity; if (std::abs(TestDelta) > 0.2) { - ShowWarningError(state, - format("{}=\"{} You may wish to check the system definition. Based upon the design flow rate and " - "range temperature difference, The nominal secondary loop heat exchanger capacity is, " - "{:.0R} but the specified design capacity is, {:.0R}", - CurrentModuleObject, - Secondary(SecondaryNum).Name, - NominalSecondaryCapacity, - Secondary(SecondaryNum).CoolingLoadRated)); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{} You may wish to check the system definition. Based upon the design flow rate and " + "range temperature difference, The nominal secondary loop heat exchanger capacity is, " + "{:.0R} but the specified design capacity is, {:.0R}", + CurrentModuleObject, + Secondary(SecondaryNum).Name, + NominalSecondaryCapacity, + Secondary(SecondaryNum).CoolingLoadRated)); } } else if (!lNumericBlanks(1)) { Secondary(SecondaryNum).CoolingLoadRated = Numbers(1); @@ -4472,12 +4491,12 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).CoolingLoadRated = FlowMassRated * CpBrineRated * Secondary(SecondaryNum).TRangeDifRated; } else { ShowSevereError(state, - format(R"({}{}="{}", Either "{}" OR "{}" must be input.)", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(1), - cNumericFieldNames(2))); + EnergyPlus::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 @@ -4488,12 +4507,12 @@ void GetRefrigerationInput(EnergyPlusData &state) (FlowMassRated * CpBrineRated * (TBrineInRated - Secondary(SecondaryNum).TEvapDesign)); Secondary(SecondaryNum).TBrineInRated = TBrineInRated; if (Secondary(SecondaryNum).HeatExchangeEta > 0.99) { - ShowWarningError( - state, - format("{}=\"{} You may wish to check the system definition. The heat exchanger effectiveness is, {:.2R}", - CurrentModuleObject, - Secondary(SecondaryNum).Name, - Secondary(SecondaryNum).HeatExchangeEta)); + ShowWarningError(state, + EnergyPlus::format( + "{}=\"{} You may wish to check the system definition. The heat exchanger effectiveness is, {:.2R}", + CurrentModuleObject, + Secondary(SecondaryNum).Name, + Secondary(SecondaryNum).HeatExchangeEta)); Secondary(SecondaryNum).HeatExchangeEta = 0.99; } } else { @@ -4535,16 +4554,17 @@ void GetRefrigerationInput(EnergyPlusData &state) Real64 CalcCircRate = DensityPhaseChange * DeltaHPhaseChange * PumpTotRatedFlowVol / Secondary(SecondaryNum).CoolingLoadRated; Real64 DiffCircRates = (CalcCircRate - Secondary(SecondaryNum).CircRate) / Secondary(SecondaryNum).CircRate; if (std::abs(DiffCircRates) > 0.3) { - ShowWarningError(state, - format("{}=\"{} {} Produces a circulating rate of {:.2R} ; A circulating rate of {:.2R} would need " - "a {} of {:.2R} m3/s", - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(7), - CalcCircRate, - Secondary(SecondaryNum).CircRate, - cNumericFieldNames(7), - CalcTotFlowVol)); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{} {} Produces a circulating rate of {:.2R} ; A circulating rate of {:.2R} would need " + "a {} of {:.2R} m3/s", + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(7), + CalcCircRate, + Secondary(SecondaryNum).CircRate, + cNumericFieldNames(7), + CalcTotFlowVol)); } // warning check on pump flow rate vs circ rate input } // blank pump flow rate SecondaryFlowVolRated = PumpTotRatedFlowVol; @@ -4570,14 +4590,14 @@ void GetRefrigerationInput(EnergyPlusData &state) PumpTotRatedFlowVol * PumpTotRatedHead / (PumpImpellerEfficiency * PumpMotorEfficiency)) / Secondary(SecondaryNum).PumpTotRatedPower; if (std::abs(ErrSecondPumpPower) > 0.35) { - ShowWarningError( - state, - 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, + 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 } } else if (!lNumericBlanks(8)) { Secondary(SecondaryNum).PumpTotRatedPower = Numbers(8); @@ -4587,12 +4607,12 @@ void GetRefrigerationInput(EnergyPlusData &state) PumpTotRatedFlowVol * PumpTotRatedHead / (PumpImpellerEfficiency * PumpMotorEfficiency); } else { ShowSevereError(state, - format(R"({}{}="{}", Either "{}" OR "{}" must be input.)", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(8), - cNumericFieldNames(9))); + EnergyPlus::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) @@ -4609,15 +4629,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, - format(R"({}{}="{}", A {} is specified even though {} is "CONSTANT".)", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum + 1), - cAlphaFieldNames(AlphaNum))); + EnergyPlus::format(R"({}{}="{}", A {} is specified even though {} is "CONSTANT".)", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum + 1), + cAlphaFieldNames(AlphaNum))); ShowContinueError(state, - format("The secondary loop pump(s) will be modeled as constant speed and the {} will be ignored.", - cAlphaFieldNames(AlphaNum + 1))); + EnergyPlus::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) { @@ -4649,12 +4669,12 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).PumpPowerToHeat = Numbers(NumNum); } else { ShowWarningError(state, - format("{}{}=\"{}\" {} must be between 0.5 and 1.0. Default value of : {:.3R} will be used", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(NumNum), - PumpMotorEfficiency)); + EnergyPlus::format("{}{}=\"{}\" {} must be between 0.5 and 1.0. Default value of : {:.3R} will be used", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(NumNum), + PumpMotorEfficiency)); } // range of pump moter heat to fluid } // blank input for pumppowertoheat @@ -4674,12 +4694,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).DistPipeZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", invalid {} not valid: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else { state.dataRefrigCase->RefrigPresentInZone(Secondary(SecondaryNum).DistPipeZoneNum) = true; @@ -4688,36 +4708,38 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).DistPipeZoneNodeNum == 0) { ShowSevereError( state, - 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))); + 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))); ErrorsFound = true; } } else if (!lNumericBlanks(NumNum) && lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - 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))); + 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))); } else if (lNumericBlanks(NumNum) && !lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - 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))); + 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))); } // distribution piping // Separator/receiver heat gain - optional @@ -4736,12 +4758,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).ReceiverZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", invalid {} not valid: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else { state.dataRefrigCase->RefrigPresentInZone(Secondary(SecondaryNum).ReceiverZoneNum) = true; @@ -4749,35 +4771,38 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).ReceiverZoneNodeNum == 0) { ShowSevereError( state, - 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.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum), - cNumericFieldNames(NumNum))); + EnergyPlus::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.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum), + cNumericFieldNames(NumNum))); ErrorsFound = true; } } else if (!lNumericBlanks(NumNum) && lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - 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))); + 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))); } else if (lNumericBlanks(NumNum) && !lAlphaBlanks(AlphaNum)) { - ShowWarningError(state, - 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))); + 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))); } // Receiver NumNum = 14; @@ -4787,12 +4812,13 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Secondary(SecondaryNum).ChillerRefInventory < 0.0) { Secondary(SecondaryNum).ChillerRefInventory = 0.0; - ShowWarningError(state, - 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, + 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))); } AlphaNum = 9; @@ -4810,13 +4836,14 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).FluidType == SecFluidType::AlwaysLiquid) { if (TBrineOutRated > (Secondary(SecondaryNum).TMinNeeded + 0.5)) { ShowWarningError(state, - format("{}=\"{} The design brine temperature to the refrigeration loads: {:.1R} ;", - CurrentModuleObject, - Secondary(SecondaryNum).Name, - TBrineOutRated)); - ShowContinueError(state, - format(" is greater than the design inlet temperature for at least one of the cases or walkins: {:.1R}", - Secondary(SecondaryNum).TMinNeeded)); + EnergyPlus::format("{}=\"{} The design brine temperature to the refrigeration loads: {:.1R} ;", + CurrentModuleObject, + Secondary(SecondaryNum).Name, + TBrineOutRated)); + ShowContinueError( + state, + EnergyPlus::format(" is greater than the design inlet temperature for at least one of the cases or walkins: {:.1R}", + Secondary(SecondaryNum).TMinNeeded)); ShowContinueError( state, " Compare your Approach and Evaporating Temperature to the design inlet temperatures needed for the loads."); // ErrorsFound = .TRUE. @@ -4827,13 +4854,14 @@ void GetRefrigerationInput(EnergyPlusData &state) Real64 DeltaCap1 = std::abs((Secondary(SecondaryNum).CoolingLoadRated - CapacityAtMaxVolFlow) / Secondary(SecondaryNum).CoolingLoadRated); if (DeltaCap1 > (0.3)) { // diff between chiller rating and capacity at max flow > 30% - ShowWarningError(state, - format("{}=\"{}\" You may wish to check the system sizing. The nominal secondary loop heat exchanger " - "capacity is {:.0R} But the capacity based upon the maximum flow rate is {:.0R}", - CurrentModuleObject, - Secondary(SecondaryNum).Name, - Secondary(SecondaryNum).CoolingLoadRated, - CapacityAtMaxVolFlow)); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{}\" You may wish to check the system sizing. The nominal secondary loop heat exchanger " + "capacity is {:.0R} But the capacity based upon the maximum flow rate is {:.0R}", + CurrentModuleObject, + Secondary(SecondaryNum).Name, + Secondary(SecondaryNum).CoolingLoadRated, + CapacityAtMaxVolFlow)); } // DeltaCap1 > .3 } else { // Fluid type phase change !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if (lNumericBlanks(1)) { // Chiller/evaporator capacity was not specified @@ -4862,22 +4890,24 @@ void GetRefrigerationInput(EnergyPlusData &state) if (DeltaCap2 > (0.3)) { // diff between chiller rating and sum of nominal loads > 30% ShowWarningError( state, - format("{}=\"{}\" You may wish to check the system sizing. Total nominal refrigerating load is {:.0R} (Including cases, " - "walk-ins, and pump heat). The nominal secondary loop heat exchanger capacity is {:.0R}", - CurrentModuleObject, - Secondary(SecondaryNum).Name, - NominalSecondaryRefLoad, - Secondary(SecondaryNum).CoolingLoadRated)); + EnergyPlus::format( + "{}=\"{}\" You may wish to check the system sizing. Total nominal refrigerating load is {:.0R} (Including cases, " + "walk-ins, and pump heat). The nominal secondary loop heat exchanger capacity is {:.0R}", + CurrentModuleObject, + Secondary(SecondaryNum).Name, + NominalSecondaryRefLoad, + Secondary(SecondaryNum).CoolingLoadRated)); } // compare rated xt xchanger brine flow to the total rated pump flow if (SecondaryFlowVolRated > (1.1 * PumpTotRatedFlowVol)) { - ShowWarningError(state, - format("{}=\"{}\" You may wish to check the pump sizing. Total nominal brine flow is {:.0R} m3/s, but the " - "total nominal pump flow rate is: {:.0R} m3/s. ", - CurrentModuleObject, - Secondary(SecondaryNum).Name, - SecondaryFlowVolRated, - PumpTotRatedFlowVol)); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{}\" You may wish to check the pump sizing. Total nominal brine flow is {:.0R} m3/s, but the " + "total nominal pump flow rate is: {:.0R} m3/s. ", + CurrentModuleObject, + Secondary(SecondaryNum).Name, + SecondaryFlowVolRated, + PumpTotRatedFlowVol)); } } // Secondary Loops @@ -4920,12 +4950,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, - format("{}{}=\"{}\"One, and Only One of {} or {}", - RoutineName, - CurrentModuleObject, - Compressor(CompNum).Name, - cNumericFieldNames(1), - cNumericFieldNames(2))); + EnergyPlus::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)) { @@ -4939,12 +4969,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, - format("{}{}=\"{}\" One, and Only One of {} or {}", - RoutineName, - CurrentModuleObject, - Compressor(CompNum).Name, - cNumericFieldNames(3), - cNumericFieldNames(4))); + EnergyPlus::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)) { @@ -5038,11 +5068,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Subcooler(SubcoolerNum).LiqSuctDesignDelT < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\" {} cannot be less than zero.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(1))); + EnergyPlus::format("{}{}=\"{}\" {} cannot be less than zero.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } @@ -5050,11 +5080,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Subcooler(SubcoolerNum).LiqSuctDesignTliqIn = Numbers(2); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } @@ -5062,21 +5092,21 @@ void GetRefrigerationInput(EnergyPlusData &state) Subcooler(SubcoolerNum).LiqSuctDesignTvapIn = Numbers(3); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } if (Subcooler(SubcoolerNum).LiqSuctDesignTvapIn > Subcooler(SubcoolerNum).LiqSuctDesignTliqIn) { ShowSevereError(state, - format("{}{}=\"{}\" {} cannot be greater than {}.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(3), - cNumericFieldNames(2))); + EnergyPlus::format("{}{}=\"{}\" {} cannot be greater than {}.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(3), + cNumericFieldNames(2))); ErrorsFound = true; } // error check } break; @@ -5088,11 +5118,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Subcooler(SubcoolerNum).MechControlTliqOut = Numbers(4); } else { ShowSevereError(state, - format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(4))); + EnergyPlus::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(4))); ErrorsFound = true; } // error check } break; @@ -5148,24 +5178,25 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((LoadCascadeNum == 0) && (LoadSecondaryNum == 0)) { ShowSevereError(state, - format("{}{}=\"{}\" : has an invalid value of {}", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + EnergyPlus::format("{}{}=\"{}\" : has an invalid value of {}", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } else if ((LoadCascadeNum != 0) && (LoadSecondaryNum != 0)) { ShowSevereError(state, - format("{}{}=\"{}\" : has a non-unique name : {}", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + EnergyPlus::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, - format("{}{}=\"{}\" : has a condenser listed as a transfer load that is not a cascade condenser: {}", + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\" : has a condenser listed as a transfer load that is not a cascade condenser: {}", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name, @@ -5216,12 +5247,12 @@ void GetRefrigerationInput(EnergyPlusData &state) CompressorLists(ListNum).CompItemNum(CompIndex) = Util::FindItemInList(Alphas(AlphaListNum), Compressor); if (CompressorLists(ListNum).CompItemNum(CompIndex) == 0) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid {} defined as {}", - RoutineName, - CurrentModuleObject, - CompressorLists(ListNum).Name, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid {} defined as {}", + RoutineName, + CurrentModuleObject, + CompressorLists(ListNum).Name, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } } @@ -5256,12 +5287,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, - format("{}{}=\"{}\", has no loads, must have at least one of: {} or {} objects attached.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(2), - cAlphaFieldNames(3))); + EnergyPlus::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; @@ -5320,20 +5351,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -5434,10 +5465,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, - format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " - "electric and hotfluid defrost types", - RoutineName, - WalkIn(WalkInID).Name)); + 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)); ErrorsFound = true; } // Find design evaporating temperature for system by getting min design evap for ALL loads @@ -5487,20 +5518,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -5544,12 +5575,13 @@ void GetRefrigerationInput(EnergyPlusData &state) } else if (Secondary(SecondaryID).CoilFlag != System(RefrigSysNum).CoilFlag) { ShowSevereError( state, - 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)); + 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)); 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) @@ -5577,12 +5609,12 @@ void GetRefrigerationInput(EnergyPlusData &state) int CondID = System(RefrigSysNum).CascadeLoadNum(cascadeLoadIndex); if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserType::Cascade) { ShowSevereError(state, - format("{}{}=\"{}\", has a {}: {} cascade load that is not a cascade condenser.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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 @@ -5610,8 +5642,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // check for consistency of loads (coils calc on sys time step, all others on zone time step, so can't mix on one system) if (System(RefrigSysNum).CoilFlag) { // could already be true if serving secondary that serves coils if ((System(RefrigSysNum).NumCases > 0) || (System(RefrigSysNum).NumWalkIns > 0)) { - ShowSevereError(state, - format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " + 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, @@ -5622,8 +5655,9 @@ void GetRefrigerationInput(EnergyPlusData &state) 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, - format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different " + 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, @@ -5647,12 +5681,12 @@ void GetRefrigerationInput(EnergyPlusData &state) int CondNum = Util::FindItemInList(Alphas(AlphaNum), Condenser); if (CondNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid {} defined as {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid {} defined as {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else { System(RefrigSysNum).CondenserNum(NumCondensers) = CondNum; @@ -5676,8 +5710,9 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedAirFlowRate = AirVolRateEvapCond * Condenser(CondNum).RatedCapacity; } if (Condenser(CondNum).RatedAirFlowRate <= 0.0) { - ShowSevereError(state, - format("{}{}=\"{}\", Evaporative Condenser Air Volume Flow Rate cannot be less than or equal to zero.", + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}\", Evaporative Condenser Air Volume Flow Rate cannot be less than or equal to zero.", RoutineName, CurrentModuleObject, Condenser(CondNum).Name)); @@ -5688,10 +5723,10 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Condenser(CondNum).EvapPumpPower < 0.0) { ShowSevereError(state, - format("{}{}=\"{}\", Design Evaporative Condenser Water Pump Power cannot be less than zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name)); + EnergyPlus::format("{}{}=\"{}\", Design Evaporative Condenser Water Pump Power cannot be less than zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name)); ErrorsFound = true; } } @@ -5702,7 +5737,8 @@ void GetRefrigerationInput(EnergyPlusData &state) int NumCompressorsSys = 0; if (lAlphaBlanks(AlphaNum)) { // blank input where must have compressor or compressor list input. - ShowSevereError(state, format("{}{} {}\" : must be input.", RoutineName, CurrentModuleObject, cAlphaFieldNames(AlphaNum))); + ShowSevereError(state, + EnergyPlus::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; @@ -5719,19 +5755,19 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((ListNum == 0) && (CompNum == 0)) { // name doesn't match either a compressor or a compressor list ShowSevereError(state, - format("{}{} {}, has an invalid or undefined value=\"{}\".", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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, - format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -5765,16 +5801,18 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - format("{}{}=\"{}\", {} must be defined.", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name, cNumericFieldNames(1))); + EnergyPlus::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, - format("{}=\"{}\", The system specified minimum condensing temperature is greater than the rated condensing " - "temperature for the cascade condenser. ", - CurrentModuleObject, - System(RefrigSysNum).Name)); + 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)); } AlphaNum = 6; @@ -5798,10 +5836,10 @@ void GetRefrigerationInput(EnergyPlusData &state) } else if (System(RefrigSysNum).CompSuctControl == CompressorSuctionPressureCtrl::FloatSuctionTemperature && System(RefrigSysNum).CoilFlag) { ShowWarningError(state, - format("{}=\"{}\", The system specified a FloatSuctionTemperature, but that is not available with air " - "chiller loads so ConstantSuctionTemperature will be used. ", - CurrentModuleObject, - System(RefrigSysNum).Name)); + 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)); } // Count subcoolers on system and allocate @@ -5824,12 +5862,12 @@ void GetRefrigerationInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Refrigeration:Subcooler", Alphas(AlphaNum)); if (System(RefrigSysNum).SubcoolerNum(NumSubcooler) <= 0) { ShowSevereError(state, - format(R"({}{}="{}", has an invalid {} defined as "{}".)", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -5841,12 +5879,12 @@ void GetRefrigerationInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Refrigeration:Subcooler", Alphas(AlphaNum + 1)); if (System(RefrigSysNum).SubcoolerNum(NumSubcooler) <= 0) { ShowSevereError(state, - format(R"({}{}="{}", has an invalid {} defined as "{}".)", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum + 1), - Alphas(AlphaNum + 1))); + EnergyPlus::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; @@ -5870,35 +5908,38 @@ void GetRefrigerationInput(EnergyPlusData &state) if (System(RefrigSysNum).SuctionPipeZoneNodeNum == 0) { ShowSevereError( state, - 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, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum), - cNumericFieldNames(2))); + EnergyPlus::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, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum), + cNumericFieldNames(2))); ErrorsFound = true; } else { state.dataRefrigCase->RefrigPresentInZone(System(RefrigSysNum).SuctionPipeActualZoneNum) = true; } } else if (!lNumericBlanks(2) && lAlphaBlanks(AlphaNum)) { - ShowWarningError(state, - 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, + 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))); } else if (lNumericBlanks(2) && !lAlphaBlanks(AlphaNum)) { - ShowWarningError(state, - 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))); + 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))); } // suction piping heat gains AlphaNum = 11; @@ -5911,12 +5952,12 @@ void GetRefrigerationInput(EnergyPlusData &state) System(RefrigSysNum).NumStages = Numbers(3); if (System(RefrigSysNum).NumStages < 1 || System(RefrigSysNum).NumStages > 2) { ShowSevereError(state, - format("{}{}=\"{}\", {}{}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cNumericFieldNames(3), - R"( has an invalid value. Only \"1\" or \"2\" compressor stages are allowed.)")); + EnergyPlus::format("{}{}=\"{}\", {}{}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cNumericFieldNames(3), + R"( has an invalid value. Only \"1\" or \"2\" compressor stages are allowed.)")); ErrorsFound = true; } } else { @@ -5937,14 +5978,16 @@ void GetRefrigerationInput(EnergyPlusData &state) if (System(RefrigSysNum).NumStages == 1 && (System(RefrigSysNum).intercoolerType == IntercoolerType::Flash || System(RefrigSysNum).intercoolerType == IntercoolerType::ShellAndCoil)) { - ShowSevereError( - state, format("{}{}=\"{}\", A single-stage compression system", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); + ShowSevereError(state, + EnergyPlus::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, - format("{}{}=\"{}\", A two-stage compression system", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); + ShowSevereError( + state, + EnergyPlus::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; @@ -5954,11 +5997,13 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!lNumericBlanks(4)) { System(RefrigSysNum).IntercoolerEffectiveness = Numbers(4); if (System(RefrigSysNum).IntercoolerEffectiveness < 0.0 || System(RefrigSysNum).IntercoolerEffectiveness > 1.0) { - ShowWarningError(state, - format("{}{}=\"{}\", The specified value for the", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); - ShowContinueError( + ShowWarningError( state, - format("{} = {:.2R} is invalid. This value must be", cNumericFieldNames(4), System(RefrigSysNum).IntercoolerEffectiveness)); + EnergyPlus::format("{}{}=\"{}\", The specified value for the", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); + ShowContinueError(state, + EnergyPlus::format("{} = {:.2R} is invalid. This value must be", + cNumericFieldNames(4), + System(RefrigSysNum).IntercoolerEffectiveness)); ShowContinueError(state, "between 0.0 and 1.0. The default value of 0.8 will be used."); System(RefrigSysNum).IntercoolerEffectiveness = 0.8; } @@ -5973,27 +6018,28 @@ void GetRefrigerationInput(EnergyPlusData &state) if (lAlphaBlanks(AlphaNum)) { // blank input where must have high-stage compressor or compressor list input. ShowSevereError(state, - format("{}{}=\"{}\", {} must be input for two-stage compression systems.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum))); + EnergyPlus::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, - format(R"({}{}="{}", {} has an invalid or undefined value="{}".)", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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, - format(R"({}{}="{}", {} has a non-unique name used for both Compressor and CompressorList name: "{}".)", + ShowSevereError( + state, + EnergyPlus::format(R"({}{}="{}", {} has a non-unique name used for both Compressor and CompressorList name: "{}".)", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name, @@ -6049,9 +6095,9 @@ void GetRefrigerationInput(EnergyPlusData &state) } // NumStages } else { // Transcritical compressor attached to subcritical refrigeration cycle ShowSevereError(state, - format("{}{}. A transcritical compressor is attached to a subcritical refrigeration system.", - RoutineName, - CurrentModuleObject)); + EnergyPlus::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."); @@ -6074,9 +6120,9 @@ void GetRefrigerationInput(EnergyPlusData &state) ++Compressor(CompNum).NumSysAttach; } else { // Transcritical compressor attached to subcritical refrigeration cycle ShowSevereError(state, - format("{}{}. A transcritical compressor is attached to a subcritical refrigeration system.", - RoutineName, - CurrentModuleObject)); + EnergyPlus::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."); @@ -6093,25 +6139,27 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (System(RefrigSysNum).NumStages == 1) { // Single-stage system if ((NominalTotalCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { - ShowWarningError(state, - format("{}=\"{}\", You may wish to check the system sizing. Total nominal cooling capacity is {:.0R}W. " - "Condenser capacity is {:.0R}W. Nominal compressor capacity is {:.0R}W.", - CurrentModuleObject, - System(RefrigSysNum).Name, - NominalTotalCoolingCap, - NominalCondCap, - NominalTotalCompCap)); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{}\", You may wish to check the system sizing. Total nominal cooling capacity is {:.0R}W. " + "Condenser capacity is {:.0R}W. Nominal compressor capacity is {:.0R}W.", + CurrentModuleObject, + System(RefrigSysNum).Name, + NominalTotalCoolingCap, + NominalCondCap, + NominalTotalCompCap)); } } else if (System(RefrigSysNum).NumStages == 2) { // Two-stage system if ((NominalTotalHiStageCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { - ShowWarningError(state, - format("{}=\"{}\", You may wish to check the system sizing. Total nominal cooling capacity is {:.0R}W. " - "Condenser capacity is {:.0R}W. Nominal compressor capacity is {:.0R}W.", - CurrentModuleObject, - System(RefrigSysNum).Name, - NominalTotalCoolingCap, - NominalCondCap, - NominalTotalCompCap)); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{}\", You may wish to check the system sizing. Total nominal cooling capacity is {:.0R}W. " + "Condenser capacity is {:.0R}W. Nominal compressor capacity is {:.0R}W.", + CurrentModuleObject, + System(RefrigSysNum).Name, + NominalTotalCoolingCap, + NominalCondCap, + NominalTotalCompCap)); } } // NumStages @@ -6149,8 +6197,9 @@ 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, - format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different " + 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, @@ -6188,12 +6237,13 @@ void GetRefrigerationInput(EnergyPlusData &state) if (System(RefrigSysNum).CoilFlag != Condenser(CondID).CoilFlag) { ShowSevereError( state, - 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)); + 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)); ErrorsFound = true; } } // numcascadeloadschecked > 1 @@ -6214,16 +6264,17 @@ void GetRefrigerationInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Refrigeration:System", Subcooler(SubcoolerNum).MechSourceSys); if (Subcooler(SubcoolerNum).MechSourceSysID == 0) { ShowSevereError(state, - format(R"({}{}="{}", Mechanical Subcooler has an invalid Source Refrigeration:System="{}".)", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - Subcooler(SubcoolerNum).MechSourceSys)); + EnergyPlus::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, - format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " + 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, @@ -6352,20 +6403,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -6435,10 +6486,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, - format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " - "electric and hotfluid defrost types", - RoutineName, - WalkIn(WalkInID).Name)); + 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)); ErrorsFound = true; } // Find design evaporating temperature for system by getting min design evap for ALL loads @@ -6485,20 +6536,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -6568,10 +6619,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, - format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " - "electric and hotfluid defrost types", - RoutineName, - WalkIn(WalkInID).Name)); + 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)); ErrorsFound = true; } // Find design evaporating temperature for system by getting min design evap for ALL loads @@ -6601,12 +6652,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (GCNum == 0) { // Invalid Gas Cooler attached to Transcritical Refrigeration System ShowSevereError(state, - format(R"({}{}="{}", has an invalid {} defined as "{}".)", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -6626,26 +6677,27 @@ void GetRefrigerationInput(EnergyPlusData &state) int NumCompressorsSys = 0; if (lAlphaBlanks(AlphaNum)) { // blank input where must have compressor or compressor list input. - ShowSevereError(state, format("{}{} {}\" : must be input.", RoutineName, CurrentModuleObject, cAlphaFieldNames(AlphaNum))); + ShowSevereError(state, + EnergyPlus::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, - format(R"({}{}, "{}", has an invalid or undefined value="{}".)", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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, - format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -6679,12 +6731,12 @@ void GetRefrigerationInput(EnergyPlusData &state) NominalTotalCompCapHP += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } else { // Subcritical compressor attached to transcritical system - show error - ShowSevereError( - state, - format("{}{}, No transcritical CO2 compressors are attached to the transcritical refrigeration system, \"{}\".", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name)); + ShowSevereError(state, + EnergyPlus::format( + "{}{}, No transcritical CO2 compressors are attached to the transcritical refrigeration system, \"{}\".", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name)); ErrorsFound = true; } } @@ -6697,41 +6749,42 @@ 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, - format("{}{}, The transcritical refrigeration system, \"{}\", is specified to be \"TwoStage\", " - "however, the \"{}\" is not given.", + EnergyPlus::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))); - 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, - 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, - format(R"({}{}, "{}", has an invalid or undefined value="{}".)", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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, - format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + EnergyPlus::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; @@ -6775,21 +6828,23 @@ void GetRefrigerationInput(EnergyPlusData &state) TransSystem(TransRefrigSysNum).TReceiver = TransSystem(TransRefrigSysNum).refrig->getSatTemperature(state, TransSystem(TransRefrigSysNum).PReceiver, routineName); if (TransSystem(TransRefrigSysNum).TReceiver > GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp) { - ShowWarningError(state, - format("{}{}=\"{}: The receiver temperature ({:.2R}C) is greater than the minimum condensing temperature " - "specified for subcritical operation ({:.2R}C).", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - TransSystem(TransRefrigSysNum).TReceiver, - GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp)); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{}: The receiver temperature ({:.2R}C) is greater than the minimum condensing temperature " + "specified for subcritical operation ({:.2R}C).", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + TransSystem(TransRefrigSysNum).TReceiver, + GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp)); ShowContinueError(state, " The minimum condensing temperature will be set at 5C greater than the receiver temperature."); GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp = TransSystem(TransRefrigSysNum).TReceiver + 5.0; } if (NominalTotalCompCapLP > 0.0) { if (TransSystem(TransRefrigSysNum).TReceiver <= TransSystem(TransRefrigSysNum).TEvapDesignLT) { - ShowSevereError(state, - format("{}{}=\"{}: The receiver temperature ({:.2R}C) is less than the design evaporator temperature for the " + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}: The receiver temperature ({:.2R}C) is less than the design evaporator temperature for the " "low temperature loads ({:.2R}C).", RoutineName, CurrentModuleObject, @@ -6806,8 +6861,9 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (NominalTotalCompCapHP > 0.0) { if (TransSystem(TransRefrigSysNum).TReceiver <= TransSystem(TransRefrigSysNum).TEvapDesignMT) { - ShowSevereError(state, - format("{}{}=\"{}: The receiver temperature ({:.2R}C) is less than the design evaporator temperature for the " + ShowSevereError( + state, + EnergyPlus::format("{}{}=\"{}: The receiver temperature ({:.2R}C) is less than the design evaporator temperature for the " "medium temperature loads ({:.2R}C).", RoutineName, CurrentModuleObject, @@ -6831,8 +6887,9 @@ void GetRefrigerationInput(EnergyPlusData &state) } // Check subcooler effectiveness value, must be value between 0 and 1 if ((TransSystem(TransRefrigSysNum).SCEffectiveness < 0) || (TransSystem(TransRefrigSysNum).SCEffectiveness > 1)) { - ShowSevereError(state, - format("{}{}=\"{}: The value for subcooler effectiveness is invalid. The subcooler effectiveness must be a value " + 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, @@ -6854,8 +6911,9 @@ void GetRefrigerationInput(EnergyPlusData &state) TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT = DataZoneEquipment::GetSystemNodeNumberForZone(state, TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumMT); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT == 0) { - ShowSevereError(state, - format(R"({}{}="{}", System Node Number not found for {} = "{}" even though {} is greater than zero.)", + ShowSevereError( + state, + EnergyPlus::format(R"({}{}="{}", System Node Number not found for {} = "{}" even though {} is greater than zero.)", RoutineName, CurrentModuleObject, TransSystem(TransRefrigSysNum).Name, @@ -6871,23 +6929,24 @@ void GetRefrigerationInput(EnergyPlusData &state) } } else if (!lNumericBlanks(3) && lAlphaBlanks(AlphaNum)) { ShowWarningError(state, - format("{}{}=\"{}\" {} not found even though {} is greater than zero.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(3))); + EnergyPlus::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, - 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))); + 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))); } // Medium temperature suction piping heat gains AlphaNum = 10; // Low temperature suction piping @@ -6898,8 +6957,9 @@ void GetRefrigerationInput(EnergyPlusData &state) TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT = DataZoneEquipment::GetSystemNodeNumberForZone(state, TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumLT); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT == 0) { - ShowSevereError(state, - format(R"({}{}="{}", System Node Number not found for {} = "{}" even though {} is greater than zero.)", + ShowSevereError( + state, + EnergyPlus::format(R"({}{}="{}", System Node Number not found for {} = "{}" even though {} is greater than zero.)", RoutineName, CurrentModuleObject, TransSystem(TransRefrigSysNum).Name, @@ -6915,23 +6975,24 @@ void GetRefrigerationInput(EnergyPlusData &state) } } else if (!lNumericBlanks(4) && lAlphaBlanks(AlphaNum)) { ShowWarningError(state, - format("{}{}=\"{}\" {} not found even though {} is greater than zero.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(4))); + EnergyPlus::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, - 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))); + 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))); } // Low temperature suction piping heat gains AlphaNum = 11; @@ -6944,14 +7005,17 @@ 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, format("{}=\"{}\", You may wish to check the system sizing.", CurrentModuleObject, TransSystem(TransRefrigSysNum).Name)); + ShowWarningError(state, + EnergyPlus::format("{}=\"{}\", You may wish to check the system sizing.", + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name)); ShowContinueError( state, - format("Total nominal cooling capacity is {:.0R}W. Condenser capacity is {:.0R}W. Nominal compressor capacity is {:.0R}W.", - NominalTotalCoolingCap, - NominalCondCap, - NominalTotalCompCap)); + EnergyPlus::format( + "Total nominal cooling capacity is {:.0R}W. Condenser capacity is {:.0R}W. Nominal compressor capacity is {:.0R}W.", + NominalTotalCoolingCap, + NominalCondCap, + NominalTotalCompCap)); } } // Transcritical refrigeration systems @@ -6980,11 +7044,11 @@ void GetRefrigerationInput(EnergyPlusData &state) TempRAFraction -= RefrigCase(CaseNum).RAFrac; } // NumSimulationCases if (TempRAFraction > 1.0) { - ShowSevereError( - state, - format("{}: Refrigeration:Case, Refrigerated case return air fraction for all cases in zone=\"{}\" is greater than 1.0.", - RoutineName, - CaseRAFraction(ZoneIndex).ZoneName)); + 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)); // check in comment, can't use "currentModuleObject" because not in get input subroutine where that is known ErrorsFound = true; } @@ -7003,13 +7067,14 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedRefrigCases; if (state.dataGlobal->DisplayExtraWarnings) { // individual case names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, format("{}: Refrigeration:Case=\"{}\" unused. ", RoutineName, RefrigCase(CaseNum).Name)); + ShowWarningError(state, EnergyPlus::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, format("{}: Refrigeration:Case=\"{}\", Same refrigerated case name referenced ", RoutineName, RefrigCase(CaseNum).Name)); + ShowSevereError(state, + EnergyPlus::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 @@ -7018,8 +7083,8 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused cases given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - format("Refrigeration:Case -> {} unused refrigerated case(s) found during input processing.", - state.dataRefrigCase->NumUnusedRefrigCases)); + EnergyPlus::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."); @@ -7039,15 +7104,16 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedCompressors; if (state.dataGlobal->DisplayExtraWarnings) { // individual compressor names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, format("{}: Refrigeration:Compressor=\"{}\" unused. ", RoutineName, Compressor(CompNum).Name)); + ShowWarningError(state, + EnergyPlus::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, - format("{}: Refrigeration:Compressor=\"{}\", Same refrigeration compressor name referenced", - RoutineName, - Compressor(CompNum).Name)); + EnergyPlus::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 @@ -7056,8 +7122,8 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused compressors given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - format("Refrigeration:Compressor -> {} unused refrigeration compressor(s) found during input processing.", - state.dataRefrigCase->NumUnusedCompressors)); + EnergyPlus::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."); @@ -7077,13 +7143,15 @@ void GetRefrigerationInput(EnergyPlusData &state) ++NumUnusedWalkIns; if (state.dataGlobal->DisplayExtraWarnings) { // individual walkin names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, format("{}: Refrigeration:WalkIn=\"{}\" unused. ", RoutineName, WalkIn(WalkInNum).Name)); + ShowWarningError(state, EnergyPlus::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, format("{}: Refrigeration:WalkIn=\"{}\", Same Refrigeration WalkIn name referenced", RoutineName, WalkIn(WalkInNum).Name)); + ShowSevereError(state, + EnergyPlus::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 @@ -7091,9 +7159,10 @@ void GetRefrigerationInput(EnergyPlusData &state) if ((NumUnusedWalkIns > 0) && (!state.dataGlobal->DisplayExtraWarnings)) { // write to error file, // summary number of unused walkins given if DataGlobals::DisplayExtraWarnings option not selected - ShowWarningError( - state, - format("{}Refrigeration:WalkIn -> {} unused refrigeration WalkIns found during input processing.", RoutineName, NumUnusedWalkIns)); + ShowWarningError(state, + EnergyPlus::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."); @@ -7113,15 +7182,16 @@ void GetRefrigerationInput(EnergyPlusData &state) ++NumUnusedWalkIns; if (state.dataGlobal->DisplayExtraWarnings) { // individual walkin names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, format("{}: Refrigeration:AirChiller=\"{}\" unused. ", RoutineName, WarehouseCoil(CoilNum).Name)); + ShowWarningError(state, + EnergyPlus::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, - format("{}: Refrigeration:AirChiller=\"{}\", Same Refrigeration Air Chiller name referenced", - RoutineName, - WarehouseCoil(CoilNum).Name)); + EnergyPlus::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 @@ -7130,9 +7200,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused air chillers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - format("{}Refrigeration:AirChiller -> {} unused refrigeration air chillers found during input processing.", - RoutineName, - state.dataRefrigCase->NumUnusedCoils)); + EnergyPlus::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."); @@ -7152,15 +7222,16 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedSecondarys; if (state.dataGlobal->DisplayExtraWarnings) { // individual secondary names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, format("{}: Refrigeration:Secondary=\"{}\" unused. ", RoutineName, Secondary(SecondaryNum).Name)); + ShowWarningError(state, + EnergyPlus::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, - format("{}: Refrigeration:Secondary=\"{}\", Same Refrigeration Secondary name referenced", - RoutineName, - Secondary(SecondaryNum).Name)); + EnergyPlus::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 @@ -7169,9 +7240,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused secondaries given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - format("{}Refrigeration:Secondary -> {} unused refrigeration Secondary Loops found during input processing.", - RoutineName, - state.dataRefrigCase->NumUnusedSecondarys)); + EnergyPlus::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. "); @@ -7192,7 +7263,7 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedCondensers; if (state.dataGlobal->DisplayExtraWarnings) { // individual condenser names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, format("{}: Refrigeration:Condenser=\"{}\" unused. ", RoutineName, Condenser(CondNum).Name)); + ShowWarningError(state, EnergyPlus::format("{}: Refrigeration:Condenser=\"{}\" unused. ", RoutineName, Condenser(CondNum).Name)); } // display extra warnings - give a list of unused condensers } // unused condenser if (Condenser(CondNum).NumSysAttach > 1) { @@ -7204,9 +7275,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused condensers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - format("{}Refrigeration condenser -> {} unused refrigeration condensers found during input processing.", - RoutineName, - state.dataRefrigCase->NumUnusedCondensers)); + EnergyPlus::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. "); @@ -7225,7 +7296,7 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedGasCoolers; if (state.dataGlobal->DisplayExtraWarnings) { // individual gas cooler names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, format("{}: Refrigeration:GasCooler=\"{}\" unused. ", RoutineName, GasCooler(GCNum).Name)); + ShowWarningError(state, EnergyPlus::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) { @@ -7237,9 +7308,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused gas coolers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - format("{}Refrigeration gas cooler -> {} unused refrigeration gas cooler(s) found during input processing.", - RoutineName, - state.dataRefrigCase->NumUnusedGasCoolers)); + EnergyPlus::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. "); @@ -7250,7 +7321,7 @@ void GetRefrigerationInput(EnergyPlusData &state) ReportRefrigerationComponents(state); if (ErrorsFound) { - ShowFatalError(state, format("{} Previous errors cause program termination", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{} Previous errors cause program termination", RoutineName)); } } @@ -10764,7 +10835,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, format("Refrigeration:CompressorRack: {}", this->Name)); + ShowWarningMessage(state, EnergyPlus::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."); @@ -10787,7 +10858,7 @@ void RefrigRackData::CalcRackSystem(EnergyPlusData &state) state.dataRefrigCase->TotalCondenserHeat = state.dataRefrigCase->TotalCompressorPower + state.dataRefrigCase->TotalRackDeliveredCapacity; } else { if (this->ShowCOPWarning) { - ShowWarningError(state, format("Refrigeration:CompressorRack: {}", this->Name)); + ShowWarningError(state, EnergyPlus::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; @@ -10832,7 +10903,8 @@ void RefrigRackData::CalcRackSystem(EnergyPlusData &state) if (this->EvapFreezeWarnIndex == 0) { ShowWarningMessage( state, - format("Refrigeration Compressor Rack {} - Evap cooling of condenser underway with no basin heater power", this->Name)); + EnergyPlus::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 @@ -11354,7 +11426,7 @@ void RefrigCaseData::CalculateCase(EnergyPlusData &state) // Absolute pointer to if (this->StoredEnergy > MyLargeNumber) { this->StoredEnergy = MyLargeNumber; if (this->ShowStoreEnergyWarning) { - ShowWarningError(state, format("Refrigeration:Case: {}", this->Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -11387,7 +11459,7 @@ void RefrigCaseData::CalculateCase(EnergyPlusData &state) // Absolute pointer to if (this->KgFrost > MyLargeNumber) { this->KgFrost = MyLargeNumber; if (this->ShowFrostWarning) { - ShowWarningError(state, format("Refrigeration:Case: {}", this->Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -11410,7 +11482,7 @@ PlantComponent *RefrigCondenserData::factory(EnergyPlusData &state, std::string } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalRefrigCondenserFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalRefrigCondenserFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -11479,9 +11551,10 @@ void RefrigCondenserData::simulate(EnergyPlusData &state, if (this->OutletTemp == this->InletTemp) { if (this->HighInletWarnIndex == 0) { - ShowSevereError( - state, - format("{}, \"{}\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. ", ErrIntro, this->Name)); + ShowSevereError(state, + EnergyPlus::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, @@ -11495,7 +11568,7 @@ void RefrigCondenserData::simulate(EnergyPlusData &state, // Check for maximum flow in the component if (this->MassFlowRate > this->MassFlowRateMax) { if (this->HighFlowWarnIndex == 0) { - ShowWarningMessage(state, format("{}{}", TypeName, this->Name)); + ShowWarningMessage(state, EnergyPlus::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 @@ -11536,7 +11609,7 @@ void RefrigCondenserData::simulate(EnergyPlusData &state, // Check outlet water temp for max value if (this->OutletTemp > this->OutletTempMax) { if (this->HighTempWarnIndex == 0) { - ShowWarningMessage(state, format("{}{}", TypeName, this->Name)); + ShowWarningMessage(state, EnergyPlus::format("{}{}", TypeName, this->Name)); ShowContinueError(state, "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); } @@ -11561,7 +11634,7 @@ PlantComponent *RefrigRackData::factory(EnergyPlusData &state, std::string const } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalRefrigRackFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalRefrigRackFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -11630,9 +11703,10 @@ void RefrigRackData::simulate(EnergyPlusData &state, if (this->OutletTemp == this->InletTemp) { if (this->HighInletWarnIndex == 0) { - ShowSevereError( - state, - format("{}, \"{}\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. ", ErrIntro, this->Name)); + ShowSevereError(state, + EnergyPlus::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, @@ -11646,7 +11720,7 @@ void RefrigRackData::simulate(EnergyPlusData &state, // Check for maximum flow in the component if (this->MassFlowRate > this->MassFlowRateMax) { if (this->HighFlowWarnIndex == 0) { - ShowWarningMessage(state, format("{}{}", TypeName, this->Name)); + ShowWarningMessage(state, EnergyPlus::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 @@ -11687,7 +11761,7 @@ void RefrigRackData::simulate(EnergyPlusData &state, // Check outlet water temp for max value if (this->OutletTemp > this->OutletTempMax) { if (this->HighTempWarnIndex == 0) { - ShowWarningMessage(state, format("{}{}", TypeName, this->Name)); + ShowWarningMessage(state, EnergyPlus::format("{}{}", TypeName, this->Name)); ShowContinueError(state, "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); } @@ -11958,9 +12032,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, format("Refrigeration:System: {}", thisSys.Name)); + ShowWarningError(state, EnergyPlus::format("Refrigeration:System: {}", thisSys.Name)); ShowContinueError(state, " Evaporating temperature greater than the controlled "); - ShowContinueError(state, format(" liquid outlet temperature for SUBCOOLER:{}", Subcooler(SubcoolID).Name)); + ShowContinueError(state, EnergyPlus::format(" liquid outlet temperature for SUBCOOLER:{}", Subcooler(SubcoolID).Name)); } } // SubcoolId @@ -12060,7 +12134,7 @@ void SimulateDetailedRefrigerationSystems(EnergyPlusData &state) thisSys.TEvapNeeded = thisSys.TEvapDesign; } else { // calculate floating T evap thisSys.TEvapNeeded = thisSys.TEvapDesign; - ShowWarningError(state, format("Refrigeration:System: {}", thisSys.Name)); + ShowWarningError(state, EnergyPlus::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 @@ -12113,7 +12187,7 @@ void SimulateDetailedRefrigerationSystems(EnergyPlusData &state) if (thisSys.UnmetEnergy > MyLargeNumber) { thisSys.UnmetEnergy = MyLargeNumber; if (state.dataRefrigCase->ShowUnmetEnergyWarning(SysNum)) { - ShowWarningError(state, format("Refrigeration:System: {}", thisSys.Name)); + ShowWarningError(state, EnergyPlus::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; @@ -12122,7 +12196,7 @@ void SimulateDetailedRefrigerationSystems(EnergyPlusData &state) if (thisSys.UnmetHiStageEnergy > MyLargeNumber) { thisSys.UnmetHiStageEnergy = MyLargeNumber; if (state.dataRefrigCase->ShowHiStageUnmetEnergyWarning(SysNum)) { - ShowWarningError(state, format("Refrigeration:System: {}", thisSys.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -12366,7 +12440,7 @@ void SimulateDetailedTransRefrigSystems(EnergyPlusData &state) if (sys.UnmetEnergy > MyLargeNumber) { sys.UnmetEnergy = MyLargeNumber; if (state.dataRefrigCase->ShowUnmetEnergyWarningTrans(SysNum)) { - ShowWarningError(state, format("Refrigeration:TranscriticalSystem: {}", sys.Name)); + ShowWarningError(state, EnergyPlus::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; @@ -12458,7 +12532,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, format("Refrigeration:System: {} showing zero refrigeration flow.", this->Name)); + ShowWarningError(state, EnergyPlus::format("Refrigeration:System: {} showing zero refrigeration flow.", this->Name)); } else { ErrorMassFlowComps = std::abs(MassFlowCompsStart - this->RefMassFlowComps) / MassFlowCompsStart; if (this->NumStages == 2) { // Two-stage systems @@ -12516,9 +12590,10 @@ void TransRefrigSystemData::CalcDetailedTransSystem(EnergyPlusData &state, int c continue; } if ((this->RefMassFlowReceiverBypass == 0.0) || (MassFlowStart == 0.0)) { - ShowSevereError(state, - format("Refrigeration:TranscriticalSystem: {} showing zero refrigerant flow through receiver bypass.", this->Name)); - ShowContinueError(state, format("Receiver Bypass Flow = {:.6R}", this->RefMassFlowReceiverBypass)); + ShowSevereError( + state, + EnergyPlus::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 { ErrorMassFlow = std::abs(MassFlowStart - this->RefMassFlowReceiverBypass) / MassFlowStart; @@ -12711,7 +12786,7 @@ void RefrigSystemData::CalculateCondensers(EnergyPlusData &state, int const SysN this->TCondense = this->TCondenseMin; // condenser.LowTempWarn += 1; if (condenser.LowTempWarnIndex == 0) { - ShowWarningMessage(state, format("Refrigeration:Condenser:WaterCooled {}", condenser.Name)); + ShowWarningMessage(state, EnergyPlus::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."); @@ -12896,7 +12971,8 @@ void RefrigSystemData::CalculateCondensers(EnergyPlusData &state, int const SysN if (condenser.EvapFreezeWarnIndex == 0) { ShowWarningMessage( state, - format("Refrigeration Condenser {} - Evap cooling of condenser underway with no basin heater power", condenser.Name)); + EnergyPlus::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."); } @@ -15125,13 +15201,13 @@ void WalkInData::CalculateWalkIn(EnergyPlusData &state) // Absolute pointer to if (this->StoredEnergy > MyLargeNumber) { this->StoredEnergy = MyLargeNumber; if (this->ShowUnmetWIEnergyWarning) { - ShowWarningError(state, format("Refrigeration:WalkIn: {}", this->Name)); + ShowWarningError(state, EnergyPlus::format("Refrigeration:WalkIn: {}", this->Name)); ShowContinueError(state, " This walk-in cooler has insufficient capacity to meet the loads"); ShowContinueError(state, - format("... Occurrence info = {}, {} {}", - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state))); + EnergyPlus::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 @@ -15139,14 +15215,14 @@ void WalkInData::CalculateWalkIn(EnergyPlusData &state) // Absolute pointer to if (this->KgFrost > MyLargeNumber) { this->KgFrost = MyLargeNumber; if (this->ShowWIFrostWarning) { - ShowWarningError(state, format("Refrigeration:WalkIn: {}", this->Name)); + ShowWarningError(state, EnergyPlus::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, - format("... Occurrence info = {}, {} {}", - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state))); + EnergyPlus::format("... Occurrence info = {}, {} {}", + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state))); this->ShowWIFrostWarning = false; } } @@ -15404,7 +15480,7 @@ void SecondaryLoopData::CalculateSecondary(EnergyPlusData &state, int const Seco if (this->UnmetEnergy > MyLargeNumber) { this->UnmetEnergy = MyLargeNumber; if (state.dataRefrigCase->ShowUnmetSecondEnergyWarning(SecondaryNum)) { - ShowWarningError(state, format("Secondary Refrigeration Loop: {}", this->Name)); + ShowWarningError(state, EnergyPlus::format("Secondary Refrigeration Loop: {}", this->Name)); ShowContinueError(state, " This secondary system has insufficient capacity to meet the refrigeration loads."); state.dataRefrigCase->ShowUnmetSecondEnergyWarning(SecondaryNum) = false; } @@ -15572,25 +15648,26 @@ void SimAirChillerSet(EnergyPlusData &state, if (AirChillerSetPtr == 0) { ChillerSetID = Util::FindItemInList(AirChillerSetName, AirChillerSet); if (ChillerSetID == 0) { - ShowFatalError(state, format("SimAirChillerSet: Unit not found={}", AirChillerSetName)); + ShowFatalError(state, EnergyPlus::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, - format("SimAirChillerSet: Invalid AirChillerSetPtr passed={}, Number of Units={}, Entered Unit name={}", - ChillerSetID, - state.dataRefrigCase->NumRefrigChillerSets, - AirChillerSetName)); + EnergyPlus::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, - format("SimAirChillerSet: Invalid AirChillerSetPtr passed={}, Unit name={}, stored Unit Name for that index={}", - ChillerSetID, - 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)); } // name not equal correct name state.dataRefrigCase->CheckChillerSetName(ChillerSetID) = false; } // CheckChillerSetName logical test @@ -15908,7 +15985,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, format("{}Refrigeration:AirCoil: {}", TrackMessage, this->Name)); + ShowWarningError(state, EnergyPlus::format("{}Refrigeration:AirCoil: {}", TrackMessage, this->Name)); ShowContinueError(state, " The estimated air outlet temperature is less than the evaporating temperature."); } Real64 ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(state, @@ -16200,7 +16277,7 @@ void WarehouseCoilData::CalculateCoil(EnergyPlusData &state, Real64 const QZnReq if (this->KgFrost > MyLargeNumber) { this->KgFrost = MyLargeNumber; if (this->ShowCoilFrostWarning) { - ShowWarningError(state, format("Refrigeration:AirCoil: {}", this->Name)); + ShowWarningError(state, EnergyPlus::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 db0d02a906d..9f189e6f5bd 100644 --- a/src/EnergyPlus/ReportCoilSelection.cc +++ b/src/EnergyPlus/ReportCoilSelection.cc @@ -842,10 +842,10 @@ int ReportCoilSelection::getIndexForOrCreateDataObjFromCoilName(EnergyPlusData & return index = i; } // throw error coil type does not match coil name, check for unique names across coil types ShowWarningError(state, - format("check for unique coil names across different coil types: {} occurs in both {} and {}", - coilName, - coilType, - coilSelectionDataObjs[i]->coilObjName)); + EnergyPlus::format("check for unique coil names across different coil types: {} occurs in both {} and {}", + coilName, + coilType, + coilSelectionDataObjs[i]->coilObjName)); } } } @@ -874,7 +874,8 @@ int ReportCoilSelection::getIndexForOrCreateDataObjFromCoilName(EnergyPlusData & } if (index == -1) { - ShowFatalError(state, format("getIndexForOrCreateDataObjFromCoilName: Developer error - not a coil: {} = {}", coilType, coilName)); + ShowFatalError(state, + EnergyPlus::format("getIndexForOrCreateDataObjFromCoilName: Developer error - not a coil: {} = {}", coilType, coilName)); } return index; } @@ -972,7 +973,7 @@ void ReportCoilSelection::associateZoneCoilWithParent(EnergyPlusData &state, std } // for (equipLoop) if (c->typeHVACname == "Unknown") { - ShowWarningError(state, format("Parent object not found for zone coil = {}", c->coilName_)); + ShowWarningError(state, EnergyPlus::format("Parent object not found for zone coil = {}", c->coilName_)); } } @@ -2020,7 +2021,7 @@ std::string ReportCoilSelection::getTimeText(EnergyPlusData &state, int const ti hourPrint = hourCounter - 1; } if (timeStepIndex == timeStepAtPeak) { - returnString = format(DataSizing::PeakHrMinFmt, hourPrint, minutes); + returnString = EnergyPlus::format(DataSizing::PeakHrMinFmt, hourPrint, minutes); } } } diff --git a/src/EnergyPlus/ReturnAirPathManager.cc b/src/EnergyPlus/ReturnAirPathManager.cc index a0048eec597..26f51cf8e54 100644 --- a/src/EnergyPlus/ReturnAirPathManager.cc +++ b/src/EnergyPlus/ReturnAirPathManager.cc @@ -182,16 +182,19 @@ namespace ReturnAirPathManager { IsNotOK, "AirLoopHVAC:ReturnPath"); if (IsNotOK) { - ShowContinueError(state, format("In AirLoopHVAC:ReturnPath ={}", state.dataZoneEquip->ReturnAirPath(PathNum).Name)); + ShowContinueError(state, + EnergyPlus::format("In AirLoopHVAC:ReturnPath ={}", state.dataZoneEquip->ReturnAirPath(PathNum).Name)); ErrorsFound = true; } state.dataZoneEquip->ReturnAirPath(PathNum).ComponentTypeEnum(CompNum) = static_cast( getEnumValue(DataZoneEquipment::AirLoopHVACTypeNamesCC, state.dataIPShortCut->cAlphaArgs(Counter))); } else { - ShowSevereError( - state, format("Unhandled component type in AirLoopHVAC:ReturnPath of {}", state.dataIPShortCut->cAlphaArgs(Counter))); - ShowContinueError(state, format("Occurs in AirLoopHVAC:ReturnPath = {}", state.dataZoneEquip->ReturnAirPath(PathNum).Name)); + ShowSevereError(state, + EnergyPlus::format("Unhandled component type in AirLoopHVAC:ReturnPath of {}", + state.dataIPShortCut->cAlphaArgs(Counter))); + ShowContinueError( + state, EnergyPlus::format("Occurs in AirLoopHVAC:ReturnPath = {}", state.dataZoneEquip->ReturnAirPath(PathNum).Name)); ShowContinueError(state, "Must be \"AirLoopHVAC:ZoneMixer\" or \"AirLoopHVAC:ReturnPlenum\""); ErrorsFound = true; } @@ -253,9 +256,10 @@ namespace ReturnAirPathManager { default: ShowSevereError(state, - format("Invalid AirLoopHVAC:ReturnPath Component={}", - state.dataZoneEquip->ReturnAirPath(ReturnAirPathNum).ComponentType(ComponentNum))); - ShowContinueError(state, format("Occurs in AirLoopHVAC:ReturnPath ={}", state.dataZoneEquip->ReturnAirPath(ReturnAirPathNum).Name)); + EnergyPlus::format("Invalid AirLoopHVAC:ReturnPath Component={}", + state.dataZoneEquip->ReturnAirPath(ReturnAirPathNum).ComponentType(ComponentNum))); + ShowContinueError( + state, EnergyPlus::format("Occurs in AirLoopHVAC:ReturnPath ={}", state.dataZoneEquip->ReturnAirPath(ReturnAirPathNum).Name)); ShowFatalError(state, "Preceding condition causes termination."); break; } diff --git a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc index 21d12db9453..2cc8db97e13 100644 --- a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc +++ b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc @@ -374,13 +374,15 @@ namespace RoomAir { if (ISum > zoneEquipConfig.NumInletNodes) { ShowSevereError( state, "GetRoomAirflowNetworkData: The number of equipment listed in RoomAirflowNetwork:Node:HVACEquipment objects"); - ShowContinueError(state, format("is greater than the number of zone configuration inlet nodes in {}", zone.Name)); + ShowContinueError(state, + EnergyPlus::format("is greater than the number of zone configuration inlet nodes in {}", zone.Name)); ShowContinueError(state, "Please check inputs of both objects."); ErrorsFound = true; } else { ShowSevereError( state, "GetRoomAirflowNetworkData: The number of equipment listed in RoomAirflowNetwork:Node:HVACEquipment objects"); - ShowContinueError(state, format("is less than the number of zone configuration inlet nodes in {}", zone.Name)); + ShowContinueError(state, + EnergyPlus::format("is less than the number of zone configuration inlet nodes in {}", zone.Name)); ShowContinueError(state, "Please check inputs of both objects."); ErrorsFound = true; } @@ -392,7 +394,7 @@ namespace RoomAir { ShowSevereError(state, "GetRoomAirflowNetworkData: The equipment listed in ZoneEquipList is not found in the lsit of " "RoomAir:Node:AirflowNetwork:HVACEquipment objects ="); - ShowContinueError(state, format("{}. Please check inputs of both objects.", zoneEquipList.EquipName(I))); + ShowContinueError(state, EnergyPlus::format("{}. Please check inputs of both objects.", zoneEquipList.EquipName(I))); ErrorsFound = true; } } @@ -402,19 +404,21 @@ namespace RoomAir { if (std::abs(SupplyFrac(I) - 1.0) > 0.001) { ShowSevereError(state, "GetRoomAirflowNetworkData: Invalid, zone supply fractions do not sum to 1.0"); ShowContinueError( - state, format("Entered in {} defined in RoomAir:Node:AirflowNetwork:HVACEquipment", zoneEquipList.EquipName(I))); + state, + EnergyPlus::format("Entered in {} defined in RoomAir:Node:AirflowNetwork:HVACEquipment", zoneEquipList.EquipName(I))); ShowContinueError(state, "The Fraction of supply fraction values across all the roomair nodes in a zone needs to sum to 1.0."); - ShowContinueError(state, format("The sum of fractions entered = {:.3R}", SupplyFrac(I))); + ShowContinueError(state, EnergyPlus::format("The sum of fractions entered = {:.3R}", SupplyFrac(I))); ErrorsFound = true; } if (std::abs(ReturnFrac(I) - 1.0) > 0.001) { ShowSevereError(state, "GetRoomAirflowNetworkData: Invalid, zone return fractions do not sum to 1.0"); ShowContinueError( - state, format("Entered in {} defined in RoomAir:Node:AirflowNetwork:HVACEquipment", zoneEquipList.EquipName(I))); + state, + EnergyPlus::format("Entered in {} defined in RoomAir:Node:AirflowNetwork:HVACEquipment", zoneEquipList.EquipName(I))); ShowContinueError(state, "The Fraction of return fraction values across all the roomair nodes in a zone needs to sum to 1.0."); - ShowContinueError(state, format("The sum of fractions entered = {:.3R}", ReturnFrac(I))); + ShowContinueError(state, EnergyPlus::format("The sum of fractions entered = {:.3R}", ReturnFrac(I))); ErrorsFound = true; } } @@ -918,7 +922,8 @@ namespace RoomAir { // check whether this zone is a controlled zone or not if (!zone.IsControlled) { ShowFatalError(state, - format("Zones must be controlled for Ceiling-Diffuser Convection model. No system serves zone {}", zone.Name)); + EnergyPlus::format("Zones must be controlled for Ceiling-Diffuser Convection model. No system serves zone {}", + zone.Name)); return; } // determine supply air temperature as a weighted average of the inlet temperatures. diff --git a/src/EnergyPlus/RoomAirModelManager.cc b/src/EnergyPlus/RoomAirModelManager.cc index 51dc1fc520d..35a9f0688b5 100644 --- a/src/EnergyPlus/RoomAirModelManager.cc +++ b/src/EnergyPlus/RoomAirModelManager.cc @@ -283,7 +283,8 @@ namespace RoomAir { ipsc->cCurrentModuleObject = cUserDefinedControlObject; if (state.dataRoomAir->numTempDistContrldZones == 0) { if (state.dataRoomAir->NumAirTempPatterns != 0) { // user may have missed control object - ShowWarningError(state, format("Missing {} object needed to use roomair temperature patterns", ipsc->cCurrentModuleObject)); + ShowWarningError(state, + EnergyPlus::format("Missing {} object needed to use roomair temperature patterns", ipsc->cCurrentModuleObject)); // ErrorsFound = .TRUE. } return; @@ -375,9 +376,10 @@ namespace RoomAir { if (state.dataRoomAir->AirPatternZoneInfo(iZone).IsUsed) { continue; // There is a Room Air Temperatures object for this zone } - ShowSevereError(state, - format("{}AirModel for Zone=[{}] is indicated as \"User Defined\".", routineName, state.dataHeatBal->Zone(iZone).Name)); - ShowContinueError(state, format("...but missing a {} object for control.", ipsc->cCurrentModuleObject)); + ShowSevereError( + state, + EnergyPlus::format("{}AirModel for Zone=[{}] is indicated as \"User Defined\".", routineName, state.dataHeatBal->Zone(iZone).Name)); + ShowContinueError(state, EnergyPlus::format("...but missing a {} object for control.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -455,22 +457,22 @@ namespace RoomAir { // now test the input some if (roomAirPattern.TwoGradPatrn.HiGradient == roomAirPattern.TwoGradPatrn.LowGradient) { - ShowWarningError(state, format("Upper and lower gradients equal, use {} instead ", cTempPatternConstGradientObject)); - ShowContinueError(state, format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("Upper and lower gradients equal, use {} instead ", cTempPatternConstGradientObject)); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); } if ((roomAirPattern.TwoGradPatrn.UpperBoundTempScale == roomAirPattern.TwoGradPatrn.LowerBoundTempScale) && ((roomAirPattern.TwoGradPatrn.InterpolationMode == UserDefinedPatternMode::OutdoorDryBulb) || (roomAirPattern.TwoGradPatrn.InterpolationMode == UserDefinedPatternMode::ZoneAirTemp) || (roomAirPattern.TwoGradPatrn.InterpolationMode == UserDefinedPatternMode::DeltaOutdoorZone))) { // throw error, will cause divide by zero when used for scaling - ShowSevereError(state, format("Error in temperature scale in {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Error in temperature scale in {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ErrorsFound = true; } if ((roomAirPattern.TwoGradPatrn.HiGradient == roomAirPattern.TwoGradPatrn.LowGradient) && ((roomAirPattern.TwoGradPatrn.InterpolationMode == UserDefinedPatternMode::SensibleCooling) || (roomAirPattern.TwoGradPatrn.InterpolationMode == UserDefinedPatternMode::SensibleHeating))) { // throw error, will cause divide by zero when used for scaling - ShowSevereError(state, format("Error in load scale in {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Error in load scale in {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ErrorsFound = true; } } @@ -519,7 +521,8 @@ namespace RoomAir { // TODO check order (TODO sort ? ) for (int i = 2; i <= NumPairs; ++i) { if (roomAirPattern.VertPatrn.ZetaPatrn(i) < roomAirPattern.VertPatrn.ZetaPatrn(i - 1)) { - ShowSevereError(state, format("Zeta values not in increasing order in {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Zeta values not in increasing order in {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ErrorsFound = true; } } @@ -556,7 +559,8 @@ namespace RoomAir { int NumPairs = NumNumbers - 4; if (NumPairs != (NumAlphas - 1)) { - ShowSevereError(state, format("Error in number of entries in {} object: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Error in number of entries in {} object: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ErrorsFound = true; } roomAirPattern.MapPatrn.SurfName.allocate(NumPairs); @@ -581,18 +585,20 @@ namespace RoomAir { } if (state.dataErrTracking->TotalRoomAirPatternTooLow > 0) { - ShowWarningError(state, - format("GetUserDefinedPatternData: RoomAirModelUserTempPattern: {} problem(s) in non-dimensional height calculations, " - "too low surface height(s) in relation to floor height of zone(s).", - state.dataErrTracking->TotalRoomAirPatternTooLow)); + ShowWarningError( + state, + EnergyPlus::format("GetUserDefinedPatternData: RoomAirModelUserTempPattern: {} problem(s) in non-dimensional height calculations, " + "too low surface height(s) in relation to floor height of zone(s).", + state.dataErrTracking->TotalRoomAirPatternTooLow)); ShowContinueError(state, "...Use OutputDiagnostics,DisplayExtraWarnings; to see details."); state.dataErrTracking->TotalWarningErrors += state.dataErrTracking->TotalRoomAirPatternTooLow; } if (state.dataErrTracking->TotalRoomAirPatternTooHigh > 0) { - ShowWarningError(state, - format("GetUserDefinedPatternData: RoomAirModelUserTempPattern: {} problem(s) in non-dimensional height calculations, " - "too high surface height(s) in relation to ceiling height of zone(s).", - state.dataErrTracking->TotalRoomAirPatternTooHigh)); + ShowWarningError( + state, + EnergyPlus::format("GetUserDefinedPatternData: RoomAirModelUserTempPattern: {} problem(s) in non-dimensional height calculations, " + "too high surface height(s) in relation to ceiling height of zone(s).", + state.dataErrTracking->TotalRoomAirPatternTooHigh)); ShowContinueError(state, "...Use OutputDiagnostics,DisplayExtraWarnings; to see details."); state.dataErrTracking->TotalWarningErrors += state.dataErrTracking->TotalRoomAirPatternTooHigh; } @@ -659,8 +665,8 @@ namespace RoomAir { if (state.dataRoomAir->TotNumOfAirNodes <= 0) { // no air node object is found, terminate the program - ShowSevereError(state, format("No {} objects found in input.", ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("The OneNodeDisplacementVentilation model requires {} objects", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} objects found in input.", ipsc->cCurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("The OneNodeDisplacementVentilation model requires {} objects", ipsc->cCurrentModuleObject)); ErrorsFound = true; return; } // air node objects are found so allocate airnode variable @@ -719,11 +725,13 @@ namespace RoomAir { if (airNode.ClassType == AirNodeType::Floor || airNode.ClassType == AirNodeType::Ceiling || airNode.ClassType == AirNodeType::Mundt || airNode.ClassType == AirNodeType::Plume || airNode.ClassType == AirNodeType::Rees) { // Are there really Rees 1-4? // terminate the program due to a severe error in the specified input - ShowSevereError(state, - format("GetAirNodeData: {}=\"{}\" invalid air node specification.", ipsc->cCurrentModuleObject, airNode.Name)); - ShowContinueError(state, - format("Mundt Room Air Model: No surface names specified. Air node=\"{} requires surfaces associated with it.", - airNode.Name)); + ShowSevereError( + state, + EnergyPlus::format("GetAirNodeData: {}=\"{}\" invalid air node specification.", ipsc->cCurrentModuleObject, airNode.Name)); + ShowContinueError( + state, + EnergyPlus::format("Mundt Room Air Model: No surface names specified. Air node=\"{} requires surfaces associated with it.", + airNode.Name)); ErrorsFound = true; } continue; @@ -733,9 +741,10 @@ namespace RoomAir { // and assign .FALSE. to 'SurfNeeded' if (airNode.ClassType == AirNodeType::Inlet || airNode.ClassType == AirNodeType::Control || airNode.ClassType == AirNodeType::Return || airNode.ClassType == AirNodeType::Plume) { - ShowWarningError(state, format("GetAirNodeData: {}=\"{}\" invalid linkage", ipsc->cCurrentModuleObject, airNode.Name)); - ShowContinueError( - state, format("Mundt Room Air Model: No surface names needed. Air node=\"{} does not relate to any surfaces.", airNode.Name)); + ShowWarningError(state, EnergyPlus::format("GetAirNodeData: {}=\"{}\" invalid linkage", ipsc->cCurrentModuleObject, airNode.Name)); + ShowContinueError(state, + EnergyPlus::format("Mundt Room Air Model: No surface names needed. Air node=\"{} does not relate to any surfaces.", + airNode.Name)); continue; } @@ -751,9 +760,10 @@ namespace RoomAir { if (NumSurfsInvolved > NumOfSurfs) { ShowFatalError( state, - format("GetAirNodeData: Mundt Room Air Model: Number of surfaces connected to {} is greater than number of surfaces in {}", - airNode.Name, - zone.Name)); + EnergyPlus::format( + "GetAirNodeData: Mundt Room Air Model: Number of surfaces connected to {} is greater than number of surfaces in {}", + airNode.Name, + zone.Name)); return; } @@ -779,9 +789,10 @@ namespace RoomAir { // report warning error since surface names are specified correctly if ((NumSurfsInvolved) != SurfCount) { - ShowWarningError( - state, - format("GetAirNodeData: Mundt Room Air Model: Some surface names specified for {} are not in {}", airNode.Name, zone.Name)); + ShowWarningError(state, + EnergyPlus::format("GetAirNodeData: Mundt Room Air Model: Some surface names specified for {} are not in {}", + airNode.Name, + zone.Name)); } } // for (AirNodeNum) @@ -836,14 +847,15 @@ namespace RoomAir { cCurrentModuleObject = "RoomAirSettings:OneNodeDisplacementVentilation"; NumOfMundtContrl = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (NumOfMundtContrl > state.dataGlobal->NumOfZones) { - ShowSevereError(state, format("Too many {} objects in input file", cCurrentModuleObject)); - ShowContinueError(state, format("There cannot be more {} objects than number of zones.", cCurrentModuleObject)); + 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)); ErrorsFound = true; } if (NumOfMundtContrl == 0) { - ShowWarningError(state, - format("No {} objects found, program assumes no convection or infiltration gains near floors", cCurrentModuleObject)); + ShowWarningError( + state, + EnergyPlus::format("No {} objects found, program assumes no convection or infiltration gains near floors", cCurrentModuleObject)); return; } @@ -871,9 +883,10 @@ namespace RoomAir { continue; } if (state.dataRoomAir->AirModel(ZoneNum).AirModel != RoomAirModel::DispVent1Node) { - ShowSevereError(state, format("Zone specified=\"{}\", Air Model type is not OneNodeDisplacementVentilation.", ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("Air Model Type for zone={}", roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); + 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])); ErrorsFound = true; continue; } @@ -1052,7 +1065,7 @@ namespace RoomAir { if (Util::FindItemInList( state.dataHeatBal->Zone(zoneCV.ZonePtr).Name, state.afn->MultizoneZoneData, &AirflowNetwork::MultizoneZoneProp::ZoneName) == 0) { - ShowSevereError(state, format("Problem with {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Problem with {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "AirflowNetwork airflow model must be active in this zone"); ErrorsFound = true; } @@ -1072,12 +1085,13 @@ 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, format("Problem with {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowWarningError(state, format("Roomair model will not be applied for Zone={}.", ipsc->cAlphaArgs(1))); + 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))); ShowContinueError( state, - format("AirflowNetwrok:Multizone:Surface crack object must have an air flow coefficient = 0.5, value was={:.2R}", - state.afn->MultizoneSurfaceCrackData(typeNum).exponent)); + EnergyPlus::format( + "AirflowNetwrok:Multizone:Surface crack object must have an air flow coefficient = 0.5, value was={:.2R}", + state.afn->MultizoneSurfaceCrackData(typeNum).exponent)); } } } // if @@ -1282,8 +1296,8 @@ namespace RoomAir { return; } if (state.dataRoomAir->NumOfRoomAFNControl > state.dataGlobal->NumOfZones) { - ShowSevereError(state, format("Too many {} objects in input file", ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("There cannot be more {} objects than number of zones.", ipsc->cCurrentModuleObject)); + 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)); ErrorsFound = true; } @@ -1313,10 +1327,12 @@ namespace RoomAir { continue; } if (state.dataRoomAir->AirModel(ZoneNum).AirModel != RoomAirModel::AirflowNetwork) { - ShowSevereError(state, - format("GetRoomAirflowNetworkData: Zone specified='{}', Air Model type is not AirflowNetwork.", ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("Air Model Type for zone ={}", roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); + ShowSevereError( + state, + EnergyPlus::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])); ErrorsFound = true; continue; } @@ -1332,8 +1348,9 @@ namespace RoomAir { if (roomAFNZoneInfo.NumOfAirNodes > 0) { roomAFNZoneInfo.Node.allocate(roomAFNZoneInfo.NumOfAirNodes); } else { - ShowSevereError(state, - format("GetRoomAirflowNetworkData: Incomplete input in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("GetRoomAirflowNetworkData: Incomplete input in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -1450,8 +1467,9 @@ namespace RoomAir { auto &roomAFNZoneNode = roomAFNZoneInfo.Node(RAFNNodeNum); if (allocated(roomAFNZoneNode.SurfMask)) { // throw error found twice - ShowSevereError(state, format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + 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, "Duplicate RoomAir:Node:AirflowNetwork:AdjacentSurfaceList name."); ErrorsFound = true; continue; @@ -1480,16 +1498,18 @@ namespace RoomAir { } } if (NumSurfsThisNode != SurfCount) { - ShowSevereError(state, format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + 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, "Some surface names were not found in the zone"); ErrorsFound = true; } } // for (iZone) if (!foundList) { // throw error - ShowSevereError(state, format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + 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, "Did not find a RoomAir:Node:AirflowNetwork object that references this object"); ErrorsFound = true; } @@ -1514,9 +1534,10 @@ namespace RoomAir { ErrorObjectHeader eoh{routineName, ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1)}; if (mod((NumAlphas + NumNumbers - 1), 3) != 0) { - ShowSevereError(state, format("GetRoomAirflowNetworkData: For {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError( - state, format("Extensible field set are not evenly divisible by 3. Number of data entries = {}", NumAlphas + NumNumbers - 1)); + 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)); ErrorsFound = true; break; } @@ -1539,9 +1560,10 @@ namespace RoomAir { int maxNumGains = numInputGains * numSpacesInZone; auto &roomAFNZoneNode = roomAFNZoneInfo.Node(RAFNNodeNum); if (allocated(roomAFNZoneNode.IntGain)) { - ShowSevereError(state, format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Duplicate {} name.", ipsc->cCurrentModuleObject)); + 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)); ErrorsFound = true; continue; } @@ -1581,10 +1603,10 @@ namespace RoomAir { roomAFNZoneNode.NumIntGains = numGainsFound; } else { ShowSevereError(state, - format("GetRoomAirflowNetworkData: Invalid {} = {}", - ipsc->cAlphaFieldNames(gainsLoop * 2 + 1), - ipsc->cAlphaArgs(gainsLoop * 2 + 1))); - ShowContinueError(state, format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + 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))); ShowContinueError(state, "Internal gain did not match correctly"); ErrorsFound = true; } @@ -1612,10 +1634,10 @@ namespace RoomAir { ErrorObjectHeader eoh{routineName, cCurrentModuleObject, ipsc->cAlphaArgs(1)}; if (mod((NumAlphas + NumNumbers - 1), 4) != 0) { - ShowSevereError(state, format("GetRoomAirflowNetworkData: For {}: {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("GetRoomAirflowNetworkData: For {}: {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("Extensible field set are not evenly divisible by 4. Number of data entries = {}", - fmt::to_string(NumAlphas + NumNumbers - 1))); + EnergyPlus::format("Extensible field set are not evenly divisible by 4. Number of data entries = {}", + fmt::to_string(NumAlphas + NumNumbers - 1))); ErrorsFound = true; break; } @@ -1636,9 +1658,10 @@ namespace RoomAir { // found it auto &roomAFNNode = roomAFNZoneInfo.Node(RAFNNodeNum); if (allocated(roomAFNNode.HVAC)) { - ShowSevereError(state, format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Duplicate {} name.", cCurrentModuleObject)); + 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)); ErrorsFound = true; continue; } @@ -1679,10 +1702,10 @@ namespace RoomAir { if (!IntEquipFound) { ShowSevereError(state, - format("GetRoomAirflowNetworkData: Invalid {} = {}", - ipsc->cAlphaFieldNames(3 + (iEquip - 1) * 2), - ipsc->cAlphaArgs(2 + (iEquip - 1) * 2))); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + 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))); ShowContinueError(state, "Internal gain did not match correctly"); ErrorsFound = true; } @@ -1707,9 +1730,10 @@ 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, format("Entered in RoomAir:Node:AirflowNetwork with Zone Name = {}", state.dataHeatBal->Zone(iZone).Name)); + ShowContinueError( + state, EnergyPlus::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, format("The sum of fractions entered = {:.3R}", SumFraction)); + ShowContinueError(state, EnergyPlus::format("The sum of fractions entered = {:.3R}", SumFraction)); ErrorsFound = true; } @@ -1740,11 +1764,11 @@ 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, - format("Entered in RoomAir:Node:AirflowNetwork with Zone Name = {}, Intrnal gain name = {}", - state.dataHeatBal->Zone(iZone).Name, - intGain.Name)); + EnergyPlus::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, format("The sum of fractions entered = {:.3R}", SumFraction)); + ShowContinueError(state, EnergyPlus::format("The sum of fractions entered = {:.3R}", SumFraction)); ErrorsFound = true; } } // for (iGain) @@ -1946,10 +1970,11 @@ namespace RoomAir { constexpr Real64 CeilingHeightDiffMaximum = 0.1; if (std::abs((Z2ofZone - Z1ofZone) - state.dataHeatBal->Zone(ZNum).CeilingHeight) > CeilingHeightDiffMaximum) { - ShowWarningError(state, format("RoomAirManager: Inconsistent ceiling heights in Zone: {}", state.dataHeatBal->Zone(ZNum).Name)); - ShowContinueError(state, format("Lowest height=[{:.3R}].", Z1ofZone)); - ShowContinueError(state, format("Highest height=[{:.3R}].", Z2ofZone)); - ShowContinueError(state, format("Ceiling height=[{:.3R}].", state.dataHeatBal->Zone(ZNum).CeilingHeight)); + ShowWarningError( + state, EnergyPlus::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)); } } // for (ZoneNum) @@ -2493,9 +2518,11 @@ namespace RoomAir { if (state.dataZoneEquip->ZoneEquipConfig(ZoneEquipConfigNum).IsControlled) { state.dataRoomAir->IsZoneCrossVent(iZone) = false; state.dataRoomAir->AirModel(iZone).SimAirModel = false; - ShowSevereError(state, format("Unmixed Flow: Cross Ventilation cannot be applied for Zone={}", zone.Name)); + ShowSevereError(state, EnergyPlus::format("Unmixed Flow: Cross Ventilation cannot be applied for Zone={}", zone.Name)); ShowContinueError( - state, format("An HVAC system is present in the zone. Fully mixed airflow model will be used for Zone={}", zone.Name)); + state, + EnergyPlus::format("An HVAC system is present in the zone. Fully mixed airflow model will be used for Zone={}", + zone.Name)); continue; } // CurrentModuleObject='RoomAirSettings:CrossVentilation' @@ -2716,8 +2743,9 @@ namespace RoomAir { if (RAFNNodeNum == 0) { Errorfound = true; - ShowSevereError(state, - format("Could not find RoomAir:Node:AirflowNetwork number with AirflowNetwork:IntraZone:Node Name='{}", RAFNNodeName)); + ShowSevereError( + state, + EnergyPlus::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 0621175ba5c..4dfc5e08b6b 100644 --- a/src/EnergyPlus/RoomAirModelUserTempPattern.cc +++ b/src/EnergyPlus/RoomAirModelUserTempPattern.cc @@ -226,7 +226,7 @@ void CalcTempDistModel(EnergyPlusData &state, int const ZoneNum) // index number if (CurPatrnID == 0) { // throw error here ? way to test schedules before getting to this point? - ShowFatalError(state, format("User defined room air pattern index not found: {}", CurntPatternKey)); + ShowFatalError(state, EnergyPlus::format("User defined room air pattern index not found: {}", CurntPatternKey)); return; } @@ -580,9 +580,9 @@ Real64 FigureNDheightInZone(EnergyPlusData &state, int const thisHBsurf) // inde if (SurfMinZ < (ZoneZorig - TolValue)) { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, "RoomAirModelUserTempPattern: Problem in non-dimensional height calculation"); - ShowContinueError(state, format("too low surface: {} in zone: {}", state.dataSurface->Surface(thisHBsurf).Name, zone.Name)); - ShowContinueError(state, format("**** Average floor height of zone is: {:.3R}", ZoneZorig)); - ShowContinueError(state, format("**** Surface minimum height is: {:.3R}", SurfMinZ)); + ShowContinueError(state, EnergyPlus::format("too low surface: {} in zone: {}", state.dataSurface->Surface(thisHBsurf).Name, zone.Name)); + ShowContinueError(state, EnergyPlus::format("**** Average floor height of zone is: {:.3R}", ZoneZorig)); + ShowContinueError(state, EnergyPlus::format("**** Surface minimum height is: {:.3R}", SurfMinZ)); } else { ++state.dataErrTracking->TotalRoomAirPatternTooLow; } @@ -591,9 +591,9 @@ Real64 FigureNDheightInZone(EnergyPlusData &state, int const thisHBsurf) // inde if (SurfMaxZ > (ZoneZorig + ZoneCeilHeight + TolValue)) { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, "RoomAirModelUserTempPattern: Problem in non-dimensional height calculation"); - ShowContinueError(state, format(" too high surface: {} in zone: {}", state.dataSurface->Surface(thisHBsurf).Name, zone.Name)); - ShowContinueError(state, format("**** Average Ceiling height of zone is: {:.3R}", (ZoneZorig + ZoneCeilHeight))); - ShowContinueError(state, format("**** Surface Maximum height is: {:.3R}", SurfMaxZ)); + ShowContinueError(state, EnergyPlus::format(" too high surface: {} in zone: {}", state.dataSurface->Surface(thisHBsurf).Name, zone.Name)); + ShowContinueError(state, EnergyPlus::format("**** Average Ceiling height of zone is: {:.3R}", (ZoneZorig + ZoneCeilHeight))); + ShowContinueError(state, EnergyPlus::format("**** Surface Maximum height is: {:.3R}", SurfMaxZ)); } else { ++state.dataErrTracking->TotalRoomAirPatternTooHigh; } diff --git a/src/EnergyPlus/RootFinder.cc b/src/EnergyPlus/RootFinder.cc index 3f2766f7623..122af2a8676 100644 --- a/src/EnergyPlus/RootFinder.cc +++ b/src/EnergyPlus/RootFinder.cc @@ -191,8 +191,8 @@ void SetupRootFinder(EnergyPlusData &state, // Load assumed action for underlying function F(X) if (SlopeType != DataRootFinder::Slope::Increasing && SlopeType != DataRootFinder::Slope::Decreasing) { ShowSevereError(state, "SetupRootFinder: Invalid function slope specification. Valid choices are:"); - ShowContinueError(state, format("SetupRootFinder: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); - ShowContinueError(state, format("SetupRootFinder: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); + ShowContinueError(state, EnergyPlus::format("SetupRootFinder: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); + ShowContinueError(state, EnergyPlus::format("SetupRootFinder: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); ShowFatalError(state, "SetupRootFinder: Preceding error causes program termination."); } RootFinderData.Controls.SlopeType = SlopeType; @@ -202,10 +202,10 @@ void SetupRootFinder(EnergyPlusData &state, MethodType != RootFinderMethod::Brent) { ShowSevereError(state, "SetupRootFinder: Invalid solution method specification. Valid choices are:"); - ShowContinueError(state, format("SetupRootFinder: iMethodBisection={}", RootFinderMethod::Bisection)); - ShowContinueError(state, format("SetupRootFinder: iMethodFalsePosition={}", RootFinderMethod::FalsePosition)); - ShowContinueError(state, format("SetupRootFinder: iMethodSecant={}", RootFinderMethod::Secant)); - ShowContinueError(state, format("SetupRootFinder: iMethodBrent={}", RootFinderMethod::Brent)); + ShowContinueError(state, EnergyPlus::format("SetupRootFinder: iMethodBisection={}", RootFinderMethod::Bisection)); + ShowContinueError(state, EnergyPlus::format("SetupRootFinder: iMethodFalsePosition={}", RootFinderMethod::FalsePosition)); + ShowContinueError(state, EnergyPlus::format("SetupRootFinder: iMethodSecant={}", RootFinderMethod::Secant)); + ShowContinueError(state, EnergyPlus::format("SetupRootFinder: iMethodBrent={}", RootFinderMethod::Brent)); ShowFatalError(state, "SetupRootFinder: Preceding error causes program termination."); } RootFinderData.Controls.MethodType = MethodType; @@ -318,7 +318,8 @@ void InitializeRootFinder(EnergyPlusData &state, if (XMax == 0.0) { XMinReset = XMax; } else { - ShowFatalError(state, format("InitializeRootFinder: Invalid min/max bounds XMin={:.6T} must be smaller than XMax={:.6T}", XMin, XMax)); + ShowFatalError( + state, EnergyPlus::format("InitializeRootFinder: Invalid min/max bounds XMin={:.6T} must be smaller than XMax={:.6T}", XMin, XMax)); } } @@ -610,8 +611,8 @@ RootFinderStatus CheckInternalConsistency(EnergyPlusData &state, RootFinderDataT default: { // Should never happen ShowSevereError(state, "CheckInternalConsistency: Invalid function slope specification. Valid choices are:"); - ShowContinueError(state, format("CheckInternalConsistency: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); - ShowContinueError(state, format("CheckInternalConsistency: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); + ShowContinueError(state, EnergyPlus::format("CheckInternalConsistency: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); + ShowContinueError(state, EnergyPlus::format("CheckInternalConsistency: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); ShowFatalError(state, "CheckInternalConsistency: Preceding error causes program termination."); } break; } @@ -644,8 +645,8 @@ RootFinderStatus CheckInternalConsistency(EnergyPlusData &state, RootFinderDataT default: { // Should never happen ShowSevereError(state, "CheckInternalConsistency: Invalid function slope specification. Valid choices are:"); - ShowContinueError(state, format("CheckInternalConsistency: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); - ShowContinueError(state, format("CheckInternalConsistency: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); + ShowContinueError(state, EnergyPlus::format("CheckInternalConsistency: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); + ShowContinueError(state, EnergyPlus::format("CheckInternalConsistency: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); ShowFatalError(state, "CheckInternalConsistency: Preceding error causes program termination."); } break; } @@ -669,8 +670,8 @@ RootFinderStatus CheckInternalConsistency(EnergyPlusData &state, RootFinderDataT default: { // Should never happen ShowSevereError(state, "CheckInternalConsistency: Invalid function slope specification. Valid choices are:"); - ShowContinueError(state, format("CheckInternalConsistency: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); - ShowContinueError(state, format("CheckInternalConsistency: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); + ShowContinueError(state, EnergyPlus::format("CheckInternalConsistency: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); + ShowContinueError(state, EnergyPlus::format("CheckInternalConsistency: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); ShowFatalError(state, "CheckInternalConsistency: Preceding error causes program termination."); } break; } @@ -824,8 +825,8 @@ bool CheckSlope(EnergyPlusData &state, RootFinderDataType const &RootFinderData) default: { // Should never happen ShowSevereError(state, "CheckSlope: Invalid function slope specification. Valid choices are:"); - ShowContinueError(state, format("CheckSlope: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); - ShowContinueError(state, format("CheckSlope: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); + ShowContinueError(state, EnergyPlus::format("CheckSlope: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); + ShowContinueError(state, EnergyPlus::format("CheckSlope: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); ShowFatalError(state, "CheckSlope: Preceding error causes program termination."); } break; } @@ -921,8 +922,8 @@ bool CheckMinConstraint(EnergyPlusData &state, RootFinderDataType const &RootFin default: { // Should never happen ShowSevereError(state, "CheckMinConstraint: Invalid function slope specification. Valid choices are:"); - ShowContinueError(state, format("CheckMinConstraint: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); - ShowContinueError(state, format("CheckMinConstraint: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); + ShowContinueError(state, EnergyPlus::format("CheckMinConstraint: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); + ShowContinueError(state, EnergyPlus::format("CheckMinConstraint: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); ShowFatalError(state, "CheckMinConstraint: Preceding error causes program termination."); } break; } @@ -968,8 +969,8 @@ bool CheckMaxConstraint(EnergyPlusData &state, RootFinderDataType const &RootFin default: { // Should never happen ShowSevereError(state, "CheckMaxConstraint: Invalid function slope specification. Valid choices are:"); - ShowContinueError(state, format("CheckMaxConstraint: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); - ShowContinueError(state, format("CheckMaxConstraint: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); + ShowContinueError(state, EnergyPlus::format("CheckMaxConstraint: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); + ShowContinueError(state, EnergyPlus::format("CheckMaxConstraint: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); ShowFatalError(state, "CheckMaxConstraint: Preceding error causes program termination."); } break; } @@ -1128,9 +1129,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, format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); - ShowContinueError( - state, format("UpdateBracket: XLower={:.15T}, YLower={:.15T}", RootFinderData.LowerPoint.X, RootFinderData.LowerPoint.Y)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); + ShowContinueError(state, + EnergyPlus::format( + "UpdateBracket: XLower={:.15T}, YLower={:.15T}", RootFinderData.LowerPoint.X, RootFinderData.LowerPoint.Y)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } } @@ -1154,9 +1156,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, format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); - ShowContinueError( - state, format("UpdateBracket: XUpper={:.15T}, YUpper={:.15T}", RootFinderData.UpperPoint.X, RootFinderData.UpperPoint.Y)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); + ShowContinueError(state, + EnergyPlus::format( + "UpdateBracket: XUpper={:.15T}, YUpper={:.15T}", RootFinderData.UpperPoint.X, RootFinderData.UpperPoint.Y)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } } @@ -1183,9 +1186,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, format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); - ShowContinueError( - state, format("UpdateBracket: XLower={:.15T}, YLower={:.15T}", RootFinderData.LowerPoint.X, RootFinderData.LowerPoint.Y)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); + ShowContinueError(state, + EnergyPlus::format( + "UpdateBracket: XLower={:.15T}, YLower={:.15T}", RootFinderData.LowerPoint.X, RootFinderData.LowerPoint.Y)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } } @@ -1209,9 +1213,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, format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); - ShowContinueError( - state, format("UpdateBracket: XUpper={:.15T}, YUpper={:.15T}", RootFinderData.UpperPoint.X, RootFinderData.UpperPoint.Y)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); + ShowContinueError(state, + EnergyPlus::format( + "UpdateBracket: XUpper={:.15T}, YUpper={:.15T}", RootFinderData.UpperPoint.X, RootFinderData.UpperPoint.Y)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } } @@ -1220,8 +1225,8 @@ void UpdateBracket(EnergyPlusData &state, default: { // Should never happen ShowSevereError(state, "UpdateBracket: Invalid function slope specification. Valid choices are:"); - ShowContinueError(state, format("UpdateBracket: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); - ShowContinueError(state, format("UpdateBracket: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: Slope::Increasing={}", DataRootFinder::Slope::Increasing)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: Slope::Decreasing={}", DataRootFinder::Slope::Decreasing)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } break; } @@ -1491,10 +1496,10 @@ void AdvanceRootFinder(EnergyPlusData &state, RootFinderDataType &RootFinderData } break; default: { ShowSevereError(state, "AdvanceRootFinder: Invalid solution method specification. Valid choices are:"); - ShowContinueError(state, format("AdvanceRootFinder: iMethodBisection={}", RootFinderMethod::Bisection)); - ShowContinueError(state, format("AdvanceRootFinder: iMethodFalsePosition={}", RootFinderMethod::FalsePosition)); - ShowContinueError(state, format("AdvanceRootFinder: iMethodSecant={}", RootFinderMethod::Secant)); - ShowContinueError(state, format("AdvanceRootFinder: iMethodBrent={}", RootFinderMethod::Brent)); + ShowContinueError(state, EnergyPlus::format("AdvanceRootFinder: iMethodBisection={}", RootFinderMethod::Bisection)); + ShowContinueError(state, EnergyPlus::format("AdvanceRootFinder: iMethodFalsePosition={}", RootFinderMethod::FalsePosition)); + ShowContinueError(state, EnergyPlus::format("AdvanceRootFinder: iMethodSecant={}", RootFinderMethod::Secant)); + ShowContinueError(state, EnergyPlus::format("AdvanceRootFinder: iMethodBrent={}", RootFinderMethod::Brent)); ShowFatalError(state, "AdvanceRootFinder: Preceding error causes program termination."); } break; } diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.cc b/src/EnergyPlus/RuntimeLanguageProcessor.cc index 845d80a62f0..0aab7b92762 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.cc +++ b/src/EnergyPlus/RuntimeLanguageProcessor.cc @@ -673,7 +673,7 @@ void ParseStack(EnergyPlusData &state, int const StackNum) if (NestedIfDepth == 1) { AddError(state, StackNum, 0, "Missing an ENDIF instruction needed to terminate an earlier IF instruction."); } else if (NestedIfDepth > 1) { - AddError(state, StackNum, 0, format("Missing {} ENDIF instructions needed to terminate earlier IF instructions.", NestedIfDepth)); + AddError(state, StackNum, 0, EnergyPlus::format("Missing {} ENDIF instructions needed to terminate earlier IF instructions.", NestedIfDepth)); } // ALLOCATE(DummyError(ErlStack(StackNum)%NumErrors)) @@ -778,7 +778,7 @@ void AddError(EnergyPlusData &state, ErrorNum = thisErlStack.NumErrors; if (LineNum > 0) { - thisErlStack.Error(ErrorNum) = format("Line {}: {} \"{}\"", LineNum, Error, thisErlStack.Line(LineNum)); + thisErlStack.Error(ErrorNum) = EnergyPlus::format("Line {}: {} \"{}\"", LineNum, Error, thisErlStack.Line(LineNum)); } else { thisErlStack.Error(ErrorNum) = Error; } @@ -1015,10 +1015,10 @@ void WriteTrace(EnergyPlusData &state, int const StackNum, int const Instruction if (seriousErrorFound) { // throw EnergyPlus severe then fatal ShowSevereError(state, "Problem found in EMS EnergyPlus Runtime Language."); - ShowContinueError(state, format("Erl program name: {}", NameString)); - ShowContinueError(state, format("Erl program line number: {}", LineNumString)); - ShowContinueError(state, format("Erl program line text: {}", LineString)); - ShowContinueError(state, format("Error message: {}", cValueString)); + ShowContinueError(state, EnergyPlus::format("Erl program name: {}", NameString)); + ShowContinueError(state, EnergyPlus::format("Erl program line number: {}", LineNumString)); + ShowContinueError(state, EnergyPlus::format("Erl program line text: {}", LineString)); + ShowContinueError(state, EnergyPlus::format("Error message: {}", cValueString)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Previous EMS error caused program termination."); } @@ -1100,9 +1100,9 @@ void ParseExpression(EnergyPlusData &state, char NextChar; ++CountDoLooping; if (CountDoLooping > MaxDoLoopCounts) { - ShowSevereError(state, format("EMS ParseExpression: Entity={}", state.dataRuntimeLang->ErlStack(StackNum).Name)); - ShowContinueError(state, format("...Line={}", Line)); - ShowContinueError(state, format("...Failed to process String=\"{}\".", String)); + ShowSevereError(state, EnergyPlus::format("EMS ParseExpression: Entity={}", state.dataRuntimeLang->ErlStack(StackNum).Name)); + ShowContinueError(state, EnergyPlus::format("...Line={}", Line)); + ShowContinueError(state, EnergyPlus::format("...Failed to process String=\"{}\".", String)); ShowFatalError(state, "...program terminates due to preceding condition."); } NextChar = String[Pos]; @@ -1138,9 +1138,10 @@ void ParseExpression(EnergyPlusData &state, if (NextChar == '.') { if (PeriodFound) { // ERROR: two periods appearing in a number literal! - ShowSevereError(state, format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); - ShowContinueError(state, format("...Line=\"{}\".", Line)); - ShowContinueError(state, format("...Bad String=\"{}\".", String)); + 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, "...Two decimal points detected in String."); ++NumErrors; ErrorFlag = true; @@ -1151,9 +1152,10 @@ void ParseExpression(EnergyPlusData &state, if (is_any_of(NextChar, "eEdD")) { StringToken += NextChar; if (LastED) { - ShowSevereError(state, format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); - ShowContinueError(state, format("...Line=\"{}\".", Line)); - ShowContinueError(state, format("...Bad String=\"{}\".", String)); + 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, "...Two D/E in numeric String."); ++NumErrors; ErrorFlag = true; @@ -1200,10 +1202,10 @@ void ParseExpression(EnergyPlusData &state, } if (ErrorFlag) { // Error: something wrong with this number! - ShowSevereError(state, format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); - ShowContinueError(state, format("...Line=\"{}\".", Line)); - ShowContinueError(state, format("...Bad String=\"{}\".", String)); - ShowContinueError(state, format("Invalid numeric=\"{}\".", StringToken)); + 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)); ++NumErrors; } } @@ -1242,15 +1244,15 @@ void ParseExpression(EnergyPlusData &state, if (NextChar == '-') { StringToken = "-"; if (MultFound) { - ShowSevereError(state, format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); - ShowContinueError(state, format("...Line = \"{}\".", Line)); + ShowSevereError(state, EnergyPlus::format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); + ShowContinueError(state, EnergyPlus::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, format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); - ShowContinueError(state, format("...Line = \"{}\".", Line)); + ShowSevereError(state, EnergyPlus::format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); + ShowContinueError(state, EnergyPlus::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; @@ -1346,7 +1348,7 @@ void ParseExpression(EnergyPlusData &state, if (state.dataSysVars->DeveloperFlag) { print(state.files.debug, "ERROR \"{}\"\n", String); } - ShowFatalError(state, format("EMS Runtime Language: did not find valid input for built-in function ={}", String)); + ShowFatalError(state, EnergyPlus::format("EMS Runtime Language: did not find valid input for built-in function ={}", String)); } } else { // Check for remaining single character operators @@ -1400,7 +1402,7 @@ void ParseExpression(EnergyPlusData &state, if (state.dataSysVars->DeveloperFlag) { print(state.files.debug, "ERROR \"{}\"\n", StringToken); } - ShowFatalError(state, format("EMS, caught unexpected token = \"{}\" ; while parsing string={}", StringToken, String)); + ShowFatalError(state, EnergyPlus::format("EMS, caught unexpected token = \"{}\" ; while parsing string={}", StringToken, String)); } } @@ -1546,7 +1548,7 @@ int ProcessTokens( if (ParenthWhileCounter == 50) { // symptom of mismatched parenthesis ShowSevereError(state, "EMS error parsing parentheses, check that parentheses are balanced"); - ShowContinueError(state, format("String being parsed=\"{}\".", ParsingString)); + ShowContinueError(state, EnergyPlus::format("String being parsed=\"{}\".", ParsingString)); ShowFatalError(state, "Program terminates due to preceding error."); } @@ -1625,13 +1627,13 @@ int ProcessTokens( } break; } - ShowSevereError(state, format("The operator \"{}\" is missing the left-hand operand!", ErlFuncNamesUC[OperatorNum])); - ShowContinueError(state, format("String being parsed=\"{}\".", ParsingString)); + ShowSevereError(state, EnergyPlus::format("The operator \"{}\" is missing the left-hand operand!", ErlFuncNamesUC[OperatorNum])); + ShowContinueError(state, EnergyPlus::format("String being parsed=\"{}\".", ParsingString)); break; } if (Pos == NumTokens) { - ShowSevereError(state, format("The operator \"{}\" is missing the right-hand operand!", ErlFuncNamesUC[OperatorNum])); - ShowContinueError(state, format("String being parsed=\"{}\".", ParsingString)); + ShowSevereError(state, EnergyPlus::format("The operator \"{}\" is missing the right-hand operand!", ErlFuncNamesUC[OperatorNum])); + ShowContinueError(state, EnergyPlus::format("String being parsed=\"{}\".", ParsingString)); break; } ExpressionNum = NewExpression(state); @@ -1933,9 +1935,9 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, // throw Error ReturnValue.Type = Value::Error; ReturnValue.Error = - format("EvaluateExpression: Attempted to raise to power with incompatible numbers: {:.6T} raised to {:.6T}", - Operand(1).Number, - Operand(2).Number); + EnergyPlus::format("EvaluateExpression: Attempted to raise to power with incompatible numbers: {:.6T} raised to {:.6T}", + Operand(1).Number, + Operand(2).Number); if (!state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation && !state.dataEMSMgr->FinishProcessingUserInput) { seriousErrorFound = true; } @@ -2004,8 +2006,8 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, ReturnValue = SetErlValueNumber(0.0); } else { // throw Error - ReturnValue.Error = - format("EvaluateExpression: Attempted to calculate exponential value of too large a number: {:.4T}", Operand(1).Number); + ReturnValue.Error = EnergyPlus::format( + "EvaluateExpression: Attempted to calculate exponential value of too large a number: {:.4T}", Operand(1).Number); ReturnValue.Type = Value::Error; if (!state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation && !state.dataEMSMgr->FinishProcessingUserInput) { seriousErrorFound = true; @@ -2019,7 +2021,8 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, } else { // throw error, ReturnValue.Type = Value::Error; - ReturnValue.Error = format("EvaluateExpression: Natural Log of zero or less! ln of value = {:.4T}", Operand(1).Number); + ReturnValue.Error = + EnergyPlus::format("EvaluateExpression: Natural Log of zero or less! ln of value = {:.4T}", Operand(1).Number); if (!state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation && !state.dataEMSMgr->FinishProcessingUserInput) { seriousErrorFound = true; } @@ -2287,18 +2290,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, format("EMS user program halted simulation with error code = {:.2T}", Operand(1).Number)); + ShowFatalError(state, EnergyPlus::format("EMS user program halted simulation with error code = {:.2T}", Operand(1).Number)); ReturnValue = SetErlValueNumber(Operand(1).Number); // returns back the error code break; case ErlFunc::SevereWarnEp: - ShowSevereError(state, format("EMS user program issued severe warning with error code = {:.2T}", Operand(1).Number)); + ShowSevereError(state, EnergyPlus::format("EMS user program issued severe warning with error code = {:.2T}", Operand(1).Number)); ShowContinueErrorTimeStamp(state, ""); ReturnValue = SetErlValueNumber(Operand(1).Number); // returns back the error code break; case ErlFunc::WarnEp: - ShowWarningError(state, format("EMS user program issued warning with error code = {:.2T}", Operand(1).Number)); + ShowWarningError(state, EnergyPlus::format("EMS user program issued warning with error code = {:.2T}", Operand(1).Number)); ShowContinueErrorTimeStamp(state, ""); ReturnValue = SetErlValueNumber(Operand(1).Number); // returns back the error code break; @@ -2624,10 +2627,10 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, } } else { ReturnValue.Type = DataRuntimeLanguage::Value::Error; - ReturnValue.Error = format("{} function called with invalid arguments: Hour={:.1R}, Timestep={:.1R}", - ErlFuncNamesUC[(int)thisErlExpression.Operator], - Operand(1).Number, - Operand(2).Number); + ReturnValue.Error = EnergyPlus::format("{} function called with invalid arguments: Hour={:.1R}, Timestep={:.1R}", + ErlFuncNamesUC[(int)thisErlExpression.Operator], + Operand(1).Number, + Operand(2).Number); } } break; @@ -2700,10 +2703,10 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, } } else { ReturnValue.Type = DataRuntimeLanguage::Value::Error; - ReturnValue.Error = format("{} function called with invalid arguments: Hour={:.1R}, Timestep={:.1R}", - ErlFuncNamesUC[(int)thisErlExpression.Operator], - Operand(1).Number, - Operand(2).Number); + ReturnValue.Error = EnergyPlus::format("{} function called with invalid arguments: Hour={:.1R}, Timestep={:.1R}", + ErlFuncNamesUC[(int)thisErlExpression.Operator], + Operand(1).Number, + Operand(2).Number); } } break; @@ -2954,16 +2957,16 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) state, cCurrentModuleObject, cAlphaArgs(ErlVarLoop), cAlphaFieldNames(ErlVarLoop), errFlag, ErrorsFound); } if (lAlphaFieldBlanks(ErlVarLoop)) { - ShowWarningError(state, format("{}{}", RoutineName, cCurrentModuleObject)); - ShowContinueError(state, format("Blank {}", cAlphaFieldNames(1))); + ShowWarningError(state, EnergyPlus::format("{}{}", RoutineName, cCurrentModuleObject)); + ShowContinueError(state, EnergyPlus::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, format("{}{}, invalid entry.", RoutineName, cCurrentModuleObject)); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(ErlVarLoop), cAlphaArgs(ErlVarLoop))); + ShowSevereError(state, EnergyPlus::format("{}{}, invalid entry.", RoutineName, cCurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(ErlVarLoop), cAlphaArgs(ErlVarLoop))); ShowContinueError(state, "Name conflicts with an existing global variable name"); ErrorsFound = true; } else { @@ -3000,15 +3003,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, format("{}{}", RoutineName, cCurrentModuleObject)); - ShowContinueError(state, format("Blank {}", cAlphaFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("{}{}", RoutineName, cCurrentModuleObject)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}", cAlphaFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}", cAlphaFieldNames(1))); ShowContinueError(state, "Name conflicts with an existing variable name"); ErrorsFound = true; } else { @@ -3022,12 +3025,12 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) int CurveIndexNum = GetCurveIndex(state, cAlphaArgs(2)); // curve name if (CurveIndexNum == 0) { if (lAlphaFieldBlanks(2)) { - ShowSevereError(state, format("{}{}=\"{} blank field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Blank {}", cAlphaFieldNames(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} blank field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Blank {}", cAlphaFieldNames(2))); ShowContinueError(state, "Blank entry for curve or table name is not allowed"); } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Curve or table was not found."); } ErrorsFound = true; @@ -3060,15 +3063,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, format("{}{}", RoutineName, cCurrentModuleObject)); - ShowContinueError(state, format("Blank {}", cAlphaFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("{}{}", RoutineName, cCurrentModuleObject)); + ShowContinueError(state, EnergyPlus::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, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}", cAlphaFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}", cAlphaFieldNames(1))); ShowContinueError(state, "Name conflicts with an existing variable name"); ErrorsFound = true; } else { @@ -3085,12 +3088,12 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) if (ConstructNum == 0) { if (lAlphaFieldBlanks(2)) { - ShowSevereError(state, format("{}{}=\"{} blank field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Blank {}", cAlphaFieldNames(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} blank field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Blank {}", cAlphaFieldNames(2))); ShowContinueError(state, "Blank entry for construction name is not allowed"); } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Construction was not found."); } ErrorsFound = true; @@ -3204,8 +3207,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, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Did not find a match with an EMS variable name"); ErrorsFound = true; } else { // found it. @@ -3238,8 +3241,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) state.dataRuntimeLang->TrendVariable(TrendNum).TimeARR(loop - 1) - state.dataGlobal->TimeStepZone; // fractional hours } } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={:.2T}", cNumericFieldNames(1), rNumericArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={:.2T}", cNumericFieldNames(1), rNumericArgs(1))); ShowContinueError(state, "must be greater than zero"); ErrorsFound = true; } @@ -3256,9 +3259,9 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) ParseStack(state, StackNum); if (state.dataRuntimeLang->ErlStack(StackNum).NumErrors > 0) { - ShowSevereError( - state, - format("Errors found parsing EMS Runtime Language program or subroutine = {}", state.dataRuntimeLang->ErlStack(StackNum).Name)); + ShowSevereError(state, + EnergyPlus::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)); } @@ -3335,15 +3338,18 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } if (!UnitsA.empty() && !UnitsB.empty()) { if (UnitsA != UnitsB) { - ShowWarningError(state, format("{}{}=\"{} mismatched units.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); - ShowContinueError(state, format("...{}=\"{}\" (will be used)", cAlphaFieldNames(6), 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)); } } else if (UnitsB.empty() && !UnitsA.empty()) { UnitsB = UnitsA; - ShowWarningError(state, - format("{}{}=\"{}\" using deprecated units designation.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), 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)); } } curUnit = static_cast(getEnumValue(Constant::unitNamesUC, Util::makeUPPER(UnitsB))); @@ -3361,8 +3367,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } if (!Found) { StackNum = 0; - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); ShowContinueError(state, "EMS program or subroutine not found."); ErrorsFound = true; } @@ -3374,13 +3380,13 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) if (VariableNum == 0) { if (lAlphaFieldBlanks(5)) { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "EMS variable not found among global variables."); } else if (StackNum != 0) { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("EMS variable not found among local variables in {}", cAlphaArgs(5))); + 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))); } ErrorsFound = true; // ELSEIF (INDEX('0123456789',cAlphaArgs(2)(1:1)) > 0) THEN @@ -3397,8 +3403,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(3) == "SUMMED") { sovStoreType = OutputProcessor::StoreType::Sum; } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); ShowContinueError(state, "...valid values are Averaged or Summed."); ErrorsFound = true; } @@ -3408,8 +3414,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(4) == "SYSTEMTIMESTEP") { sovTimeStepType = OutputProcessor::TimeStepType::System; } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); ShowContinueError(state, "...valid values are ZoneTimestep or SystemTimestep."); ErrorsFound = true; } @@ -3508,15 +3514,18 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } if (!UnitsA.empty() && !UnitsB.empty()) { if (UnitsA != UnitsB) { - ShowWarningError(state, format("{}{}=\"{} mismatched units.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); - ShowContinueError(state, format("...{}=\"{}\" (will be used)", cAlphaFieldNames(9), 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)); } } else if (UnitsB.empty() && !UnitsA.empty()) { UnitsB = UnitsA; - ShowWarningError(state, - format("{}{}=\"{}\" using deprecated units designation.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), 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)); } } curUnit = static_cast(getEnumValue(Constant::unitNamesUC, Util::makeUPPER(UnitsB))); @@ -3534,8 +3543,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } if (!Found) { StackNum = 0; - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); ShowContinueError(state, "EMS program or subroutine not found."); ErrorsFound = true; } @@ -3546,13 +3555,13 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) VariableNum = FindEMSVariable(state, cAlphaArgs(2), StackNum); if (VariableNum == 0) { if (lAlphaFieldBlanks(4)) { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "EMS variable not found among global variables."); } else if (StackNum != 0) { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("EMS variable not found among local variables in {}", cAlphaArgs(5))); + 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))); } ErrorsFound = true; // ELSEIF (INDEX('0123456789',cAlphaArgs(2)(1:1)) > 0) THEN @@ -3571,8 +3580,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(3) == "SYSTEMTIMESTEP") { sovTimeStepType = OutputProcessor::TimeStepType::System; } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); ShowContinueError(state, "...valid values are ZoneTimestep or SystemTimestep."); ErrorsFound = true; } @@ -3582,8 +3591,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER(cAlphaArgs(5)))); if (resource == Constant::eResource::Invalid) { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); ErrorsFound = true; } @@ -3599,8 +3608,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(6) == "SYSTEM") { sovGroup = OutputProcessor::Group::HVAC; } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(6), cAlphaArgs(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(6), cAlphaArgs(6))); ErrorsFound = true; } @@ -3650,8 +3659,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(7) == "HEATRECOVERYFORHEATING") { sovEndUseCat = OutputProcessor::EndUseCat::HeatRecoveryForHeating; } else { - ShowSevereError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("Invalid {}={}", cAlphaFieldNames(7), cAlphaArgs(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(7), cAlphaArgs(7))); ErrorsFound = true; } @@ -3661,10 +3670,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, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, - format("Invalid {}={} for {}={}", cAlphaFieldNames(5), cAlphaArgs(5), cAlphaFieldNames(7), cAlphaArgs(7))); - ShowContinueError(state, format("Field {} is reset from {} to EnergyTransfer", cAlphaFieldNames(5), cAlphaArgs(5))); + 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))); resource = Constant::eResource::EnergyTransfer; } @@ -3837,7 +3846,7 @@ std::string ValueToString(ErlValueType const &Value) if (Value.Number == 0.0) { String = "0.0"; } else { - String = format("{:.6T}", Value.Number); //(String) + String = EnergyPlus::format("{:.6T}", Value.Number); //(String) } break; diff --git a/src/EnergyPlus/SZVAVModel.cc b/src/EnergyPlus/SZVAVModel.cc index c16586fa7df..61e470fb59e 100644 --- a/src/EnergyPlus/SZVAVModel.cc +++ b/src/EnergyPlus/SZVAVModel.cc @@ -529,13 +529,15 @@ namespace SZVAVModel { 15.0) { // water coil can provide same output at varying water PLR (model discontinuity?) if (SZVAVModel.MaxIterIndex == 0) { ShowWarningMessage( - state, format("{}Coil control failed to converge for {}:{}", MessagePrefix, SZVAVModel.UnitType, SZVAVModel.Name)); + state, + EnergyPlus::format("{}Coil control failed to converge for {}:{}", MessagePrefix, SZVAVModel.UnitType, SZVAVModel.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating system sensible part-load ratio."); ShowContinueErrorTimeStamp( state, - format("Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} (watts), and the simulation continues.", - ZoneLoad, - TempSensOutput)); + EnergyPlus::format( + "Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} (watts), and the simulation continues.", + ZoneLoad, + TempSensOutput)); } ShowRecurringWarningErrorAtEnd( state, @@ -547,9 +549,11 @@ namespace SZVAVModel { } } else if (SolFlag == -2) { if (SZVAVModel.RegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, format("{}Coil control failed for {}:{}", MessagePrefix, SZVAVModel.UnitType, SZVAVModel.Name)); + ShowWarningMessage(state, + 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, format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); + ShowContinueErrorTimeStamp( + state, EnergyPlus::format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); } ShowRecurringWarningErrorAtEnd(state, SZVAVModel.UnitType + " \"" + SZVAVModel.Name + @@ -1054,13 +1058,15 @@ namespace SZVAVModel { 15.0) { // water coil can provide same output at varying water PLR (model discontinuity?) if (SZVAVModel.MaxIterIndex == 0) { ShowWarningMessage( - state, format("{}Coil control failed to converge for {}:{}", MessagePrefix, SZVAVModel.UnitType, SZVAVModel.Name)); + state, + EnergyPlus::format("{}Coil control failed to converge for {}:{}", MessagePrefix, SZVAVModel.UnitType, SZVAVModel.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating system sensible part-load ratio."); ShowContinueErrorTimeStamp( state, - format("Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} (watts), and the simulation continues.", - ZoneLoad, - TempSensOutput)); + EnergyPlus::format( + "Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} (watts), and the simulation continues.", + ZoneLoad, + TempSensOutput)); } ShowRecurringWarningErrorAtEnd( state, @@ -1072,9 +1078,11 @@ namespace SZVAVModel { } } else if (SolFlag == -2) { if (SZVAVModel.RegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, format("{}Coil control failed for {}:{}", MessagePrefix, SZVAVModel.UnitType, SZVAVModel.Name)); + ShowWarningMessage(state, + 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, format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); + ShowContinueErrorTimeStamp( + state, EnergyPlus::format("Sensible load to be met = {:.2T} (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 a571f58a38a..54330874091 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -554,7 +554,8 @@ namespace Sched { NumAlphas = 0; NumNumbers = 0; if (NumCommaFileShading > 1) { - ShowWarningError(state, format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); + ShowWarningError(state, + EnergyPlus::format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); } std::map::iterator schedule_file_shading_result; @@ -676,10 +677,10 @@ namespace Sched { if (schedule_file_shading_result->second["header"].back().get() == "()") { ShowWarningError(state, - format("{}: {}=\"{}\" Removing last column of the CSV since it has '()' for the surface name.", - routineName, - CurrentModuleObject, - Alphas(1))); + EnergyPlus::format("{}: {}=\"{}\" Removing last column of the CSV since it has '()' for the surface name.", + routineName, + CurrentModuleObject, + Alphas(1))); ShowContinueError(state, "This was a problem in E+ 22.2.0 and below, consider removing it from the file to suppress this warning."); schedule_file_shading_result->second["header"].erase(NumCSVAllColumnsSchedules); assert(schedule_file_shading_result->second["header"].size() == schedule_file_shading_result->second["values"].size()); @@ -688,13 +689,16 @@ namespace Sched { if (rowCnt != rowLimitCount) { if (rowCnt < rowLimitCount) { - ShowSevereError(state, format("{}: {}=\"{}\" {} data values read.", routineName, CurrentModuleObject, Alphas(1), rowCnt)); + ShowSevereError(state, + EnergyPlus::format("{}: {}=\"{}\" {} data values read.", routineName, CurrentModuleObject, Alphas(1), rowCnt)); } else if (rowCnt > rowLimitCount) { - ShowSevereError(state, format("{}: {}=\"{}\" too many data values read.", routineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, + EnergyPlus::format("{}: {}=\"{}\" too many data values read.", routineName, CurrentModuleObject, Alphas(1))); } ShowContinueError( state, - format("Number of rows in the shading file must be a full year multiplied by the simulation TimeStep: {}.", rowLimitCount)); + EnergyPlus::format("Number of rows in the shading file must be a full year multiplied by the simulation TimeStep: {}.", + rowLimitCount)); ShowFatalError(state, "Program terminates due to previous condition."); } @@ -704,7 +708,7 @@ namespace Sched { if (numerrors > 0) { ShowWarningError( state, - format( + EnergyPlus::format( "{}:{}=\"{}\" {} records had errors - these values are set to 0.", routineName, CurrentModuleObject, Alphas(1), numerrors)); } } @@ -779,10 +783,14 @@ namespace Sched { if (schedType->isLimited && schedType->minVal > schedType->maxVal) { if (schedType->isReal) { ShowSevereCustom( - state, eoh, format("{} [{:.2R}] > {} [{:.2R}].", cNumericFields(1), schedType->minVal, cNumericFields(2), schedType->maxVal)); + state, + eoh, + EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}].", cNumericFields(1), schedType->minVal, cNumericFields(2), schedType->maxVal)); } else { ShowSevereCustom( - state, eoh, format("{} [{:.0R}] > {} [{:.0R}].", cNumericFields(1), schedType->minVal, cNumericFields(2), schedType->maxVal)); + state, + eoh, + EnergyPlus::format("{} [{:.0R}] > {} [{:.0R}].", cNumericFields(1), schedType->minVal, cNumericFields(2), schedType->maxVal)); } ShowContinueError(state, " Other warning/severes about schedule values may appear."); } @@ -837,11 +845,11 @@ namespace Sched { } if (daySched->checkValsForLimitViolations(state)) { - ShowWarningCustom(state, eoh, format("Values are outside of range for {}={}", cAlphaFields(2), Alphas(2))); + ShowWarningCustom(state, eoh, EnergyPlus::format("Values are outside of range for {}={}", cAlphaFields(2), Alphas(2))); } if (daySched->checkValsForBadIntegers(state)) { - ShowWarningCustom(state, eoh, format("One or more values are not integer in {}={}", cAlphaFields(2), Alphas(2))); + ShowWarningCustom(state, eoh, EnergyPlus::format("One or more values are not integer in {}={}", cAlphaFields(2), Alphas(2))); } } // for (Loop) @@ -887,9 +895,9 @@ namespace Sched { if (NumFields == 0) { ShowSevereCustom(state, eoh, - format("Insufficient data entered for a full schedule day." - "Number of interval fields == [{}].", - NumFields)); + EnergyPlus::format("Insufficient data entered for a full schedule day." + "Number of interval fields == [{}].", + NumFields)); ErrorsFound = true; } @@ -916,11 +924,11 @@ namespace Sched { daySched->populateFromMinuteVals(state, minuteVals); if (daySched->checkValsForLimitViolations(state)) { - ShowWarningCustom(state, eoh, format("Values are outside of range for {}={}", cAlphaFields(2), Alphas(2))); + ShowWarningCustom(state, eoh, EnergyPlus::format("Values are outside of range for {}={}", cAlphaFields(2), Alphas(2))); } if (daySched->checkValsForBadIntegers(state)) { - ShowWarningCustom(state, eoh, format("One or more values are not integer in {}={}", cAlphaFields(2), Alphas(2))); + ShowWarningCustom(state, eoh, EnergyPlus::format("One or more values are not integer in {}={}", cAlphaFields(2), Alphas(2))); } } @@ -967,19 +975,19 @@ namespace Sched { if (Numbers(1) <= 0.0) { ShowSevereCustom(state, eoh, - format("Insufficient data entered for a full schedule day." - "...Minutes per Item field = [{}].", - Numbers(1))); + EnergyPlus::format("Insufficient data entered for a full schedule day." + "...Minutes per Item field = [{}].", + Numbers(1))); ErrorsFound = true; continue; } if (NumNumbers < 25) { ShowSevereCustom(state, eoh, - format("Insufficient data entered for a full schedule day." - "...Minutes per Item field = [{}] and only [{}] to apply to list fields.", - Numbers(1), - NumNumbers - 1)); + EnergyPlus::format("Insufficient data entered for a full schedule day." + "...Minutes per Item field = [{}] and only [{}] to apply to list fields.", + Numbers(1), + NumNumbers - 1)); ErrorsFound = true; continue; } @@ -989,18 +997,18 @@ namespace Sched { if ((NumNumbers - 1) != NumExpectedItems) { ShowSevereCustom(state, eoh, - format("Number of Entered Items={} not equal number of expected items={}" - "based on {}={}", - NumNumbers - 1, - NumExpectedItems, - cNumericFields(1), - MinutesPerItem)); + EnergyPlus::format("Number of Entered Items={} not equal number of expected items={}" + "based on {}={}", + NumNumbers - 1, + NumExpectedItems, + cNumericFields(1), + MinutesPerItem)); ErrorsFound = true; continue; } if (mod(Constant::iMinutesInHour, MinutesPerItem) != 0) { - ShowSevereCustom(state, eoh, format("{}={} not evenly divisible into 60", cNumericFields(1), MinutesPerItem)); + ShowSevereCustom(state, eoh, EnergyPlus::format("{}={} not evenly divisible into 60", cNumericFields(1), MinutesPerItem)); ErrorsFound = true; continue; } @@ -1026,11 +1034,11 @@ namespace Sched { daySched->populateFromMinuteVals(state, minuteVals); if (daySched->checkValsForLimitViolations(state)) { - ShowWarningCustom(state, eoh, format("Values are outside of range for {}={}", cAlphaFields(2), Alphas(2))); + ShowWarningCustom(state, eoh, EnergyPlus::format("Values are outside of range for {}={}", cAlphaFields(2), Alphas(2))); } if (daySched->checkValsForBadIntegers(state)) { - ShowWarningCustom(state, eoh, format("One or more values are not integer for {}={}", cAlphaFields(2), Alphas(2))); + ShowWarningCustom(state, eoh, EnergyPlus::format("One or more values are not integer for {}={}", cAlphaFields(2), Alphas(2))); } } @@ -1103,14 +1111,14 @@ namespace Sched { auto *daySched = GetDaySchedule(state, Alphas(idx + 1)); if (daySched == nullptr) { ShowSevereItemNotFoundAudit(state, eoh, cAlphaFields(idx + 1), Alphas(idx + 1)); - ShowContinueError(state, format("ref: {} \"{}\"", cAlphaFields(idx), Alphas(idx))); + ShowContinueError(state, EnergyPlus::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, format("{}: {}=\"{}", routineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("{}: {}=\"{}", routineName, CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { @@ -1127,7 +1135,8 @@ namespace Sched { if (allDays[iDayType] == true) { continue; } - ShowSevereError(state, format("{}: {}=\"{}\", Missing some day assignments", routineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, + EnergyPlus::format("{}: {}=\"{}\", Missing some day assignments", routineName, CurrentModuleObject, Alphas(1))); ErrorsFound = true; break; } @@ -1308,7 +1317,7 @@ namespace Sched { while (NumField < NumAlphas) { // Process "Through" if (!has_prefix(Alphas(NumField), "THROUGH:") && !has_prefix(Alphas(NumField), "THROUGH")) { - ShowSevereCustom(state, eoh, format("Expecting \"Through:\" date, instead found entry={}", Alphas(NumField))); + ShowSevereCustom(state, eoh, EnergyPlus::format("Expecting \"Through:\" date, instead found entry={}", Alphas(NumField))); ErrorsFound = true; goto Through_exit; } @@ -1321,7 +1330,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, format("Invalid \"Through:\" date, found entry={}", Alphas(NumField))); + ShowSevereCustom(state, eoh, EnergyPlus::format("Invalid \"Through:\" date, found entry={}", Alphas(NumField))); ErrorsFound = true; goto Through_exit; } @@ -1336,7 +1345,9 @@ namespace Sched { if (EndPointer == 366) { if (FullYearSet) { ShowSevereCustom( - state, eoh, format("New \"Through\" entry when \"full year\" already set \"Through\" field={}", CurrentThrough)); + state, + eoh, + EnergyPlus::format("New \"Through\" entry when \"full year\" already set \"Through\" field={}", CurrentThrough)); ErrorsFound = true; } FullYearSet = true; @@ -1344,7 +1355,7 @@ namespace Sched { ++WkCount; - auto *weekSched = AddWeekSchedule(state, format("{}_wk_{}", Alphas(1), WkCount)); + auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_wk_{}", Alphas(1), WkCount)); weekSched->isUsed = true; for (int iDay = StartPointer; iDay <= EndPointer; ++iDay) { @@ -1363,14 +1374,14 @@ namespace Sched { } // "For" must be next, adds to "# Day Schedules" if (!has_prefix(Alphas(NumField), "FOR")) { - ShowSevereCustom(state, eoh, format("Looking for \"For\" field, found={}", Alphas(NumField))); + ShowSevereCustom(state, eoh, EnergyPlus::format("Looking for \"For\" field, found={}", Alphas(NumField))); ErrorsFound = true; goto Through_exit; } ++DyCount; - auto *daySched = AddDaySchedule(state, format("{}_dy_{}", Alphas(1), DyCount)); + auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_dy_{}", Alphas(1), DyCount)); daySched->schedTypeNum = sched->schedTypeNum; daySched->isUsed = true; @@ -1380,8 +1391,8 @@ namespace Sched { LastFor = Alphas(NumField); ProcessForDayTypes(state, Alphas(NumField), theseDays, allDays, ErrorHere); if (ErrorHere) { - ShowContinueError(state, format("ref {}=\"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("ref Through field={}", Alphas(ThruField))); + ShowContinueError(state, EnergyPlus::format("ref {}=\"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("ref Through field={}", Alphas(ThruField))); ErrorsFound = true; } else { for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { @@ -1425,13 +1436,15 @@ namespace Sched { Numbers(NumNumbers) = Util::ProcessNumber(Alphas(NumField), ErrorHere); if (ErrorHere) { ShowSevereCustom( - state, eoh, format("Until field=[{}] has illegal value field=[{}].", Alphas(NumField - 1), Alphas(NumField))); + state, + eoh, + EnergyPlus::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, format("Looking for \"Until\" field, found={}", Alphas(NumField))); + ShowSevereCustom(state, eoh, EnergyPlus::format("Looking for \"Until\" field, found={}", Alphas(NumField))); ErrorsFound = true; goto Through_exit; } @@ -1457,7 +1470,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, format("ref {}=\"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("ref {}=\"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1471,15 +1484,15 @@ namespace Sched { continue; } - ShowWarningCustom(state, eoh, format("has missing day types in Through={}", CurrentThrough)); - ShowContinueError(state, format("Last \"For\" field={}", LastFor)); + ShowWarningCustom(state, eoh, EnergyPlus::format("has missing day types in Through={}", CurrentThrough)); + ShowContinueError(state, EnergyPlus::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 = format("{} \"{}\",-", errmsg, dayTypeNames[kDayType]); + errmsg = EnergyPlus::format("{} \"{}\",-", errmsg, dayTypeNames[kDayType]); } errmsg.erase(errmsg.length() - 2); ShowContinueError(state, errmsg); @@ -1601,10 +1614,11 @@ namespace Sched { Numbers(3) = 8760.0; } if (Numbers(3) != 8760 && Numbers(3) != 8784) { - ShowSevereCustom( - state, - eoh, - format("{} must = 8760 or 8784 (for a leap year). Value = {:.0T}, Schedule not processed.", cNumericFields(3), Numbers(3))); + ShowSevereCustom(state, + eoh, + EnergyPlus::format("{} must = 8760 or 8784 (for a leap year). Value = {:.0T}, Schedule not processed.", + cNumericFields(3), + Numbers(3))); ErrorsFound = true; continue; } @@ -1648,7 +1662,9 @@ namespace Sched { // int NumExpectedItems = 1440 / MinutesPerItem; if (mod(Constant::iMinutesInHour, minutesPerItem) != 0) { ShowSevereCustom( - state, eoh, format("Requested {} field value ({}) not evenly divisible into 60", cNumericFields(4), minutesPerItem)); + state, + eoh, + EnergyPlus::format("Requested {} field value ({}) not evenly divisible into 60", cNumericFields(4), minutesPerItem)); ErrorsFound = true; continue; } @@ -1658,7 +1674,7 @@ namespace Sched { int rowLimitCnt = (Numbers(3) * Constant::rMinutesInHour) / minutesPerItem; int hrLimitCount = Constant::iMinutesInHour / minutesPerItem; - std::string contextString = format("{}=\"{}\", {}: ", CurrentModuleObject, Alphas(1), cAlphaFields(3)); + std::string contextString = EnergyPlus::format("{}=\"{}\", {}: ", CurrentModuleObject, Alphas(1), cAlphaFields(3)); state.files.TempFullFilePath.filePath = CheckForActualFilePath(state, Alphas(3), contextString); // Setup file reading parameters @@ -1732,10 +1748,11 @@ namespace Sched { } } if (!isCSV && !isJSON) { - ShowSevereCustom( - state, - eoh, - format("{} = {} has an unknown file extension and cannot be read by this program.", cAlphaFields(3), Alphas(3))); + ShowSevereCustom(state, + eoh, + EnergyPlus::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."); } } @@ -1744,7 +1761,9 @@ namespace Sched { // curcolCount is 1-indexed here if (static_cast(curcolCount) > result->second["values"].size()) { ShowSevereCustom( - state, eoh, format("Requested column number {}, but found only {} columns.", curcolCount, result->second["values"].size())); + 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)); ShowFatalError(state, "Program terminates due to previous condition."); } @@ -1755,7 +1774,7 @@ namespace Sched { try { column_values = column_json.get>(); } catch (nlohmann::json::type_error &e) { - ShowSevereCustom(state, eoh, format("Column number {} has non-numeric data.", curcolCount)); + ShowSevereCustom(state, eoh, EnergyPlus::format("Column number {} has non-numeric data.", curcolCount)); ShowContinueError(state, e.what()); ShowContinueError(state, fmt::format("Error Occurred in {}", state.files.TempFullFilePath.filePath)); ShowFatalError(state, "Program terminates due to previous condition."); @@ -1766,18 +1785,18 @@ namespace Sched { if (numerrors > 0) { ShowWarningCustom(state, eoh, - format("{} records had errors - these values are set to 0." - "Use Output:Diagnostics,DisplayExtraWarnings; to see individual records in error.", - numerrors)); + EnergyPlus::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, - format("less than {} hourly values read from file." - "..Number read={}.", - numHourlyValues, - (rowCnt * Constant::iMinutesInHour) / minutesPerItem)); + EnergyPlus::format("less than {} hourly values read from file." + "..Number read={}.", + numHourlyValues, + (rowCnt * Constant::iMinutesInHour) / minutesPerItem)); } // process the data into the normal schedule data structures @@ -1796,11 +1815,11 @@ namespace Sched { // no matter what the day type that is used in a design day. // define day schedule - auto *daySched = AddDaySchedule(state, format("{}_dy_{}", Alphas(1), iDay)); + auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_dy_{}", Alphas(1), iDay)); daySched->schedTypeNum = sched->schedTypeNum; // define week schedule - auto *weekSched = AddWeekSchedule(state, format("{}_wk_{}", Alphas(1), iDay)); + auto *weekSched = AddWeekSchedule(state, EnergyPlus::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) { @@ -1888,11 +1907,11 @@ namespace Sched { ShowFatalError(state, "Program terminates due to previous condition."); } - std::string curName = format("{}_shading", header); + std::string curName = EnergyPlus::format("{}_shading", header); std::string curNameUC = Util::makeUPPER(curName); if (s_sched->scheduleMap.find(curNameUC) != s_sched->scheduleMap.end()) { - ShowSevereError(state, format("Duplicate schedule name {}", curName)); + ShowSevereError(state, EnergyPlus::format("Duplicate schedule name {}", curName)); ErrorsFound = true; continue; } @@ -1910,11 +1929,11 @@ namespace Sched { } // day schedule - auto *daySched = AddDaySchedule(state, format("{}_dy_{}", curName, iDay)); + auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_dy_{}", curName, iDay)); daySched->schedTypeNum = schedShading->schedTypeNum; // define week schedule - auto *weekSched = AddWeekSchedule(state, format("{}_wk_{}", curName, iDay)); + auto *weekSched = AddWeekSchedule(state, EnergyPlus::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) { @@ -2020,7 +2039,7 @@ namespace Sched { // TODO: I'm not sure this Jazz is necessary // Add day schedule - auto *daySched = AddDaySchedule(state, format("{}_xi_dy_", Alphas(1))); + auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_xi_dy_", Alphas(1))); daySched->isUsed = true; daySched->schedTypeNum = sched->schedTypeNum; @@ -2032,7 +2051,7 @@ namespace Sched { } ExternalInterfaceSetSchedule(state, daySched->Num, Numbers(1)); - auto *weekSched = AddWeekSchedule(state, format("{}_xi_wk_", Alphas(1))); + auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_xi_wk_", Alphas(1))); weekSched->isUsed = true; for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { weekSched->dayScheds[iDayType] = daySched; @@ -2066,9 +2085,9 @@ namespace Sched { if (NumExternalInterfaceSchedules >= 1) { ShowContinueError( state, - 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))); + 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))); } ErrorsFound = true; continue; @@ -2088,7 +2107,7 @@ namespace Sched { // TODO: I'm not sure this Jazz is necessary // Add day schedule - auto *daySched = AddDaySchedule(state, format("{}_xi_dy_", Alphas(1))); + auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_xi_dy_", Alphas(1))); daySched->isUsed = true; daySched->schedTypeNum = sched->schedTypeNum; @@ -2100,7 +2119,7 @@ namespace Sched { } ExternalInterfaceSetSchedule(state, daySched->Num, Numbers(1)); - auto *weekSched = AddWeekSchedule(state, format("{}_xi_wk_", Alphas(1))); + auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_xi_wk_", Alphas(1))); weekSched->isUsed = true; for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { weekSched->dayScheds[iDayType] = daySched; @@ -2134,9 +2153,9 @@ namespace Sched { if (NumExternalInterfaceSchedules >= 1) { ShowContinueError( state, - 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))); + 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))); } ErrorsFound = true; continue; @@ -2156,7 +2175,7 @@ namespace Sched { // TODO: I'm not sure this Jazz is necessary // Add day schedule - auto *daySched = AddDaySchedule(state, format("{}_xi_dy_", Alphas(1))); + auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_xi_dy_", Alphas(1))); daySched->isUsed = true; daySched->schedTypeNum = sched->schedTypeNum; @@ -2168,7 +2187,7 @@ namespace Sched { } ExternalInterfaceSetSchedule(state, daySched->Num, Numbers(1)); - auto *weekSched = AddWeekSchedule(state, format("{}_xi_wk_", Alphas(1))); + auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_xi_wk_", Alphas(1))); weekSched->isUsed = true; for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { weekSched->dayScheds[iDayType] = daySched; @@ -2197,7 +2216,7 @@ namespace Sched { } if (ErrorsFound) { - ShowFatalError(state, format("{}: Preceding Errors cause termination.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}: Preceding Errors cause termination.", routineName)); } if (s_sched->scheduleTypes.size() + s_sched->daySchedules.size() + s_sched->weekSchedules.size() + s_sched->schedules.size() > 0) { @@ -2228,8 +2247,8 @@ namespace Sched { } else { ShowWarningCustom(state, eoh, - format("Report level {} has already been processed. This report level will not be processed again.", - reportLevelNames[(int)reportLevel])); + EnergyPlus::format("Report level {} has already been processed. This report level will not be processed again.", + reportLevelNames[(int)reportLevel])); continue; } } @@ -2258,9 +2277,9 @@ namespace Sched { for (auto const *schedType : state.dataSched->scheduleTypes) { if (schedType->isLimited) { YesNoLimited = "Yes"; - minValStr = format("{:.2R}", schedType->minVal); + minValStr = EnergyPlus::format("{:.2R}", schedType->minVal); strip(minValStr); - maxValStr = format("{:.2R}", schedType->maxVal); + maxValStr = EnergyPlus::format("{:.2R}", schedType->maxVal); strip(maxValStr); if (schedType->isReal) { YesNoContinous = "Yes"; @@ -2331,9 +2350,9 @@ namespace Sched { assert(static_cast(times.size()) == NumTimesInDay); std::string_view const &reportLevelName = reportLevelNames[(int)LevelOfDetail]; - std::string const dayScheduleTableName = format("DaySchedule - {}", reportLevelName); - std::string const weekScheduleTableName = format("WeekSchedule - {}", reportLevelName); // TODO: "Schedule:Week:Daily" ? - std::string const scheduleTableName = format("Schedule - {}", reportLevelName); // TODO: "Detailed Schedule" maybe? + 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? // Schedule Types Header { @@ -2490,7 +2509,7 @@ namespace Sched { // Hourly Value if (hr > Constant::iHoursInDay) { - ShowFatalError(state, format("LookUpScheduleValue called with thisHour={}", hr)); + ShowFatalError(state, EnergyPlus::format("LookUpScheduleValue called with thisHour={}", hr)); } int thisHr = hr + state.dataEnvrn->DSTIndicator * static_cast(this->UseDaylightSaving); @@ -2756,8 +2775,9 @@ namespace Sched { Real64 EndValue = 0; if (NumUntils != NumNumbers) { - ShowSevereError(state, - format("ProcessScheduleInput: ProcessIntervalFields, number of Time fields does not match number of value fields, {}={}", + ShowSevereError( + state, + EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, number of Time fields does not match number of value fields, {}={}", ErrContext, DayScheduleName)); ErrorsFound = true; @@ -2777,21 +2797,24 @@ 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, format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", until)); - ShowContinueError(state, format("Occurred in Day Schedule={}", DayScheduleName)); + ShowSevereError(state, + EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", until)); + ShowContinueError(state, EnergyPlus::format("Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; continue; } // Field decoded if (HHField < 0 || HHField > Constant::iHoursInDay || MMField < 0 || MMField > Constant::iMinutesInHour) { - ShowSevereError(state, format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", until)); - ShowContinueError(state, format("Occurred in Day Schedule={}", DayScheduleName)); + ShowSevereError(state, + EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", until)); + ShowContinueError(state, EnergyPlus::format("Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; continue; } if (HHField == Constant::iHoursInDay && MMField > 0 && MMField < Constant::iMinutesInHour) { - ShowWarningError(state, format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", Untils(Count))); - ShowContinueError(state, format("Occurred in Day Schedule={}", DayScheduleName)); + ShowWarningError( + state, EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", Untils(Count))); + ShowContinueError(state, EnergyPlus::format("Occurred in Day Schedule={}", DayScheduleName)); ShowContinueError(state, "Terminating the field at 24:00"); MMField = 0; } @@ -2823,13 +2846,15 @@ namespace Sched { if (begHr > endHr) { if (begHr == endHr + 1 && begMin == 0 && endMin == Constant::iMinutesInHour - 1) { - ShowWarningError(state, - format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, zero time interval detected, {}={}", - ErrContext, - DayScheduleName)); + ShowWarningError( + state, + EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, zero time interval detected, {}={}", + ErrContext, + DayScheduleName)); } else { - ShowSevereError(state, - format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, overlapping times detected, {}={}", + ShowSevereError( + state, + EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, overlapping times detected, {}={}", ErrContext, DayScheduleName)); ErrorsFound = true; @@ -2838,11 +2863,11 @@ namespace Sched { } else if (begHr == endHr) { for (int iMin = begMin; iMin <= endMin; ++iMin) { if (setMinuteVals[begHr * Constant::iMinutesInHour + iMin] == true) { - ShowSevereError( - state, - format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, overlapping times detected, {}={}", - ErrContext, - DayScheduleName)); + ShowSevereError(state, + EnergyPlus::format( + "ProcessScheduleInput: ProcessIntervalFields, Processing time fields, overlapping times detected, {}={}", + ErrContext, + DayScheduleName)); ErrorsFound = true; goto UntilLoop_exit; } @@ -2926,8 +2951,9 @@ namespace Sched { for (int iMin = 0; iMin < Constant::iMinutesInDay; ++iMin) { if (setMinuteVals[iMin] == false) { - ShowSevereError(state, - format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, incomplete day detected, {}={}", + ShowSevereError( + state, + EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, incomplete day detected, {}={}", ErrContext, DayScheduleName)); ErrorsFound = true; @@ -2961,10 +2987,11 @@ namespace Sched { auto const &s_glob = state.dataGlobal; if (Pos == std::string::npos) { - ShowSevereError(state, - format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (no : separator in hh:mm)={}", + ShowSevereError( + state, + EnergyPlus::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (no : separator in hh:mm)={}", stripped(FullFieldValue))); - ShowContinueError(state, format("Occurred in Day Schedule={}", DayScheduleName)); + ShowContinueError(state, EnergyPlus::format("Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; return; } @@ -2976,17 +3003,20 @@ namespace Sched { RetHH = int(rRetHH); if (double(RetHH) != rRetHH || error || rRetHH < 0.0) { if (double(RetHH) != rRetHH && rRetHH >= 0.0) { - ShowWarningError(state, - format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (non-integer numeric in HH)={}", - stripped(FullFieldValue))); - ShowContinueError(state, format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); + 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)); nonIntegral = true; } else { - ShowSevereError(state, - format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (invalid numeric in HH)={}", + ShowSevereError( + state, + EnergyPlus::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (invalid numeric in HH)={}", stripped(FullFieldValue))); ShowContinueError( - state, format("Field values must be integer and represent hours:minutes. Occurred in Day Schedule={}", DayScheduleName)); + state, + EnergyPlus::format("Field values must be integer and represent hours:minutes. Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; return; } @@ -2999,17 +3029,20 @@ namespace Sched { RetMM = int(rRetMM); if (double(RetMM) != rRetMM || error || rRetMM < 0.0) { if (double(RetMM) != rRetMM && rRetMM >= 0.0) { - ShowWarningError(state, - format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (non-integer numeric in MM)={}", - stripped(FullFieldValue))); - ShowContinueError(state, format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); + 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)); nonIntegral = true; } else { - ShowSevereError(state, - format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (invalid numeric in MM)={}", + ShowSevereError( + state, + EnergyPlus::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (invalid numeric in MM)={}", stripped(FullFieldValue))); - ShowContinueError(state, - format("Field values must be integer and represent hours:minutes. Occurred in Day Schedule={}", DayScheduleName)); + ShowContinueError( + state, + EnergyPlus::format("Field values must be integer and represent hours:minutes. Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; return; } @@ -3018,16 +3051,16 @@ namespace Sched { if (nonIntegral) { std::string hHour; // these haven't been initialized? std::string mMinute; - ShowContinueError(state, format("Until value to be used will be: {:2.2F}:{:2.2F}", hHour, mMinute)); + ShowContinueError(state, EnergyPlus::format("Until value to be used will be: {:2.2F}:{:2.2F}", hHour, mMinute)); } if (interpolation == Interpolation::No) { if (!isMinuteMultipleOfTimestep(RetMM, s_glob->MinutesInTimeStep)) { ShowWarningError( state, - format( + EnergyPlus::format( "ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field value is not a multiple of the minutes for each timestep: {}", stripped(FullFieldValue))); - ShowContinueError(state, format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); + ShowContinueError(state, EnergyPlus::format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); } } } @@ -3207,11 +3240,11 @@ namespace Sched { } if (DupAssignment) { - ShowSevereError(state, format("ProcessForDayTypes: Duplicate assignment attempted in \"for\" days field={}", ForDayField)); + ShowSevereError(state, EnergyPlus::format("ProcessForDayTypes: Duplicate assignment attempted in \"for\" days field={}", ForDayField)); ErrorsFound = true; } if (!OneValid) { - ShowSevereError(state, format("ProcessForDayTypes: No valid day assignments found in \"for\" days field={}", ForDayField)); + ShowSevereError(state, EnergyPlus::format("ProcessForDayTypes: No valid day assignments found in \"for\" days field={}", ForDayField)); ErrorsFound = true; } } // ProcessScheduleInput() @@ -3636,14 +3669,14 @@ namespace Sched { NeedOrphanMessage = false; } if (s_glob->DisplayUnusedSchedules) { - ShowMessage(state, format("Schedule:Year or Schedule:Compact or Schedule:File or Schedule:Constant={}", sched->Name)); + ShowMessage(state, EnergyPlus::format("Schedule:Year or Schedule:Compact or Schedule:File or Schedule:Constant={}", sched->Name)); } else { ++NumCount; } } if (NumCount > 0) { - ShowMessage(state, format("There are {} unused schedules in input.", NumCount)); + ShowMessage(state, EnergyPlus::format("There are {} unused schedules in input.", NumCount)); NeedUseMessage = true; } @@ -3663,7 +3696,7 @@ namespace Sched { NeedOrphanMessage = false; } if (s_glob->DisplayUnusedSchedules) { - ShowMessage(state, format("Schedule:Week:Daily or Schedule:Week:Compact={}", weekSched->Name)); + ShowMessage(state, EnergyPlus::format("Schedule:Week:Daily or Schedule:Week:Compact={}", weekSched->Name)); } else { ++NumCount; } @@ -3691,14 +3724,14 @@ namespace Sched { } if (s_glob->DisplayUnusedSchedules) { - ShowMessage(state, format("Schedule:Day:Hourly or Schedule:Day:Interval or Schedule:Day:List={}", daySched->Name)); + ShowMessage(state, EnergyPlus::format("Schedule:Day:Hourly or Schedule:Day:Interval or Schedule:Day:List={}", daySched->Name)); } else { ++NumCount; } } if (NumCount > 0) { - ShowMessage(state, format("There are {} unused day schedules in input.", NumCount)); + ShowMessage(state, EnergyPlus::format("There are {} unused day schedules in input.", NumCount)); NeedUseMessage = true; } @@ -3910,11 +3943,12 @@ namespace Sched { Real64 minVal, std::string_view msg) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError( - state, format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMin == Clusive::In ? "<" : "<=", minVal)); + state, + EnergyPlus::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMin == Clusive::In ? "<" : "<=", minVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -3926,11 +3960,12 @@ namespace Sched { Real64 maxVal, std::string_view msg) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError( - state, format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMax == Clusive::In ? ">" : ">=", maxVal)); + state, + EnergyPlus::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMax == Clusive::In ? ">" : ">=", maxVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -3944,17 +3979,17 @@ namespace Sched { Real64 maxVal, std::string_view msg) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - format("{} = {}, schedule contains values that are {} {} and/or {} {}", - fieldName, - fieldVal, - cluMin == Clusive::In ? "<" : "<=", - minVal, - cluMax == Clusive::In ? ">" : ">=", - maxVal)); + EnergyPlus::format("{} = {}, schedule contains values that are {} {} and/or {} {}", + fieldName, + fieldVal, + cluMin == Clusive::In ? "<" : "<=", + minVal, + cluMax == Clusive::In ? ">" : ">=", + maxVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -3966,11 +4001,12 @@ namespace Sched { Real64 minVal, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError( - state, format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMin == Clusive::In ? "<" : "<=", minVal)); + state, + EnergyPlus::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMin == Clusive::In ? "<" : "<=", minVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -3982,11 +4018,12 @@ namespace Sched { Real64 maxVal, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError( - state, format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMax == Clusive::In ? ">" : ">=", maxVal)); + state, + EnergyPlus::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMax == Clusive::In ? ">" : ">=", maxVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -4000,17 +4037,17 @@ namespace Sched { Real64 maxVal, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - format("{} = {}, schedule contains values that are {} {} and/or {} {}", - fieldName, - fieldVal, - cluMin == Clusive::In ? "<" : "<=", - minVal, - cluMax == Clusive::In ? ">" : ">=", - maxVal)); + EnergyPlus::format("{} = {}, schedule contains values that are {} {} and/or {} {}", + fieldName, + fieldVal, + cluMin == Clusive::In ? "<" : "<=", + minVal, + cluMax == Clusive::In ? ">" : ">=", + maxVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } diff --git a/src/EnergyPlus/SetPointManager.cc b/src/EnergyPlus/SetPointManager.cc index a25c5c120cb..1ed67302289 100644 --- a/src/EnergyPlus/SetPointManager.cc +++ b/src/EnergyPlus/SetPointManager.cc @@ -306,7 +306,7 @@ void GetSetPointManagerInputs(EnergyPlusData &state) GetSetPointManagerInputData(state, ErrorsFound); if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in input. Program terminates.", routineName)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in input. Program terminates.", routineName)); } state.dataSetPointManager->GetInputFlag = false; } @@ -589,11 +589,12 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) spm->minSetTemp = ip->getRealFieldValue(fields, props, "minimum_setpoint_temperature"); spm->maxSetTemp = ip->getRealFieldValue(fields, props, "maximum_setpoint_temperature"); if (spm->maxSetTemp < spm->minSetTemp) { - ShowWarningError(state, format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spm->Name)); - ShowContinueError(state, - format("...maximum_supply_air_temperature=[{:.1R}] is less than minimum_supply_air_temperature=[{:.1R}].", - spm->maxSetTemp, - spm->minSetTemp)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spm->Name)); + ShowContinueError( + state, + EnergyPlus::format("...maximum_supply_air_temperature=[{:.1R}] is less than minimum_supply_air_temperature=[{:.1R}].", + spm->maxSetTemp, + spm->minSetTemp)); } } break; @@ -603,11 +604,12 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) spm->minSetTemp = ip->getRealFieldValue(fields, props, "minimum_supply_air_temperature"); spm->maxSetTemp = ip->getRealFieldValue(fields, props, "maximum_supply_air_temperature"); if (spm->maxSetTemp < spm->minSetTemp) { - ShowWarningError(state, format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spm->Name)); - ShowContinueError(state, - format("...maximum_supply_air_temperature=[{:.1R}] is less than minimum_supply_air_temperature=[{:.1R}].", - spm->maxSetTemp, - spm->minSetTemp)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spm->Name)); + ShowContinueError( + state, + EnergyPlus::format("...maximum_supply_air_temperature=[{:.1R}] is less than minimum_supply_air_temperature=[{:.1R}].", + spm->maxSetTemp, + spm->minSetTemp)); } } break; @@ -615,11 +617,12 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) spm->minSetTemp = ip->getRealFieldValue(fields, props, "minimum_limit_setpoint_temperature"); spm->maxSetTemp = ip->getRealFieldValue(fields, props, "maximum_limit_setpoint_temperature"); if (spm->maxSetTemp < spm->minSetTemp) { - ShowWarningError(state, format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spm->Name)); - ShowContinueError(state, - format("...maximum_supply_air_temperature=[{:.1R}] is less than minimum_supply_air_temperature=[{:.1R}].", - spm->maxSetTemp, - spm->minSetTemp)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spm->Name)); + ShowContinueError( + state, + EnergyPlus::format("...maximum_supply_air_temperature=[{:.1R}] is less than minimum_supply_air_temperature=[{:.1R}].", + spm->maxSetTemp, + spm->minSetTemp)); } } break; @@ -638,22 +641,23 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) spm->minSetHum = ip->getRealFieldValue(fields, props, "minimum_setpoint_humidity_ratio"); spm->maxSetHum = ip->getRealFieldValue(fields, props, "maximum_setpoint_humidity_ratio"); if (spm->maxSetHum < spm->minSetHum) { - ShowWarningError(state, format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spm->Name)); - ShowContinueError(state, - format("...maximum_setpoint_humidity_ratio=[{:.1R}] is less than minimum_setpoint_humidity_ratio=[{:.1R}].", - spm->maxSetHum, - spm->minSetHum)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spm->Name)); + ShowContinueError( + state, + EnergyPlus::format("...maximum_setpoint_humidity_ratio=[{:.1R}] is less than minimum_setpoint_humidity_ratio=[{:.1R}].", + spm->maxSetHum, + spm->minSetHum)); } // Because a zero humidity ratio setpoint is a special value indicating "off" or "no load" // must not allow MinSetHumRat or MaxSetHumRat to be <=0.0 if (spm->minSetHum <= 0.0) { - ShowWarningError(state, format("{}: {}=\"{}\", invalid value.", routineName, cCurrentModuleObject, spm->Name)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\", invalid value.", routineName, cCurrentModuleObject, spm->Name)); ShowContinueError(state, "Minimum setpoint humidity ratio <=0.0, resetting to 0.00001"); spm->minSetHum = 0.00001; } if (spm->maxSetHum <= 0.0) { - ShowWarningError(state, format("{}: {}=\"{}\", invalid value.", routineName, cCurrentModuleObject, spm->Name)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\", invalid value.", routineName, cCurrentModuleObject, spm->Name)); ShowContinueError(state, "Maximum setpoint humidity ratio <=0.0, resetting to 0.00001"); spm->maxSetHum = 0.00001; } @@ -766,11 +770,11 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) if (spmOA->high2 < spmOA->low2) { ShowWarningCustom(state, eoh, - format("...{}=[{:.1R}] is less than {}=[{:.1R}].", - "outdoor_high_temperature_2", - spmOA->high2, - "outdoor_low_temperature_2", - spmOA->low2)); + EnergyPlus::format("...{}=[{:.1R}] is less than {}=[{:.1R}].", + "outdoor_high_temperature_2", + spmOA->high2, + "outdoor_low_temperature_2", + spmOA->low2)); } } else { // !foundSched spmOA->sched = nullptr; @@ -890,8 +894,8 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) // only allow one control zone for now if (NumNodes > 1) { - ShowSevereError(state, format("{}: {}=\"{}\", entered nodelist.", routineName, cCurrentModuleObject, spmSZHum->Name)); - ShowContinueError(state, format("..invalid ctrl_zone_node_name=\"{}\".", ctrlZoneNodeName)); + ShowSevereError(state, EnergyPlus::format("{}: {}=\"{}\", entered nodelist.", routineName, cCurrentModuleObject, spmSZHum->Name)); + ShowContinueError(state, EnergyPlus::format("..invalid ctrl_zone_node_name=\"{}\".", ctrlZoneNodeName)); ShowContinueError(state, "..only one control zone is allowed."); ErrorsFound = true; } @@ -982,13 +986,13 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) ObjectIsNotParent); if (std::find(spmOAP->ctrlNodeNums.begin(), spmOAP->ctrlNodeNums.end(), spmOAP->refNodeNum) != spmOAP->ctrlNodeNums.end()) { - ShowSevereError(state, format("{}: {}=\"{}\", reference node.", routineName, cCurrentModuleObject, spmOAP->Name)); + ShowSevereError(state, EnergyPlus::format("{}: {}=\"{}\", reference node.", routineName, cCurrentModuleObject, spmOAP->Name)); if (spmOAP->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, format("Reference Node Name=\"{}\".", state.dataLoopNodes->NodeID(spmOAP->refNodeNum))); + ShowContinueError(state, EnergyPlus::format("Reference Node Name=\"{}\".", state.dataLoopNodes->NodeID(spmOAP->refNodeNum))); ErrorsFound = true; } } break; @@ -1027,8 +1031,8 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) spmWTF->minTurndown = ip->getRealFieldValue(fields, props, "minimum_turndown_ratio"); if (spmWTF->minTurndown >= 0.8) { - ShowWarningError(state, format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spmWTF->Name)); - ShowContinueError(state, format("...minimum_turndown_ratio=[{:.2R}] is greater than 0.8;", spmWTF->minTurndown)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spmWTF->Name)); + ShowContinueError(state, EnergyPlus::format("...minimum_turndown_ratio=[{:.2R}] is greater than 0.8;", spmWTF->minTurndown)); ShowContinueError(state, "...typical values for minimum_turndown_ratio are less than 0.8."); } @@ -1124,13 +1128,13 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) if (state.dataSetPointManager->NoGroundTempObjWarning[(int)spmFGT->refTempType]) { if (!state.dataEnvrn->GroundTempInputs[(int)spmFGT->refTempType]) { ShowWarningError(state, - format("{}: {}=\"{}\" requires \"Site:GroundTemperature:BuildingSurface\" in the input..", - routineName, - cCurrentModuleObject, - spmFGT->Name)); + EnergyPlus::format("{}: {}=\"{}\" requires \"Site:GroundTemperature:BuildingSurface\" in the input..", + routineName, + cCurrentModuleObject, + spmFGT->Name)); ShowContinueError(state, - format("Defaults, constant throughout the year of ({:.1R}) will be used.", - state.dataEnvrn->GroundTemp[(int)spmFGT->refTempType])); + EnergyPlus::format("Defaults, constant throughout the year of ({:.1R}) will be used.", + state.dataEnvrn->GroundTemp[(int)spmFGT->refTempType])); } state.dataSetPointManager->NoGroundTempObjWarning[(int)spmFGT->refTempType] = false; } @@ -1171,12 +1175,12 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) spmCET->towerDesignInletAirWetBulbTemp = ip->getRealFieldValue(fields, props, "cooling_tower_design_inlet_air_wet_bulb_temperature"); if (spmCET->maxCondenserEnteringTemp < spmCET->towerDesignInletAirWetBulbTemp) { - ShowWarningError(state, format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spmCET->Name)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spmCET->Name)); ShowContinueError(state, - format("...maximum_condenser_entering_water_temperature=[{:.1R}] is less than " - "cooling_tower_design_inlet_air_wet-bulb_temperature=[{:.1R}].", - spmCET->maxCondenserEnteringTemp, - spmCET->towerDesignInletAirWetBulbTemp)); + EnergyPlus::format("...maximum_condenser_entering_water_temperature=[{:.1R}] is less than " + "cooling_tower_design_inlet_air_wet-bulb_temperature=[{:.1R}].", + spmCET->maxCondenserEnteringTemp, + spmCET->towerDesignInletAirWetBulbTemp)); } } break; @@ -1206,12 +1210,12 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) if (spmSZOSC->coolingOffSetPt < spmSZOSC->coolingOnSetPt) { // throw warning, off must be warmer than on - ShowWarningError(state, format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spmSZOSC->Name)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spmSZOSC->Name)); ShowContinueError(state, - format("...cooling_stage_off_supply_air_setpoint_temperature=[{:.1R}] is less than " - "cooling_stage_on_supply_air_setpoint_temperature=[{:.1R}].", - spmSZOSC->coolingOffSetPt, - spmSZOSC->coolingOnSetPt)); + EnergyPlus::format("...cooling_stage_off_supply_air_setpoint_temperature=[{:.1R}] is less than " + "cooling_stage_on_supply_air_setpoint_temperature=[{:.1R}].", + spmSZOSC->coolingOffSetPt, + spmSZOSC->coolingOnSetPt)); } std::string ctrlZoneName = ip->getAlphaFieldValue(fields, props, "control_zone_name"); @@ -1224,8 +1228,9 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) spmSZOSC->zoneNodeNum = GetSystemNodeNumberForZone(state, spmSZOSC->ctrlZoneNum); if (allocated(state.dataZoneCtrls->StageZoneLogic)) { if (!state.dataZoneCtrls->StageZoneLogic(spmSZOSC->ctrlZoneNum)) { - ShowSevereError(state, format("{}: {}=\"{}\", invalid field.", routineName, cCurrentModuleObject, spmSZOSC->Name)); - ShowContinueError(state, format("..invalid control_zone_name=\"{}\".", ctrlZoneName)); + ShowSevereError(state, + EnergyPlus::format("{}: {}=\"{}\", invalid field.", routineName, cCurrentModuleObject, spmSZOSC->Name)); + ShowContinueError(state, EnergyPlus::format("..invalid control_zone_name=\"{}\".", ctrlZoneName)); ShowContinueError(state, "Zone thermostat must use ZoneControl:Thermostat:StagedDualSetpoint."); ErrorsFound = true; } @@ -1243,12 +1248,12 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) if (spmSZOSH->heatingOffSetPt > spmSZOSH->heatingOnSetPt) { // throw warning, off must be warmer than on - ShowWarningError(state, format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spmSZOSH->Name)); + ShowWarningError(state, EnergyPlus::format("{}: {}=\"{}\",", routineName, cCurrentModuleObject, spmSZOSH->Name)); ShowContinueError(state, - format("...heating_stage_off_supply_air_setpoint_temperature=[{:.1R}] is less than " - "heating_stage_on_supply_air_setpoint_temperature=[{:.1R}].", - spmSZOSH->heatingOffSetPt, - spmSZOSH->heatingOnSetPt)); + EnergyPlus::format("...heating_stage_off_supply_air_setpoint_temperature=[{:.1R}] is less than " + "heating_stage_on_supply_air_setpoint_temperature=[{:.1R}].", + spmSZOSH->heatingOffSetPt, + spmSZOSH->heatingOnSetPt)); } std::string ctrlZoneName = ip->getAlphaFieldValue(fields, props, "control_zone_name"); @@ -1261,8 +1266,9 @@ 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, format("{}: {}=\"{}\", invalid field.", routineName, cCurrentModuleObject, spmSZOSH->Name)); - ShowContinueError(state, format("..invalid control_zone_name=\"{}\".", ctrlZoneName)); + ShowSevereError(state, + EnergyPlus::format("{}: {}=\"{}\", invalid field.", routineName, cCurrentModuleObject, spmSZOSH->Name)); + ShowContinueError(state, EnergyPlus::format("..invalid control_zone_name=\"{}\".", ctrlZoneName)); ShowContinueError(state, "Zone thermostat must use ZoneControl:Thermostat:StagedDualSetpoint."); ErrorsFound = true; } @@ -1445,13 +1451,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, format("{}: {}=\"{}\", reference node.", routineName, cCurrentModuleObject, spmMA->Name)); + ShowSevereError(state, EnergyPlus::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, format("Reference Node Name=\"{}\".", state.dataLoopNodes->NodeID(spmMA->refNodeNum))); + ShowContinueError(state, EnergyPlus::format("Reference Node Name=\"{}\".", state.dataLoopNodes->NodeID(spmMA->refNodeNum))); ErrorsFound = true; } } break; @@ -1572,9 +1578,10 @@ void VerifySetPointManagers(EnergyPlusData &state, [[maybe_unused]] bool &Errors if (spm->ctrlNodeNums[iNode] != spm->ctrlNodeNums[jNode]) { continue; } - ShowWarningError(state, format("{} =\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); - ShowContinueError(state, format("...duplicate node specified = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); - ShowContinueError(state, format("...control type variable = {}", ctrlVarTypeNamesUC[(int)spm->ctrlVar])); + 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])); } } @@ -1590,10 +1597,11 @@ 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, format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, "...air loop name conflicts with another setpoint manager."); - ShowContinueError(state, format("...conflicting setpoint manager = {} \"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); - ShowContinueError(state, format("...conflicting air loop name = {}", spm->airLoopName)); + ShowContinueError(state, + EnergyPlus::format("...conflicting setpoint manager = {} \"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); + ShowContinueError(state, EnergyPlus::format("...conflicting air loop name = {}", spm->airLoopName)); // ErrorsFound=.TRUE. } @@ -1605,12 +1613,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, format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, "...setpoint node conflicts with another setpoint manager."); - ShowContinueError(state, - format("...conflicting setpoint manager = {} \"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); - ShowContinueError(state, format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); - ShowContinueError(state, format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); + 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])); // ErrorsFound=.TRUE. } } @@ -1632,20 +1641,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, format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, "...setpoint node conflicts with another setpoint manager."); - ShowContinueError(state, format("...conflicting setpoint manager ={}:\"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); - ShowContinueError(state, format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); - ShowContinueError(state, format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); + 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, "...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, format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, "...setpoint node conflicts with another setpoint manager."); - ShowContinueError(state, - format("...conflicting setpoint manager = {}:\"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); - ShowContinueError(state, format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); - ShowContinueError(state, format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); + 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])); // ErrorsFound=.TRUE. } } @@ -1734,9 +1746,10 @@ void InitSetPointManagers(EnergyPlusData &state) } } if (ConZoneNum == 0) { - ShowSevereError(state, format("{}=\"{}\", Zone Node not found:", spmTypeName, spmName)); - ShowContinueError(state, - format("Node=\"{}\", not found in any controlled Zone", state.dataLoopNodes->NodeID(spmSZT->zoneNodeNum))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Zone Node not found:", spmTypeName, spmName)); + ShowContinueError( + state, + EnergyPlus::format("Node=\"{}\", not found in any controlled Zone", state.dataLoopNodes->NodeID(spmSZT->zoneNodeNum))); ErrorsFound = true; } else { auto &zoneEquip = state.dataZoneEquip->ZoneEquipConfig(ConZoneNum); @@ -1748,11 +1761,11 @@ void InitSetPointManagers(EnergyPlusData &state) } if (!found) { ShowSevereError(state, - format("{}=\"{}\", The zone inlet node of {}", - spmTypeName, - spmName, - state.dataLoopNodes->NodeID(spmSZT->zoneInletNodeNum))); - ShowContinueError(state, format("is not found in Zone = {}. Please check inputs.", zoneEquip.ZoneName)); + 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)); ErrorsFound = true; } } @@ -1772,7 +1785,8 @@ void InitSetPointManagers(EnergyPlusData &state) } // still need to validate... if (spmSZH->ctrlZoneNum == 0) { // didn't find - ShowSevereCustom(state, eoh, format("could not find Controlled Zone={}", state.dataHeatBal->Zone(spmSZH->ctrlZoneNum).Name)); + ShowSevereCustom( + state, eoh, EnergyPlus::format("could not find Controlled Zone={}", state.dataHeatBal->Zone(spmSZH->ctrlZoneNum).Name)); ErrorsFound = true; } else { // make sure humidity controlled zone @@ -1784,9 +1798,10 @@ void InitSetPointManagers(EnergyPlusData &state) } } if (!HstatZoneFound) { - ShowSevereError(state, format("{}=\"{}\", invalid humidistat specification", spmTypeName, spmName)); - ShowContinueError(state, - format("could not locate Humidistat in Zone={}", state.dataHeatBal->Zone(spmSZH->ctrlZoneNum).Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid humidistat specification", spmTypeName, spmName)); + ShowContinueError( + state, + EnergyPlus::format("could not locate Humidistat in Zone={}", state.dataHeatBal->Zone(spmSZH->ctrlZoneNum).Name)); ErrorsFound = true; } } @@ -1811,9 +1826,10 @@ void InitSetPointManagers(EnergyPlusData &state) } if (ConZoneNum == 0) { - ShowSevereError(state, format("{}=\"{}\", Zone Node not found:", spmTypeName, spmName)); - ShowContinueError(state, - format("Node=\"{}\", not found in any controlled Zone", state.dataLoopNodes->NodeID(spmSZR->zoneNodeNum))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Zone Node not found:", spmTypeName, spmName)); + ShowContinueError( + state, + EnergyPlus::format("Node=\"{}\", not found in any controlled Zone", state.dataLoopNodes->NodeID(spmSZR->zoneNodeNum))); ErrorsFound = true; } else { bool found = false; @@ -1826,15 +1842,16 @@ void InitSetPointManagers(EnergyPlusData &state) } if (!found) { ShowSevereError(state, - format("{}=\"{}\", The zone inlet node of {}", - spmTypeName, - spmName, - state.dataLoopNodes->NodeID(spmSZR->zoneInletNodeNum))); - ShowContinueError(state, format("is not found in Zone = {}. Please check inputs.", zoneEquip.ZoneName)); + 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)); ErrorsFound = true; } if (spmSZR->airLoopNum == 0) { - ShowSevereError(state, format("{}=\"{}\", The zone inlet node is not connected to an air loop.", spmTypeName, spmName)); + ShowSevereError( + state, EnergyPlus::format("{}=\"{}\", The zone inlet node is not connected to an air loop.", spmTypeName, spmName)); ErrorsFound = true; continue; } @@ -1900,12 +1917,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, format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); - ShowContinueError(state, format("Air Loop provides no cooling, Air Loop=\"{}\".", spmT->airLoopName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); + ShowContinueError(state, EnergyPlus::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmT->airLoopName)); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -1925,12 +1942,12 @@ void InitSetPointManagers(EnergyPlusData &state) spmWTF->simReady = true; } if (state.dataAirLoop->AirToZoneNodeInfo(spmWTF->airLoopNum).NumZonesCooled == 0) { - ShowSevereError(state, format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); - ShowContinueError(state, format("Air Loop provides no cooling, Air Loop=\"{}\".", spmWTF->airLoopName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); + ShowContinueError(state, EnergyPlus::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmWTF->airLoopName)); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -1957,12 +1974,12 @@ void InitSetPointManagers(EnergyPlusData &state) spmRAB->sysOutNodeNum = state.dataAirLoop->AirToZoneNodeInfo(spmRAB->airLoopNum).AirLoopSupplyNodeNum(1); spmRAB->ctrlNodeNums.push_back(spmRAB->rabSplitOutNodeNum); } else { - ShowSevereError(state, format("{}=\"{}\", no RAB in air loop found:", spmTypeName, spmName)); - ShowContinueError(state, format("Air Loop=\"{}\".", spmRAB->airLoopName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no RAB in air loop found:", spmTypeName, spmName)); + ShowContinueError(state, EnergyPlus::format("Air Loop=\"{}\".", spmRAB->airLoopName)); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -1982,12 +1999,12 @@ void InitSetPointManagers(EnergyPlusData &state) } if (state.dataAirLoop->AirToZoneNodeInfo(spmMZTemp->airLoopNum).NumZonesCooled == 0) { - ShowSevereError(state, format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); - ShowContinueError(state, format("Air Loop provides no cooling, Air Loop=\"{}\".", spmMZTemp->airLoopName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); + ShowContinueError(state, EnergyPlus::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmMZTemp->airLoopName)); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -2021,15 +2038,15 @@ void InitSetPointManagers(EnergyPlusData &state) } if (!HstatZoneFound) { - ShowSevereError(state, format("{}=\"{}\", invalid humidistat specification", spmTypeName, spmName)); - ShowContinueError( - state, - format("could not locate Humidistat in any of the zones served by the Air loop={}", primaryAirSystem.Name)); + 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)); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -2051,8 +2068,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, format("{}=\"{}\", invalid tower found", spmTypeName, spmName)); - ShowContinueError(state, format("Found SingleSpeed Cooling Tower, Cooling Tower={}", comp.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid tower found", spmTypeName, spmName)); + ShowContinueError(state, EnergyPlus::format("Found SingleSpeed Cooling Tower, Cooling Tower={}", comp.Name)); ShowContinueError(state, "SingleSpeed cooling towers cannot be used with this setpoint manager."); ErrorsFound = true; } @@ -2131,8 +2148,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, format("{}=\"{}\", invalid cooling tower found", spmTypeName, spmName)); - ShowContinueError(state, format("Found Single Speed Cooling Tower, Cooling Tower={}", comp.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid cooling tower found", spmTypeName, spmName)); + ShowContinueError(state, EnergyPlus::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 || @@ -2197,9 +2214,9 @@ void InitSetPointManagers(EnergyPlusData &state) } } if (NumChiller > 1) { - ShowSevereError(state, format("{}=\"{}\", too many chillers found", spmTypeName, spmName)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", too many chillers found", spmTypeName, spmName)); ShowContinueError(state, "only one chiller can be used with this setpoint manager on each loop"); - ShowContinueError(state, format("Found more than one chiller, chiller ={}", comp.Name)); + ShowContinueError(state, EnergyPlus::format("Found more than one chiller, chiller ={}", comp.Name)); ErrorsFound = true; } spmIdealCET->chillerType = ChillerType; @@ -2766,14 +2783,15 @@ void SPMOutsideAir::calculate(EnergyPlusData &state) if ((this->sched != nullptr) && (SchedVal != 1.0)) { // Since schedule is optional, only check this if the user entered a schedule ++this->setPtErrorCount; if (this->setPtErrorCount <= 10) { - ShowSevereError(state, - format("Schedule Values for the Outside Air Setpoint Manager = {} are something other than 1 or 2.", this->Name)); - ShowContinueError(state, format("...the value for the schedule currently is {}", SchedVal)); + 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)); ShowContinueError(state, "...the value is being interpreted as 1 for this run but should be fixed."); } else { ShowRecurringSevereErrorAtEnd( state, - format("Schedule Values for the Outside Air Setpoint Manager = {} are something other than 1 or 2.", this->Name), + EnergyPlus::format("Schedule Values for the Outside Air Setpoint Manager = {} are something other than 1 or 2.", this->Name), this->invalidSchedValErrorIndex); } } @@ -2994,9 +3012,10 @@ void SPMMixedAir::calculate(EnergyPlusData &state) if (refNode.TempSetPoint == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, - format("CalcMixedAirSetPoint: Missing reference temperature setpoint for Mixed Air Setpoint Manager {}", this->Name)); - ShowContinueError(state, format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); + 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))); ShowContinueError( state, " use an additional Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at this node."); state.dataHVACGlobal->SetPointErrorFlag = true; @@ -3005,8 +3024,10 @@ void SPMMixedAir::calculate(EnergyPlusData &state) CheckIfNodeSetPointManagedByEMS(state, this->refNodeNum, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError( - state, format("CalcMixedAirSetPoint: Missing reference temperature setpoint for Mixed Air Setpoint Manager {}", this->Name)); - ShowContinueError(state, format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); + 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))); 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"); @@ -3103,9 +3124,10 @@ void SPMOutsideAirPretreat::calculate(EnergyPlusData &state) this->mySetPointCheckFlag = false; if (RefNodeSetPoint == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError( - state, format("CalcOAPretreatSetPoint: Missing reference setpoint for Outdoor Air Pretreat Setpoint Manager {}", this->Name)); - ShowContinueError(state, format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); + 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))); ShowContinueError(state, "use a Setpoint Manager to establish a setpoint at this node."); ShowFatalError(state, "Missing reference setpoint."); } else { @@ -3122,8 +3144,10 @@ void SPMOutsideAirPretreat::calculate(EnergyPlusData &state) } if (LocalSetPointCheckFailed) { ShowSevereError( - state, format("CalcOAPretreatSetPoint: Missing reference setpoint for Outdoor Air Pretreat Setpoint Manager {}", this->Name)); - ShowContinueError(state, format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); + 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))); 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."); @@ -3988,9 +4012,10 @@ 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, - 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, + 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, "Or change the target return temperature input type to constant or scheduled"); ShowFatalError(state, "Missing reference setpoint"); } @@ -4500,7 +4525,7 @@ void ResetHumidityRatioCtrlVarType(EnergyPlusData &state, int const NodeNum) } spm->ctrlVar = HVAC::CtrlVarType::MaxHumRat; - ShowWarningError(state, format("ResetHumidityRatioCtrlVarType: {}=\"{}\". ", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, EnergyPlus::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"); @@ -4593,7 +4618,7 @@ void SetUpNewScheduledTESSetPtMgr(EnergyPlusData &state, auto *spm = new SPMTESScheduled; // Set up the scheduled TES setpoint manager information - spm->Name = format("TES Scheduled {}", state.dataSetPointManager->spms.size()); + spm->Name = EnergyPlus::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 c50f4761b5f..9370b1abca7 100644 --- a/src/EnergyPlus/SimAirServingZones.cc +++ b/src/EnergyPlus/SimAirServingZones.cc @@ -449,13 +449,13 @@ void GetAirPathData(EnergyPlusData &state) primaryAirSystems.Name = Alphas(1); airLoopZoneInfo.AirLoopName = Alphas(1); if (NumAlphas < 9) { - ShowSevereError(state, format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "...Have supplied less than 9 alpha fields."); ErrorsFound = true; continue; } if (NumNumbers < 1) { - ShowSevereError(state, format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "...Have supplied less than 1 numeric field."); ErrorsFound = true; continue; @@ -505,11 +505,12 @@ void GetAirPathData(EnergyPlusData &state) TestUniqueNodes(state.dataSimAirServingZones->TestUniqueNodesNum).FieldName = cAlphaFields(6); TestUniqueNodes(state.dataSimAirServingZones->TestUniqueNodesNum).NodeNameUsed = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", duplicate node name.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("...used for {}=\"{}\"", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", duplicate node name.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...used for {}=\"{}\"", cAlphaFields(6), Alphas(6))); ShowContinueError( state, - format("...first used in {}=\"{}\" for {}", CurrentModuleObject, TestUniqueNodes(test).AirLoopName, TestUniqueNodes(test).FieldName)); + EnergyPlus::format( + "...first used in {}=\"{}\" for {}", CurrentModuleObject, TestUniqueNodes(test).AirLoopName, TestUniqueNodes(test).FieldName)); ErrorsFound = true; } if (!lAlphaBlanks(7)) { @@ -521,13 +522,13 @@ void GetAirPathData(EnergyPlusData &state) TestUniqueNodes(state.dataSimAirServingZones->TestUniqueNodesNum).FieldName = cAlphaFields(7); TestUniqueNodes(state.dataSimAirServingZones->TestUniqueNodesNum).NodeNameUsed = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", duplicate node name.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("...used for {}=\"{}\"", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", duplicate node name.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...used for {}=\"{}\"", cAlphaFields(7), Alphas(7))); ShowContinueError(state, - format("...first used in {}=\"{}\" for {}", - CurrentModuleObject, - TestUniqueNodes(test).AirLoopName, - TestUniqueNodes(test).FieldName)); + EnergyPlus::format("...first used in {}=\"{}\" for {}", + CurrentModuleObject, + TestUniqueNodes(test).AirLoopName, + TestUniqueNodes(test).FieldName)); ErrorsFound = true; } } @@ -539,11 +540,12 @@ void GetAirPathData(EnergyPlusData &state) TestUniqueNodes(state.dataSimAirServingZones->TestUniqueNodesNum).FieldName = cAlphaFields(8); TestUniqueNodes(state.dataSimAirServingZones->TestUniqueNodesNum).NodeNameUsed = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", duplicate node name/list.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("...used for {}=\"{}\"", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", duplicate node name/list.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...used for {}=\"{}\"", cAlphaFields(8), Alphas(8))); ShowContinueError( state, - format("...first used in {}=\"{}\" for {}", CurrentModuleObject, TestUniqueNodes(test).AirLoopName, TestUniqueNodes(test).FieldName)); + EnergyPlus::format( + "...first used in {}=\"{}\" for {}", CurrentModuleObject, TestUniqueNodes(test).AirLoopName, TestUniqueNodes(test).FieldName)); ErrorsFound = true; } test = Util::FindItemInList(Alphas(9), TestUniqueNodes, &AirUniqueNodes::NodeName, state.dataSimAirServingZones->TestUniqueNodesNum); @@ -554,11 +556,12 @@ void GetAirPathData(EnergyPlusData &state) TestUniqueNodes(state.dataSimAirServingZones->TestUniqueNodesNum).FieldName = cAlphaFields(9); TestUniqueNodes(state.dataSimAirServingZones->TestUniqueNodesNum).NodeNameUsed = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", duplicate node name/list.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("...used for {}=\"{}\"", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", duplicate node name/list.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("...used for {}=\"{}\"", cAlphaFields(9), Alphas(9))); ShowContinueError( state, - format("...first used in {}=\"{}\" for {}", CurrentModuleObject, TestUniqueNodes(test).AirLoopName, TestUniqueNodes(test).FieldName)); + EnergyPlus::format( + "...first used in {}=\"{}\" for {}", CurrentModuleObject, TestUniqueNodes(test).AirLoopName, TestUniqueNodes(test).FieldName)); ErrorsFound = true; } // this test depends on the controlled zone input having been "gotten" @@ -584,8 +587,9 @@ void GetAirPathData(EnergyPlusData &state) } } if ((test == 0) && (airLoopZoneInfo.NumReturnNodes > 0) && !lAlphaBlanks(7)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("{} (Return Air Path or ZoneHVAC:EquipmentConnections) not valid = \"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError( + state, EnergyPlus::format("{} (Return Air Path or ZoneHVAC:EquipmentConnections) not valid = \"{}\".", cAlphaFields(7), Alphas(7))); ErrorsFound = true; } // Get the supply nodes @@ -608,12 +612,12 @@ void GetAirPathData(EnergyPlusData &state) } // Allow at most 3 supply nodes (for a 3 deck system) if (NumNodes > 3) { - ShowSevereError(state, format("{}{}=\"{}\", too many nodes.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, format("Only 1st 3 Nodes will be used from {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", too many nodes.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, EnergyPlus::format("Only 1st 3 Nodes will be used from {}=\"{}\".", cAlphaFields(8), Alphas(8))); ErrorsFound = true; } if (NumNodes == 0) { - ShowSevereError(state, format("{}{}=\"{}\", too few nodes.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", too few nodes.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "There must be at least 1 supply node in the system."); ErrorsFound = true; } @@ -650,11 +654,11 @@ void GetAirPathData(EnergyPlusData &state) ErrorsFound = true; } if (NumNodes != airLoopZoneInfo.NumSupplyNodes) { - ShowSevereError(state, format("{}{}=\"{}\", node mismatch.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", node mismatch.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - format("...number of air system exit nodes [{}] must match number of zone equip inlet nodes [{}].", - NumNodes, - airLoopZoneInfo.NumSupplyNodes)); + EnergyPlus::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) { @@ -669,7 +673,8 @@ void GetAirPathData(EnergyPlusData &state) ConnectorListName = Alphas(5); primaryAirSystems.NumBranches = NumBranchesInBranchList(state, BranchListName); if (primaryAirSystems.NumBranches == 0) { - ShowSevereError(state, format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "...there must be at least 1 branch specified."); ErrorsFound = true; } @@ -683,8 +688,9 @@ void GetAirPathData(EnergyPlusData &state) primaryAirSystems.Branch(BranchNum).Name = BranchNames(BranchNum); NumCompsOnBranch = NumCompsInBranch(state, BranchNames(BranchNum)); if (NumCompsOnBranch <= 0) { - ShowSevereError(state, format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, format("...Branch=\"{}\", no components on branch.", BranchNames(BranchNum))); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, EnergyPlus::format("...Branch=\"{}\", no components on branch.", BranchNames(BranchNum))); ErrorsFound = true; continue; } @@ -741,8 +747,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, format("{}{}=\"{}\", too many outdoor air systems.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, + EnergyPlus::format( + "{}{}=\"{}\", too many outdoor air systems.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "Only one AirLoopHVAC:OutdoorAirSystem allowed."); ErrorsFound = true; continue; @@ -764,15 +771,17 @@ void GetAirPathData(EnergyPlusData &state) if (OAMixNum > 0) { primaryAirSystems.OAMixOAInNodeNum = GetOAMixerInletNodeNumber(state, OAMixNum); } else { - ShowSevereError(state, format("{}{}=\"{}\", item not found.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, - format("OutdoorAir:Mixer for AirLoopHVAC:OutdoorAirSystem=\"{}\" not found.", CompNames(CompNum))); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\", item not found.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError( + state, EnergyPlus::format("OutdoorAir:Mixer for AirLoopHVAC:OutdoorAirSystem=\"{}\" not found.", CompNames(CompNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}{}=\"{}\", item not found.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, format("AirLoopHVAC:OutdoorAirSystem=\"{}\" not found.", CompNames(CompNum))); - ShowContinueError(state, format(" referenced in Branch=\"{}\".", primaryAirSystems.Branch(BranchNum).Name)); + 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)); ErrorsFound = true; } } @@ -841,12 +850,12 @@ void GetAirPathData(EnergyPlusData &state) if (primaryAirSystems.OutletBranchNum[OutBranchNum - 1] != 0) { continue; } - ShowSevereError(state, format("{}{}=\"{}\", branch in error.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, EnergyPlus::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, format("Possible Error in Branch Object=\"{}\".", primaryAirSystems.Branch(BranchNum).Name)); + ShowContinueError(state, EnergyPlus::format("Possible Error in Branch Object=\"{}\".", primaryAirSystems.Branch(BranchNum).Name)); } - ShowContinueError(state, format("...looking to match to Node=\"{}\".", MatchNodeName(OutBranchNum))); + ShowContinueError(state, EnergyPlus::format("...looking to match to Node=\"{}\".", MatchNodeName(OutBranchNum))); ErrorsFound = true; } @@ -860,10 +869,12 @@ void GetAirPathData(EnergyPlusData &state) } } if (primaryAirSystems.InletBranchNum[InBranchNum - 1] == 0) { - ShowSevereError(state, format("{}{}=\"{}\", connection to zone.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", connection to zone.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "No Connection found for Return Air from Zone"); - ShowContinueError( - state, format("Expected node name =\"{}\".", state.dataLoopNodes->NodeID(airLoopZoneInfo.AirLoopReturnNodeNum(InBranchNum)))); + ShowContinueError(state, + EnergyPlus::format("Expected node name =\"{}\".", + state.dataLoopNodes->NodeID(airLoopZoneInfo.AirLoopReturnNodeNum(InBranchNum)))); ErrorsFound = true; } } @@ -884,8 +895,9 @@ void GetAirPathData(EnergyPlusData &state) MixerExists = true; } } else { - ShowSevereError(state, format("{}{}=\"{}\", connector list object.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, format("ConnectorList object=\"{}\" not found in input.", ConnectorListName)); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", connector list object.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, EnergyPlus::format("ConnectorList object=\"{}\" not found in input.", ConnectorListName)); } errFlag = false; GetNumSplitterMixerInConntrList( @@ -1042,19 +1054,20 @@ void GetAirPathData(EnergyPlusData &state) ValidateComponent(state, ControllerType, ControllerName, IsNotOK, CurrentModuleObject); if (IsNotOK) { ShowContinueError(state, - format("{}{}=\"{}\", for ControllerList=\"{}\".", - RoutineName, - CurrentModuleObject, - primaryAirSystems.Name, - ControllerListName)); + EnergyPlus::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, format("{}{}=\"{}\", controller list object.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, format("ControllerList object=\"{}\" not found in input.", ControllerListName)); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\", controller list object.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, EnergyPlus::format("ControllerList object=\"{}\" not found in input.", ControllerListName)); ErrorsFound = true; } } @@ -1133,7 +1146,8 @@ void GetAirPathData(EnergyPlusData &state) } if (NumControllers + NumOASysSimpControllers == 0) { if (!PackagedUnit(AirSysNum)) { - ShowWarningError(state, format("{}{}=\"{}\" has no Controllers.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowWarningError(state, + EnergyPlus::format("{}{}=\"{}\" has no Controllers.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); } primaryAirSystems.NumControllers = 0; primaryAirSystems.ControllerName.allocate(0); @@ -1146,7 +1160,7 @@ void GetAirPathData(EnergyPlusData &state) Avail::GetAirLoopAvailabilityManager(state, AvailManagerListName, AirSysNum, NumPrimaryAirSys, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, primaryAirSystems.Name)); ErrorsFound = true; } @@ -1184,7 +1198,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, format("Component {} of type {} not found.", comp.Name, comp.TypeOf)); + ShowSevereError(state, EnergyPlus::format("Component {} of type {} not found.", comp.Name, comp.TypeOf)); } } @@ -1295,24 +1309,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, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError( - state, format("..Invalid Air Loop Component Type = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).TypeOf)); + ShowSevereError(state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, - format("..Air Loop Component Name = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); - ShowContinueError(state, format("..reference Branch = \"{}\".", primaryAirSystems.Branch(BranchNum).Name)); + EnergyPlus::format("..Invalid Air Loop Component Type = \"{}\".", + primaryAirSystems.Branch(BranchNum).Comp(CompNum).TypeOf)); + ShowContinueError( + state, EnergyPlus::format("..Air Loop Component Name = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); + ShowContinueError(state, EnergyPlus::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, format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError( - state, format("..Invalid Air Loop Component Type = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).TypeOf)); + ShowSevereError(state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, - format("..Air Loop Component Name = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); - ShowContinueError(state, format("..reference Branch = \"{}\".", primaryAirSystems.Branch(BranchNum).Name)); + EnergyPlus::format("..Invalid Air Loop Component Type = \"{}\".", + primaryAirSystems.Branch(BranchNum).Comp(CompNum).TypeOf)); + ShowContinueError( + state, EnergyPlus::format("..Air Loop Component Name = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); + ShowContinueError(state, EnergyPlus::format("..reference Branch = \"{}\".", primaryAirSystems.Branch(BranchNum).Name)); ErrorsFound = true; } } @@ -1337,10 +1353,10 @@ void GetAirPathData(EnergyPlusData &state) if (NodeNotFound) { ErrorsFound = true; ShowSevereError(state, - format("{}{}=\"{}\", invalid actuator.", - RoutineName, - CurrentModuleObject, - primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); + EnergyPlus::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."); @@ -1364,7 +1380,9 @@ void GetAirPathData(EnergyPlusData &state) if (NodeNotFound) { ErrorsFound = true; ShowSevereError( - state, format("{}{}=\"{}\", invalid actuator.", RoutineName, CurrentModuleObject, GetOACompName(state, OASysNum, OACompNum))); + state, + EnergyPlus::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."); @@ -1374,7 +1392,7 @@ void GetAirPathData(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found retrieving input for {}.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found retrieving input for {}.", RoutineName, CurrentModuleObject)); } for (AirSysNum = 1; AirSysNum <= NumPrimaryAirSys; ++AirSysNum) { @@ -1465,10 +1483,11 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE state.dataSplitterComponent->SplitterCond, &SplitterComponent::SplitterConditions::SplitterName); if (SplitterNum == 0) { - ShowSevereError( - state, - format("AirLoopHVAC:ZoneSplitter not found={}", state.dataZoneEquip->SupplyAirPath(SupAirPath).ComponentName(CompNum))); - ShowContinueError(state, format("Occurs in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(SupAirPath).Name)); + 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)); ErrorsFound = true; } state.dataZoneEquip->SupplyAirPath(SupAirPath).SplitterIndex(CompNum) = SplitterNum; @@ -1478,10 +1497,11 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE state.dataZonePlenum->ZoneSupPlenCond, &ZonePlenum::ZoneSupplyPlenumConditions::ZonePlenumName); if (PlenumNum == 0) { - ShowSevereError( - state, - format("AirLoopHVAC:SupplyPlenum not found={}", state.dataZoneEquip->SupplyAirPath(SupAirPath).ComponentName(CompNum))); - ShowContinueError(state, format("Occurs in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(SupAirPath).Name)); + 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)); ErrorsFound = true; } state.dataZoneEquip->SupplyAirPath(SupAirPath).PlenumIndex(CompNum) = PlenumNum; @@ -1727,11 +1747,12 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE // If the supply air path is not connected to either a heating or a cooling air distribution // unit...we have a problem! if (!FoundSupPathZoneConnect) { - ShowSevereError( - state, - format("Node {} connects to no component", - state.dataLoopNodes->NodeID(state.dataZoneEquip->SupplyAirPath(SupAirPathNum).OutletNode(SupAirPathOutNodeNum)))); - ShowContinueError(state, format("Occurs in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupAirPathNum).Name)); + 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)); 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; @@ -1795,10 +1816,11 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE ControlledZoneLoop2_exit:; } // End of no supply air path case if ((NumZonesCool + NumZonesHeat) == 0) { - ShowSevereError(state, format("An outlet node in AirLoopHVAC=\"{}\" is not connected to any zone", thisPrimaryAirSys.Name)); + ShowSevereError(state, + EnergyPlus::format("An outlet node in AirLoopHVAC=\"{}\" is not connected to any zone", thisPrimaryAirSys.Name)); ShowContinueError(state, - format("Could not match ZoneEquipGroup Inlet Node=\"{}\" to any Supply Air Path or controlled zone", - state.dataLoopNodes->NodeID(ZoneSideNodeNum))); + EnergyPlus::format("Could not match ZoneEquipGroup Inlet Node=\"{}\" to any Supply Air Path or controlled zone", + state.dataLoopNodes->NodeID(ZoneSideNodeNum))); ErrorsFound = true; } } @@ -2254,7 +2276,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, format("Missing Inlet Branch on Primary Air System={}", thisPrimaryAirSys.Name)); + ShowFatalError(state, EnergyPlus::format("Missing Inlet Branch on Primary Air System={}", thisPrimaryAirSys.Name)); } int NodeNumIn = thisPrimaryAirSys.Branch(InBranchNum).NodeNumIn; @@ -2974,13 +2996,13 @@ void SolveAirLoopControllers( state.dataSimAirServingZones->ErrEnvironmentName = state.dataEnvrn->EnvironmentName; const std::string CharErrOut = fmt::to_string(MaxIter); ShowWarningError(state, - format("SolveAirLoopControllers: Maximum iterations ({}) exceeded for {}, {}, at {}, {} {}", - CharErrOut, - PrimaryAirSystems(AirLoopNum).Name, - PrimaryAirSystems(AirLoopNum).ControllerName(AirLoopControlNum), - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(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))); } else { if (state.dataEnvrn->EnvironmentName != state.dataSimAirServingZones->ErrEnvironmentName) { state.dataSimAirServingZones->MaxErrCountSALC = 0; @@ -3202,13 +3224,13 @@ void SolveWaterCoilController(EnergyPlusData &state, state.dataSimAirServingZones->ErrEnvironmentNameSolveWaterCoilController = state.dataEnvrn->EnvironmentName; const std::string CharErrOut = fmt::to_string(MaxIter); ShowWarningError(state, - format("SolveAirLoopControllers: Maximum iterations ({}) exceeded for {}:{}, at {}, {} {}", - CharErrOut, - PrimaryAirSystems(AirLoopNum).Name, - ControllerName, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state))); + EnergyPlus::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; @@ -4118,11 +4140,11 @@ void SizeAirLoopBranches(EnergyPlusData &state, int const AirLoopNum, int const } if (PrimaryAirSystems(AirLoopNum).DesignVolFlowRate < HVAC::SmallAirVolFlow) { ShowSevereError(state, - format("SizeAirLoopBranches: AirLoopHVAC {} has air flow less than {:.4R} m3/s.", - PrimaryAirSystems(AirLoopNum).Name, - HVAC::SmallAirVolFlow)); - ShowContinueError(state, - format("Primary air system volumetric flow rate = {:.4R} m3/s.", PrimaryAirSystems(AirLoopNum).DesignVolFlowRate)); + EnergyPlus::format("SizeAirLoopBranches: AirLoopHVAC {} has air flow less than {:.4R} m3/s.", + PrimaryAirSystems(AirLoopNum).Name, + HVAC::SmallAirVolFlow)); + ShowContinueError( + state, EnergyPlus::format("Primary air system volumetric flow rate = {:.4R} m3/s.", PrimaryAirSystems(AirLoopNum).DesignVolFlowRate)); ShowContinueError(state, "Check flow rate inputs for components in this air loop and,"); ShowContinueError(state, "if autosized, check Sizing:Zone and Sizing:System objects and related inputs."); } @@ -4201,7 +4223,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, format("Sizing:System: {} references unknown AirLoopHVAC", sysSizInput.AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("Sizing:System: {} references unknown AirLoopHVAC", sysSizInput.AirPriLoopName)); ErrorsFound = true; } } @@ -4221,7 +4243,7 @@ void SetUpSysSizingArrays(EnergyPlusData &state) SysSizNum = 1; ShowWarningError( state, - format( + EnergyPlus::format( "SetUpSysSizingArrays: Sizing for System (HVACAirLoop)=\" {}\" will use Sizing:System specifications listed for System=\" {}\".", primaryAirSystems.Name, state.dataSize->SysSizInput(1).AirPriLoopName)); @@ -4618,9 +4640,9 @@ void SizeSysOutdoorAir(EnergyPlusData &state) int TermUnitSizingIndex = airToZoneNodeInfo.TermUnitCoolSizingIndex(ZonesCooledNum); if (TermUnitSizingIndex == 0) { ShowSevereError(state, - format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", - airToZoneNodeInfo.AirLoopName, - state.dataHeatBal->Zone(airToZoneNodeInfo.CoolCtrlZoneNums(ZonesCooledNum)).Name)); + EnergyPlus::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); @@ -4660,11 +4682,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, format("Sizing:System - The system outdoor air method is set to VRP in {}", finalSysSizing.AirPriLoopName)); - ShowContinueError( - state, - format("But zone \"{}\" associated with system does not have OA flow/person", termUnitFinalZoneSizing.ZoneName)); + 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)); ShowContinueError(state, "or flow/area values specified in DesignSpecification:OutdoorAir object associated with the zone"); } @@ -4791,9 +4814,9 @@ void SizeSysOutdoorAir(EnergyPlusData &state) int TermUnitSizingIndex = airToZoneNodeInfo.TermUnitHeatSizingIndex(ZonesHeatedNum); if (TermUnitSizingIndex == 0) { ShowSevereError(state, - format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", - airToZoneNodeInfo.AirLoopName, - state.dataHeatBal->Zone(airToZoneNodeInfo.HeatCtrlZoneNums(ZonesHeatedNum)).Name)); + EnergyPlus::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); @@ -4838,12 +4861,12 @@ void SizeSysOutdoorAir(EnergyPlusData &state) SysOAMethod::SP) { // Ventilation Rate and Simplified Procedure // CR 8872 - check to see if uncorrected OA is calculated to be greater than 0 if (!(ZoneOAUnc > 0.0)) { - ShowSevereError( - state, - format("Sizing:System - The system outdoor air method is set to VRP in {}", finalSysSizing.AirPriLoopName)); + ShowSevereError(state, + EnergyPlus::format("Sizing:System - The system outdoor air method is set to VRP in {}", + finalSysSizing.AirPriLoopName)); ShowContinueError(state, - format("But zone \"{}\" associated with system does not have OA flow/person", - termUnitFinalZoneSizing.ZoneName)); + EnergyPlus::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"); @@ -4958,9 +4981,9 @@ void SizeSysOutdoorAir(EnergyPlusData &state) int TermUnitSizingIndex = airToZoneNodeInfo.TermUnitCoolSizingIndex(ZonesHeatedNum); if (TermUnitSizingIndex == 0) { ShowSevereError(state, - format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", - airToZoneNodeInfo.AirLoopName, - state.dataHeatBal->Zone(airToZoneNodeInfo.CoolCtrlZoneNums(ZonesHeatedNum)).Name)); + EnergyPlus::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); @@ -5209,18 +5232,19 @@ 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, - format("Latent Sizing for AirLoop = {} requires latent sizing in Sizing:Zone object for Zone = {}", - airToZoneNodeInfo.AirLoopName, - state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName)); + ShowWarningError( + state, + EnergyPlus::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, - format("Sizing for AirLoop = {} includes latent sizing in Sizing:Zone object for Zone = {}", - airToZoneNodeInfo.AirLoopName, - state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName)); + EnergyPlus::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 @@ -6995,9 +7019,10 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn if ((SysHeatSizingRat != 1.0) && (finalSysSizing.loadSizingType == DataSizing::LoadSizing::Ventilation) && (termUnitFinalZoneSizing.MinOA <= 0.0)) { ShowWarningError(state, - format("FinalSystemSizing: AirLoop=\"{}\", Requested sizing on Ventilation,", - state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).AirLoopName)); - ShowContinueError(state, format("but Zone has no design OA Flow. Zone=\"{}\".", termUnitFinalZoneSizing.ZoneName)); + 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)); } if ((SysHeatSizingRat != 1.0) && (finalSysSizing.loadSizingType == DataSizing::LoadSizing::Ventilation) && (termUnitFinalZoneSizing.MinOA > 0.0)) { @@ -7582,7 +7607,7 @@ void CheckWaterCoilIsOnAirLoop(EnergyPlusData &state, CheckWaterCoilIsOnAirLoop = CheckWaterCoilSystemOnAirLoopOrOASystem(state, CompTypeNum, CompName); } if (!CheckWaterCoilIsOnAirLoop) { - ShowSevereError(state, format("CheckWaterCoilIsOnAirLoop: = {} = {}.", CompType, CompName)); + ShowSevereError(state, EnergyPlus::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 0bd4e66358b..be5bfb69e7c 100644 --- a/src/EnergyPlus/SimulationManager.cc +++ b/src/EnergyPlus/SimulationManager.cc @@ -682,13 +682,15 @@ namespace SimulationManager { Which = static_cast(index(Alphas(1), MatchVersion)); } if (Which != 0) { - ShowWarningError(state, format("{}: in IDF=\"{}\" not the same as expected=\"{}\"", CurrentModuleObject, Alphas(1), MatchVersion)); + ShowWarningError( + state, EnergyPlus::format("{}: in IDF=\"{}\" not the same as expected=\"{}\"", CurrentModuleObject, Alphas(1), MatchVersion)); } VersionID = Alphas(1); } else if (Num == 0) { - ShowWarningError(state, format("{}: missing in IDF, processing for EnergyPlus version=\"{}\"", CurrentModuleObject, MatchVersion)); + ShowWarningError(state, + EnergyPlus::format("{}: missing in IDF, processing for EnergyPlus version=\"{}\"", CurrentModuleObject, MatchVersion)); } else { - ShowSevereError(state, format("Too many {} Objects found.", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Too many {} Objects found.", CurrentModuleObject)); ErrorsFound = true; } @@ -819,7 +821,7 @@ namespace SimulationManager { } if (state.dataGlobal->TimeStepsInHour <= 0 || state.dataGlobal->TimeStepsInHour > 60) { Alphas(1) = fmt::to_string(state.dataGlobal->TimeStepsInHour); - ShowWarningError(state, format("{}: Requested number ({}) invalid, Defaulted to 4", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, EnergyPlus::format("{}: Requested number ({}) invalid, Defaulted to 4", CurrentModuleObject, Alphas(1))); state.dataGlobal->TimeStepsInHour = 4; } else if (mod(60, state.dataGlobal->TimeStepsInHour) != 0) { MinInt = 9999; @@ -831,41 +833,43 @@ namespace SimulationManager { Which = Num; } ShowWarningError(state, - format("{}: Requested number ({}) not evenly divisible into 60, defaulted to nearest ({}).", - CurrentModuleObject, - state.dataGlobal->TimeStepsInHour, - Div60[Which - 1])); + EnergyPlus::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, - format("{}: Requested number ({}) cannot be used when Conduction Finite Difference algorithm is selected.", - CurrentModuleObject, - state.dataGlobal->TimeStepsInHour)); - ShowContinueError(state, format("...{} is set to 20.", CurrentModuleObject)); + 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)); state.dataGlobal->TimeStepsInHour = 20; } if (state.dataGlobal->TimeStepsInHour < 4 && state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "Zone") > 0) { ShowWarningError(state, - format("{}: Requested number ({}) is less than the suggested minimum of 4.", - CurrentModuleObject, - state.dataGlobal->TimeStepsInHour)); - ShowContinueError(state, - format("Please see entry for {} in Input/Output Reference for discussion of considerations.", CurrentModuleObject)); + EnergyPlus::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)); } } else if (Num == 0 && state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "Zone") > 0 && !CondFDAlgo) { - ShowWarningError(state, format("No {} object found. Number of TimeSteps in Hour defaulted to 4.", CurrentModuleObject)); + ShowWarningError(state, EnergyPlus::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, format("No {} object found. Number of TimeSteps in Hour defaulted to 20.", CurrentModuleObject)); + ShowWarningError(state, EnergyPlus::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, format("Too many {} Objects found.", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Too many {} Objects found.", CurrentModuleObject)); ErrorsFound = true; } @@ -895,7 +899,7 @@ namespace SimulationManager { if (MinInt < 0 || MinInt > 60) { ShowWarningError( state, - format( + EnergyPlus::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 @@ -930,7 +934,7 @@ namespace SimulationManager { state.dataConvergeParams->MinPlantSubIterations = 2; state.dataConvergeParams->MaxPlantSubIterations = 8; } else { - ShowSevereError(state, format("Too many {} Objects found.", CurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Too many {} Objects found.", CurrentModuleObject)); ErrorsFound = true; } @@ -941,7 +945,8 @@ namespace SimulationManager { CurrentModuleObject = "Output:DebuggingData"; NumDebugOut = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject); if (NumDebugOut > 1) { - ShowWarningError(state, format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); + ShowWarningError(state, + EnergyPlus::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); @@ -959,7 +964,8 @@ namespace SimulationManager { if (Num > 1) { // Let it slide, but warn // ErrorsFound = true; - ShowWarningError(state, format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); + ShowWarningError( + state, EnergyPlus::format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); } auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(CurrentModuleObject); @@ -978,8 +984,9 @@ namespace SimulationManager { // Which happens if you put an "empty" entry in the extensible portion auto it = diagnosticsExtensible.find("key"); if (it == diagnosticsExtensible.end()) { - ShowWarningError(state, - format("{}: empty key found, consider removing it to avoid this warning.", CurrentModuleObject)); + ShowWarningError( + state, + EnergyPlus::format("{}: empty key found, consider removing it to avoid this warning.", CurrentModuleObject)); continue; } std::string diagnosticName = it->get(); @@ -1033,9 +1040,9 @@ namespace SimulationManager { // CreateMinimalSurfaceVariables=.FALSE. } else if (!diagnosticName.empty()) { ShowWarningError(state, - format("GetProjectData: {}=\"{}\", Invalid value for field, entered value ignored.", - CurrentModuleObject, - diagnosticName)); + EnergyPlus::format("GetProjectData: {}=\"{}\", Invalid value for field, entered value ignored.", + CurrentModuleObject, + diagnosticName)); } } } @@ -1151,12 +1158,14 @@ namespace SimulationManager { if (NumPltSizInput == 0 && state.dataGlobal->DoHVACSizingSimulation && state.dataGlobal->DoPlantSizing) { ShowSevereError( state, - format( + EnergyPlus::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, format("...When these input flags are both yes, a {} object is required.", spObject)); - ShowContinueError(state, format("...Either add one or more appropriate {} objects to the input file", 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, "...or change both the Do HVAC Sizing Simulation and Do Plant Sizing are both YES. "); ErrorsFound = true; } @@ -1183,7 +1192,7 @@ namespace SimulationManager { Num = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject); if (Num > 1) { ErrorsFound = true; - ShowFatalError(state, format("GetProjectData: Only one (\"1\") {} object per simulation is allowed.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetProjectData: Only one (\"1\") {} object per simulation is allowed.", CurrentModuleObject)); } state.dataGlobal->createPerfLog = Num > 0; std::string overrideModeValue = "Normal"; @@ -1273,17 +1282,18 @@ namespace SimulationManager { bool advancedModeUsed = false; if (fields.find("maxzonetempdiff") != fields.end()) { // not required field, has default value state.dataConvergeParams->MaxZoneTempDiff = fields.at("maxzonetempdiff").get(); - ShowWarningError(state, - format("PerformancePrecisionTradeoffs using the Advanced Override Mode, MaxZoneTempDiff set to: {:.4R}", - state.dataConvergeParams->MaxZoneTempDiff)); + ShowWarningError( + state, + EnergyPlus::format("PerformancePrecisionTradeoffs using the Advanced Override Mode, MaxZoneTempDiff set to: {:.4R}", + state.dataConvergeParams->MaxZoneTempDiff)); advancedModeUsed = true; } if (fields.find("maxalloweddeltemp") != fields.end()) { // not required field, has default value state.dataHeatBal->MaxAllowedDelTemp = fields.at("maxalloweddeltemp").get(); ShowWarningError( state, - format("PerformancePrecisionTradeoffs using the Advanced Override Mode, MaxAllowedDelTemp set to: {:.4R}", - state.dataHeatBal->MaxAllowedDelTemp)); + EnergyPlus::format("PerformancePrecisionTradeoffs using the Advanced Override Mode, MaxAllowedDelTemp set to: {:.4R}", + state.dataHeatBal->MaxAllowedDelTemp)); advancedModeUsed = true; } if (advancedModeUsed) { @@ -1295,8 +1305,9 @@ namespace SimulationManager { state, "PerformancePrecisionTradeoffs using the Advanced Override Mode but no specific parameters have been set."); } } else { - ShowSevereError(state, - format("Invalid over ride mode specified in PerformancePrecisionTradeoffs object: {}", overrideModeValue)); + ShowSevereError( + state, + EnergyPlus::format("Invalid over ride mode specified in PerformancePrecisionTradeoffs object: {}", overrideModeValue)); } if (overrideTimestep) { @@ -1452,9 +1463,9 @@ namespace SimulationManager { } else { Alphas(7) = "No"; } - Alphas(8) = format("{:.1R}", state.dataConvergeParams->MinTimeStepSys * 60.0); - Alphas(9) = format("{:.3R}", state.dataConvergeParams->MaxZoneTempDiff); - Alphas(10) = format("{:.4R}", state.dataHeatBal->MaxAllowedDelTemp); + Alphas(8) = EnergyPlus::format("{:.1R}", state.dataConvergeParams->MinTimeStepSys * 60.0); + Alphas(9) = EnergyPlus::format("{:.3R}", state.dataConvergeParams->MaxZoneTempDiff); + Alphas(10) = EnergyPlus::format("{:.4R}", state.dataHeatBal->MaxAllowedDelTemp); std::string pptHeader = "! , Use Coil Direct Simulation, " "Zone Radiant Exchange Algorithm, Override Mode, Number of Timestep In Hour, " "Force Euler Method, Minimum Number of Warmup Days, Force Suppress All Begin Environment Resets, " @@ -1512,9 +1523,9 @@ namespace SimulationManager { Util::appendPerfLog(state, "Number of Timesteps per Hour", fmt::to_string(state.dataGlobal->TimeStepsInHour)); Util::appendPerfLog(state, "Minimum Number of Warmup Days", fmt::to_string(state.dataHeatBal->MinNumberOfWarmupDays)); Util::appendPerfLog(state, "SuppressAllBeginEnvironmentResets", bool_to_string(state.dataEnvrn->forceBeginEnvResetSuppress)); - Util::appendPerfLog(state, "Minimum System Timestep", format("{:.1R}", state.dataConvergeParams->MinTimeStepSys * 60.0)); - Util::appendPerfLog(state, "MaxZoneTempDiff", format("{:.2R}", state.dataConvergeParams->MaxZoneTempDiff)); - Util::appendPerfLog(state, "MaxAllowedDelTemp", format("{:.4R}", state.dataHeatBal->MaxAllowedDelTemp)); + Util::appendPerfLog(state, "Minimum System Timestep", EnergyPlus::format("{:.1R}", state.dataConvergeParams->MinTimeStepSys * 60.0)); + Util::appendPerfLog(state, "MaxZoneTempDiff", EnergyPlus::format("{:.2R}", state.dataConvergeParams->MaxZoneTempDiff)); + Util::appendPerfLog(state, "MaxAllowedDelTemp", EnergyPlus::format("{:.4R}", state.dataHeatBal->MaxAllowedDelTemp)); } std::string bool_to_string(bool logical) @@ -1694,7 +1705,7 @@ namespace SimulationManager { { auto result = std::make_unique(filePath, mode); // (AUTO_OK_UPTR) if (!result->good()) { - ShowFatalError(state, format("OpenOutputFiles: Could not open file {} for output (write).", filePath)); + ShowFatalError(state, EnergyPlus::format("OpenOutputFiles: Could not open file {} for output (write).", filePath)); } return result; } @@ -1713,7 +1724,7 @@ namespace SimulationManager { result = std::make_unique(std::move(f)); } catch (const std::system_error &error) { ShowSevereError(state, error.what()); - ShowFatalError(state, format("OpenOutputFiles: Could not open file {} for output (write).", filePath)); + ShowFatalError(state, EnergyPlus::format("OpenOutputFiles: Could not open file {} for output (write).", filePath)); } return result; } @@ -2267,12 +2278,14 @@ namespace SimulationManager { "been retrieved."); state.dataSimulationManager->WarningOut = false; } - ShowWarningError(state, - format("Node Connection Error for object {}={}", CType, state.dataBranchNodeConnections->CompSets(Count).CName)); - ShowContinueError(state, - format(" {} not on any Branch or Parent Object", state.dataBranchNodeConnections->CompSets(Count).Description)); - ShowContinueError(state, format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); - ShowContinueError(state, format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + ShowWarningError( + state, + EnergyPlus::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.dataBranchNodeConnections->NumNodeConnectionErrors; if (state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType == DataLoopNode::ConnectionObjectType::SolarCollectorUnglazedTranspired) { @@ -2286,12 +2299,13 @@ namespace SimulationManager { "been retrieved."); state.dataSimulationManager->WarningOut = false; } - ShowSevereError( - state, - format("Potential Node Connection Error for object {}, name={}", CType, state.dataBranchNodeConnections->CompSets(Count).CName)); + ShowSevereError(state, + EnergyPlus::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, format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); - ShowContinueError(state, format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + ShowContinueError(state, EnergyPlus::format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); + ShowContinueError(state, EnergyPlus::format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); nodeConnectionErrorFlag = true; ++state.dataBranchNodeConnections->NumNodeConnectionErrors; } @@ -2327,11 +2341,13 @@ namespace SimulationManager { std::string_view const ParentCType1 = BranchNodeConnections::ConnectionObjectTypeNamesUC[static_cast( state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)]; ShowWarningError(state, "Component plus inlet/outlet node pair used more than once:"); - ShowContinueError(state, format(" Component : {}={}", CType, state.dataBranchNodeConnections->CompSets(Count).CName)); - ShowContinueError(state, format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); - ShowContinueError(state, format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); - ShowContinueError(state, format(" Used by : {}={}", ParentCType, state.dataBranchNodeConnections->CompSets(Count).ParentCName)); - ShowContinueError(state, format(" and by : {}={}", ParentCType1, state.dataBranchNodeConnections->CompSets(Count1).ParentCName)); + 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)); ++state.dataBranchNodeConnections->NumNodeConnectionErrors; } } @@ -2747,9 +2763,12 @@ namespace SimulationManager { ShowMessage(state, "No node connection errors were found."); } else { if (state.dataBranchNodeConnections->NumNodeConnectionErrors > 1) { - ShowMessage(state, format("There were {} node connection errors noted.", state.dataBranchNodeConnections->NumNodeConnectionErrors)); + ShowMessage( + state, + EnergyPlus::format("There were {} node connection errors noted.", state.dataBranchNodeConnections->NumNodeConnectionErrors)); } else { - ShowMessage(state, format("There was {} node connection error noted.", state.dataBranchNodeConnections->NumNodeConnectionErrors)); + ShowMessage( + state, EnergyPlus::format("There was {} node connection error noted.", state.dataBranchNodeConnections->NumNodeConnectionErrors)); } } diff --git a/src/EnergyPlus/SingleDuct.cc b/src/EnergyPlus/SingleDuct.cc index 6f91b77e755..cbd2f88504e 100644 --- a/src/EnergyPlus/SingleDuct.cc +++ b/src/EnergyPlus/SingleDuct.cc @@ -140,25 +140,26 @@ void SimulateSingleDuct( if (CompIndex == 0) { SysNum = Util::FindItemInList(CompName, state.dataSingleDuct->sd_airterminal, &SingleDuctAirTerminal::SysName); if (SysNum == 0) { - ShowFatalError(state, format("SimulateSingleDuct: System not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimulateSingleDuct: System not found={}", CompName)); } CompIndex = SysNum; } else { SysNum = CompIndex; if (SysNum > state.dataSingleDuct->NumSDAirTerminal || SysNum < 1) { ShowFatalError(state, - format("SimulateSingleDuct: Invalid CompIndex passed={}, Number of Systems={}, System name={}", - CompIndex, - state.dataSingleDuct->NumSDAirTerminal, - CompName)); + EnergyPlus::format("SimulateSingleDuct: Invalid CompIndex passed={}, Number of Systems={}, System name={}", + CompIndex, + state.dataSingleDuct->NumSDAirTerminal, + CompName)); } if (state.dataSingleDuct->CheckEquipName(SysNum)) { if (CompName != state.dataSingleDuct->sd_airterminal(SysNum).SysName) { - ShowFatalError(state, - format("SimulateSingleDuct: Invalid CompIndex passed={}, System name={}, stored System Name for that index={}", - CompIndex, - CompName, - state.dataSingleDuct->sd_airterminal(SysNum).SysName)); + ShowFatalError( + state, + EnergyPlus::format("SimulateSingleDuct: Invalid CompIndex passed={}, System name={}, stored System Name for that index={}", + CompIndex, + CompName, + state.dataSingleDuct->sd_airterminal(SysNum).SysName)); } state.dataSingleDuct->CheckEquipName(SysNum) = false; } @@ -377,8 +378,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.ReheatComp_Num = HeatingCoilType::SteamAirHeating; airTerm.ReheatComp_PlantType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; } else if (!airTerm.ReheatComp.empty()) { - ShowSevereError(state, format("Illegal {} = {}.", cAlphaFields(8), airTerm.ReheatComp)); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(8), airTerm.ReheatComp)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -441,8 +442,8 @@ void GetSysInput(EnergyPlusData &state) } else if (Util::SameString(Alphas(5), "Scheduled")) { airTerm.ZoneMinAirFracMethod = MinFlowFraction::Scheduled; } else { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(5), Alphas(5))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -454,8 +455,9 @@ void GetSysInput(EnergyPlusData &state) airTerm.ConstantMinAirFracSetByUser = true; airTerm.DesignMinAirFrac = Numbers(2); if (airTerm.ZoneMinAirFracMethod == MinFlowFraction::Fixed) { - ShowWarningError(state, format("Since {} = {}, input for {} will be ignored.", cAlphaFields(5), Alphas(5), cNumericFields(2))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + 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)); airTerm.ZoneMinAirFracDes = 0.0; } } @@ -468,8 +470,9 @@ void GetSysInput(EnergyPlusData &state) airTerm.FixedMinAirSetByUser = true; airTerm.DesignMinAirFrac = Numbers(3); if (airTerm.ZoneMinAirFracMethod == MinFlowFraction::Constant) { - ShowWarningError(state, format("Since {} = {}, input for {} will be ignored.", cAlphaFields(5), Alphas(5), cNumericFields(3))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + 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)); airTerm.ZoneFixedMinAir = 0.0; } } @@ -493,14 +496,14 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilSteamInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::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, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -534,8 +537,8 @@ void GetSysInput(EnergyPlusData &state) } else if (Util::SameString(Alphas(10), "ReverseWithLimits")) { airTerm.DamperHeatingAction = Action::ReverseWithLimits; } else { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(10), Alphas(10))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(10), Alphas(10))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -556,9 +559,10 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + 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))); ErrorsFound = true; } else { @@ -572,8 +576,9 @@ 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, format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + 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, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -602,12 +607,14 @@ void GetSysInput(EnergyPlusData &state) if (airTerm.DamperHeatingAction != Action::ReverseWithLimits) { if (airTerm.MaxAirVolFlowRateDuringReheat > 0.0) { - ShowWarningError(state, format("Since {} = {}, input for {} will be ignored.", cAlphaFields(10), Alphas(10), cNumericFields(7))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + 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)); } if (airTerm.MaxAirVolFractionDuringReheat > 0.0) { - ShowWarningError(state, format("Since {} = {}, input for {} will be ignored.", cAlphaFields(10), Alphas(10), cNumericFields(8))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + 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)); } } @@ -624,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, format("{} = {} not found.", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(11), Alphas(11))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } else { airTerm.NoOAFlowInputFromUser = false; @@ -641,7 +648,7 @@ void GetSysInput(EnergyPlusData &state) ValidateComponent(state, Alphas(7), Alphas(8), IsNotOK, airTerm.sysType); if (IsNotOK) { - ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("In {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -706,8 +713,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.ReheatComp_Num = HeatingCoilType::SteamAirHeating; airTerm.ReheatComp_PlantType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; } else if (!airTerm.ReheatComp.empty()) { - ShowSevereError(state, format("Illegal {} = {}.", cAlphaFields(5), airTerm.ReheatComp)); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(5), airTerm.ReheatComp)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } airTerm.ReheatName = Alphas(6); @@ -763,14 +770,15 @@ void GetSysInput(EnergyPlusData &state) airTerm.MaxAirVolFlowRate = Numbers(1); airTerm.ZoneMinAirFracDes = Numbers(2); if (airTerm.ZoneMinAirFracDes < 0.0) { - ShowWarningError(state, format("{} \"{}\"", airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, - format("{} must be greater than or equal to 0. Resetting to 0 and the simulation continues.", cNumericFields(2))); + 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))); airTerm.ZoneMinAirFracDes = 0.0; } if (airTerm.ZoneMinAirFracDes > 1.0) { - ShowWarningError(state, format("{} \"{}\"", airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("{} must be less than or equal to 1. Resetting to 1 and the simulation continues.", cNumericFields(2))); + 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))); airTerm.ZoneMinAirFracDes = 1.0; } // The reheat coil control node is necessary for hot water and steam reheat, but not necessary for @@ -781,14 +789,14 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilSteamInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::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, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -836,9 +844,10 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + 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))); ErrorsFound = true; } else { @@ -852,8 +861,9 @@ 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, format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + 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, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -882,7 +892,7 @@ void GetSysInput(EnergyPlusData &state) ValidateComponent(state, Alphas(5), Alphas(6), IsNotOK, airTerm.sysType); if (IsNotOK) { - ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("In {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -949,8 +959,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.ReheatComp_Num = HeatingCoilType::SteamAirHeating; airTerm.ReheatComp_PlantType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; } else { - ShowSevereError(state, format("Illegal {} = {}.", cAlphaFields(5), airTerm.ReheatComp)); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(5), airTerm.ReheatComp)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } airTerm.ReheatName = Alphas(6); @@ -1009,14 +1019,14 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilSteamInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::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, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -1065,9 +1075,10 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + 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))); ErrorsFound = true; } else { @@ -1080,9 +1091,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, - format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); - ShowContinueError(state, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + 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, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1103,7 +1114,7 @@ void GetSysInput(EnergyPlusData &state) ValidateComponent(state, Alphas(5), Alphas(6), IsNotOK, airTerm.sysType); if (IsNotOK) { - ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("In {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -1206,9 +1217,10 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); + 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))); ErrorsFound = true; } else { @@ -1221,9 +1233,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, - format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); - ShowContinueError(state, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + 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, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1247,8 +1259,8 @@ void GetSysInput(EnergyPlusData &state) } else { airTerm.OARequirementsPtr = Util::FindItemInList(Alphas(5), state.dataSize->OARequirements); if (airTerm.OARequirementsPtr == 0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("..invalid {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("..invalid {}=\"{}\".", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } else { airTerm.NoOAFlowInputFromUser = false; @@ -1264,9 +1276,9 @@ void GetSysInput(EnergyPlusData &state) airTerm.OAPerPersonMode = DataZoneEquipment::PerPersonVentRateMode::ByDesignLevel; } else { airTerm.OAPerPersonMode = DataZoneEquipment::PerPersonVentRateMode::DCVByCurrentLevel; - ShowWarningError(state, format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, - format("..invalid {}=\"{}\". The default input of CurrentOccupancy is assigned", cAlphaFields(6), Alphas(6))); + 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))); } } @@ -1358,8 +1370,8 @@ void GetSysInput(EnergyPlusData &state) } else if (Util::SameString(Alphas(5), "Scheduled")) { airTerm.ZoneMinAirFracMethod = MinFlowFraction::Scheduled; } else { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(5), Alphas(5))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -1371,8 +1383,9 @@ void GetSysInput(EnergyPlusData &state) airTerm.ConstantMinAirFracSetByUser = true; airTerm.ZoneMinAirFracDes = Numbers(2); if (airTerm.ZoneMinAirFracMethod == MinFlowFraction::Fixed) { - ShowWarningError(state, format("Since {} = {}, input for {} will be ignored.", cAlphaFields(5), Alphas(5), cNumericFields(2))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + 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)); airTerm.ZoneMinAirFracDes = 0.0; } } @@ -1385,8 +1398,9 @@ void GetSysInput(EnergyPlusData &state) airTerm.FixedMinAirSetByUser = true; airTerm.DesignFixedMinAir = Numbers(3); if (airTerm.ZoneMinAirFracMethod == MinFlowFraction::Constant) { - ShowWarningError(state, format("Since {} = {}, input for {} will be ignored.", cAlphaFields(5), Alphas(5), cNumericFields(3))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + 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)); airTerm.ZoneFixedMinAir = 0.0; } } @@ -1429,9 +1443,10 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + 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))); ErrorsFound = true; } else { @@ -1445,8 +1460,9 @@ 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, format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + 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, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1468,8 +1484,8 @@ void GetSysInput(EnergyPlusData &state) if (!lAlphaBlanks(7)) { airTerm.OARequirementsPtr = Util::FindItemInList(Alphas(7), state.dataSize->OARequirements); if (airTerm.OARequirementsPtr == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(7), Alphas(7))); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(7), Alphas(7))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } else { airTerm.NoOAFlowInputFromUser = false; @@ -1564,14 +1580,15 @@ void GetSysInput(EnergyPlusData &state) airTerm.MaxAirVolFlowRate = Numbers(1); airTerm.ZoneMinAirFracDes = Numbers(2); if (airTerm.ZoneMinAirFracDes < 0.0) { - ShowWarningError(state, format("{} = \"{}", airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, - format("{} must be greater than or equal to 0. Resetting to 0 and the simulation continues.", cNumericFields(2))); + 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))); airTerm.ZoneMinAirFracDes = 0.0; } if (airTerm.ZoneMinAirFracDes > 1.0) { - ShowWarningError(state, format("{} = \"{}", airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("{} must be less than or equal to 1. Resetting to 1 and the simulation continues.", cNumericFields(2))); + 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))); airTerm.ZoneMinAirFracDes = 1.0; } @@ -1601,9 +1618,10 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + 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))); ErrorsFound = true; } else { @@ -1617,8 +1635,9 @@ 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, format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + 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, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1695,14 +1714,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, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); } } else if (Util::SameString(airTerm.ReheatComp, "Coil:Heating:Electric")) { airTerm.ReheatComp_Num = HeatingCoilType::Electric; airTerm.ReheatAirOutletNode = GetHeatingCoilOutletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); airTerm.ReheatCoilMaxCapacity = GetHeatingCoilCapacity(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); } } else if (Util::SameString(airTerm.ReheatComp, "Coil:Heating:Water")) { airTerm.ReheatComp_Num = HeatingCoilType::SimpleHeating; @@ -1711,8 +1730,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.ReheatComp_Num = HeatingCoilType::SteamAirHeating; airTerm.ReheatComp_PlantType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; } else if (!airTerm.ReheatComp.empty()) { - ShowSevereError(state, format("Illegal {} = {}.", cAlphaFields(7), airTerm.ReheatComp)); - ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(7), airTerm.ReheatComp)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -1767,10 +1786,11 @@ void GetSysInput(EnergyPlusData &state) AirTermSysInletNodeName = state.dataLoopNodes->NodeID(airTerm.InletNodeNum); if (!Util::SameString(Alphas(3), AirTermSysInletNodeName)) { - ShowWarningError(state, - format("{}Invalid air terminal object air inlet node name in {} = {}", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format(" Specified air inlet node name is = {}.", Alphas(3))); - ShowContinueError(state, format(" Expected air inlet node name is = {}.", 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)); // ErrorsFound = true; } @@ -1795,7 +1815,7 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilSteamInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } else { // A4, \field Unit supply air outlet node @@ -1805,7 +1825,7 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatAirOutletNode = GetCoilAirOutletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -1815,7 +1835,7 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilWaterInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } else { // A4, \field Unit supply air outlet node @@ -1825,7 +1845,7 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatAirOutletNode = GetCoilOutletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -1842,10 +1862,11 @@ void GetSysInput(EnergyPlusData &state) // DataLoopNode::NodeFluidType::Air,DataLoopNode::NodeConnectionType::Outlet,1,ObjectIsParent) AirTermSysOutletNodeName = state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode); if (!Util::SameString(Alphas(4), AirTermSysOutletNodeName)) { - ShowWarningError(state, - format("{}Invalid air terminal object air outlet node name in {} = {}", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format(" Specified air outlet node name is = {}.", Alphas(4))); - ShowContinueError(state, format(" Expected air outlet node name is = {}.", 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)); // ErrorsFound = true; } @@ -1880,9 +1901,10 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError(state, - format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + 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))); ErrorsFound = true; } else { @@ -1899,8 +1921,9 @@ 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, format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + 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, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1920,7 +1943,7 @@ void GetSysInput(EnergyPlusData &state) } if (IsNotOK) { ShowWarningError(state, "Did not Match Supply Air Outlet Node to any Zone Node"); - ShowContinueError(state, format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); } if (lAlphaBlanks(9)) { @@ -1980,11 +2003,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, - format("{}A zone secondary recirculation fraction is specified for zone served by ", RoutineName)); + ShowWarningError( + state, EnergyPlus::format("{}A zone secondary recirculation fraction is specified for zone served by ", RoutineName)); ShowContinueError(state, - format("...terminal unit \"{}\" , that indicates a single path system", - state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysIndexGSI).SysName)); + EnergyPlus::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; @@ -2004,7 +2027,7 @@ void GetSysInput(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -2057,7 +2080,7 @@ void SingleDuctAirTerminal::InitSys(EnergyPlusData &state, bool const FirstHVACI ScanPlantLoopsForObject(state, this->ReheatName, this->ReheatComp_PlantType, this->HWplantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, format("Reference Unit=\"{}\", type={}", this->SysName, this->sysType)); + ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type={}", this->SysName, this->sysType)); ShowFatalError(state, "InitSys: Program terminated for previous conditions."); } @@ -2084,12 +2107,12 @@ void SingleDuctAirTerminal::InitSys(EnergyPlusData &state, bool const FirstHVACI continue; } ShowSevereError(state, - format("InitSingleDuctSystems: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - state.dataDefineEquipment->AirDistUnit(state.dataSingleDuct->sd_airterminal(SysIndex).ADUNum).Name)); + EnergyPlus::format("InitSingleDuctSystems: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", + state.dataDefineEquipment->AirDistUnit(state.dataSingleDuct->sd_airterminal(SysIndex).ADUNum).Name)); ShowContinueError(state, - format("...System=[{},{}] will not be simulated.", - state.dataSingleDuct->sd_airterminal(SysIndex).sysType, - state.dataSingleDuct->sd_airterminal(SysIndex).SysName)); + EnergyPlus::format("...System=[{},{}] will not be simulated.", + state.dataSingleDuct->sd_airterminal(SysIndex).sysType, + state.dataSingleDuct->sd_airterminal(SysIndex).SysName)); } } @@ -2113,7 +2136,7 @@ void SingleDuctAirTerminal::InitSys(EnergyPlusData &state, bool const FirstHVACI errFlag = false; this->ReheatCoilMaxCapacity = GetHeatingCoilCapacity(state, this->ReheatComp, this->ReheatName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs for terminal unit {} = {}", this->sysType, this->SysName)); + ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", this->sysType, this->SysName)); } } if (this->ReheatCoilMaxCapacity != AutoSize) { @@ -2450,11 +2473,14 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxAirVolFlowRateDes - MaxAirVolFlowRateUser) / MaxAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); - ShowContinueError(state, format("User-Specified Maximum Air Flow Rate of {:.5R} [m3/s]", MaxAirVolFlowRateUser)); - ShowContinueError(state, format("differs from Design Size Maximum Air Flow Rate of {:.5R} [m3/s]", MaxAirVolFlowRateDes)); + ShowMessage(state, + EnergyPlus::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( + state, EnergyPlus::format("differs from Design Size Maximum Air Flow Rate of {:.5R} [m3/s]", MaxAirVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2506,13 +2532,16 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxHeatAirVolFlowRateDes - MaxHeatAirVolFlowRateUser) / MaxHeatAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( + ShowMessage(state, + EnergyPlus::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", + this->sysType, + this->SysName)); + ShowContinueError( state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + EnergyPlus::format("User-Specified Maximum Heating Air Flow Rate of {:.5R} [m3/s]", MaxHeatAirVolFlowRateUser)); ShowContinueError(state, - format("User-Specified Maximum Heating Air Flow Rate of {:.5R} [m3/s]", MaxHeatAirVolFlowRateUser)); - ShowContinueError( - state, format("differs from Design Size Maximum Heating Air Flow Rate of {:.5R} [m3/s]", MaxHeatAirVolFlowRateDes)); + EnergyPlus::format("differs from Design Size Maximum Heating Air Flow Rate of {:.5R} [m3/s]", + MaxHeatAirVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2586,19 +2615,22 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (MinAirFlowFracDes > 1.0 && IsMaxFlowAutoSize) { this->MaxAirVolFlowRate *= MinAirFlowFracDes; MinAirFlowFracDes = 1.0; - ShowWarningError(state, - 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)); + 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)); } else if (MinAirFlowFracDes > 1.0) { - ShowWarningError(state, - format("SingleDuctSystem:SizeSys: Maximum air flow rate for {} is potentially too low.", this->SysName)); + ShowWarningError( + state, + EnergyPlus::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:"); - ShowContinueError(state, format(" User-specified maximum air flow rate: {:.3R} m3/s.", this->MaxAirVolFlowRate)); - ShowContinueError(state, - format(" Calculated minimum air flow rate: {:.3R} m3/s.", this->MaxAirVolFlowRate * MinAirFlowFracDes)); + ShowContinueError(state, EnergyPlus::format(" User-specified maximum air flow rate: {:.3R} m3/s.", this->MaxAirVolFlowRate)); + ShowContinueError( + state, + EnergyPlus::format(" Calculated minimum air flow rate: {:.3R} m3/s.", this->MaxAirVolFlowRate * MinAirFlowFracDes)); MinAirFlowFracDes = 1.0; } } @@ -2631,9 +2663,11 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((MinAirFlowFracUser > 0.0) && ((std::abs(MinAirFlowFracDes - MinAirFlowFracUser) / MinAirFlowFracUser) > state.dataSize->AutoVsHardSizingThreshold)) { ShowMessage(state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); - ShowContinueError(state, format("User-Specified Minimum Cooling Air Flow Fraction of {:.5R}", MinAirFlowFracUser)); - ShowContinueError(state, format("differs from Design Size Minimum Cooling Air Flow Fraction of {:.5R}", MinAirFlowFracDes)); + EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2684,18 +2718,20 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) // adjust maximum flow rate if (FixedMinAirDes > this->MaxAirVolFlowRate && IsMaxFlowAutoSize) { this->MaxAirVolFlowRate = FixedMinAirDes; - ShowWarningError(state, - 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)); + 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)); } else if (FixedMinAirDes > this->MaxAirVolFlowRate) { - ShowWarningError(state, - format("SingleDuctSystem:SizeSys: Maximum air flow rate for {} is potentially too low.", this->SysName)); + ShowWarningError( + state, + EnergyPlus::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:"); - ShowContinueError(state, format(" User-specified maximum air flow rate: {:.3R} m3/s.", this->MaxAirVolFlowRate)); - ShowContinueError(state, format(" Calculated minimum air flow rate: {:.3R} m3/s.", FixedMinAirDes)); + ShowContinueError(state, EnergyPlus::format(" User-specified maximum air flow rate: {:.3R} m3/s.", this->MaxAirVolFlowRate)); + ShowContinueError(state, EnergyPlus::format(" Calculated minimum air flow rate: {:.3R} m3/s.", FixedMinAirDes)); FixedMinAirDes = this->MaxAirVolFlowRate; } } @@ -2724,9 +2760,11 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(FixedMinAirDes - FixedMinAirUser) / FixedMinAirUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); - ShowContinueError(state, format("User-Specified Minimum Cooling Air Flow Rate of {:.5R} [m3/s]", FixedMinAirUser)); - ShowContinueError(state, format("differs from Design Size Minimum Cooling Air Flow Rate of {:.5R} [m3/s]", FixedMinAirDes)); + EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2829,11 +2867,14 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxAirVolFractionDuringReheatDes - MaxAirVolFractionDuringReheatUser) / MaxAirVolFractionDuringReheatUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); - ShowContinueError(state, - format("User-Specified Maximum Flow Fraction during Reheat of {:.5R} []", MaxAirVolFractionDuringReheatUser)); + EnergyPlus::format( + "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError( - state, format("differs from Design Size Maximum Flow Fraction during Reheat of {:.5R} []", MaxAirVolFractionDuringReheatDes)); + state, + EnergyPlus::format("User-Specified Maximum Flow Fraction during Reheat of {:.5R} []", MaxAirVolFractionDuringReheatUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Flow Fraction during Reheat of {:.5R} []", + MaxAirVolFractionDuringReheatDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2863,13 +2904,15 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxAirVolFlowRateDuringReheatDes - MaxAirVolFlowRateDuringReheatUser) / MaxAirVolFlowRateDuringReheatUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + EnergyPlus::format( + "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError(state, - format("User-Specified Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", - MaxAirVolFlowRateDuringReheatUser)); - ShowContinueError(state, - format("differs from Design Size Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", - MaxAirVolFlowRateDuringReheatDes)); + EnergyPlus::format("User-Specified Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", + MaxAirVolFlowRateDuringReheatUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", + MaxAirVolFlowRateDuringReheatDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2902,11 +2945,14 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxAirVolFractionDuringReheatDes - MaxAirVolFractionDuringReheatUser) / MaxAirVolFractionDuringReheatUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); - ShowContinueError(state, - format("User-Specified Maximum Flow Fraction during Reheat of {:.5R} []", MaxAirVolFractionDuringReheatUser)); + EnergyPlus::format( + "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError( - state, format("differs from Design Size Maximum Flow Fraction during Reheat of {:.5R} []", MaxAirVolFractionDuringReheatDes)); + state, + EnergyPlus::format("User-Specified Maximum Flow Fraction during Reheat of {:.5R} []", MaxAirVolFractionDuringReheatUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Flow Fraction during Reheat of {:.5R} []", + MaxAirVolFractionDuringReheatDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2915,13 +2961,15 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxAirVolFlowRateDuringReheatDes - MaxAirVolFlowRateDuringReheatUser) / MaxAirVolFlowRateDuringReheatUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + EnergyPlus::format( + "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError(state, - format("User-Specified Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", - MaxAirVolFlowRateDuringReheatUser)); - ShowContinueError(state, - format("differs from Design Size Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", - MaxAirVolFlowRateDuringReheatDes)); + EnergyPlus::format("User-Specified Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", + MaxAirVolFlowRateDuringReheatUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", + MaxAirVolFlowRateDuringReheatDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3067,7 +3115,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) state.dataSingleDuct->CoilWaterOutletNodeSS, PlantSizingErrorsFound); if (PlantSizingErrorsFound) { - ShowContinueError(state, format("...Occurs in {}:{}", this->sysType, this->SysName)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}:{}", this->sysType, this->SysName)); ErrorsFound = true; } if (PltSizHeatNum > 0) { @@ -3099,7 +3147,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) } } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in AirTerminal Object={}", this->SysName)); + ShowContinueError(state, EnergyPlus::format("Occurs in AirTerminal Object={}", this->SysName)); ErrorsFound = true; } this->MaxReheatWaterVolFlow = MaxReheatWaterVolFlowDes; @@ -3134,14 +3182,15 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxReheatWaterVolFlowDes - MaxReheatWaterVolFlowUser) / MaxReheatWaterVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", - this->sysType, - this->SysName)); - ShowContinueError( - state, format("User-Specified Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", MaxReheatWaterVolFlowUser)); + EnergyPlus::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", + this->sysType, + this->SysName)); ShowContinueError( state, - format("differs from Design Size Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", MaxReheatWaterVolFlowDes)); + EnergyPlus::format("User-Specified Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", MaxReheatWaterVolFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", + MaxReheatWaterVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3178,7 +3227,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) state.dataSingleDuct->CoilSteamOutletNodeSS, PlantSizingErrorsFound); if (PlantSizingErrorsFound) { - ShowContinueError(state, format("...Occurs in {}:{}", this->sysType, this->SysName)); + ShowContinueError(state, EnergyPlus::format("...Occurs in {}:{}", this->sysType, this->SysName)); ErrorsFound = true; } if (PltSizHeatNum > 0) { @@ -3211,7 +3260,8 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in AirTerminal:SingleDuct:ConstantVolume:Reheat Object={}", this->SysName)); + ShowContinueError(state, + EnergyPlus::format("Occurs in AirTerminal:SingleDuct:ConstantVolume:Reheat Object={}", this->SysName)); ErrorsFound = true; } this->MaxReheatSteamVolFlow = MaxReheatSteamVolFlowDes; @@ -3231,14 +3281,15 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxReheatSteamVolFlowDes - MaxReheatSteamVolFlowUser) / MaxReheatSteamVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", - this->sysType, - this->SysName)); - ShowContinueError( - state, format("User-Specified Maximum Reheat Steam Flow Rate of {:.5R} [m3/s]", MaxReheatSteamVolFlowUser)); + EnergyPlus::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", + this->sysType, + this->SysName)); ShowContinueError( state, - format("differs from Design Size Maximum Reheat Steam Flow Rate of {:.5R} [m3/s]", MaxReheatSteamVolFlowDes)); + EnergyPlus::format("User-Specified Maximum Reheat Steam Flow Rate of {:.5R} [m3/s]", MaxReheatSteamVolFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Reheat Steam Flow Rate of {:.5R} [m3/s]", + MaxReheatSteamVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3274,15 +3325,15 @@ 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, format("Air Terminal Unit name = {}", this->SysName)); + ShowContinueError(state, EnergyPlus::format("Air Terminal Unit name = {}", this->SysName)); ShowContinueError(state, - format("Maximum terminal flow during reheat = {:.6R} [m3/s] or flow fraction = {:.4R}", - this->MaxAirVolFlowRateDuringReheat, - (this->MaxAirVolFlowRateDuringReheat / this->MaxAirVolFlowRate))); + EnergyPlus::format("Maximum terminal flow during reheat = {:.6R} [m3/s] or flow fraction = {:.4R}", + this->MaxAirVolFlowRateDuringReheat, + (this->MaxAirVolFlowRateDuringReheat / this->MaxAirVolFlowRate))); ShowContinueError(state, - format("Minimum terminal flow = {:.6R} [m3/s] or flow fraction = {:.4R}", - (this->ZoneMinAirFracDes * this->MaxAirVolFlowRate), - this->ZoneMinAirFracDes)); + EnergyPlus::format("Minimum terminal flow = {:.6R} [m3/s] or flow fraction = {:.4R}", + (this->ZoneMinAirFracDes * this->MaxAirVolFlowRate), + this->ZoneMinAirFracDes)); ShowContinueError(state, "The reheat maximum flow limit will be replaced by the minimum limit, and the simulation continues"); } this->MaxAirVolFlowRateDuringReheat = (this->ZoneMinAirFracDes * this->MaxAirVolFlowRate); @@ -3729,7 +3780,7 @@ void SingleDuctAirTerminal::SimVAV(EnergyPlusData &state, bool const FirstHVACIt // If something else is there that is not a reheat coil or a blank then give the error message } break; default: { - ShowFatalError(state, format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } @@ -3761,7 +3812,7 @@ void SingleDuctAirTerminal::SimVAV(EnergyPlusData &state, bool const FirstHVACIt // If something else is that is not a reheat coil or a blank then give the error message } break; default: { - ShowFatalError(state, format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } } @@ -4130,7 +4181,7 @@ void SingleDuctAirTerminal::SimCBVAV(EnergyPlusData &state, bool const FirstHVAC // If something else is there that is not a reheat coil then give the error message below. } break; default: { - ShowFatalError(state, format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } @@ -4165,7 +4216,7 @@ void SingleDuctAirTerminal::SimCBVAV(EnergyPlusData &state, bool const FirstHVAC // If something else is there that is not a reheat coil then give the error message } break; default: { - ShowFatalError(state, format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } } @@ -4331,14 +4382,14 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC SolveRoot(state, UnitFlowToler, 50, SolFlag, MassFlow, f, MinMassFlow, MaxCoolMassFlow); if (SolFlag == -1) { if (this->IterationLimit == 0) { - ShowWarningError(state, format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, EnergyPlus::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 == -2) { if (this->IterationFailed == 0) { - ShowWarningError(state, format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, EnergyPlus::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Bad air flow limits"); } ShowRecurringWarningErrorAtEnd( @@ -4416,14 +4467,14 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC SolveRoot(state, UnitFlowToler, 50, SolFlag, MassFlow, f, MinMassFlow, MaxHeatMassFlow); if (SolFlag == -1) { if (this->IterationLimit == 0) { - ShowWarningError(state, format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, EnergyPlus::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 == -2) { if (this->IterationFailed == 0) { - ShowWarningError(state, format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, EnergyPlus::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Bad air flow limits"); } ShowRecurringWarningErrorAtEnd( @@ -4486,14 +4537,14 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC SolveRoot(state, UnitFlowToler, 50, SolFlag, MassFlow, f, MinMassFlow, MaxHeatMassFlow); if (SolFlag == -1) { if (this->IterationLimit == 0) { - ShowWarningError(state, format("Steam heating coil control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, EnergyPlus::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 == -2) { if (this->IterationFailed == 0) { - ShowWarningError(state, format("Steam heating coil control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, EnergyPlus::format("Steam heating coil control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Bad air flow limits"); } ShowRecurringWarningErrorAtEnd( @@ -4534,14 +4585,14 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC MassFlow = state.dataLoopNodes->Node(SysInletNode).MassFlowRate; if (SolFlag == -1) { if (this->IterationLimit == 0) { - ShowWarningError(state, format("Heating coil control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, EnergyPlus::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 == -2) { if (this->IterationFailed == 0) { - ShowWarningError(state, format("Heating coil control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, EnergyPlus::format("Heating coil control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Bad air flow limits"); } ShowRecurringWarningErrorAtEnd( @@ -4553,7 +4604,7 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC this->CalcVAVVS(state, FirstHVACIteration, ZoneNodeNum, 0.0, QTotLoad, fanType, MassFlow, FanOp, QDelivered); } } else { - ShowFatalError(state, format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); } } else { @@ -4709,7 +4760,7 @@ void SingleDuctAirTerminal::SimConstVol(EnergyPlusData &state, bool const FirstH SimulateHeatingCoilComponents(state, this->ReheatName, FirstHVACIteration, QZnReq, this->ReheatComp_Index); } break; default: { - ShowFatalError(state, format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } @@ -4740,7 +4791,7 @@ void SingleDuctAirTerminal::SimConstVol(EnergyPlusData &state, bool const FirstH SimulateHeatingCoilComponents(state, this->ReheatName, FirstHVACIteration, 0.0, this->ReheatComp_Index); } break; default: { - ShowFatalError(state, format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } } @@ -4838,7 +4889,7 @@ void SingleDuctAirTerminal::CalcVAVVS(EnergyPlusData &state, SimulateHeatingCoilComponents(state, this->ReheatName, FirstHVACIteration, HCoilReq, this->ReheatComp_Index); } break; default: { - ShowFatalError(state, format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } @@ -4934,7 +4985,7 @@ void GetHVACSingleDuctSysIndex(EnergyPlusData &state, if (!ThisObjectType.empty()) { ShowSevereError(state, fmt::format("{}, GetHVACSingleDuctSysIndex: Single duct system not found={}", ThisObjectType, SDSName)); } else { - ShowSevereError(state, format("GetHVACSingleDuctSysIndex: Single duct system not found={}", SDSName)); + ShowSevereError(state, EnergyPlus::format("GetHVACSingleDuctSysIndex: Single duct system not found={}", SDSName)); } ErrorsFound = true; } else { @@ -4943,7 +4994,7 @@ void GetHVACSingleDuctSysIndex(EnergyPlusData &state, if (!ThisObjectType.empty()) { ShowSevereError(state, fmt::format("{}, GetHVACSingleDuctSysIndex: Could not find allowed types={}", ThisObjectType, SDSName)); } else { - ShowSevereError(state, format("GetHVACSingleDuctSysIndex: Could not find allowed types={}", SDSName)); + ShowSevereError(state, EnergyPlus::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; @@ -4976,7 +5027,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, format("Object {} not found", SysName)); + ShowFatalError(state, EnergyPlus::format("Object {} not found", SysName)); } } else { state.dataSingleDuct->SysNumSATM = SysIndex; @@ -5119,9 +5170,11 @@ 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, format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("..invalid {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); + ShowSevereError( + state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + EnergyPlus::format("..invalid {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); ErrorsFound = true; } else { state.dataSingleDuct->SysATMixer(ATMixerNum).NoOAFlowInputFromUser = false; @@ -5137,43 +5190,44 @@ void GetATMixers(EnergyPlusData &state) state.dataSingleDuct->SysATMixer(ATMixerNum).OAPerPersonMode = DataZoneEquipment::PerPersonVentRateMode::ByDesignLevel; } else { state.dataSingleDuct->SysATMixer(ATMixerNum).OAPerPersonMode = DataZoneEquipment::PerPersonVentRateMode::DCVByCurrentLevel; - ShowWarningError(state, format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("..invalid {}=\"{}\". The default input of CurrentOccupancy is assigned", - state.dataIPShortCut->cAlphaFieldNames(9), - state.dataIPShortCut->cAlphaArgs(9))); + EnergyPlus::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, - 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))); + 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))); ErrorsFound = true; } else if (state.dataSingleDuct->SysATMixer(ATMixerNum).SecInNode == state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } if (state.dataSingleDuct->SysATMixer(ATMixerNum).PriInNode == state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode) { ShowSevereError(state, - 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))); + 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))); ErrorsFound = true; } @@ -5187,13 +5241,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, - format("{}No matching Air Distribution Unit, for System = [{},{}].", - RoutineName, - cCurrentModuleObject, - state.dataSingleDuct->SysATMixer(ATMixerNum).Name)); - ShowContinueError( - state, - format("...should have outlet node = {}", state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode))); + EnergyPlus::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))); ErrorsFound = true; } else { @@ -5257,16 +5311,17 @@ void GetATMixers(EnergyPlusData &state) } } if (!ZoneNodeFoundAgain) { - ShowSevereError(state, - format("{} = \"{}\". Inlet Side Air Terminal Mixer air inlet node name must be the same as either a zone " + 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)); 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, - format("..Inlet Side CONNECTED Air Terminal Mixer inlet node name = {}", - state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).SecInNode))); + EnergyPlus::format("..Inlet Side CONNECTED Air Terminal Mixer inlet node name = {}", + state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).SecInNode))); ErrorsFound = true; } } @@ -5304,13 +5359,14 @@ void GetATMixers(EnergyPlusData &state) if (ZoneNodeNotFound) { ShowSevereError( state, - 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)); + 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)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, - format("..Supply Side connected Air Terminal Mixer outlet node name = {}", - state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode))); + EnergyPlus::format("..Supply Side connected Air Terminal Mixer outlet node name = {}", + state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode))); ErrorsFound = true; } } @@ -5328,10 +5384,12 @@ void GetATMixers(EnergyPlusData &state) if (state.dataSize->ZoneSizingInput(SizingInputNum).ZoneNum == state.dataSingleDuct->SysATMixer(ATMixerNum).ZoneNum) { if (state.dataSize->ZoneSizingInput(SizingInputNum).ZoneDesignSpecOAIndex == 0) { ShowWarningError( - state, format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, + EnergyPlus::format( + "{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("{} is blank in both the mixer and the Sizing:Zone object for the same zone.", - state.dataIPShortCut->cAlphaFieldNames(8))); + EnergyPlus::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 { @@ -5348,9 +5406,10 @@ void GetATMixers(EnergyPlusData &state) } } } else { - ShowWarningError(state, - 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))); + 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))); state.dataSingleDuct->SysATMixer(ATMixerNum).DesignPrimaryAirVolRate = 0.0; } } @@ -5359,7 +5418,7 @@ void GetATMixers(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Program terminates.", RoutineName)); } } @@ -5472,12 +5531,12 @@ 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, format("CalcATMixer: Invalid mass flow rates in AirTerminal:SingleDuct:Mixer={}", atMixer.Name)); + ShowSevereError(state, EnergyPlus::format("CalcATMixer: Invalid mass flow rates in AirTerminal:SingleDuct:Mixer={}", atMixer.Name)); ShowContinueErrorTimeStamp(state, - format("Primary mass flow rate={:.6R}Secondary mass flow rate={:.6R}Mixed mass flow rate={:.6R}", - priInNode.MassFlowRate, - secInNode.MassFlowRate, - MixedAirMassFlowRate)); + EnergyPlus::format("Primary mass flow rate={:.6R}Secondary mass flow rate={:.6R}Mixed mass flow rate={:.6R}", + priInNode.MassFlowRate, + secInNode.MassFlowRate, + MixedAirMassFlowRate)); ShowFatalError(state, "Simulation terminates."); } } @@ -5637,13 +5696,14 @@ 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, format("AirTerminal:SingleDuct:Mixer: {}", state.dataSingleDuct->SysATMixer(inletATMixerIndex).Name)); + ShowWarningError(state, + EnergyPlus::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, - format(" Set Account for Dedicated Outdoor Air System = Yes in Sizing:Zone object for zone = {}", finalZoneSizing.ZoneName)); + ShowContinueError(state, + EnergyPlus::format(" Set Account for Dedicated Outdoor Air System = Yes in Sizing:Zone object for zone = {}", + finalZoneSizing.ZoneName)); } state.dataSingleDuct->SysATMixer(inletATMixerIndex).printWarning = false; } @@ -5653,10 +5713,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, format("AirTerminal:SingleDuct:Mixer: {}", state.dataSingleDuct->SysATMixer(inletATMixerIndex).Name)); + ShowWarningError(state, EnergyPlus::format("AirTerminal:SingleDuct:Mixer: {}", state.dataSingleDuct->SysATMixer(inletATMixerIndex).Name)); ShowContinueError(state, " Inlet side Air Terminal Mixer automatically adjusts zone equipment coil sizing."); - ShowContinueError( - state, format(" Set Account for Dedicated Outdoor Air System = No in Sizing:Zone object for zone = {}", finalZoneSizing.ZoneName)); + ShowContinueError(state, + EnergyPlus::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 ca0e0e31aac..2463286e4a1 100644 --- a/src/EnergyPlus/SizingManager.cc +++ b/src/EnergyPlus/SizingManager.cc @@ -171,7 +171,7 @@ void ManageSizing(EnergyPlusData &state) if (state.dataGlobal->DoZoneSizing || state.dataGlobal->DoSystemSizing) { if ((state.dataSize->NumSysSizInput > 0 && state.dataSize->NumZoneSizingInput == 0) || (!state.dataGlobal->DoZoneSizing && state.dataGlobal->DoSystemSizing && state.dataSize->NumSysSizInput > 0)) { - ShowSevereError(state, format("{}Requested System Sizing but did not request Zone Sizing.", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{}Requested System Sizing but did not request Zone Sizing.", RoutineName)); ShowContinueError(state, "System Sizing cannot be done without Zone Sizing"); ShowFatalError(state, "Program terminates for preceding conditions."); } @@ -189,13 +189,14 @@ void ManageSizing(EnergyPlusData &state) if (fileHasSizingPeriodDays) { ShowWarningError( state, - format("{}The ZoneComponentLoadSummary report was requested but no sizing objects were found so that report cannot be generated.", - RoutineName)); + EnergyPlus::format( + "{}The ZoneComponentLoadSummary report was requested but no sizing objects were found so that report cannot be generated.", + RoutineName)); } else { ShowWarningError(state, - format("{}The ZoneComponentLoadSummary report was requested but no SizingPeriod:DesignDay or " - "SizingPeriod:WeatherFileDays objects were found so that report cannot be generated.", - RoutineName)); + EnergyPlus::format("{}The ZoneComponentLoadSummary report was requested but no SizingPeriod:DesignDay or " + "SizingPeriod:WeatherFileDays objects were found so that report cannot be generated.", + RoutineName)); } } } @@ -208,8 +209,9 @@ void ManageSizing(EnergyPlusData &state) if ((state.dataGlobal->DoZoneSizing) && (state.dataSize->NumZoneSizingInput == 0)) { ShowWarningError( state, - format("{}For a zone sizing run, there must be at least 1 Sizing:Zone input object. SimulationControl Zone Sizing option ignored.", - RoutineName)); + EnergyPlus::format( + "{}For a zone sizing run, there must be at least 1 Sizing:Zone input object. SimulationControl Zone Sizing option ignored.", + RoutineName)); } if ((state.dataSize->NumZoneSizingInput > 0) && @@ -390,7 +392,8 @@ void ManageSizing(EnergyPlusData &state) UpdateFacilitySizing(state, Constant::CallIndicator::EndZoneSizingCalc); state.dataSize->ZoneSizingRunDone = true; } else { - ShowSevereError(state, format("{}No Sizing periods were performed for Zone Sizing. No Zone Sizing calculations saved.", RoutineName)); + ShowSevereError( + state, EnergyPlus::format("{}No Sizing periods were performed for Zone Sizing. No Zone Sizing calculations saved.", RoutineName)); ErrorsFound = true; } @@ -417,8 +420,9 @@ void ManageSizing(EnergyPlusData &state) if ((state.dataGlobal->DoSystemSizing) && (state.dataSize->NumSysSizInput == 0) && (state.dataSizingManager->NumAirLoops > 0)) { ShowWarningError( state, - format("{}For a system sizing run, there must be at least 1 Sizing:System object input. SimulationControl System Sizing option ignored.", - RoutineName)); + EnergyPlus::format( + "{}For a system sizing run, there must be at least 1 Sizing:System object input. SimulationControl System Sizing option ignored.", + RoutineName)); } if ((state.dataSize->NumSysSizInput > 0) && (state.dataGlobal->DoSystemSizing || state.dataGlobal->DoPlantSizing) && !ErrorsFound) { @@ -551,7 +555,8 @@ void ManageSizing(EnergyPlusData &state) UpdateSysSizing(state, Constant::CallIndicator::EndSysSizingCalc); state.dataSize->SysSizingRunDone = true; } else { - ShowSevereError(state, format("{}No Sizing periods were performed for System Sizing. No System Sizing calculations saved.", RoutineName)); + ShowSevereError( + state, EnergyPlus::format("{}No Sizing periods were performed for System Sizing. No System Sizing calculations saved.", RoutineName)); ErrorsFound = true; } } else if ((state.dataSize->NumZoneSizingInput > 0) && @@ -620,15 +625,17 @@ void ManageSizing(EnergyPlusData &state) curName = finalSysSizing.AirPriLoopName; PreDefTableEntry(state, state.dataOutRptPredefined->pdchSysSizCalcClAir, curName, calcSysSizing.DesCoolVolFlow); if (std::abs(calcSysSizing.DesCoolVolFlow) <= 1.e-8) { - ShowWarningError( - state, format("{}Calculated Cooling Design Air Flow Rate for System={} is zero.", RoutineName, finalSysSizing.AirPriLoopName)); + ShowWarningError(state, + EnergyPlus::format( + "{}Calculated Cooling Design Air Flow Rate for System={} is zero.", RoutineName, finalSysSizing.AirPriLoopName)); ShowContinueError(state, "Check Sizing:Zone and ZoneControl:Thermostat inputs."); } PreDefTableEntry(state, state.dataOutRptPredefined->pdchSysSizUserClAir, curName, finalSysSizing.DesCoolVolFlow); PreDefTableEntry(state, state.dataOutRptPredefined->pdchSysSizCalcHtAir, curName, calcSysSizing.DesHeatVolFlow); if (std::abs(calcSysSizing.DesHeatVolFlow) <= 1.e-8) { - ShowWarningError( - state, format("{}Calculated Heating Design Air Flow Rate for System={} is zero.", RoutineName, finalSysSizing.AirPriLoopName)); + ShowWarningError(state, + EnergyPlus::format( + "{}Calculated Heating Design Air Flow Rate for System={} is zero.", RoutineName, finalSysSizing.AirPriLoopName)); ShowContinueError(state, "Check Sizing:Zone and ZoneControl:Thermostat inputs."); } std::string_view coolPeakLoadKind; @@ -723,8 +730,9 @@ void ManageSizing(EnergyPlusData &state) if ((state.dataGlobal->DoPlantSizing) && (state.dataSize->NumPltSizInput == 0)) { ShowWarningError( state, - format("{}For a plant sizing run, there must be at least 1 Sizing:Plant object input. SimulationControl Plant Sizing option ignored.", - RoutineName)); + EnergyPlus::format( + "{}For a plant sizing run, there must be at least 1 Sizing:Plant object input. SimulationControl Plant Sizing option ignored.", + RoutineName)); } if ((state.dataSize->NumPltSizInput > 0) && (state.dataGlobal->DoPlantSizing) && !ErrorsFound) { @@ -2122,7 +2130,7 @@ void DetermineSystemPopulationDiversity(EnergyPlusData &state) TimeMinsInt = 0; } state.dataSize->PeakPsOccurrenceDateTimeStringBySys(AirLoopNum) = - format("{:02}/{:02} {:02}:{:02}", Month, DayOfMonth, TimeHrsInt, TimeMinsInt); + EnergyPlus::format("{:02}/{:02} {:02}:{:02}", Month, DayOfMonth, TimeHrsInt, TimeMinsInt); state.dataSize->PeakPsOccurrenceEnvironmentStringBySys(AirLoopNum) = "Full Year Schedule"; } } // if autosized and VRP @@ -2157,9 +2165,10 @@ void DetermineSystemPopulationDiversity(EnergyPlusData &state) state.dataSize->DBySys(AirLoopNum) = 1.0; ShowWarningError( state, - format("The {} air loop serves a single zone. The Occupant Diversity was calculated or set to a value less than 1.0. Single-zone air " - "loops should have an Occupant Diversity of 1.0. The Occupant Diversity value for that air loop has been reset to 1.0", - finalSysSizing.AirPriLoopName)); + EnergyPlus::format( + "The {} air loop serves a single zone. The Occupant Diversity was calculated or set to a value less than 1.0. Single-zone air " + "loops should have an Occupant Diversity of 1.0. The Occupant Diversity value for that air loop has been reset to 1.0", + finalSysSizing.AirPriLoopName)); } } } @@ -2270,7 +2279,8 @@ void GetOARequirements(EnergyPlusData &state) if (Util::FindItemInList(thisOAReqName, state.dataSize->OARequirements) > 0) { ShowSevereError( state, - format("{}{}=\"{}\" is a duplicate DesignSpecification:OutdoorAir name.", RoutineName, cCurrentModuleObject2, thisOAReqName)); + EnergyPlus::format( + "{}{}=\"{}\" is a duplicate DesignSpecification:OutdoorAir name.", RoutineName, cCurrentModuleObject2, thisOAReqName)); ErrorsFound = true; } thisOAReq.Name = thisOAReqName; @@ -2292,20 +2302,20 @@ void GetOARequirements(EnergyPlusData &state) thisOAReq.dsoaIndexes.emplace_back(thisDsoaNum); ++thisOAReq.numDSOA; } else { - ShowSevereError(state, format("{}{}={}", RoutineName, cCurrentModuleObject2, thisOAReq.Name)); - ShowContinueError(state, format("DesignSpecification:OutdoorAir={} not found.", thisDsoaName)); + ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject2, thisOAReq.Name)); + ShowContinueError(state, EnergyPlus::format("DesignSpecification:OutdoorAir={} not found.", thisDsoaName)); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{}{}={} is empty.", RoutineName, cCurrentModuleObject2, thisOAReq.Name)); + ShowSevereError(state, EnergyPlus::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, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } } @@ -2347,8 +2357,9 @@ void ProcessInputOARequirements(EnergyPlusData &state, if (NumAlphas > 1) { thisOARequirements.OAFlowMethod = static_cast(getEnumValue(OAFlowCalcMethodNamesUC, Util::makeUPPER(Alphas(2)))); if (thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Invalid) { - ShowSevereError(state, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, state.dataSize->OARequirements(OAIndex).Name)); - ShowContinueError(state, format("...Invalid {}=\"{}\",", cAlphaFields(2), Alphas(2))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, state.dataSize->OARequirements(OAIndex).Name)); + ShowContinueError(state, EnergyPlus::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."); @@ -2542,7 +2553,7 @@ void GetZoneAirDistribution(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } } @@ -2603,7 +2614,7 @@ void GetSizingParams(EnergyPlusData &state) state.dataSize->GlobalCoolSizingFactor = 1.0; state.dataSize->NumTimeStepsInAvg = state.dataGlobal->TimeStepsInHour; } else { - ShowFatalError(state, format("{}: More than 1 occurrence of this object; only 1 allowed", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}: More than 1 occurrence of this object; only 1 allowed", cCurrentModuleObject)); } if (state.dataGlobal->OverrideTimestep) { state.dataSize->NumTimeStepsInAvg = state.dataGlobal->TimeStepsInHour; @@ -2613,11 +2624,11 @@ void GetSizingParams(EnergyPlusData &state) } if (state.dataSize->NumTimeStepsInAvg < state.dataGlobal->TimeStepsInHour) { ShowWarningError(state, - format("{}: note {} entered value=[{}] is less than 1 hour (i.e., {} timesteps).", - cCurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3), - state.dataSize->NumTimeStepsInAvg, - state.dataGlobal->TimeStepsInHour)); + EnergyPlus::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"; @@ -2651,10 +2662,10 @@ void GetSizingParams(EnergyPlusData &state) } else { state.dataSize->SizingFileColSep = CharComma; // comma ShowWarningError(state, - format("{}: invalid {} entered value=\"{}\", Commas will be used to separate fields.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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"); @@ -2756,17 +2767,17 @@ void GetZoneSizingInput(EnergyPlusData &state) SizingZoneObjects(Item).ZoneOrZoneListPtr = ZLItem; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {} not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(1))); + EnergyPlus::format("{}=\"{}\" invalid {} not found.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(1))); ErrorsFound = true; errFlag = true; } } if (errFlag) { - ShowSevereError(state, format("GetZoneSizingInput: Errors with invalid names in {} objects.", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::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; } @@ -2836,9 +2847,12 @@ void GetZoneSizingInput(EnergyPlusData &state) } else if (coolingSATMethod == "TEMPERATUREDIFFERENCE") { state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnCoolDgnSAMethod = TemperatureDifference; } else { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, format("... incorrect {}=\"{}\"", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("... incorrect {}=\"{}\"", + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError(state, "... valid values are SupplyAirTemperature or TemperatureDifference."); ErrorsFound = true; } @@ -2923,12 +2937,13 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesHumRat = 0.0; } else if (state.dataIPShortCut->rNumericArgs(5) < 0.0) { ShowSevereError(state, - format("{}: incorrect {}: {:.2R}", - cCurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5), - state.dataIPShortCut->rNumericArgs(5))); - ShowContinueError(state, - format(".. value should not be negative. Occurs in Sizing Object={}", state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}: incorrect {}: {:.2R}", + cCurrentModuleObject, + 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))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesHumRat = state.dataIPShortCut->rNumericArgs(5); @@ -2942,12 +2957,13 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesHumRat = 0.0; } else if (state.dataIPShortCut->rNumericArgs(6) < 0.0) { ShowSevereError(state, - format("{}: incorrect {}: {:.2R}", - cCurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(6), - state.dataIPShortCut->rNumericArgs(6))); - ShowContinueError(state, - format(".. value should not be negative. Occurs in Sizing Object={}", state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}: incorrect {}: {:.2R}", + cCurrentModuleObject, + 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))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesHumRat = state.dataIPShortCut->rNumericArgs(6); @@ -2964,10 +2980,12 @@ void GetZoneSizingInput(EnergyPlusData &state) if (OAIndex > 0) { state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneDesignSpecOAIndex = OAIndex; } else { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, - format("... incorrect {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::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 @@ -2979,11 +2997,11 @@ 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, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(7), - state.dataIPShortCut->rNumericArgs(7))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(7), + state.dataIPShortCut->rNumericArgs(7))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatSizingFactor = state.dataIPShortCut->rNumericArgs(7); @@ -2994,11 +3012,11 @@ 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, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(8), - state.dataIPShortCut->rNumericArgs(8))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(8), + state.dataIPShortCut->rNumericArgs(8))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolSizingFactor = state.dataIPShortCut->rNumericArgs(8); @@ -3014,11 +3032,11 @@ 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, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(9), - state.dataIPShortCut->rNumericArgs(9))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(9), + state.dataIPShortCut->rNumericArgs(9))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolAirFlow = state.dataIPShortCut->rNumericArgs(9); @@ -3037,11 +3055,11 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlowPerArea = state.dataIPShortCut->rNumericArgs(10); } } else if (state.dataIPShortCut->rNumericArgs(10) < 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(108), - state.dataIPShortCut->rNumericArgs(10))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(108), + state.dataIPShortCut->rNumericArgs(10))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlowPerArea = state.dataIPShortCut->rNumericArgs(10); @@ -3055,22 +3073,22 @@ 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, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(11), - state.dataIPShortCut->rNumericArgs(11))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(11), + state.dataIPShortCut->rNumericArgs(11))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlow = state.dataIPShortCut->rNumericArgs(11); } // N12,\field Cooling Minimum Air Flow Fraction if (state.dataIPShortCut->rNumericArgs(12) < 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(12), - state.dataIPShortCut->rNumericArgs(12))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(12), + state.dataIPShortCut->rNumericArgs(12))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlowFrac = state.dataIPShortCut->rNumericArgs(12); @@ -3087,11 +3105,11 @@ 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, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(13), - state.dataIPShortCut->rNumericArgs(13))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(13), + state.dataIPShortCut->rNumericArgs(13))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatAirFlow = state.dataIPShortCut->rNumericArgs(13); @@ -3111,11 +3129,11 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowPerArea = state.dataIPShortCut->rNumericArgs(14); } } else if (state.dataIPShortCut->rNumericArgs(14) < 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(14), - state.dataIPShortCut->rNumericArgs(14))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(14), + state.dataIPShortCut->rNumericArgs(14))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowPerArea = state.dataIPShortCut->rNumericArgs(14); @@ -3136,11 +3154,11 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlow = state.dataIPShortCut->rNumericArgs(15); } } else if (state.dataIPShortCut->rNumericArgs(15) < 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(15), - state.dataIPShortCut->rNumericArgs(15))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(15), + state.dataIPShortCut->rNumericArgs(15))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlow = state.dataIPShortCut->rNumericArgs(15); @@ -3160,11 +3178,11 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowFrac = state.dataIPShortCut->rNumericArgs(16); } } else if (state.dataIPShortCut->rNumericArgs(16) < 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(16), - state.dataIPShortCut->rNumericArgs(16))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(16), + state.dataIPShortCut->rNumericArgs(16))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowFrac = state.dataIPShortCut->rNumericArgs(16); @@ -3200,10 +3218,12 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneAirDistribution(ObjIndex).ZoneVentilationEff; } else { // generate a warning message - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, - format("... not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + 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))); ErrorsFound = true; } } else { @@ -3235,7 +3255,8 @@ 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, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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; } @@ -3278,16 +3299,17 @@ void GetZoneSizingInput(EnergyPlusData &state) Real64 maxHumidify = zoneSizingIndex.zoneRHHumidifySched->getMaxVal(state); Real64 minDehumidify = zoneSizingIndex.zoneRHDehumidifySched->getMinVal(state); if (maxHumidify > minDehumidify) { - ShowWarningCustom(state, - eoh, - 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))); + 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))); } } zoneSizingIndex.heatCoilSizingMethod = static_cast( @@ -3298,7 +3320,7 @@ void GetZoneSizingInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); } } @@ -3307,22 +3329,22 @@ 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, format("{}=\"{}\" has invalid data.", cObjectName, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" has invalid data.", cObjectName, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}] is less than {}=[{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(paramNum), - state.dataIPShortCut->rNumericArgs(paramNum), - state.dataIPShortCut->cNumericFieldNames(paramNum - 2), - state.dataIPShortCut->rNumericArgs(paramNum - 2))); + EnergyPlus::format("... incorrect {}=[{:.2R}] is less than {}=[{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(paramNum), + state.dataIPShortCut->rNumericArgs(paramNum), + state.dataIPShortCut->cNumericFieldNames(paramNum - 2), + state.dataIPShortCut->rNumericArgs(paramNum - 2))); 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, format("{}=\"{}\" has invalid data.", cObjectName, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\" has invalid data.", cObjectName, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}] is less than [{:.2R}]", - state.dataIPShortCut->cNumericFieldNames(paramNum), - state.dataIPShortCut->rNumericArgs(paramNum), - comparisonTemperature)); + EnergyPlus::format("... incorrect {}=[{:.2R}] is less than [{:.2R}]", + state.dataIPShortCut->cNumericFieldNames(paramNum), + state.dataIPShortCut->rNumericArgs(paramNum), + comparisonTemperature)); ShowContinueError(state, "Please check your input to make sure this is correct."); } } @@ -3546,11 +3568,12 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).DesOutAirVolFlow = AutoSize; } else if (state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum) < 0.0 && state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum) != AutoSize) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(iDesignOAVolFlowNumericNum), - state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(iDesignOAVolFlowNumericNum), + state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum))); ErrorsFound = true; } else { SysSizInput(SysSizIndex).DesOutAirVolFlow = state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum); @@ -3569,12 +3592,13 @@ 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, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iMinSysAirFlowRatioNumericNum))); + ShowSevereError(state, + EnergyPlus::format( + "{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iMinSysAirFlowRatioNumericNum))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(iMinSysAirFlowRatioNumericNum), - state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(iMinSysAirFlowRatioNumericNum), + state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum))); ErrorsFound = true; } else { SysSizInput(SysSizIndex).SysAirMinFlowRat = state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum); @@ -3615,11 +3639,12 @@ void GetSystemSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(iMaxCoolAirVolFlowNumericNum)) { SysSizInput(SysSizIndex).DesCoolAirFlow = 0.0; } else if (state.dataIPShortCut->rNumericArgs(iMaxCoolAirVolFlowNumericNum) < 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(iMaxCoolAirVolFlowNumericNum), - state.dataIPShortCut->rNumericArgs(iMaxCoolAirVolFlowNumericNum))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(iMaxCoolAirVolFlowNumericNum), + state.dataIPShortCut->rNumericArgs(iMaxCoolAirVolFlowNumericNum))); ErrorsFound = true; } else { SysSizInput(SysSizIndex).DesCoolAirFlow = state.dataIPShortCut->rNumericArgs(iMaxCoolAirVolFlowNumericNum); @@ -3642,11 +3667,12 @@ void GetSystemSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(iMaxHeatAirVolFlowNumericNum)) { SysSizInput(SysSizIndex).DesHeatAirFlow = 0.0; } else if (state.dataIPShortCut->rNumericArgs(iMaxHeatAirVolFlowNumericNum) < 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(iMaxHeatAirVolFlowNumericNum), - state.dataIPShortCut->rNumericArgs(iMaxHeatAirVolFlowNumericNum))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(iMaxHeatAirVolFlowNumericNum), + state.dataIPShortCut->rNumericArgs(iMaxHeatAirVolFlowNumericNum))); ErrorsFound = true; } else { SysSizInput(SysSizIndex).DesHeatAirFlow = state.dataIPShortCut->rNumericArgs(iMaxHeatAirVolFlowNumericNum); @@ -3663,11 +3689,12 @@ void GetSystemSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(iZoneMaxOAFractionNumericNum)) { SysSizInput(SysSizIndex).MaxZoneOAFraction = 0.0; } else if (state.dataIPShortCut->rNumericArgs(iZoneMaxOAFractionNumericNum) < 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(iZoneMaxOAFractionNumericNum), - state.dataIPShortCut->rNumericArgs(iZoneMaxOAFractionNumericNum))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(iZoneMaxOAFractionNumericNum), + state.dataIPShortCut->rNumericArgs(iZoneMaxOAFractionNumericNum))); ErrorsFound = true; } else { SysSizInput(SysSizIndex).MaxZoneOAFraction = state.dataIPShortCut->rNumericArgs(iZoneMaxOAFractionNumericNum); @@ -3691,11 +3718,12 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).ScaleCoolSAFMethod = FlowPerCoolingCapacity; SysSizInput(SysSizIndex).FlowPerCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolFlowPerCoolCapNumericNum); } else { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError( + state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iCoolSAFMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolSAFMAlphaNum))); + EnergyPlus::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iCoolSAFMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolSAFMAlphaNum))); ShowContinueError(state, "... valid values are DesignDay, Flow/System, FlowPerFloorArea, FractionOfAutosizedCoolingAirflow, or " "FlowPerCoolingCapacity."); @@ -3725,11 +3753,12 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).ScaleHeatSAFMethod = FlowPerHeatingCapacity; SysSizInput(SysSizIndex).FlowPerHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatFlowPerHeatCapNumericNum); } else { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError( + state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iHeatSAFMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatSAFMAlphaNum))); + EnergyPlus::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iHeatSAFMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatSAFMAlphaNum))); ShowContinueError(state, "... valid values are DesignDay, Flow/System, FlowPerFloorArea, FractionOfAutosizedHeatingAirflow, or " "FlowPerHeatingCapacity."); @@ -3743,34 +3772,37 @@ void GetSystemSizingInput(EnergyPlusData &state) } else if (systemOAMethod == "STANDARD62.1VENTILATIONRATEPROCEDURE") { SysSizInput(SysSizIndex).SystemOAMethod = SysOAMethod::VRP; if (SysSizInput(SysSizIndex).loadSizingType == DataSizing::LoadSizing::Ventilation) { - ShowWarningError( - state, - format("{}=\"{}\", invalid combination of inputs.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowWarningError(state, + EnergyPlus::format("{}=\"{}\", invalid combination of inputs.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("{} = {} and {} = {}.", - state.dataIPShortCut->cAlphaFieldNames(iLoadTypeSizeAlphaNum), - state.dataIPShortCut->cAlphaArgs(iLoadTypeSizeAlphaNum), - state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum), - state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum))); + EnergyPlus::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, - format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("SystemOAMethod is set to VRP and {} > 0, user entry will be ignored.", - state.dataIPShortCut->cNumericFieldNames(iDesignOAVolFlowNumericNum))); + EnergyPlus::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, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError( + state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum), - state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum))); + EnergyPlus::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum), + state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum))); ShowContinueError(state, "... valid values are ZoneSum or Standard62.1VentilationRateProcedure."); ErrorsFound = true; } @@ -3782,11 +3814,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, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iCoolDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iCoolDesignCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iCoolDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iCoolDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "CAPACITYPERFLOORAREA")) { @@ -3794,34 +3826,36 @@ void GetSystemSizingInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(iCoolCapacityPerFloorAreaNumericNum)) { SysSizInput(SysSizIndex).ScaledCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolCapacityPerFloorAreaNumericNum); if (SysSizInput(SysSizIndex).ScaledCoolingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum), - state.dataIPShortCut->rNumericArgs(iCoolCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum), + state.dataIPShortCut->rNumericArgs(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (SysSizInput(SysSizIndex).ScaledCoolingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); - ShowContinueError(state, - format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); + ShowContinueError( + state, + EnergyPlus::format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); - ShowContinueError( - state, format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Blank field not allowed for {}", + state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "FRACTIONOFAUTOSIZEDCOOLINGCAPACITY")) { @@ -3829,33 +3863,34 @@ void GetSystemSizingInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(iCoolFracOfAutosizedCapacityNumericNum)) { SysSizInput(SysSizIndex).ScaledCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolFracOfAutosizedCapacityNumericNum); if (SysSizInput(SysSizIndex).ScaledCoolingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iCoolFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iCoolFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); - ShowContinueError( - state, - format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "NONE")) { SysSizInput(SysSizIndex).CoolingCapMethod = None; SysSizInput(SysSizIndex).ScaledCoolingCapacity = 0.0; } else { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); + EnergyPlus::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); ShowContinueError(state, "... valid values are CoolingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity, or None."); ErrorsFound = true; @@ -3867,11 +3902,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, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "CAPACITYPERFLOORAREA")) { @@ -3879,34 +3914,36 @@ void GetSystemSizingInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatCapacityPerFloorAreaNumericNum)) { SysSizInput(SysSizIndex).ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum); if (SysSizInput(SysSizIndex).ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (SysSizInput(SysSizIndex).ScaledHeatingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError(state, - format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, + EnergyPlus::format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Blank field not allowed for {}", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "FRACTIONOFAUTOSIZEDHEATINGCAPACITY")) { @@ -3914,33 +3951,34 @@ void GetSystemSizingInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatFracOfAutosizedCapacityNumericNum)) { SysSizInput(SysSizIndex).ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum); if (SysSizInput(SysSizIndex).ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, - format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "NONE")) { SysSizInput(SysSizIndex).HeatingCapMethod = None; SysSizInput(SysSizIndex).ScaledHeatingCapacity = 0.0; } else { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + EnergyPlus::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, "... valid values are HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedHeatingCapacity, or None."); ErrorsFound = true; @@ -3955,19 +3993,21 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).OccupantDiversity = AutoSize; } else if (state.dataIPShortCut->rNumericArgs(iOccupantDiversity) <= 0.0 && state.dataIPShortCut->rNumericArgs(iOccupantDiversity) != AutoSize) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be negative.", - state.dataIPShortCut->cNumericFieldNames(iOccupantDiversity), - state.dataIPShortCut->rNumericArgs(iOccupantDiversity))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", + state.dataIPShortCut->cNumericFieldNames(iOccupantDiversity), + state.dataIPShortCut->rNumericArgs(iOccupantDiversity))); ErrorsFound = true; } else if (state.dataIPShortCut->rNumericArgs(iOccupantDiversity) > 1.0 && state.dataIPShortCut->rNumericArgs(iOccupantDiversity) != AutoSize) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - format("... incorrect {}=[{:.2R}], value should not be greater than 1.0.", - state.dataIPShortCut->cNumericFieldNames(iOccupantDiversity), - state.dataIPShortCut->rNumericArgs(iOccupantDiversity))); + EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be greater than 1.0.", + state.dataIPShortCut->cNumericFieldNames(iOccupantDiversity), + state.dataIPShortCut->rNumericArgs(iOccupantDiversity))); ErrorsFound = true; } else { SysSizInput(SysSizIndex).OccupantDiversity = state.dataIPShortCut->rNumericArgs(iOccupantDiversity); @@ -3979,7 +4019,7 @@ void GetSystemSizingInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); } } @@ -4081,7 +4121,7 @@ void GetPlantSizingInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); } } @@ -4486,7 +4526,7 @@ std::string TimeIndexToHrMinString(EnergyPlusData const &state, int timeIndex) int tMinOfDay = timeIndex * state.dataGlobal->MinutesInTimeStep; int tHr = int(tMinOfDay / 60.); int tMin = tMinOfDay - tHr * 60; - return format(PeakHrMinFmt, tHr, tMin); + return EnergyPlus::format(PeakHrMinFmt, tHr, tMin); } void GetZoneHVACSizing(EnergyPlusData &state) @@ -4629,16 +4669,17 @@ void GetZoneHVACSizing(EnergyPlusData &state) } if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iMaxCoolAirVolFlowNumericNum), Numbers(iMaxCoolAirVolFlowNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iMaxCoolAirVolFlowNumericNum), + Numbers(iMaxCoolAirVolFlowNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iMaxCoolAirVolFlowNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolSAFMAlphaNum), "FlowPerFloorArea")) { @@ -4647,26 +4688,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iCoolFlowPerFloorAreaNumericNum), Numbers(iCoolFlowPerFloorAreaNumericNum))); + 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 {} = {:.7T}", + cNumericFields(iCoolFlowPerFloorAreaNumericNum), + Numbers(iCoolFlowPerFloorAreaNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerFloorAreaNumericNum))); + 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))); 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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolSAFMAlphaNum), "FractionOfAutosizedCoolingAirflow")) { @@ -4675,26 +4717,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iCoolFlowPerFracCoolNumericNum), Numbers(iCoolFlowPerFracCoolNumericNum))); + 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 {} = {:.7T}", + cNumericFields(iCoolFlowPerFracCoolNumericNum), + Numbers(iCoolFlowPerFracCoolNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerFracCoolNumericNum))); + 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))); 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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerFracCoolNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolSAFMAlphaNum), "FlowPerCoolingCapacity")) { @@ -4704,26 +4747,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iCoolFlowPerCoolCapNumericNum), Numbers(iCoolFlowPerCoolCapNumericNum))); + 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 {} = {:.7T}", + cNumericFields(iCoolFlowPerCoolCapNumericNum), + Numbers(iCoolFlowPerCoolCapNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerCoolCapNumericNum))); + 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))); 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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerCoolCapNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolSAFMAlphaNum), "None") || lAlphaBlanks(iCoolSAFMAlphaNum)) { @@ -4731,8 +4775,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); ErrorsFound = true; } // Determine supply air flow rate sizing method for heating mode @@ -4746,16 +4790,17 @@ void GetZoneHVACSizing(EnergyPlusData &state) if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iMaxHeatAirVolFlowNumericNum), Numbers(iMaxHeatAirVolFlowNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iMaxHeatAirVolFlowNumericNum), + Numbers(iMaxHeatAirVolFlowNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iMaxHeatAirVolFlowNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatSAFMAlphaNum), "FlowPerFloorArea")) { @@ -4764,26 +4809,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iHeatFlowPerFloorAreaNumericNum), Numbers(iHeatFlowPerFloorAreaNumericNum))); + 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 {} = {:.7T}", + cNumericFields(iHeatFlowPerFloorAreaNumericNum), + Numbers(iHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerFloorAreaNumericNum))); + 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))); 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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatSAFMAlphaNum), "FractionOfAutosizedHeatingAirflow")) { @@ -4792,26 +4838,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iHeatFlowPerFracCoolNumericNum), Numbers(iHeatFlowPerFracCoolNumericNum))); + 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 {} = {:.7T}", + cNumericFields(iHeatFlowPerFracCoolNumericNum), + Numbers(iHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerFracCoolNumericNum))); + 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))); 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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerFracCoolNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatSAFMAlphaNum), "FlowPerHeatingCapacity")) { @@ -4820,34 +4867,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iHeatFlowPerHeatCapNumericNum), Numbers(iHeatFlowPerHeatCapNumericNum))); + 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 {} = {:.7T}", + cNumericFields(iHeatFlowPerHeatCapNumericNum), + Numbers(iHeatFlowPerHeatCapNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerHeatCapNumericNum))); + 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))); 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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerHeatCapNumericNum))); + 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))); 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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); ErrorsFound = true; } @@ -4861,17 +4909,19 @@ void GetZoneHVACSizing(EnergyPlusData &state) } if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum), - Numbers(iMaxNoCoolHeatAirVolFlowNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum), + Numbers(iMaxNoCoolHeatAirVolFlowNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, + EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FlowPerFloorArea")) { @@ -4880,18 +4930,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum), - Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum), + Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } else { // user input supply air flow per unit floor area during no cooling or heating area is saved in @@ -4899,9 +4951,11 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, + EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FractionOfAutosizedCoolingAirflow")) { @@ -4910,18 +4964,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum), - Numbers(iNoCoolHeatFlowPerFracCoolNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum), + Numbers(iNoCoolHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))); + 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))); ErrorsFound = true; } else { // user input fraction of cooling supply air flow rate during no cooling or heating area is saved in @@ -4929,9 +4985,11 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, + EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FractionOfAutosizedHeatingAirflow")) { @@ -4940,18 +4998,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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum), - Numbers(iNoCoolHeatFlowPerFracHeatNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum), + Numbers(iNoCoolHeatFlowPerFracHeatNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum))); + 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))); ErrorsFound = true; } else { // user input fraction of heating supply air flow rate during no cooling or heating area is saved in @@ -4959,17 +5019,20 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, + EnergyPlus::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, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); ErrorsFound = true; } @@ -4983,16 +5046,17 @@ void GetZoneHVACSizing(EnergyPlusData &state) } if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iCoolDesignCapacityNumericNum), Numbers(iCoolDesignCapacityNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iCoolDesignCapacityNumericNum), + Numbers(iCoolDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iCoolDesignCapacityNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolCAPMAlphaNum), "CapacityPerFloorArea")) { @@ -5000,24 +5064,25 @@ void GetZoneHVACSizing(EnergyPlusData &state) if (!lNumericBlanks(iCoolCapacityPerFloorAreaNumericNum)) { state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity = Numbers(iCoolCapacityPerFloorAreaNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iCoolCapacityPerFloorAreaNumericNum), - Numbers(iCoolCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iCoolCapacityPerFloorAreaNumericNum), + Numbers(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iCoolCapacityPerFloorAreaNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iCoolCapacityPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolCAPMAlphaNum), "FractionOfAutosizedCoolingCapacity")) { @@ -5029,24 +5094,25 @@ void GetZoneHVACSizing(EnergyPlusData &state) } if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iCoolFracOfAutosizedCapacityNumericNum), - Numbers(iCoolFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iCoolFracOfAutosizedCapacityNumericNum), + Numbers(iCoolFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iCoolFracOfAutosizedCapacityNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolCAPMAlphaNum), "None") || lAlphaBlanks(iCoolCAPMAlphaNum)) { state.dataSize->ZoneHVACSizing(zSIndex).CoolingCapMethod = None; } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); ErrorsFound = true; } @@ -5060,16 +5126,17 @@ void GetZoneHVACSizing(EnergyPlusData &state) } if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, - format("Illegal {} = {:.7T}", cNumericFields(iHeatDesignCapacityNumericNum), Numbers(iHeatDesignCapacityNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iHeatDesignCapacityNumericNum), + Numbers(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatDesignCapacityNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "CapacityPerFloorArea")) { @@ -5077,24 +5144,25 @@ void GetZoneHVACSizing(EnergyPlusData &state) if (!lNumericBlanks(iHeatCapacityPerFloorAreaNumericNum)) { state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity = Numbers(iHeatCapacityPerFloorAreaNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iHeatCapacityPerFloorAreaNumericNum), - Numbers(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iHeatCapacityPerFloorAreaNumericNum), + Numbers(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity == AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Illegal {} = Autosize", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "FractionOfAutosizedHeatingCapacity")) { @@ -5106,24 +5174,25 @@ void GetZoneHVACSizing(EnergyPlusData &state) } if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity != AutoSize) { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - cNumericFields(iHeatFracOfAutosizedCapacityNumericNum), - Numbers(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + cNumericFields(iHeatFracOfAutosizedCapacityNumericNum), + Numbers(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, format("Blank field not allowed for {}", cNumericFields(iHeatFracOfAutosizedCapacityNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "None") || lAlphaBlanks(iHeatCAPMAlphaNum)) { state.dataSize->ZoneHVACSizing(zSIndex).HeatingCapMethod = None; } else { - ShowSevereError(state, format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); ErrorsFound = true; } } @@ -5137,7 +5206,7 @@ void GetZoneHVACSizing(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -5195,7 +5264,7 @@ void GetAirTerminalSizing(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } diff --git a/src/EnergyPlus/SolarCollectors.cc b/src/EnergyPlus/SolarCollectors.cc index 6a10bf69d8b..d5c0e8e284e 100644 --- a/src/EnergyPlus/SolarCollectors.cc +++ b/src/EnergyPlus/SolarCollectors.cc @@ -105,7 +105,8 @@ namespace SolarCollectors { } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalSolarCollectorFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalSolarCollectorFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -226,10 +227,10 @@ namespace SolarCollectors { state.dataIPShortCut->rNumericArgs(2) * Psychrometrics::RhoH2O(Constant::InitConvTemp); } else { ShowSevereError(state, - format("{} = {}: flow rate must be greater than zero for {}", - CurrentModuleParamObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(2))); + EnergyPlus::format("{} = {}: flow rate must be greater than zero for {}", + CurrentModuleParamObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(2))); ErrorsFound = true; } @@ -237,11 +238,11 @@ namespace SolarCollectors { state.dataSolarCollectors->Parameters(ParametersNum).TestType = static_cast(getEnumValue(testTypesUC, key)); if (state.dataSolarCollectors->Parameters(ParametersNum).TestType == TestTypeEnum::INVALID) { ShowSevereError(state, - format("{} = {}: {} is not supported for {}", - CurrentModuleParamObject, - state.dataIPShortCut->cAlphaArgs(1), - key, - state.dataIPShortCut->cAlphaFieldNames(3))); + EnergyPlus::format("{} = {}: {} is not supported for {}", + CurrentModuleParamObject, + state.dataIPShortCut->cAlphaArgs(1), + key, + state.dataIPShortCut->cAlphaFieldNames(3))); ErrorsFound = true; } @@ -270,7 +271,7 @@ namespace SolarCollectors { } // ParametersNum if (ErrorsFound) { - ShowFatalError(state, format("Errors in {} input.", CurrentModuleParamObject)); + ShowFatalError(state, EnergyPlus::format("Errors in {} input.", CurrentModuleParamObject)); } } @@ -304,11 +305,11 @@ namespace SolarCollectors { if (ParametersNum == 0) { ShowSevereError(state, - format("{} = {}: {} object called {} not found.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - CurrentModuleParamObject, - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: {} object called {} not found.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + CurrentModuleParamObject, + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } else { state.dataSolarCollectors->Collector(CollectorNum).Parameters = ParametersNum; @@ -319,32 +320,34 @@ namespace SolarCollectors { if (SurfNum == 0) { ShowSevereError(state, - format("{} = {}: Surface {} not found.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::format("{} = {}: Surface {} not found.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; continue; // avoid hard crash } if (!state.dataSurface->Surface(SurfNum).ExtSolar) { ShowWarningError(state, - format("{} = {}: Surface {} is not exposed to exterior radiation.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::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, - format("Suspected input problem with {} = {}", - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, "Surface used for solar collector faces down"); + EnergyPlus::format("Suspected input problem with {} = {}", + state.dataIPShortCut->cAlphaFieldNames(3), + state.dataIPShortCut->cAlphaArgs(3))); ShowContinueError( - state, format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", state.dataSurface->Surface(SurfNum).Tilt)); + state, + EnergyPlus::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}", + state.dataSurface->Surface(SurfNum).Tilt)); } // Check to make sure other solar collectors are not using the same surface @@ -352,11 +355,11 @@ namespace SolarCollectors { for (int CollectorNum2 = 1; CollectorNum2 <= NumFlatPlateUnits; ++CollectorNum2) { if (state.dataSolarCollectors->Collector(CollectorNum2).Surface == SurfNum) { ShowSevereError(state, - format("{} = {}: Surface {} is referenced by more than one {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3), - CurrentModuleObject)); + EnergyPlus::format("{} = {}: Surface {} is referenced by more than one {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3), + CurrentModuleObject)); ErrorsFound = true; break; } @@ -370,10 +373,11 @@ namespace SolarCollectors { state.dataSurface->Surface(SurfNum).Area > 0.01) { - ShowWarningError(state, - format("{} = {}: Gross Area of solar collector parameters and surface object differ by more than 1%.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + EnergyPlus::format("{} = {}: Gross Area of solar collector parameters and surface object differ by more than 1%.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Area of surface object will be used in all calculations."); } @@ -457,17 +461,19 @@ namespace SolarCollectors { // NOTE: This collector gross area is used in all the calculations. state.dataSolarCollectors->Parameters(ParametersNum).Area = state.dataIPShortCut->rNumericArgs(1); if (state.dataIPShortCut->rNumericArgs(1) <= 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleParamObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, format("Illegal {} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleParamObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format( + "Illegal {} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); ShowContinueError(state, " Collector gross area must be always greater than zero."); ErrorsFound = true; } state.dataSolarCollectors->Parameters(ParametersNum).Volume = state.dataIPShortCut->rNumericArgs(2); if (state.dataIPShortCut->rNumericArgs(2) <= 0.0) { - ShowSevereError(state, format("{} = {}", CurrentModuleParamObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, format("Illegal {} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleParamObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format( + "Illegal {} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); ShowContinueError(state, " Collector water volume must be always greater than zero."); ErrorsFound = true; } @@ -494,7 +500,7 @@ namespace SolarCollectors { state.dataSolarCollectors->Parameters(ParametersNum).ExtCoefTimesThickness[1] = state.dataIPShortCut->rNumericArgs(14); state.dataSolarCollectors->Parameters(ParametersNum).EmissOfCover[1] = state.dataIPShortCut->rNumericArgs(15); } else { - ShowSevereError(state, format("{} = {}", CurrentModuleParamObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleParamObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Illegal input for one of the three inputs of the inner cover optical properties"); ErrorsFound = true; } @@ -506,9 +512,10 @@ namespace SolarCollectors { // Outer cover emissivity state.dataSolarCollectors->Parameters(ParametersNum).EmissOfCover[0] = state.dataIPShortCut->rNumericArgs(12); } else { - ShowSevereError(state, format("{} = {}", CurrentModuleParamObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, format("Illegal {} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(8), state.dataIPShortCut->rNumericArgs(8))); + ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleParamObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format( + "Illegal {} = {:.2R}", state.dataIPShortCut->cNumericFieldNames(8), state.dataIPShortCut->rNumericArgs(8))); ErrorsFound = true; } // Solar absorptance of the absorber plate @@ -519,7 +526,7 @@ namespace SolarCollectors { } // end of ParametersNum if (ErrorsFound) { - ShowFatalError(state, format("Errors in {} input.", CurrentModuleParamObject)); + ShowFatalError(state, EnergyPlus::format("Errors in {} input.", CurrentModuleParamObject)); } CurrentModuleObject = "SolarCollector:IntegralCollectorStorage"; @@ -559,11 +566,11 @@ namespace SolarCollectors { if (ParametersNum == 0) { ShowSevereError(state, - format("{} = {}: {} object called {} not found.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - CurrentModuleParamObject, - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::format("{} = {}: {} object called {} not found.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + CurrentModuleParamObject, + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } else { state.dataSolarCollectors->Collector(CollectorNum).Parameters = ParametersNum; @@ -590,32 +597,34 @@ namespace SolarCollectors { if (SurfNum == 0) { ShowSevereError(state, - format("{} = {}: Surface {} not found.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::format("{} = {}: Surface {} not found.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; continue; // avoid hard crash } if (!state.dataSurface->Surface(SurfNum).ExtSolar) { ShowWarningError(state, - format("{} = {}: Surface {} is not exposed to exterior radiation.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::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, - format("Suspected input problem with {} = {}", - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, "Surface used for solar collector faces down"); + EnergyPlus::format("Suspected input problem with {} = {}", + state.dataIPShortCut->cAlphaFieldNames(3), + state.dataIPShortCut->cAlphaArgs(3))); ShowContinueError( - state, format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", state.dataSurface->Surface(SurfNum).Tilt)); + state, + EnergyPlus::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}", + state.dataSurface->Surface(SurfNum).Tilt)); } // Check to make sure other solar collectors are not using the same surface @@ -623,11 +632,11 @@ namespace SolarCollectors { for (int CollectorNum2 = 1; CollectorNum2 <= state.dataSolarCollectors->NumOfCollectors; ++CollectorNum2) { if (state.dataSolarCollectors->Collector(CollectorNum2).Surface == SurfNum) { ShowSevereError(state, - format("{} = {}: Surface {} is referenced by more than one {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3), - CurrentModuleObject)); + EnergyPlus::format("{} = {}: Surface {} is referenced by more than one {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3), + CurrentModuleObject)); ErrorsFound = true; break; } @@ -641,7 +650,7 @@ namespace SolarCollectors { state.dataSurface->Surface(SurfNum).Area > 0.01) { - ShowWarningError(state, format("{} = {}: ", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::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 "); @@ -657,20 +666,20 @@ namespace SolarCollectors { int Found = Util::FindItemInList(state.dataSolarCollectors->Collector(CollectorNum).OSCMName, state.dataSurface->OSCM); if (Found == 0) { ShowSevereError(state, - format("{} not found={} in {} ={}", - state.dataIPShortCut->cAlphaFieldNames(5), - state.dataSolarCollectors->Collector(CollectorNum).OSCMName, - CurrentModuleObject, - state.dataSolarCollectors->Collector(CollectorNum).Name)); + EnergyPlus::format("{} not found={} in {} ={}", + state.dataIPShortCut->cAlphaFieldNames(5), + state.dataSolarCollectors->Collector(CollectorNum).OSCMName, + CurrentModuleObject, + state.dataSolarCollectors->Collector(CollectorNum).Name)); ErrorsFound = true; } } else { ShowSevereError(state, - format("{} not found={} in {} ={}", - state.dataIPShortCut->cAlphaFieldNames(5), - state.dataSolarCollectors->Collector(CollectorNum).BCType, - CurrentModuleObject, - state.dataSolarCollectors->Collector(CollectorNum).Name)); + EnergyPlus::format("{} not found={} in {} ={}", + state.dataIPShortCut->cAlphaFieldNames(5), + state.dataSolarCollectors->Collector(CollectorNum).BCType, + CurrentModuleObject, + state.dataSolarCollectors->Collector(CollectorNum).Name)); ErrorsFound = true; } @@ -722,7 +731,7 @@ namespace SolarCollectors { } // ICSNum if (ErrorsFound) { - ShowFatalError(state, format("Errors in {} input.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors in {} input.", CurrentModuleObject)); } } } @@ -1239,17 +1248,17 @@ namespace SolarCollectors { if (qEquation < 0.0) { if (this->ErrIndex == 0) { ShowSevereMessage(state, - format("CalcSolarCollector: {}=\"{}\", possible bad input coefficients.", - DataPlant::PlantEquipTypeNames[static_cast(this->Type)], - this->Name)); + EnergyPlus::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, - format("CalcSolarCollector: {}=\"{}\", coefficient error continues.", - DataPlant::PlantEquipTypeNames[static_cast(this->Type)], - this->Name), + EnergyPlus::format("CalcSolarCollector: {}=\"{}\", coefficient error continues.", + DataPlant::PlantEquipTypeNames[static_cast(this->Type)], + this->Name), this->ErrIndex, qEquation, qEquation); @@ -1269,14 +1278,14 @@ namespace SolarCollectors { if (Iteration > 100) { if (this->IterErrIndex == 0) { ShowWarningMessage(state, - format("CalcSolarCollector: {}=\"{}\": Solution did not converge.", - DataPlant::PlantEquipTypeNames[static_cast(this->Type)], - this->Name)); + EnergyPlus::format("CalcSolarCollector: {}=\"{}\": Solution did not converge.", + DataPlant::PlantEquipTypeNames[static_cast(this->Type)], + this->Name)); } ShowRecurringWarningErrorAtEnd(state, - format("CalcSolarCollector: {}=\"{}\", solution not converge error continues.", - DataPlant::PlantEquipTypeNames[static_cast(this->Type)], - this->Name), + EnergyPlus::format("CalcSolarCollector: {}=\"{}\", solution not converge error continues.", + DataPlant::PlantEquipTypeNames[static_cast(this->Type)], + this->Name), this->IterErrIndex); break; } @@ -1332,12 +1341,12 @@ namespace SolarCollectors { if (IAM > 10.0) { // Greater than 10 is probably not a possibility ShowSevereError( state, - format( + EnergyPlus::format( "IAM Function: SolarCollectorPerformance:FlatPlate = {}: Incident Angle Modifier is out of bounds due to bad coefficients.", this->Name)); - ShowContinueError(state, format("Coefficient 2 of Incident Angle Modifier = {}", this->iam1)); - ShowContinueError(state, format("Coefficient 3 of Incident Angle Modifier = {}", this->iam2)); - ShowContinueError(state, format("Calculated Incident Angle Modifier = {}", IAM)); + 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, "Expected Incident Angle Modifier should be approximately 1.5 or less."); ShowFatalError(state, "Errors in SolarCollectorPerformance:FlatPlate input."); } @@ -2164,9 +2173,10 @@ namespace SolarCollectors { } if (!Found) { - ShowFatalError(state, - format("Did not find surface in Exterior Vented Cavity description in GetExtVentedCavityIndex, Surface name = {}", - state.dataSurface->Surface(SurfacePtr).Name)); + ShowFatalError( + state, + EnergyPlus::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/SolarReflectionManager.cc b/src/EnergyPlus/SolarReflectionManager.cc index 5721acf6e7a..b596db07088 100644 --- a/src/EnergyPlus/SolarReflectionManager.cc +++ b/src/EnergyPlus/SolarReflectionManager.cc @@ -243,9 +243,9 @@ namespace SolarReflectionManager { // Warning if any receiving surface vertex is below ground level, taken to be at Z = 0 in absolute coords for (loop = 1; loop <= state.dataSurface->Surface(SurfNum).Sides; ++loop) { if (state.dataSurface->Surface(SurfNum).Vertex(loop).z < state.dataSurface->GroundLevelZ) { - ShowWarningError( - state, - format("Calculation of reflected solar onto surface={} may be inaccurate", state.dataSurface->Surface(SurfNum).Name)); + ShowWarningError(state, + EnergyPlus::format("Calculation of reflected solar onto surface={} may be inaccurate", + state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, "because it has one or more vertices below ground level."); break; } diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index 9ff5922a769..39703715597 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -186,8 +186,9 @@ void InitSolarCalculations(EnergyPlusData &state) state.dataSolarShading->shd_stream = std::make_unique(state.dataStrGlobals->outputShdFilePath, std::ios_base::out | std::ios_base::trunc); if (!state.dataSolarShading->shd_stream) { - ShowFatalError( - state, format("InitSolarCalculations: Could not open file \"{}\" for output (write).", state.dataStrGlobals->outputShdFilePath)); + ShowFatalError(state, + EnergyPlus::format("InitSolarCalculations: Could not open file \"{}\" for output (write).", + state.dataStrGlobals->outputShdFilePath)); } } else { state.dataSolarShading->shd_stream = std::make_unique(nullptr); @@ -402,9 +403,9 @@ void checkShadingSurfaceSchedules(EnergyPlusData &state) } else if (!thisSurface.MirroredSurf) { // Warning moved here from shading surface input processing (skip warning for mirrored surfaces) ShowWarningError(state, - format(R"(Shading Surface="{}", Transmittance Schedule Name="{}", is always transparent.)", - thisSurface.Name, - thisSurface.shadowSurfSched->Name)); + EnergyPlus::format(R"(Shading Surface="{}", Transmittance Schedule Name="{}", is always transparent.)", + thisSurface.Name, + thisSurface.shadowSurfSched->Name)); ShowContinueError(state, "This shading surface will be ignored."); } } @@ -439,7 +440,8 @@ void GetShadowingInput(EnergyPlusData &state) NumAlphas = 0; NumNumbers = 0; if (NumItems > 1) { - ShowWarningError(state, format("{}: More than 1 occurrence of this object found, only first will be used.", cCurrentModuleObject)); + ShowWarningError(state, + EnergyPlus::format("{}: More than 1 occurrence of this object found, only first will be used.", cCurrentModuleObject)); } if (NumItems != 0) { @@ -463,8 +465,9 @@ void GetShadowingInput(EnergyPlusData &state) state.dataSolarShading->ShadowingCalcFrequency = 20; } if (state.dataSolarShading->ShadowingCalcFrequency > 31) { - ShowWarningError(state, format("{}: suspect {}", cCurrentModuleObject, state.dataIPShortCut->cNumericFieldNames(1))); - ShowContinueError(state, format("Value entered=[{:.0R}], Shadowing Calculations will be inaccurate.", state.dataIPShortCut->rNumericArgs(1))); + ShowWarningError(state, EnergyPlus::format("{}: suspect {}", cCurrentModuleObject, state.dataIPShortCut->cNumericFieldNames(1))); + ShowContinueError( + state, EnergyPlus::format("Value entered=[{:.0R}], Shadowing Calculations will be inaccurate.", state.dataIPShortCut->rNumericArgs(1))); } if (state.dataIPShortCut->rNumericArgs(2) > 199.0) { @@ -485,10 +488,11 @@ void GetShadowingInput(EnergyPlusData &state) state.dataSysVars->shadingMethod = ShadingMethod::Imported; state.dataIPShortCut->cAlphaArgs(aNum) = "Imported"; } else { - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, - format("Value entered=\"{}\" while no Schedule:File:Shading object is defined, InternalCalculation will be used.", - state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError( + state, + EnergyPlus::format("Value entered=\"{}\" while no Schedule:File:Shading object is defined, InternalCalculation will be used.", + state.dataIPShortCut->cAlphaArgs(aNum))); } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(aNum), "PolygonClipping")) { state.dataSysVars->shadingMethod = ShadingMethod::PolygonClipping; @@ -500,8 +504,8 @@ void GetShadowingInput(EnergyPlusData &state) pixelRes = (unsigned)state.dataIPShortCut->rNumericArgs(3); } #ifdef EP_NO_OPENGL - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, format("Value entered=\"{}\"", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError(state, EnergyPlus::format("Value entered=\"{}\"", state.dataIPShortCut->cAlphaArgs(aNum))); ShowContinueError(state, "This version of EnergyPlus was not compiled to use OpenGL (required for PixelCounting)"); ShowContinueError(state, "PolygonClipping will be used instead"); state.dataSysVars->shadingMethod = ShadingMethod::PolygonClipping; @@ -520,8 +524,9 @@ void GetShadowingInput(EnergyPlusData &state) } #endif } else { - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, format("Value entered=\"{}\", PolygonClipping will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError(state, + EnergyPlus::format("Value entered=\"{}\", PolygonClipping will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); } } else { state.dataIPShortCut->cAlphaArgs(aNum) = "PolygonClipping"; @@ -537,8 +542,8 @@ void GetShadowingInput(EnergyPlusData &state) state.dataSysVars->DetailedSolarTimestepIntegration = true; state.dataIPShortCut->cAlphaArgs(aNum) = "Timestep"; } else { - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, format("Value entered=\"{}\", Periodic will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError(state, EnergyPlus::format("Value entered=\"{}\", Periodic will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); state.dataSysVars->DetailedSolarTimestepIntegration = false; state.dataIPShortCut->cAlphaArgs(aNum) = "Periodic"; } @@ -570,16 +575,18 @@ void GetShadowingInput(EnergyPlusData &state) } } } else { - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); if (!state.dataSysVars->SutherlandHodgman) { - ShowContinueError(state, format("Value entered=\"{}\", ConvexWeilerAtherton will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowContinueError( + state, EnergyPlus::format("Value entered=\"{}\", ConvexWeilerAtherton will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); } else { if (!state.dataSysVars->SlaterBarsky) { - ShowContinueError(state, format("Value entered=\"{}\", SutherlandHodgman will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); - } else { ShowContinueError( - state, - format("Value entered=\"{}\", SlaterBarskyandSutherlandHodgman will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); + state, EnergyPlus::format("Value entered=\"{}\", SutherlandHodgman will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); + } else { + ShowContinueError(state, + EnergyPlus::format("Value entered=\"{}\", SlaterBarskyandSutherlandHodgman will be used.", + state.dataIPShortCut->cAlphaArgs(aNum))); } } } @@ -607,8 +614,9 @@ void GetShadowingInput(EnergyPlusData &state) state.dataSysVars->DetailedSkyDiffuseAlgorithm = false; state.dataIPShortCut->cAlphaArgs(aNum) = "SimpleSkyDiffuseModeling"; } else { - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, format("Value entered=\"{}\", SimpleSkyDiffuseModeling will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError( + state, EnergyPlus::format("Value entered=\"{}\", SimpleSkyDiffuseModeling will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); } } else { state.dataIPShortCut->cAlphaArgs(aNum) = "SimpleSkyDiffuseModeling"; @@ -624,8 +632,9 @@ void GetShadowingInput(EnergyPlusData &state) state.dataSysVars->ReportExtShadingSunlitFrac = false; state.dataIPShortCut->cAlphaArgs(aNum) = "No"; } else { - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, format("Value entered=\"{}\", InternalCalculation will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError(state, + EnergyPlus::format("Value entered=\"{}\", InternalCalculation will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); } } else { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; @@ -640,9 +649,9 @@ void GetShadowingInput(EnergyPlusData &state) } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(aNum), "No")) { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; } else { - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, - format("Value entered=\"{}\", all shading effects would be considered.", state.dataIPShortCut->cAlphaArgs(aNum))); + 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))); } } else { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; @@ -656,9 +665,9 @@ void GetShadowingInput(EnergyPlusData &state) } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(aNum), "No")) { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; } else { - ShowWarningError(state, format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, - format("Value entered=\"{}\", all shading effects would be considered.", state.dataIPShortCut->cAlphaArgs(aNum))); + 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))); } } else { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; @@ -681,23 +690,25 @@ void GetShadowingInput(EnergyPlusData &state) state.dataHeatBal->SolarDistribution != DataHeatBalance::Shadowing::Minimal) { ShowWarningError(state, "GetShadowingInput: The shading transmittance for shading devices may change throughout the year."); - ShowContinueError(state, - format("Choose Shading Calculation Update Frequency Method = Timestep in the {} object to capture all shading impacts.", - cCurrentModuleObject)); + ShowContinueError( + state, + EnergyPlus::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, format("Choose DetailedSkyDiffuseModeling in the {} object to remove this warning.", cCurrentModuleObject)); + ShowContinueError(state, + EnergyPlus::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, - format("Better accuracy may be gained by setting the {} to 1 in the {} object.", - state.dataIPShortCut->cNumericFieldNames(1), - cCurrentModuleObject)); + EnergyPlus::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) { @@ -706,7 +717,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, format("Choose SimpleSkyDiffuseModeling in the {} object to reduce computation time.", cCurrentModuleObject)); + ShowContinueError( + state, EnergyPlus::format("Choose SimpleSkyDiffuseModeling in the {} object to reduce computation time.", cCurrentModuleObject)); } } @@ -752,8 +764,9 @@ void processShadowingInput(EnergyPlusData &state) if ((surf.surfExternalShadingSched = Sched::GetSchedule(state, surf.Name + "_shading")) != nullptr) { surf.SurfSchedExternalShadingFrac = true; } else { - ShowWarningError(state, - format("processShadowingInput: sunlit fraction schedule not found for {} when using ImportedShading.", surf.Name)); + ShowWarningError( + state, + EnergyPlus::format("processShadowingInput: sunlit fraction schedule not found for {} when using ImportedShading.", surf.Name)); ShowContinueError(state, "These values are set to 1.0."); } } @@ -833,19 +846,21 @@ void checkScheduledSurfacePresent(EnergyPlusData &state) if (numNotDef == 1) { ShowWarningError( state, - format("ShadowCalculation specified Schedule for the Shading Calculation Method but no schedule provided for {}", thisSurf.Name)); + EnergyPlus::format("ShadowCalculation specified Schedule for the Shading Calculation Method but no schedule provided for {}", + thisSurf.Name)); ShowContinueError( state, "When Schedule is selected for the Shading Calculation Method and no schedule is provided for a particular surface,"); ShowContinueError( state, "EnergyPlus will assume that the surface is not shaded. Use SurfaceProperty:LocalEnvironment to specify a schedule"); 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, format("No schedule was provided for {} either. See above error message for more details", thisSurf.Name)); + ShowWarningError( + state, EnergyPlus::format("No schedule was provided for {} either. See above error message for more details", thisSurf.Name)); } } } if (numNotDef > maxErrMessages) { - ShowContinueError(state, format("This message is only shown for the first {} occurrences of this issue.", maxErrMessages)); + ShowContinueError(state, EnergyPlus::format("This message is only shown for the first {} occurrences of this issue.", maxErrMessages)); } } @@ -1408,7 +1423,7 @@ void AllocateModuleArrays(EnergyPlusData &state) for (I = 1; I <= NumOfLayers; ++I) { if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF) { SetupOutputVariable(state, - format("Surface Window Total Absorbed Shortwave Radiation Rate Layer {}", I), + EnergyPlus::format("Surface Window Total Absorbed Shortwave Radiation Rate Layer {}", I), Constant::Units::W, state.dataHeatBal->SurfWinQRadSWwinAbsLayer(SurfLoop, I), OutputProcessor::TimeStepType::Zone, @@ -1417,7 +1432,7 @@ void AllocateModuleArrays(EnergyPlusData &state) } if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF || (I == 1)) { SetupOutputVariable(state, - format("Surface Window Front Face Temperature Layer {}", I), + EnergyPlus::format("Surface Window Front Face Temperature Layer {}", I), Constant::Units::C, state.dataHeatBal->SurfWinFenLaySurfTempFront(SurfLoop, I), OutputProcessor::TimeStepType::Zone, @@ -1426,7 +1441,7 @@ void AllocateModuleArrays(EnergyPlusData &state) } if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF || (I == NumOfLayers)) { SetupOutputVariable(state, - format("Surface Window Back Face Temperature Layer {}", I), + EnergyPlus::format("Surface Window Back Face Temperature Layer {}", I), Constant::Units::C, state.dataHeatBal->SurfWinFenLaySurfTempBack(SurfLoop, I), OutputProcessor::TimeStepType::Zone, @@ -2706,8 +2721,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, format("Occurs on surface: {}", s_surf->Surface(SurfNum).Name)); - ShowContinueError(state, format("Current value = {} ... should be within [-1, +1]", CosIncAngBeamOnSurface)); + ShowContinueError(state, EnergyPlus::format("Occurs on surface: {}", s_surf->Surface(SurfNum).Name)); + ShowContinueError(state, EnergyPlus::format("Current value = {} ... should be within [-1, +1]", CosIncAngBeamOnSurface)); ShowFatalError(state, "Anisotropic solar calculation causes fatal error"); } CosIncAngBeamOnSurface = 1.0; @@ -2715,8 +2730,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, format("Occurs on surface: {}", s_surf->Surface(SurfNum).Name)); - ShowContinueError(state, format("Current value = {} ... should be within [-1, +1]", CosIncAngBeamOnSurface)); + ShowContinueError(state, EnergyPlus::format("Occurs on surface: {}", s_surf->Surface(SurfNum).Name)); + ShowContinueError(state, EnergyPlus::format("Current value = {} ... should be within [-1, +1]", CosIncAngBeamOnSurface)); ShowFatalError(state, "Anisotropic solar calculation causes fatal error"); } CosIncAngBeamOnSurface = -1.0; @@ -2814,13 +2829,15 @@ void CHKBKS(EnergyPlusData &state, DOTP = dot(CVec, DVec); if (DOTP > 0.0009) { ShowSevereError(state, "Problem in interior solar distribution calculation (CHKBKS)"); - ShowContinueError(state, format(" Solar Distribution = FullInteriorExterior will not work in Zone={}", s_surf->Surface(NRS).ZoneName)); - ShowContinueError(state, - 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, format(" (Dot Product indicator={:20.4F})", DOTP)); + ShowContinueError( + state, EnergyPlus::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)); ShowContinueError(state, " Check surface geometry; if OK, use Solar Distribution = FullExterior instead. Use Output:Diagnostics, " "DisplayExtraWarnings; for more details."); @@ -3317,8 +3334,9 @@ 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, format("...Enclosure=\"{}\" has no floor, but has approximate horizontal surfaces.", thisEnclosure.Name)); - ShowContinueError(state, format("...these Tilt > 120 degrees, (area=[{:.2R}] m2) will be used.", HorizAreaSum)); + ShowContinueError(state, + EnergyPlus::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)); } // Compute ISABSF @@ -3362,11 +3380,13 @@ 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, format("but Zone or Enclosure =\"{}\" does not appear to have any floor surfaces.", thisEnclosure.Name)); + ShowContinueError( + state, EnergyPlus::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, format("but Zone or Enclosure =\"{}\" floor cannot absorb any solar gains. ", thisEnclosure.Name)); + ShowContinueError(state, + EnergyPlus::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..."); } @@ -3623,7 +3643,7 @@ void HTRANS(EnergyPlusData &state, // 1 - Compute H.C. of vertices & sides if (NS > 2 * state.dataSolarShading->MaxHCS) { - ShowFatalError(state, format("Solar Shading: HTrans: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); + ShowFatalError(state, EnergyPlus::format("Solar Shading: HTrans: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); } state.dataSolarShading->HCNV(NS) = NumVertices; @@ -3686,7 +3706,7 @@ void HTRANS0(EnergyPlusData &state, // Locals if (NS > 2 * state.dataSolarShading->MaxHCS) { - ShowFatalError(state, format("Solar Shading: HTrans0: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); + ShowFatalError(state, EnergyPlus::format("Solar Shading: HTrans0: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); } state.dataSolarShading->HCNV(NS) = NumVertices; @@ -3730,7 +3750,7 @@ void HTRANS1(EnergyPlusData &state, // Using/Aliasing if (NS > 2 * state.dataSolarShading->MaxHCS) { - ShowFatalError(state, format("Solar Shading: HTrans1: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); + ShowFatalError(state, EnergyPlus::format("Solar Shading: HTrans1: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); } state.dataSolarShading->HCNV(NS) = NumVertices; @@ -4752,9 +4772,9 @@ void DeterminePolygonOverlap(EnergyPlusData &state, if (!state.dataSolarShading->TooManyFiguresMessage && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - format("DeterminePolygonOverlap: Too many figures [>{}] detected in an overlap calculation. Use " - "Output:Diagnostics,DisplayExtraWarnings; for more details.", - state.dataSolarShading->MaxHCS)); + EnergyPlus::format("DeterminePolygonOverlap: Too many figures [>{}] detected in an overlap calculation. Use " + "Output:Diagnostics,DisplayExtraWarnings; for more details.", + state.dataSolarShading->MaxHCS)); state.dataSolarShading->TooManyFiguresMessage = true; } @@ -4848,9 +4868,9 @@ void DeterminePolygonOverlap(EnergyPlusData &state, if (!state.dataSolarShading->TooManyVerticesMessage && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - format("DeterminePolygonOverlap: Too many vertices [>{}] detected in an overlap calculation. Use " - "Output:Diagnostics,DisplayExtraWarnings; for more details.", - state.dataSolarShading->MaxHCV)); + EnergyPlus::format("DeterminePolygonOverlap: Too many vertices [>{}] detected in an overlap calculation. Use " + "Output:Diagnostics,DisplayExtraWarnings; for more details.", + state.dataSolarShading->MaxHCV)); state.dataSolarShading->TooManyVerticesMessage = true; } @@ -5634,9 +5654,10 @@ void DetermineShadowingCombinations(EnergyPlusData &state) << " is used as Receiving Surface in calculations and is non-convex.\n"; if (state.dataShadowComb->ShadowComb(HTSnum).NumGenSurf > 0) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, - format("DetermineShadowingCombinations: Surface=\"{}\" is a receiving surface and is non-convex.", - s_surf->Surface(HTSnum).Name)); + ShowWarningError( + state, + EnergyPlus::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 { @@ -5674,9 +5695,9 @@ void DetermineShadowingCombinations(EnergyPlusData &state) for (HTS = 1; HTS <= s_surf->TotSurfaces; ++HTS) { if (CastingSurface(HTS) && !s_surf->Surface(HTS).IsConvex) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowSevereError( - state, - format("DetermineShadowingCombinations: Surface=\"{}\" is a casting surface and is non-convex.", s_surf->Surface(HTS).Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -5685,18 +5706,20 @@ void DetermineShadowingCombinations(EnergyPlusData &state) } if (state.dataErrTracking->TotalReceivingNonConvexSurfaces > 0) { - ShowWarningMessage(state, - format("DetermineShadowingCombinations: There are {} surfaces which are receiving surfaces and are non-convex.", - state.dataErrTracking->TotalReceivingNonConvexSurfaces)); + ShowWarningMessage( + state, + EnergyPlus::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, - format("DetermineShadowingCombinations: There are {} surfaces which are casting surfaces and are non-convex.", - state.dataErrTracking->TotalCastingNonConvexSurfaces)); + ShowSevereMessage( + state, + EnergyPlus::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; @@ -9968,7 +9991,8 @@ void WindowShadingManager(EnergyPlusData &state) } break; default: - ShowWarningError(state, format("Invalid Selection of Window Shading Control Type for Surface {}", s_surf->Surface(ISurf).Name)); + ShowWarningError( + state, EnergyPlus::format("Invalid Selection of Window Shading Control Type for Surface {}", s_surf->Surface(ISurf).Name)); } WinShadingType ShType = s_surf->WindowShadingControl(IShadingCtrl).ShadingType; @@ -10199,8 +10223,9 @@ void WindowShadingManager(EnergyPlusData &state) if (SurfWinShadingFlagEMS != WinShadingType::Invalid) { s_surf->SurfWinShadingFlag(ISurf) = SurfWinShadingFlagEMS; } else { - ShowWarningError(state, - format("Invalid EMS value of Window Shading Control Type for Surface {}", s_surf->Surface(ISurf).Name)); + ShowWarningError( + state, + EnergyPlus::format("Invalid EMS value of Window Shading Control Type for Surface {}", s_surf->Surface(ISurf).Name)); } } } // End of surface loop @@ -10417,9 +10442,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, - format("Airflow schedule has a value outside the range 0.0 to 1.0 for window={}", s_surf->Surface(ISurf).Name)); + ShowFatalError(state, + EnergyPlus::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); } @@ -11651,26 +11676,27 @@ void ReportSurfaceErrors(EnergyPlusData &state) } TotCount += Count; state.dataErrTracking->TotalWarningErrors += Count - 1; - ShowWarningError(state, - format("Base surface does not surround subsurface (CHKSBS), Overlap Status={}", - state.dataSolarShading->cOverLapStatus(state.dataSolarShading->TrackBaseSubSurround(Loop1).MiscIndex))); - ShowContinueError(state, format(" The base surround errors occurred {} times.", Count)); + 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)); 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, - 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)); + 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)); } } SurfErrorReported(state.dataSolarShading->TrackBaseSubSurround(Loop1).SurfIndex1) = true; } if (TotCount > 0) { ShowMessage(state, ""); - ShowContinueError(state, format(" The base surround errors occurred {} times (total).", TotCount)); + ShowContinueError(state, EnergyPlus::format(" The base surround errors occurred {} times (total).", TotCount)); ShowMessage(state, ""); } @@ -11678,7 +11704,7 @@ void ReportSurfaceErrors(EnergyPlusData &state) SurfErrorReported = false; TotCount = 0; if (state.dataSolarShading->NumTooManyVertices > 0) { - ShowMessage(state, format("Too many vertices [>={}] in shadow overlap errors occurring...", state.dataSolarShading->MaxHCV)); + ShowMessage(state, EnergyPlus::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 " @@ -11699,22 +11725,24 @@ void ReportSurfaceErrors(EnergyPlusData &state) TotCount += Count; state.dataErrTracking->TotalWarningErrors += Count - 1; ShowMessage(state, ""); - ShowWarningError(state, format("Too many vertices [>={}] in a shadow overlap", state.dataSolarShading->MaxHCV)); - ShowContinueError(state, - 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, format(" This error occurred {} times.", Count)); + 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)); for (Loop2 = 1; Loop2 <= state.dataSolarShading->NumTooManyVertices; ++Loop2) { if (state.dataSolarShading->TrackTooManyVertices(Loop1).SurfIndex1 == state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex1) { if (SurfErrorReported2(state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex2)) { continue; } - ShowContinueError(state, - 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))); + 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))); SurfErrorReported2(state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex2) = true; } } @@ -11722,14 +11750,14 @@ void ReportSurfaceErrors(EnergyPlusData &state) } if (TotCount > 0) { ShowMessage(state, ""); - ShowContinueError(state, format(" The too many vertices errors occurred {} times (total).", TotCount)); + ShowContinueError(state, EnergyPlus::format(" The too many vertices errors occurred {} times (total).", TotCount)); ShowMessage(state, ""); } SurfErrorReported = false; TotCount = 0; if (state.dataSolarShading->NumTooManyFigures > 0) { - ShowMessage(state, format("Too many figures [>={}] in shadow overlap errors occurring...", state.dataSolarShading->MaxHCS)); + ShowMessage(state, EnergyPlus::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 " @@ -11749,21 +11777,23 @@ void ReportSurfaceErrors(EnergyPlusData &state) TotCount += Count; state.dataErrTracking->TotalWarningErrors += Count - 1; ShowMessage(state, ""); - ShowWarningError(state, format("Too many figures [>={}] in a shadow overlap", state.dataSolarShading->MaxHCS)); - ShowContinueError(state, - 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, format(" This error occurred {} times.", Count)); + 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)); 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)) { continue; } - ShowContinueError(state, - 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))); + 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))); SurfErrorReported2(state.dataSolarShading->TrackTooManyFigures(Loop2).SurfIndex2) = true; } } @@ -11771,7 +11801,7 @@ void ReportSurfaceErrors(EnergyPlusData &state) } if (TotCount > 0) { ShowMessage(state, ""); - ShowContinueError(state, format(" The too many figures errors occurred {} times (total).", TotCount)); + ShowContinueError(state, EnergyPlus::format(" The too many figures errors occurred {} times (total).", TotCount)); ShowMessage(state, ""); } SurfErrorReported.deallocate(); diff --git a/src/EnergyPlus/SplitterComponent.cc b/src/EnergyPlus/SplitterComponent.cc index d66cd807b7c..f499dc2e592 100644 --- a/src/EnergyPlus/SplitterComponent.cc +++ b/src/EnergyPlus/SplitterComponent.cc @@ -107,25 +107,26 @@ namespace SplitterComponent { if (CompIndex == 0) { SplitterNum = Util::FindItemInList(CompName, state.dataSplitterComponent->SplitterCond, &SplitterConditions::SplitterName); if (SplitterNum == 0) { - ShowFatalError(state, format("SimAirLoopSplitter: Splitter not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimAirLoopSplitter: Splitter not found={}", CompName)); } CompIndex = SplitterNum; } else { SplitterNum = CompIndex; if (SplitterNum > state.dataSplitterComponent->NumSplitters || SplitterNum < 1) { ShowFatalError(state, - format("SimAirLoopSplitter: Invalid CompIndex passed={}, Number of Splitters={}, Splitter name={}", - SplitterNum, - state.dataSplitterComponent->NumSplitters, - CompName)); + EnergyPlus::format("SimAirLoopSplitter: Invalid CompIndex passed={}, Number of Splitters={}, Splitter name={}", + SplitterNum, + state.dataSplitterComponent->NumSplitters, + CompName)); } if (state.dataSplitterComponent->CheckEquipName(SplitterNum)) { if (CompName != state.dataSplitterComponent->SplitterCond(SplitterNum).SplitterName) { ShowFatalError(state, - format("SimAirLoopSplitter: Invalid CompIndex passed={}, Splitter name={}, stored Splitter Name for that index={}", - SplitterNum, - CompName, - state.dataSplitterComponent->SplitterCond(SplitterNum).SplitterName)); + EnergyPlus::format( + "SimAirLoopSplitter: Invalid CompIndex passed={}, Splitter name={}, stored Splitter Name for that index={}", + SplitterNum, + CompName, + state.dataSplitterComponent->SplitterCond(SplitterNum).SplitterName)); } state.dataSplitterComponent->CheckEquipName(SplitterNum) = false; } @@ -269,7 +270,7 @@ namespace SplitterComponent { NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (lAlphaBlanks(2 + NodeNum)) { - ShowSevereError(state, format("{} is Blank, {} = {}", cAlphaFields(2 + NodeNum), CurrentModuleObject, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("{} is Blank, {} = {}", cAlphaFields(2 + NodeNum), CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -284,11 +285,11 @@ namespace SplitterComponent { continue; } ShowSevereError(state, - format("{} = {} specifies an outlet node name the same as the inlet node.", - CurrentModuleObject, - state.dataSplitterComponent->SplitterCond(SplitterNum).SplitterName)); - ShowContinueError(state, format("..{}={}", cAlphaFields(2), state.dataLoopNodes->NodeID(NodeNum))); - ShowContinueError(state, format("..Outlet Node #{} is duplicate.", OutNodeNum1)); + EnergyPlus::format("{} = {} specifies an outlet node name the same as the inlet node.", + CurrentModuleObject, + state.dataSplitterComponent->SplitterCond(SplitterNum).SplitterName)); + ShowContinueError(state, EnergyPlus::format("..{}={}", cAlphaFields(2), state.dataLoopNodes->NodeID(NodeNum))); + ShowContinueError(state, EnergyPlus::format("..Outlet Node #{} is duplicate.", OutNodeNum1)); ErrorsFound = true; } for (OutNodeNum1 = 1; OutNodeNum1 <= state.dataSplitterComponent->SplitterCond(SplitterNum).NumOutletNodes; ++OutNodeNum1) { @@ -299,11 +300,11 @@ namespace SplitterComponent { continue; } ShowSevereError(state, - format("{} = {} specifies duplicate outlet nodes in its outlet node list.", - CurrentModuleObject, - state.dataSplitterComponent->SplitterCond(SplitterNum).SplitterName)); - ShowContinueError(state, format("..Outlet Node #{} Name={}", OutNodeNum1, state.dataLoopNodes->NodeID(OutNodeNum1))); - ShowContinueError(state, format("..Outlet Node #{} is duplicate.", OutNodeNum2)); + EnergyPlus::format("{} = {} specifies duplicate outlet nodes in its outlet node list.", + CurrentModuleObject, + state.dataSplitterComponent->SplitterCond(SplitterNum).SplitterName)); + ShowContinueError(state, EnergyPlus::format("..Outlet Node #{} Name={}", OutNodeNum1, state.dataLoopNodes->NodeID(OutNodeNum1))); + ShowContinueError(state, EnergyPlus::format("..Outlet Node #{} is duplicate.", OutNodeNum2)); ErrorsFound = true; } } @@ -317,7 +318,7 @@ namespace SplitterComponent { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input.", RoutineName)); } } @@ -623,7 +624,7 @@ namespace SplitterComponent { } if (WhichSplitter == 0) { - ShowSevereError(state, format("GetSplitterOuletNumber: Could not find Splitter = \"{}\"", SplitterName)); + ShowSevereError(state, EnergyPlus::format("GetSplitterOuletNumber: Could not find Splitter = \"{}\"", SplitterName)); ErrorsFound = true; SplitterOutletNumber = 0; } @@ -677,7 +678,7 @@ namespace SplitterComponent { } if (WhichSplitter == 0) { - ShowSevereError(state, format("GetSplitterNodeNumbers: Could not find Splitter = \"{}\"", SplitterName)); + ShowSevereError(state, EnergyPlus::format("GetSplitterNodeNumbers: Could not find Splitter = \"{}\"", SplitterName)); ErrorsFound = true; } diff --git a/src/EnergyPlus/StandardRatings.cc b/src/EnergyPlus/StandardRatings.cc index f24863d07ab..87b63776017 100644 --- a/src/EnergyPlus/StandardRatings.cc +++ b/src/EnergyPlus/StandardRatings.cc @@ -601,10 +601,10 @@ namespace StandardRatings { General::SolveRoot(state, Acc, IterMax, SolFla, CondenserOutletTemp, f, CondenserOutletTemp0, CondenserOutletTemp1); if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating Reform Chiller IPLV"); - ShowContinueError(state, format("Reformulated Chiller IPLV calculation failed for {}", ChillerName)); + ShowContinueError(state, EnergyPlus::format("Reformulated Chiller IPLV calculation failed for {}", ChillerName)); } else if (SolFla == -2) { ShowWarningError(state, "Bad starting values for calculating Reform Chiller IPLV"); - ShowContinueError(state, format("Reformulated Chiller IPLV calculation failed for {}", ChillerName)); + ShowContinueError(state, EnergyPlus::format("Reformulated Chiller IPLV calculation failed for {}", ChillerName)); } if (RedCapNum == 0) { @@ -674,37 +674,42 @@ namespace StandardRatings { } else { { if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricEIR) { - ShowWarningError( - state, format("Chiller:Electric:EIR = {}: Integrated Part Load Value (IPLV) cannot be calculated.", ChillerName)); + ShowWarningError(state, + EnergyPlus::format("Chiller:Electric:EIR = {}: Integrated Part Load Value (IPLV) cannot be calculated.", + ChillerName)); } else if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricReformEIR) { - ShowWarningError(state, - format("Chiller:Electric:ReformulatedEIR = {}: Integrated Part Load Value (IPLV) cannot be calculated.", - ChillerName)); + ShowWarningError( + state, + EnergyPlus::format("Chiller:Electric:ReformulatedEIR = {}: Integrated Part Load Value (IPLV) cannot be calculated.", + ChillerName)); } } if (RefCap <= 0.0) { ShowContinueError( state, - format(" Check the chiller autosized or user specified capacity. Autosized or specified chiller capacity = {:.2R}", - RefCap)); + EnergyPlus::format( + " Check the chiller autosized or user specified capacity. Autosized or specified chiller capacity = {:.2R}", RefCap)); } if (RefCOP <= 0.0) { - ShowContinueError(state, format(" Check the chiller reference or rated COP specified. Specified COP = {:.2R}", RefCOP)); + ShowContinueError(state, + EnergyPlus::format(" Check the chiller reference or rated COP specified. Specified COP = {:.2R}", RefCOP)); } if (ChillerCapFT <= 0.0) { - ShowContinueError(state, - format(" Check limits in Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}.", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); - ShowContinueError(state, format(" ..ChillerCapFT value at standard test condition = {:.2R}", ChillerCapFT)); + ShowContinueError( + state, + EnergyPlus::format(" Check limits in Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}.", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); + ShowContinueError(state, EnergyPlus::format(" ..ChillerCapFT value at standard test condition = {:.2R}", ChillerCapFT)); } if (ChillerEIRFT <= 0.0) { - ShowContinueError(state, - 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, format(" ..ChillerEIRFT value at standard test condition = {:.2R}", ChillerEIRFT)); + 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, EnergyPlus::format(" ..ChillerEIRFT value at standard test condition = {:.2R}", ChillerEIRFT)); } IPLV = 0.0; break; @@ -854,27 +859,30 @@ namespace StandardRatings { ShowWarningError( state, - format("Chiller:Electric:EIR = {}: Integrated Part Load Value (IPLV) calculated is not at the AHRI test condition.", - ChillerName)); + EnergyPlus::format( + "Chiller:Electric:EIR = {}: Integrated Part Load Value (IPLV) calculated is not at the AHRI test condition.", + ChillerName)); } else if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricReformEIR) { ShowWarningError( state, - format( + EnergyPlus::format( "Chiller:Electric:ReformulatedEIR = {}: Integrated Part Load Value (IPLV) calculated is not at the AHRI test condition.", ChillerName)); } if (CapCurveIPLVLimitsExceeded) { - ShowContinueError(state, - format(" Check limits in Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + ShowContinueError( + state, + EnergyPlus::format(" Check limits in Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (EIRCurveIPLVLimitsExceeded) { - ShowContinueError(state, - 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, + 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))); } } } @@ -2138,59 +2146,62 @@ namespace StandardRatings { if (TotCapTempModFacRated < 0.0 || CapTempModFacH2Test < 0.0 || CapTempModFacH3Test < 0.0 || EIRTempModFacRated < 0.0 || EIRTempModFacH2Test < 0.0 || EIRTempModFacH3Test < 0.0) { if (TotCapTempModFacRated < 0.0) { - ShowSevereError( - state, - format(" Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", - TotCapTempModFacRated, - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + ShowSevereError(state, + EnergyPlus::format( + " Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", + TotCapTempModFacRated, + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); ShowContinueError(state, " ...Net heating capacity at high temperature is set to zero. The curve value must be > 0. Check the curve."); NetHeatingCapRated = 0.0; NetHeatingCapRated_2023 = 0.0; } if (CapTempModFacH3Test < 0.0) { - ShowSevereError( - state, - format(" Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", - CapTempModFacH3Test, - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + ShowSevereError(state, + EnergyPlus::format( + " Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", + CapTempModFacH3Test, + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); ShowContinueError(state, " ...Net heating capacity at low temperature is set to zero. The curve value must be > 0. Check the curve."); NetHeatingCapH3Test = 0.0; NetHeatingCapH3Test_2023 = 0.0; } if (CapTempModFacH2Test < 0.0) { - ShowSevereError( - state, - format(" Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", - CapTempModFacH2Test, - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + ShowSevereError(state, + EnergyPlus::format( + " Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", + CapTempModFacH2Test, + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); ShowContinueError(state, " ...HSPF calculation is incorrect. The curve value must be > 0. Check the curve."); NetHeatingCapH3Test = 0.0; NetHeatingCapH3Test_2023 = 0.0; } // check EIR curve values if (EIRTempModFacRated < 0.0) { - ShowSevereError(state, - format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", + ShowSevereError( + state, + EnergyPlus::format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", EIRTempModFacRated, Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], GetCurveName(state, EIRFTempCurveIndex))); ShowContinueError(state, " ...HSPF calculation is incorrect. The curve value must be > 0. Check the curve."); } if (EIRTempModFacH2Test < 0.0) { - ShowSevereError(state, - format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", + ShowSevereError( + state, + EnergyPlus::format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", EIRTempModFacH2Test, Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], GetCurveName(state, EIRFTempCurveIndex))); ShowContinueError(state, " ...HSPF calculation is incorrect. The curve value must be > 0. Check the curve."); } if (EIRTempModFacH3Test < 0.0) { - ShowSevereError(state, - format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", + ShowSevereError( + state, + EnergyPlus::format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}", EIRTempModFacH3Test, Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], GetCurveName(state, EIRFTempCurveIndex))); @@ -3790,8 +3801,9 @@ namespace StandardRatings { } } else { - ShowSevereError(state, - format("Standard Ratings: {} {} has esither zero rated total cooling capacity or zero rated air volume flow rate. " + ShowSevereError( + state, + EnergyPlus::format("Standard Ratings: {} {} has esither zero rated total cooling capacity or zero rated air volume flow rate. " "Standard ratings cannot be calculated.", DXCoilType, DXCoilName)); @@ -3897,8 +3909,9 @@ namespace StandardRatings { } } } else { - ShowSevereError(state, - format("Standard Ratings: {} {} has zero rated total cooling capacity. Capacity and Power cannot be calculated.", + ShowSevereError( + state, + EnergyPlus::format("Standard Ratings: {} {} has zero rated total cooling capacity. Capacity and Power cannot be calculated.", DXCoilType, DXCoilName)); } @@ -7072,7 +7085,7 @@ namespace StandardRatings { } for (int ClassNum = 1; ClassNum <= 4; ++ClassNum) { int Num = (ClassNum - 1) * 4; - std::string ClassName = format("Class {}", ClassNum); + std::string ClassName = EnergyPlus::format("Class {}", ClassNum); std::string CompNameNew = fmt::format("{}({})", CompName, ClassName); static constexpr std::string_view Format_102( " DX Cooling Coil ASHRAE 127 Standard Ratings Information, {}, {}, {}, {:.1R}, {:.1R}, {:.1R}, " @@ -7276,15 +7289,16 @@ namespace StandardRatings { ShowWarningError( state, - format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", - DXCoilType, - DXCoilName)); + EnergyPlus::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", + DXCoilType, + 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, format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); + ShowContinueError(state, + EnergyPlus::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."); } @@ -7292,22 +7306,25 @@ namespace StandardRatings { // For Standard Rating Cooling Capacity: if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError( - state, - format("{}={}: Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", DXCoilType, DXCoilName)); + ShowContinueError(state, + EnergyPlus::format("{}={}: Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", + DXCoilType, + DXCoilName)); if (CapCurveHighOATLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + EnergyPlus::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))); } } } @@ -7315,36 +7332,41 @@ namespace StandardRatings { // For EER: if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveHighOATLimitsExceeded || EIRCurveFlowLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError( - state, - format("{}={}: Energy Efficiency Ratio (EER) calculated is not at the AHRI test condition.", DXCoilType, DXCoilName)); + ShowContinueError(state, + EnergyPlus::format("{}={}: Energy Efficiency Ratio (EER) calculated is not at the AHRI test condition.", + DXCoilType, + DXCoilName)); if (CapCurveHighOATLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + EnergyPlus::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 (EIRCurveHighOATLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (EIRCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } } } @@ -7353,44 +7375,49 @@ namespace StandardRatings { if (CapCurveMidOATLimitsExceeded || EIRCurveMidOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveFlowLimitsExceeded || PLFfPLRforSEERLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, - format("{}={}: Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.", - DXCoilType, - DXCoilName)); + ShowContinueError( + state, + EnergyPlus::format("{}={}: Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.", + DXCoilType, + DXCoilName)); if (CapCurveMidOATLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + EnergyPlus::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 (EIRCurveMidOATLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (EIRCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (PLFfPLRforSEERLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } } } @@ -7398,37 +7425,41 @@ namespace StandardRatings { // For IEER: if (CapCurveIEERLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveIEERLimitsExceeded || EIRCurveFlowLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, - format("{}={}: Integrated Energy Efficiency Ratio (IEER) calculated is not at the AHRI test condition.", - DXCoilType, - DXCoilName)); + ShowContinueError( + state, + EnergyPlus::format("{}={}: Integrated Energy Efficiency Ratio (IEER) calculated is not at the AHRI test condition.", + DXCoilType, + DXCoilName)); if (CapCurveIEERLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + EnergyPlus::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, - 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, + 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))); } if (EIRCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } } } @@ -7482,34 +7513,38 @@ namespace StandardRatings { if (HeatingCapCurveHSPFLimitsExceeded || HeatingEIRCurveHSPFLimitsExceeded) { ShowWarningError( state, - format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", - DXCoilType, - DXCoilName)); + EnergyPlus::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", + DXCoilType, + 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, format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); + ShowContinueError(state, + EnergyPlus::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, - format("{}={}: Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", DXCoilType, DXCoilName)); + ShowWarningError(state, + EnergyPlus::format("{}={}: Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", + DXCoilType, + DXCoilName)); ShowContinueError(state, " Review the Standard Ratings calculations in the Engineering Reference for this coil type."); if (HeatingCapCurveHSPFLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (HeatingEIRCurveHSPFLimitsExceeded) { - ShowContinueError(state, - 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, + 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))); } } } @@ -7560,15 +7595,16 @@ namespace StandardRatings { ShowWarningError( state, - format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", - DXCoilType, - DXCoilName)); + EnergyPlus::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", + DXCoilType, + 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, format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); + ShowContinueError(state, + EnergyPlus::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."); } @@ -7576,23 +7612,26 @@ namespace StandardRatings { // For Standard Rating Cooling Capacity: if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, - format("{}={}: The Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", - DXCoilType, - DXCoilName)); + ShowContinueError( + state, + EnergyPlus::format("{}={}: The Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", + DXCoilType, + DXCoilName)); if (CapCurveHighOATLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + EnergyPlus::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))); } } } @@ -7601,37 +7640,42 @@ namespace StandardRatings { if (CapCurveLowOATLimitsExceeded || EIRCurveLowOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveFlowLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, - format("{}={}: The Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.", - DXCoilType, - DXCoilName)); + ShowContinueError( + state, + EnergyPlus::format("{}={}: The Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.", + DXCoilType, + DXCoilName)); if (CapCurveLowOATLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + EnergyPlus::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 (EIRCurveLowOATLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (EIRCurveFlowLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } } } @@ -7698,15 +7742,16 @@ namespace StandardRatings { ShowWarningError( state, - format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", - DXCoilType, - DXCoilName)); + EnergyPlus::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", + DXCoilType, + 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, format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); + ShowContinueError(state, + EnergyPlus::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."); } @@ -7714,33 +7759,36 @@ namespace StandardRatings { if (CapCurveOATLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( - state, format("{}={}: The Net Heating Capacity Calculated is not at the AHRI test condition.", DXCoilType, DXCoilName)); + state, + EnergyPlus::format("{}={}: The Net Heating Capacity Calculated is not at the AHRI test condition.", DXCoilType, DXCoilName)); ShowContinueError( state, - 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))); + 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))); } } if (HeatingCapCurveHSPFLimitsExceeded || HeatingEIRCurveHSPFLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, - format("{}={}: The Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", - DXCoilType, - DXCoilName)); + ShowWarningError( + state, + EnergyPlus::format( + "{}={}: The Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", DXCoilType, DXCoilName)); if (HeatingCapCurveHSPFLimitsExceeded) { ShowContinueError( state, - 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))); + 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))); } if (HeatingEIRCurveHSPFLimitsExceeded) { - ShowContinueError(state, - 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, + 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))); } } } diff --git a/src/EnergyPlus/SteamBaseboardRadiator.cc b/src/EnergyPlus/SteamBaseboardRadiator.cc index 4abeb69782b..25b55f49eb5 100644 --- a/src/EnergyPlus/SteamBaseboardRadiator.cc +++ b/src/EnergyPlus/SteamBaseboardRadiator.cc @@ -142,25 +142,26 @@ namespace SteamBaseboardRadiator { if (CompIndex == 0) { BaseboardNum = Util::FindItemInList(EquipName, state.dataSteamBaseboardRadiator->SteamBaseboard, &SteamBaseboardParams::Name); if (BaseboardNum == 0) { - ShowFatalError(state, format("SimSteamBaseboard: Unit not found={}", EquipName)); + ShowFatalError(state, EnergyPlus::format("SimSteamBaseboard: Unit not found={}", EquipName)); } CompIndex = BaseboardNum; } else { BaseboardNum = CompIndex; if (BaseboardNum > state.dataSteamBaseboardRadiator->NumSteamBaseboards || BaseboardNum < 1) { ShowFatalError(state, - format("SimSteamBaseboard: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - BaseboardNum, - state.dataSteamBaseboardRadiator->NumSteamBaseboards, - EquipName)); + EnergyPlus::format("SimSteamBaseboard: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + BaseboardNum, + state.dataSteamBaseboardRadiator->NumSteamBaseboards, + EquipName)); } if (state.dataSteamBaseboardRadiator->CheckEquipName(BaseboardNum)) { if (EquipName != state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name) { - ShowFatalError(state, - format("SimSteamBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - BaseboardNum, - EquipName, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimSteamBaseboard: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + BaseboardNum, + EquipName, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); } state.dataSteamBaseboardRadiator->CheckEquipName(BaseboardNum) = false; } @@ -213,12 +214,12 @@ namespace SteamBaseboardRadiator { state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).plantLoc); } break; default: { - ShowSevereError( - state, - format("SimSteamBaseboard: Errors in Baseboard={}", state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + ShowSevereError(state, + EnergyPlus::format("SimSteamBaseboard: Errors in Baseboard={}", + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ShowContinueError(state, - format("Invalid or unimplemented equipment type={}", - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipType)); + EnergyPlus::format("Invalid or unimplemented equipment type={}", + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).EquipType)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -240,7 +241,7 @@ namespace SteamBaseboardRadiator { ReportSteamBaseboard(state, BaseboardNum); } else { - ShowFatalError(state, format("SimSteamBaseboard: Unit not found={}", EquipName)); + ShowFatalError(state, EnergyPlus::format("SimSteamBaseboard: Unit not found={}", EquipName)); } } @@ -360,43 +361,44 @@ namespace SteamBaseboardRadiator { state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum); if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).DesignScaledHeatingCapacity <= 0.0) { ShowSevereError(state, - format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); + EnergyPlus::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).DesignScaledHeatingCapacity == AutoSize) { ShowSevereError(state, - format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); + EnergyPlus::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); + ShowContinueError(state, + EnergyPlus::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + EnergyPlus::format("Illegal {} = Autosize", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { ShowSevereError(state, - format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); + EnergyPlus::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, - format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + 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))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "FractionOfAutosizedHeatingCapacity")) { @@ -406,38 +408,38 @@ namespace SteamBaseboardRadiator { state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum); if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).DesignScaledHeatingCapacity < 0.0) { ShowSevereError(state, - format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); + EnergyPlus::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { ShowSevereError(state, - format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); + EnergyPlus::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, - format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + 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))); ErrorsFound = true; } } else { ShowSevereError(state, - format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); + EnergyPlus::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); ShowContinueError(state, - format("Illegal {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + EnergyPlus::format("Illegal {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ErrorsFound = true; } @@ -446,11 +448,11 @@ namespace SteamBaseboardRadiator { if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).Offset <= 0.0) { state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).Offset = 0.001; ShowWarningError(state, - format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3))); + EnergyPlus::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,21 +460,21 @@ namespace SteamBaseboardRadiator { state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracRadiant = state.dataIPShortCut->rNumericArgs(4); if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracRadiant < MinFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, format("...reset to minimum value=[{:.3R}].", MinFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, format("...reset to maximum value=[{:.3R}].", MaxFraction)); + EnergyPlus::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,22 +482,22 @@ namespace SteamBaseboardRadiator { state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracDistribPerson = state.dataIPShortCut->rNumericArgs(5); if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracDistribPerson < MinFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(5))); - ShowContinueError(state, format("...reset to minimum value=[{:.3R}].", MinFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(5))); - ShowContinueError(state, format("...reset to maximum value=[{:.3R}].", MaxFraction)); + EnergyPlus::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; } } @@ -596,26 +598,27 @@ namespace SteamBaseboardRadiator { if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ScaledHeatingCapacity < 0.0 && state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ScaledHeatingCapacity != AutoSize) { ShowSevereError(state, - format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + EnergyPlus::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ShowContinueError(state, - format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Illegal {} = {:.7T}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { ShowSevereError(state, - format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + 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))); ShowContinueError(state, - format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError( - state, format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); + EnergyPlus::format("Blank field not allowed for {}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (SteamBaseboardDesignDataObject.HeatingCapMethod == CapacityPerFloorArea) { @@ -632,31 +635,31 @@ namespace SteamBaseboardRadiator { state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamVolFlowRateMax = state.dataIPShortCut->rNumericArgs(3); if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamVolFlowRateMax >= MaxSteamFlowRate) { ShowWarningError(state, - format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3))); - ShowContinueError(state, format("...reset to maximum value=[{:.2R}].", MaxSteamFlowRate)); + EnergyPlus::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, - format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3))); - ShowContinueError(state, format("...reset to minimum value=[{:.2R}].", MinSteamFlowRate)); + EnergyPlus::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, - format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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,12 +676,13 @@ namespace SteamBaseboardRadiator { // END IF if ((state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotSurfToDistrib < MinDistribSurfaces) && (SteamBaseboardDesignDataObject.FracRadiant > MinFraction)) { - ShowSevereError(state, - format("{}{}=\"{}\", the number of surface/radiant fraction groups entered was less than the allowable minimum.", + 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, format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); + ShowContinueError(state, EnergyPlus::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); ErrorsFound = true; state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotSurfToDistrib = 0; } @@ -706,10 +710,10 @@ namespace SteamBaseboardRadiator { } if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ZonePtr <= 0) { ShowSevereError(state, - format("{}{}=\"{}\" is not on any ZoneHVAC:EquipmentList.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + EnergyPlus::format("{}{}=\"{}\" is not on any ZoneHVAC:EquipmentList.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ErrorsFound = true; continue; } @@ -729,22 +733,22 @@ namespace SteamBaseboardRadiator { state.dataIPShortCut->rNumericArgs(SurfNum + 3); if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).FracDistribToSurf(SurfNum) > MaxFraction) { ShowWarningError(state, - format("{}{}=\"{}\", {}was greater than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(SurfNum + 3))); - ShowContinueError(state, format("...reset to maximum value=[{:.1R}].", MaxFraction)); + EnergyPlus::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, - format("{}{}=\"{}\", {}was less than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(SurfNum + 3))); - ShowContinueError(state, format("...reset to maximum value=[{:.1R}].", MinFraction)); + EnergyPlus::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; } if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SurfacePtr(SurfNum) != 0) { @@ -758,26 +762,26 @@ namespace SteamBaseboardRadiator { } // surfaces if (AllFracsSummed > (MaxFraction + 0.01)) { - ShowSevereError( - state, - format("Fraction of radiation distributed to surfaces sums up to greater than 1 for {}", state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("Occurs in Baseboard Heater={}", state.dataIPShortCut->cAlphaArgs(1))); + 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))); 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, - format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, format("{}Steam Properties for {} not found.", RoutineName, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::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."); } @@ -787,9 +791,10 @@ namespace SteamBaseboardRadiator { } if (ErrorsFound) { - ShowFatalError( - state, - format("{}{}Errors found getting input. Program terminates.", RoutineName, state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); + ShowFatalError(state, + EnergyPlus::format("{}{}Errors found getting input. Program terminates.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); } // Setup Report variables for the Coils @@ -935,9 +940,9 @@ namespace SteamBaseboardRadiator { continue; } ShowSevereError(state, - format("InitBaseboard: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(Loop).Name)); + 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)); } } @@ -1194,13 +1199,15 @@ namespace SteamBaseboardRadiator { if ((std::abs(SteamVolFlowRateMaxDes - SteamVolFlowRateMaxUser) / SteamVolFlowRateMaxUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeSteamBaseboard: Potential issue with equipment sizing for " - "ZoneHVAC:Baseboard:RadiantConvective:Steam=\"{}\".", - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); - ShowContinueError(state, - format("User-Specified Maximum Steam Flow Rate of {:.5R} [m3/s]", SteamVolFlowRateMaxUser)); + EnergyPlus::format("SizeSteamBaseboard: Potential issue with equipment sizing for " + "ZoneHVAC:Baseboard:RadiantConvective:Steam=\"{}\".", + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ShowContinueError( - state, format("differs from Design Size Maximum Steam Flow Rate of {:.5R} [m3/s]", SteamVolFlowRateMaxDes)); + state, + EnergyPlus::format("User-Specified Maximum Steam Flow Rate of {:.5R} [m3/s]", SteamVolFlowRateMaxUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Steam Flow Rate of {:.5R} [m3/s]", + SteamVolFlowRateMaxDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1214,8 +1221,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, - format("Occurs in Baseboard Heater={}", state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + ShowContinueError( + state, EnergyPlus::format("Occurs in Baseboard Heater={}", state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ErrorsFound = true; } } @@ -1493,29 +1500,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, format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); + ShowContinueError(state, EnergyPlus::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("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); ShowContinueError(state, - format("Occurs in {} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); - ShowContinueError(state, format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); - ShowContinueError( - state, - format("Assign a larger surface area or more surfaces in {}", state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); + EnergyPlus::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, format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); + ShowContinueError(state, EnergyPlus::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); ShowContinueError(state, - format("Occurs in {} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); - ShowContinueError( - state, - format("Assign a larger surface area or more surfaces in {}", state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); + 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)); ShowFatalError(state, "DistributeBBSteamRadGains: surface not large enough to receive thermal radiation heat flux"); } } @@ -1582,7 +1589,7 @@ namespace SteamBaseboardRadiator { if (CompIndex == 0) { BaseboardNum = Util::FindItemInList(BaseboardName, state.dataSteamBaseboardRadiator->SteamBaseboard, &SteamBaseboardParams::Name); if (BaseboardNum == 0) { - ShowFatalError(state, format("UpdateSteamBaseboardPlantConnection: Specified baseboard not valid ={}", BaseboardName)); + ShowFatalError(state, EnergyPlus::format("UpdateSteamBaseboardPlantConnection: Specified baseboard not valid ={}", BaseboardName)); } CompIndex = BaseboardNum; } else { @@ -1590,27 +1597,30 @@ namespace SteamBaseboardRadiator { if (BaseboardNum > state.dataSteamBaseboardRadiator->NumSteamBaseboards || BaseboardNum < 1) { ShowFatalError( state, - format("UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, Number of baseboards={}, Entered baseboard name={}", - BaseboardNum, - state.dataSteamBaseboardRadiator->NumSteamBaseboards, - BaseboardName)); + EnergyPlus::format( + "UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, Number of baseboards={}, Entered baseboard name={}", + BaseboardNum, + state.dataSteamBaseboardRadiator->NumSteamBaseboards, + BaseboardName)); } if (state.dataGlobal->KickOffSimulation) { if (BaseboardName != state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name) { - ShowFatalError(state, - format("UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard " - "Name for that index={}", - BaseboardNum, - 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)); } if (BaseboardType != DataPlant::PlantEquipmentType::Baseboard_Rad_Conv_Steam) { - ShowFatalError(state, - format("UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard " - "Name for that index={}", - BaseboardNum, - BaseboardName, - PlantEquipTypeNames[static_cast(BaseboardType)])); + ShowFatalError( + state, + EnergyPlus::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 5f8df6c03f7..2e5b865847c 100644 --- a/src/EnergyPlus/SteamCoils.cc +++ b/src/EnergyPlus/SteamCoils.cc @@ -138,26 +138,26 @@ namespace SteamCoils { if (CompIndex == 0) { CoilNum = Util::FindItemInList(CompName, state.dataSteamCoils->SteamCoil); if (CoilNum == 0) { - ShowFatalError(state, format("SimulateSteamCoilComponents: Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimulateSteamCoilComponents: Coil not found={}", CompName)); } CompIndex = CoilNum; } else { CoilNum = CompIndex; if (CoilNum > state.dataSteamCoils->NumSteamCoils || CoilNum < 1) { ShowFatalError(state, - format("SimulateSteamCoilComponents: Invalid CompIndex passed={}, Number of Steam Coils={}, Coil name={}", - CoilNum, - state.dataSteamCoils->NumSteamCoils, - CompName)); + EnergyPlus::format("SimulateSteamCoilComponents: Invalid CompIndex passed={}, Number of Steam Coils={}, Coil name={}", + CoilNum, + state.dataSteamCoils->NumSteamCoils, + CompName)); } if (state.dataSteamCoils->CheckEquipName(CoilNum)) { if (CompName != state.dataSteamCoils->SteamCoil(CoilNum).Name) { - ShowFatalError( - state, - format("SimulateSteamCoilComponents: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CompName, - state.dataSteamCoils->SteamCoil(CoilNum).Name)); + ShowFatalError(state, + EnergyPlus::format( + "SimulateSteamCoilComponents: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CompName, + state.dataSteamCoils->SteamCoil(CoilNum).Name)); } state.dataSteamCoils->CheckEquipName(CoilNum) = false; } @@ -345,22 +345,24 @@ namespace SteamCoils { NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataSteamCoils->SteamCoil(CoilNum).TempSetPointNodeNum == 0) { - ShowSevereError(state, format("{}{} not found for {} = {}", RoutineName, cAlphaFields(8), CurrentModuleObject, AlphArray(1))); + ShowSevereError( + state, EnergyPlus::format("{}{} not found for {} = {}", RoutineName, cAlphaFields(8), CurrentModuleObject, AlphArray(1))); ShowContinueError(state, "..required for Temperature Setpoint Controlled Coils."); ErrorsFound = true; } break; case CoilControlType::ZoneLoadControl: if (!lAlphaBlanks(8)) { - ShowWarningError(state, format("{}ZoneLoad Controlled Coil, so {} not needed", RoutineName, cAlphaFields(8))); - ShowContinueError(state, format("for {} = {}", CurrentModuleObject, AlphArray(1))); + ShowWarningError(state, EnergyPlus::format("{}ZoneLoad Controlled Coil, so {} not needed", RoutineName, cAlphaFields(8))); + ShowContinueError(state, EnergyPlus::format("for {} = {}", CurrentModuleObject, AlphArray(1))); state.dataSteamCoils->SteamCoil(CoilNum).TempSetPointNodeNum = 0; } break; default: ShowSevereError( state, - format("{}Invalid {} [{}] specified for {} = {}", RoutineName, cAlphaFields(7), AlphArray(7), CurrentModuleObject, AlphArray(1))); + EnergyPlus::format( + "{}Invalid {} [{}] specified for {} = {}", RoutineName, cAlphaFields(7), AlphArray(7), CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -369,7 +371,7 @@ namespace SteamCoils { state.dataSteamCoils->SteamCoil(CoilNum).steam = Fluid::GetSteam(state); if (state.dataSteamCoils->SteamCoil(CoilNum).steam == nullptr && CoilNum == 1) { - ShowSevereError(state, format("{}Steam Properties for {} not found.", RoutineName, AlphArray(1))); + ShowSevereError(state, EnergyPlus::format("{}Steam Properties for {} not found.", RoutineName, AlphArray(1))); ShowContinueError(state, "Steam Fluid Properties should have been included in the input file."); ErrorsFound = true; } @@ -427,7 +429,7 @@ namespace SteamCoils { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input.", RoutineName)); } AlphArray.deallocate(); @@ -808,8 +810,9 @@ namespace SteamCoils { // PlantSizData(PltSizSteamNum)%DeltaT*CPHW(PlantSizData(PltSizSteamNum)%ExitTemp))) } else { state.dataSteamCoils->SteamCoil(CoilNum).MaxSteamVolFlowRate = 0.0; - ShowWarningError( - state, format("The design coil load is zero for COIL:Heating:Steam {}", state.dataSteamCoils->SteamCoil(CoilNum).Name)); + ShowWarningError(state, + EnergyPlus::format("The design coil load is zero for COIL:Heating:Steam {}", + state.dataSteamCoils->SteamCoil(CoilNum).Name)); } BaseSizer::reportSizerOutput(state, "Coil:Heating:Steam", @@ -877,8 +880,9 @@ namespace SteamCoils { } // issue warning if hw coil has zero flow if (state.dataSteamCoils->SteamCoil(CoilNum).MaxSteamVolFlowRate == 0.0) { - ShowWarningError( - state, format("The design coil load is zero for COIL:Heating:Steam {}", state.dataSteamCoils->SteamCoil(CoilNum).Name)); + ShowWarningError(state, + EnergyPlus::format("The design coil load is zero for COIL:Heating:Steam {}", + state.dataSteamCoils->SteamCoil(CoilNum).Name)); ShowContinueError(state, "The autosize value for max Steam flow rate is zero"); } BaseSizer::reportSizerOutput(state, @@ -893,7 +897,7 @@ namespace SteamCoils { // if there is no heating Plant Sizing object and autosizng was requested, issue an error message if (state.dataSteamCoils->SteamCoil(CoilNum).MaxSteamVolFlowRate == AutoSize) { ShowSevereError(state, "Autosizing of Steam coil requires a heating loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in Steam coil object= {}", state.dataSteamCoils->SteamCoil(CoilNum).Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Steam coil object= {}", state.dataSteamCoils->SteamCoil(CoilNum).Name)); ErrorsFound = true; } } // end of heating Plant Sizing existence IF - ELSE @@ -1512,7 +1516,7 @@ namespace SteamCoils { } if (IndexNum == 0) { - ShowSevereError(state, format(R"(GetSteamCoilIndex: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(GetSteamCoilIndex: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; } @@ -1529,7 +1533,8 @@ namespace SteamCoils { int indexNum = Util::FindItemInList(coilName, state.dataSteamCoils->SteamCoil); if (indexNum == 0) { // may not find coil name - ShowSevereError(state, format("GetSteamCoilIndex: Could not find CoilType = Coil:Heating:Steam with Name = \"{}\"", coilName)); + ShowSevereError(state, + EnergyPlus::format("GetSteamCoilIndex: Could not find CoilType = Coil:Heating:Steam with Name = \"{}\"", coilName)); } return indexNum; @@ -1561,7 +1566,7 @@ namespace SteamCoils { if (CompIndex == 0) { CoilNum = Util::FindItemInList(CompName, state.dataSteamCoils->SteamCoil); if (CoilNum == 0) { - ShowFatalError(state, format("CheckSteamCoilSchedule: Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("CheckSteamCoilSchedule: Coil not found={}", CompName)); } CompIndex = CoilNum; Value = state.dataSteamCoils->SteamCoil(CoilNum).availSched->getCurrentVal(); // not scheduled? @@ -1569,17 +1574,18 @@ namespace SteamCoils { CoilNum = CompIndex; if (CoilNum > state.dataSteamCoils->NumSteamCoils || CoilNum < 1) { ShowFatalError(state, - format("SimulateSteamCoilComponents: Invalid CompIndex passed={}, Number of Steam Coils={}, Coil name={}", - CoilNum, - state.dataSteamCoils->NumSteamCoils, - CompName)); + EnergyPlus::format("SimulateSteamCoilComponents: Invalid CompIndex passed={}, Number of Steam Coils={}, Coil name={}", + CoilNum, + state.dataSteamCoils->NumSteamCoils, + CompName)); } if (CompName != state.dataSteamCoils->SteamCoil(CoilNum).Name) { - ShowFatalError(state, - format("SimulateSteamCoilComponents: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CompName, - state.dataSteamCoils->SteamCoil(CoilNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimulateSteamCoilComponents: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CompName, + state.dataSteamCoils->SteamCoil(CoilNum).Name)); } Value = state.dataSteamCoils->SteamCoil(CoilNum).availSched->getCurrentVal(); // not scheduled? } @@ -1627,7 +1633,8 @@ namespace SteamCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilMaxWaterFlowRate: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxWaterFlowRate = -1000.0; } @@ -1700,7 +1707,8 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, format("GetCoilAirInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilAirInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1747,7 +1755,8 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, format("GetCoilAirOutletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilAirOutletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1830,7 +1839,8 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1877,7 +1887,8 @@ namespace SteamCoils { } if (IndexNum == 0) { - ShowSevereError(state, format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1915,7 +1926,8 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1962,7 +1974,8 @@ namespace SteamCoils { } if (IndexNum == 0) { - ShowSevereError(state, format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -2013,7 +2026,7 @@ namespace SteamCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilSteamInletNode: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; Capacity = 0.0; } @@ -2046,7 +2059,8 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; return CoilControlType::Invalid; } @@ -2095,7 +2109,8 @@ namespace SteamCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetSteamCoilControlNodeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetSteamCoilControlNodeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorFlag = true; NodeNumber = 0; } @@ -2146,7 +2161,7 @@ namespace SteamCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; AvailSchIndex = 0; } @@ -2178,9 +2193,9 @@ namespace SteamCoils { if (CoilNum <= 0 || CoilNum > state.dataSteamCoils->NumSteamCoils) { ShowSevereError(state, - format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", - CoilNum, - state.dataSteamCoils->NumSteamCoils)); + EnergyPlus::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 34761aff7cc..32203af4f15 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -514,25 +514,27 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->ErrCount == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - format("{}Entered Ceiling Height for some zone(s) significantly different from calculated Ceiling Height", - RoutineName)); + EnergyPlus::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, - format("{}Entered Ceiling Height for Zone=\"{}\" significantly different from calculated Ceiling Height", - RoutineName, - thisZone.Name)); + ShowWarningError( + state, + EnergyPlus::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 = format(ValFmt, thisZone.CeilingHeight); - std::string String2 = format(ValFmt, AverageHeight); + std::string String1 = EnergyPlus::format(ValFmt, thisZone.CeilingHeight); + std::string String2 = EnergyPlus::format(ValFmt, AverageHeight); ShowContinueError( state, - format("{}Entered Ceiling Height={}, Calculated Ceiling Height={}, entered height will be used in calculations.", - RoutineName, - String1, - String2)); + EnergyPlus::format( + "{}Entered Ceiling Height={}, Calculated Ceiling Height={}, entered height will be used in calculations.", + RoutineName, + String1, + String2)); } } } @@ -595,8 +597,9 @@ namespace SurfaceGeometry { thisZone.Centroid.z /= TotSurfArea; } if (internalMassSurfacesPresent && !nonInternalMassSurfacesPresent) { - ShowSevereError( - state, format("{}Zone=\"{}\" has only internal mass surfaces. Need at least one other surface.", RoutineName, thisZone.Name)); + ShowSevereError(state, + EnergyPlus::format( + "{}Zone=\"{}\" has only internal mass surfaces. Need at least one other surface.", RoutineName, thisZone.Name)); ErrorsFound = true; } } @@ -1067,8 +1070,9 @@ namespace SurfaceGeometry { if (RelWarning && !state.dataSurfaceGeometry->WarningDisplayed) { ShowWarningError( state, - format("{}World Coordinate System selected. Any non-zero Building/Zone North Axes or non-zero Zone Origins are ignored.", - RoutineName)); + EnergyPlus::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; @@ -1088,8 +1092,9 @@ namespace SurfaceGeometry { if (RelWarning && !state.dataSurfaceGeometry->WarningDisplayed) { ShowWarningError( state, - format("{}World Coordinate System selected. Any non-zero Building/Zone North Axes or non-zero Zone Origins are ignored.", - RoutineName)); + EnergyPlus::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; @@ -1208,7 +1213,7 @@ namespace SurfaceGeometry { state.dataSurface->TotSurfaces = NumSurfs + AddedSubSurfaces + NeedToAddSurfaces + NeedToAddSubSurfaces; if (ErrorsFound) { - ShowFatalError(state, format("{}Errors discovered, program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors discovered, program terminates.", RoutineName)); } state.dataSurface->Surface.allocate(state.dataSurface->TotSurfaces); // Allocate the Surface derived type appropriately @@ -1352,8 +1357,9 @@ namespace SurfaceGeometry { // Debug write(outputfiledebug,*) ' subsurf, extboundcondname=',TRIM(SurfaceTmp(CurNewSurf)%ExtBoundCondName) // Debug write(outputfiledebug,*) ' subsurf, basesurf=',TRIM('iz-'//SurfaceTmp(SurfNum)%BaseSurfName) } else { - ShowSevereError(state, - format("{}Adding unentered subsurface, could not find base surface=iz-{}", RoutineName, surfTemp.BaseSurfName)); + ShowSevereError( + state, + EnergyPlus::format("{}Adding unentered subsurface, could not find base surface=iz-{}", RoutineName, surfTemp.BaseSurfName)); SurfError = true; } } @@ -1383,13 +1389,13 @@ namespace SurfaceGeometry { } if (surfTemp.Class < SurfaceClass::Window || surfTemp.Class > SurfaceClass::TDD_Diffuser) { if (surfTemp.Class == SurfaceClass::None) { - ShowSevereError(state, format("{}Invalid SubSurface detected, Surface={}", RoutineName, surfTemp.Name)); + ShowSevereError(state, EnergyPlus::format("{}Invalid SubSurface detected, Surface={}", RoutineName, surfTemp.Name)); } else { ShowSevereError(state, - format("{}Invalid SubSurface detected, Surface={}, class={} invalid class for subsurface", - RoutineName, - surfTemp.Name, - state.dataSurfaceGeometry->BaseSurfCls(int(surfTemp.Class)))); + EnergyPlus::format("{}Invalid SubSurface detected, Surface={}, class={} invalid class for subsurface", + RoutineName, + surfTemp.Name, + state.dataSurfaceGeometry->BaseSurfCls(int(surfTemp.Class)))); SurfError = true; } } @@ -1683,19 +1689,22 @@ namespace SurfaceGeometry { if (MovedSurfs != state.dataSurface->TotSurfaces) { ShowSevereError( state, - format("{}Reordered # of Surfaces ({}) not = Total # of Surfaces ({})", RoutineName, MovedSurfs, state.dataSurface->TotSurfaces)); + EnergyPlus::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, - format("{}Error in Surface= \"{} indicated Zone=\"{}\"", - RoutineName, - state.dataSurfaceGeometry->SurfaceTmp(Loop).Name, - state.dataSurfaceGeometry->SurfaceTmp(Loop).ZoneName)); + EnergyPlus::format("{}Error in Surface= \"{} indicated Zone=\"{}\"", + RoutineName, + state.dataSurfaceGeometry->SurfaceTmp(Loop).Name, + state.dataSurfaceGeometry->SurfaceTmp(Loop).ZoneName)); } } ShowWarningError( - state, format("{}Remaining surface checks will use \"reordered number of surfaces\", not number of original surfaces", RoutineName)); + state, + EnergyPlus::format("{}Remaining surface checks will use \"reordered number of surfaces\", not number of original surfaces", + RoutineName)); } // Realign the relationship: surface to base surface @@ -1706,13 +1715,13 @@ namespace SurfaceGeometry { movedSurf.BaseSurf = newBaseSurfNum; if (newBaseSurfNum < 1) { - ShowFatalError( - state, - 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, + 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)); } } auto &reportOrderNum = state.dataSurface->AllSurfaceListReportOrder[SurfNum - 1]; @@ -1786,16 +1795,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, format("{}Potential \"OtherZoneSurface\" is not matched correctly:", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{}Potential \"OtherZoneSurface\" is not matched correctly:", RoutineName)); ShowContinueError(state, - format("Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + EnergyPlus::format("Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - format("Nonmatched Other/InterZone Surface={}, Zone={}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + EnergyPlus::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 @@ -1804,23 +1813,25 @@ namespace SurfaceGeometry { if (state.dataSurface->Surface(SurfNum).spaceNum == state.dataSurface->Surface(Found).spaceNum) { ++state.dataSurfaceGeometry->ErrCount2; if (state.dataSurfaceGeometry->ErrCount2 == 1 && !state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, - format("{}CAUTION -- Interspace surfaces are occurring in the same space(s).", RoutineName)); + ShowWarningError( + state, + EnergyPlus::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, format("{}CAUTION -- Interspace surfaces are usually in different spaces", RoutineName)); + ShowWarningError( + state, EnergyPlus::format("{}CAUTION -- Interspace surfaces are usually in different spaces", RoutineName)); ShowContinueError(state, - format("Surface={}, Space={}, Zone={}", - state.dataSurface->Surface(SurfNum).Name, - state.dataHeatBal->space(state.dataSurface->Surface(SurfNum).spaceNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + EnergyPlus::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, - format("Surface={}, Space={}, Zone={}", - state.dataSurface->Surface(Found).Name, - state.dataHeatBal->space(state.dataSurface->Surface(Found).spaceNum).Name, - state.dataSurface->Surface(Found).ZoneName)); + EnergyPlus::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; @@ -1841,8 +1852,9 @@ namespace SurfaceGeometry { if (TotLay != TotLayFound) { // Different number of layers // match on like Uvalues (nominal) if (std::abs(state.dataHeatBal->NominalU(ConstrNum) - state.dataHeatBal->NominalU(ConstrNumFound)) > 0.001) { - ShowSevereError(state, - format("{}Construction {} of interzone surface {} does not have the same number of layers as the " + 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, @@ -1864,8 +1876,9 @@ namespace SurfaceGeometry { CheckForReversedLayers(state, izConstDiff, ConstrNum, ConstrNumFound, TotLay); if (izConstDiff && std::abs(state.dataHeatBal->NominalU(ConstrNum) - state.dataHeatBal->NominalU(ConstrNumFound)) > 0.001) { - ShowSevereError(state, - format("{}Construction {} of interzone surface {} does not have the same materials in the " + 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, @@ -1883,21 +1896,23 @@ namespace SurfaceGeometry { } SurfError = true; } else if (izConstDiff) { - ShowWarningError(state, - 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, + 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)); ShowContinueError(state, "or the properties of the reversed layers are not correct due to differing layer front and " "back side values"); ShowContinueError( state, - format("...but Nominal U values are similar, diff=[{:.4R}] ... simulation proceeds.", - std::abs(state.dataHeatBal->NominalU(ConstrNum) - state.dataHeatBal->NominalU(ConstrNumFound)))); + EnergyPlus::format( + "...but Nominal U values are similar, diff=[{:.4R}] ... simulation proceeds.", + std::abs(state.dataHeatBal->NominalU(ConstrNum) - state.dataHeatBal->NominalU(ConstrNumFound)))); if (!izConstDiffMsg) { ShowContinueError(state, "...if the two zones are expected to have significantly different temperatures, the proper " @@ -1926,44 +1941,48 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->ErrCount4 == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - format("{}InterZone Surface Areas do not match as expected and might not satisfy conservation of energy:", - RoutineName)); + EnergyPlus::format( + "{}InterZone Surface Areas do not match as expected and might not satisfy conservation of energy:", + RoutineName)); ShowContinueError( state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual mismatches."); } if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - format("{}InterZone Surface Areas do not match as expected and might not satisfy conservation of energy:", - RoutineName)); + EnergyPlus::format( + "{}InterZone Surface Areas do not match as expected and might not satisfy conservation of energy:", + RoutineName)); if (MultFound == 1 && MultSurfNum == 1) { ShowContinueError(state, - format(" Area={:.1T} in Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Area, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + EnergyPlus::format(" Area={:.1T} in Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Area, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - format(" Area={:.1T} in Surface={}, Zone={}", - state.dataSurface->Surface(Found).Area, - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + EnergyPlus::format(" Area={:.1T} in Surface={}, Zone={}", + state.dataSurface->Surface(Found).Area, + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); } else { // Show multiplier info - ShowContinueError(state, - 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, - 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, + 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)); } } } @@ -1971,17 +1990,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, format("{}InterZone Surface Tilts do not match as expected.", RoutineName)); + ShowWarningError(state, EnergyPlus::format("{}InterZone Surface Tilts do not match as expected.", RoutineName)); ShowContinueError(state, - format(" Tilt={:.1T} in Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Tilt, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + EnergyPlus::format(" Tilt={:.1T} in Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Tilt, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - format(" Tilt={:.1T} in Surface={}, Zone={}", - state.dataSurface->Surface(Found).Tilt, - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + EnergyPlus::format(" Tilt={:.1T} in Surface={}, Zone={}", + state.dataSurface->Surface(Found).Tilt, + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); } // check surface class match. interzone surface. @@ -1989,30 +2008,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, format("{}InterZone Surface Classes do not match as expected.", RoutineName)); + ShowWarningError(state, EnergyPlus::format("{}InterZone Surface Classes do not match as expected.", RoutineName)); ShowContinueError(state, - format("Surface=\"{}\", surface class={}", - state.dataSurface->Surface(SurfNum).Name, - cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); + EnergyPlus::format("Surface=\"{}\", surface class={}", + state.dataSurface->Surface(SurfNum).Name, + cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); ShowContinueError(state, - format("Adjacent Surface=\"{}\", surface class={}", - state.dataSurface->Surface(Found).Name, - cSurfaceClass(state.dataSurface->Surface(Found).Class))); + EnergyPlus::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, format("{}InterZone Surface Classes do not match as expected.", RoutineName)); + ShowWarningError(state, EnergyPlus::format("{}InterZone Surface Classes do not match as expected.", RoutineName)); ShowContinueError(state, - format("Surface=\"{}\", surface class={}", - state.dataSurface->Surface(SurfNum).Name, - cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); + EnergyPlus::format("Surface=\"{}\", surface class={}", + state.dataSurface->Surface(SurfNum).Name, + cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); ShowContinueError(state, - format("Adjacent Surface=\"{}\", surface class={}", - state.dataSurface->Surface(Found).Name, - cSurfaceClass(state.dataSurface->Surface(Found).Class))); + EnergyPlus::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 && @@ -2032,54 +2051,56 @@ 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, format("{}InterZone Surface Azimuths do not match as expected.", RoutineName)); + ShowWarningError(state, + EnergyPlus::format("{}InterZone Surface Azimuths do not match as expected.", RoutineName)); ShowContinueError(state, - 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)); + 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)); ShowContinueError(state, - 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)); - ShowContinueError( - state, - format("..surface class of first surface={}", cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); - ShowContinueError( - state, - format("..surface class of second surface={}", cSurfaceClass(state.dataSurface->Surface(Found).Class))); + 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)); + ShowContinueError(state, + EnergyPlus::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))); } } } // Make sure exposures (Sun, Wind) are the same.....and are "not" if (state.dataSurface->Surface(SurfNum).ExtSolar || state.dataSurface->Surface(Found).ExtSolar) { - ShowWarningError(state, format("{}Interzone surfaces cannot be \"SunExposed\" -- removing SunExposed", RoutineName)); + ShowWarningError( + state, EnergyPlus::format("{}Interzone surfaces cannot be \"SunExposed\" -- removing SunExposed", RoutineName)); ShowContinueError(state, - format(" Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + EnergyPlus::format(" Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - format(" Surface={}, Zone={}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + EnergyPlus::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, - format("{}Interzone surfaces cannot be \"WindExposed\" -- removing WindExposed", RoutineName)); + ShowWarningError( + state, EnergyPlus::format("{}Interzone surfaces cannot be \"WindExposed\" -- removing WindExposed", RoutineName)); ShowContinueError(state, - format(" Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + EnergyPlus::format(" Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - format(" Surface={}, Zone={}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + EnergyPlus::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; } @@ -2095,12 +2116,13 @@ namespace SurfaceGeometry { state.dataSurface->Surface(SurfNum).BaseSurf) { // base surface is not interzone surface ShowSevereError(state, - format("{}SubSurface=\"{}\" is an interzone subsurface.", - RoutineName, - state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError(state, - format("..but the Base Surface is not an interzone surface, Surface=\"{}\".", - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); + 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)); SurfError = true; } } @@ -2109,10 +2131,10 @@ namespace SurfaceGeometry { // Seems unlikely that an internal surface would be missing itself, so this message // only indicates for adjacent (interzone) surfaces. ShowSevereError(state, - format("{}Adjacent Surface not found: {} adjacent to surface {}", - RoutineName, - state.dataSurface->Surface(SurfNum).ExtBoundCondName, - state.dataSurface->Surface(SurfNum).Name)); + EnergyPlus::format("{}Adjacent Surface not found: {} adjacent to surface {}", + RoutineName, + state.dataSurface->Surface(SurfNum).ExtBoundCondName, + state.dataSurface->Surface(SurfNum).Name)); NonMatch = true; SurfError = true; } @@ -2120,24 +2142,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, format("{}SubSurface on Interzone Surface must be an Interzone SubSurface.", RoutineName)); - ShowContinueError(state, - format("...OutsideFaceEnvironment is blank, in Surface={}", state.dataSurface->Surface(SurfNum).Name)); + 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)); SurfError = true; } else { ++state.dataSurfaceGeometry->ErrCount3; if (state.dataSurfaceGeometry->ErrCount3 == 1 && !state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, format("{}Blank name for Outside Boundary Condition Objects.", RoutineName)); + ShowWarningError(state, EnergyPlus::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, - format("{}Blank name for Outside Boundary Condition Object, in surface={}", - RoutineName, - state.dataSurface->Surface(SurfNum).Name)); + EnergyPlus::format("{}Blank name for Outside Boundary Condition Object, in surface={}", + RoutineName, + state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, - format("Resetting this surface to be an internal zone surface, zone={}", - state.dataSurface->Surface(SurfNum).ZoneName)); + EnergyPlus::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; @@ -2145,17 +2167,17 @@ namespace SurfaceGeometry { } else { ++state.dataSurfaceGeometry->ErrCount3; if (state.dataSurfaceGeometry->ErrCount3 == 1 && !state.dataGlobal->DisplayExtraWarnings) { - ShowSevereError(state, format("{}Blank name for Outside Boundary Condition Objects.", RoutineName)); + ShowSevereError(state, EnergyPlus::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, - format("{}Blank name for Outside Boundary Condition Object, in surface={}", - RoutineName, - state.dataSurface->Surface(SurfNum).Name)); + EnergyPlus::format("{}Blank name for Outside Boundary Condition Object, in surface={}", + RoutineName, + state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, - format("Resetting this surface to be an internal zone (adiabatic) surface, zone={}", - state.dataSurface->Surface(SurfNum).ZoneName)); + EnergyPlus::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; @@ -2165,7 +2187,7 @@ namespace SurfaceGeometry { } // ...end of the Surface DO loop for finding BaseSurf if (NonMatch) { - ShowSevereError(state, format("{}Non matching interzone surfaces found", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{}Non matching interzone surfaces found", RoutineName)); } //********************************************************************************** @@ -2185,37 +2207,41 @@ namespace SurfaceGeometry { if (state.dataSurface->Surface(SurfNum).ExtBoundCond == SurfNum) { ShowSevereError( state, - format("{}Subsurface=\"{}\" exterior condition [adiabatic surface] in a base surface=\"{}\" with exterior condition [{}]", - RoutineName, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name, - DataSurfaces::cExtBoundCondition( - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond))); + EnergyPlus::format( + "{}Subsurface=\"{}\" exterior condition [adiabatic surface] in a base surface=\"{}\" with exterior condition [{}]", + RoutineName, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name, + DataSurfaces::cExtBoundCondition( + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond))); SurfError = true; } else if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) { ShowSevereError( state, - format("{}Subsurface=\"{}\" exterior condition [interzone surface] in a base surface=\"{}\" with exterior condition [{}]", - RoutineName, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name, - DataSurfaces::cExtBoundCondition( - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond))); + EnergyPlus::format( + "{}Subsurface=\"{}\" exterior condition [interzone surface] in a base surface=\"{}\" with exterior condition [{}]", + RoutineName, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name, + DataSurfaces::cExtBoundCondition( + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond))); SurfError = true; } else if (state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond == DataSurfaces::OtherSideCondModeledExt) { - ShowWarningError(state, - 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))); + 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))); ShowContinueError(state, "...SubSurface will not use the exterior condition model of the base surface."); } else { - ShowSevereError(state, - format("{}Subsurface=\"{}\" exterior condition [{}] in a base surface=\"{}\" with exterior condition [{}]", + 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), @@ -2234,8 +2260,9 @@ namespace SurfaceGeometry { // adiabatic surface. make sure subsurfaces match if (state.dataSurface->Surface(SurfNum).ExtBoundCond != SurfNum) { // not adiabatic surface if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) { - ShowSevereError(state, - format("{}Subsurface=\"{}\" exterior condition [interzone surface] in a base surface=\"{}\" with exterior " + ShowSevereError( + state, + EnergyPlus::format("{}Subsurface=\"{}\" exterior condition [interzone surface] in a base surface=\"{}\" with exterior " "condition [adiabatic surface]", RoutineName, state.dataSurface->Surface(SurfNum).Name, @@ -2243,11 +2270,12 @@ namespace SurfaceGeometry { } else { ShowSevereError( state, - format("{}Subsurface=\"{}\" exterior condition [{}] in a base surface=\"{}\" with exterior condition [adiabatic surface]", - RoutineName, - state.dataSurface->Surface(SurfNum).Name, - DataSurfaces::cExtBoundCondition(state.dataSurface->Surface(SurfNum).ExtBoundCond), - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); + EnergyPlus::format( + "{}Subsurface=\"{}\" exterior condition [{}] in a base surface=\"{}\" with exterior condition [adiabatic surface]", + RoutineName, + state.dataSurface->Surface(SurfNum).Name, + DataSurfaces::cExtBoundCondition(state.dataSurface->Surface(SurfNum).ExtBoundCond), + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); } if (!SubSurfaceSevereDisplayed) { ShowContinueError(state, "...calculations for heat balance would be compromised."); @@ -2258,10 +2286,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, - 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)); + 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)); if (!SubSurfaceSevereDisplayed) { ShowContinueError(state, "...calculations for heat balance would be compromised."); SubSurfaceSevereDisplayed = true; @@ -2304,25 +2332,27 @@ namespace SurfaceGeometry { if (ErrCount == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - format("{}Entered Space Floor Area(s) differ more than {:.0R}% from calculated Space Floor Area(s).", - std::string(RoutineName), - floorAreaPercentTolerance)); + EnergyPlus::format( + "{}Entered Space Floor Area(s) differ more than {:.0R}% from calculated Space Floor Area(s).", + std::string(RoutineName), + floorAreaPercentTolerance)); ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual Spaces."); } if (state.dataGlobal->DisplayExtraWarnings) { // Warn user of using specified Space Floor Area - ShowWarningError( + ShowWarningError(state, + EnergyPlus::format( + "{}Entered Floor Area for Space=\"{}\" is {:.1R}% different from the calculated Floor Area.", + std::string(RoutineName), + thisSpace.Name, + diffp * 100.0)); + ShowContinueError( state, - format("{}Entered Floor Area for Space=\"{}\" is {:.1R}% different from the calculated Floor Area.", - std::string(RoutineName), - thisSpace.Name, - diffp * 100.0)); - ShowContinueError(state, - format("Entered Space Floor Area={:.2R}, Calculated Space Floor Area={:.2R}, entered " - "Floor Area will be used.", - thisSpace.userEnteredFloorArea, - calcFloorArea)); + EnergyPlus::format("Entered Space Floor Area={:.2R}, Calculated Space Floor Area={:.2R}, entered " + "Floor Area will be used.", + thisSpace.userEnteredFloorArea, + calcFloorArea)); } } } @@ -2352,24 +2382,26 @@ namespace SurfaceGeometry { if (ErrCount == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - format("{}Entered Zone Floor Area(s) differ more than {:.0R}% from the sum of the Space Floor Area(s).", - std::string(RoutineName), - floorAreaPercentTolerance)); + EnergyPlus::format( + "{}Entered Zone Floor Area(s) differ more than {:.0R}% from the sum of the Space Floor Area(s).", + std::string(RoutineName), + floorAreaPercentTolerance)); ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual zones."); } if (state.dataGlobal->DisplayExtraWarnings) { // Warn user of using specified Zone Floor Area - ShowWarningError(state, - format("{}Entered Floor Area for Zone=\"{}\" is {:.1R}% different from the sum of the " - "Space Floor Area(s).", - std::string(RoutineName), - thisZone.Name, - diffp * 100.0)); + ShowWarningError( + state, + EnergyPlus::format("{}Entered Floor Area for Zone=\"{}\" is {:.1R}% different from the sum of the " + "Space Floor Area(s).", + std::string(RoutineName), + thisZone.Name, + diffp * 100.0)); ShowContinueError(state, - format("Entered Zone Floor Area={:.2R}, Sum of Space Floor Area(s)={:.2R}", - thisZone.UserEnteredFloorArea, - zoneCalcFloorArea)); + EnergyPlus::format("Entered Zone Floor Area={:.2R}, Sum of Space Floor Area(s)={:.2R}", + thisZone.UserEnteredFloorArea, + zoneCalcFloorArea)); ShowContinueError( state, "Entered Zone Floor Area will be used and Space Floor Area(s) will be adjusted proportionately."); } @@ -2394,9 +2426,10 @@ namespace SurfaceGeometry { // Warn if calculated floor area was zero and there is more than one Space ShowWarningError( state, - format("{}Entered Floor Area entered for Zone=\"{}\" significantly different from sum of Space Floor Areas", - RoutineName, - thisZone.Name)); + EnergyPlus::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."); @@ -2425,18 +2458,18 @@ namespace SurfaceGeometry { for (int SurfNum = 1; SurfNum <= MovedSurfs; ++SurfNum) { // TotSurfaces if (state.dataSurface->Surface(SurfNum).Area < 1.e-06) { ShowSevereError(state, - format("{}Zero or negative surface area[{:.5R}], Surface={}", - RoutineName, - state.dataSurface->Surface(SurfNum).Area, - state.dataSurface->Surface(SurfNum).Name)); + EnergyPlus::format("{}Zero or negative surface area[{:.5R}], Surface={}", + RoutineName, + state.dataSurface->Surface(SurfNum).Area, + state.dataSurface->Surface(SurfNum).Name)); SurfError = true; } if (state.dataSurface->Surface(SurfNum).Area >= 1.e-06 && state.dataSurface->Surface(SurfNum).Area < 0.001) { ShowWarningError(state, - format("{}Very small surface area[{:.5R}], Surface={}", - RoutineName, - state.dataSurface->Surface(SurfNum).Area, - state.dataSurface->Surface(SurfNum).Name)); + EnergyPlus::format("{}Very small surface area[{:.5R}], Surface={}", + RoutineName, + state.dataSurface->Surface(SurfNum).Area, + state.dataSurface->Surface(SurfNum).Name)); } } @@ -2500,7 +2533,7 @@ namespace SurfaceGeometry { if (errFlag) { ErrorsFound = true; - ShowContinueError(state, format("WindowShadingControl {} has errors, program will terminate.", winShadeCtrl.Name)); + ShowContinueError(state, EnergyPlus::format("WindowShadingControl {} has errors, program will terminate.", winShadeCtrl.Name)); } if (winShadeCtrl.slatAngleControl != DataSurfaces::SlatAngleControl::Fixed) { @@ -2547,8 +2580,9 @@ namespace SurfaceGeometry { } if (OpaqueHTSurfsWithWin == 1 && OpaqueHTSurfs == 1 && InternalMassSurfs == 0) { SurfError = true; - ShowSevereError(state, - format("{}Zone {} has only one floor, wall or roof, and this surface has a window.", RoutineName, thisZone.Name)); + ShowSevereError( + state, + EnergyPlus::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."); } } @@ -2580,12 +2614,12 @@ namespace SurfaceGeometry { continue; } if (LayNumOutside != state.dataConstruction->Construct(surf.Construction).LayerPoint(1)) { - ShowSevereError(state, format("{}Only one EcoRoof Material is currently allowed for all constructions.", RoutineName)); - ShowContinueError(state, format("... first material={}", s_mat->materials(LayNumOutside)->Name)); + 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)); ShowContinueError(state, - format("... conflicting Construction={} uses material={}", - state.dataConstruction->Construct(surf.Construction).Name, - s_mat->materials(state.dataConstruction->Construct(surf.Construction).LayerPoint(1))->Name)); + EnergyPlus::format("... conflicting Construction={} uses material={}", + state.dataConstruction->Construct(surf.Construction).Name, + s_mat->materials(state.dataConstruction->Construct(surf.Construction).LayerPoint(1))->Name)); ErrorsFound = true; } } @@ -2703,16 +2737,18 @@ namespace SurfaceGeometry { if (!state.dataGlobal->DisplayExtraWarnings) { ++iTmp1; } else { - ShowWarningError(state, - format("{}Surface=\"{}\" uses InfraredTransparent construction in a non-interzone surface. (illegal use)", - RoutineName, - surf.Name)); + ShowWarningError( + state, + EnergyPlus::format("{}Surface=\"{}\" uses InfraredTransparent construction in a non-interzone surface. (illegal use)", + RoutineName, + surf.Name)); } } if (iTmp1 > 0) { - ShowWarningError( - state, - format("{}Surfaces use InfraredTransparent constructions {} in non-interzone surfaces. (illegal use)", RoutineName, iTmp1)); + ShowWarningError(state, + EnergyPlus::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;"); } } @@ -2758,52 +2794,54 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->Warning1Count > 0) { ShowWarningMessage(state, - format("{}Window dimensions differ from Window 5/6 data file dimensions, {} times.", - RoutineName, - state.dataSurfaceGeometry->Warning1Count)); + EnergyPlus::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, - format("{}Exterior Windows have been replaced with Window 5/6 two glazing systems, {} times.", - RoutineName, - state.dataSurfaceGeometry->Warning2Count)); + EnergyPlus::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, - format("{}Interior Windows have been replaced with Window 5/6 two glazing systems, {} times.", - RoutineName, - state.dataSurfaceGeometry->Warning3Count)); + EnergyPlus::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, - format("{}There are {} window/glass door(s) that may cause inaccurate shadowing due to Solar Distribution.", - RoutineName, - state.dataErrTracking->TotalMultipliedWindows)); + ShowWarningMessage( + state, + EnergyPlus::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, - 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)); + 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)); 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, - format("{}There are {} degenerate surfaces; Degenerate surfaces are those with number of sides < 3.", - RoutineName, - state.dataErrTracking->TotalDegenerateSurfaces)); + EnergyPlus::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; @@ -2826,14 +2864,15 @@ namespace SurfaceGeometry { if (SurfError || ErrorsFound) { ErrorsFound = true; - ShowFatalError(state, format("{}Errors discovered, program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::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, format("{}When using DElight daylighting the presence of exterior shading surfaces is ignored.", RoutineName)); + ShowWarningError( + state, EnergyPlus::format("{}When using DElight daylighting the presence of exterior shading surfaces is ignored.", RoutineName)); } for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; SurfNum++) { @@ -2871,7 +2910,7 @@ namespace SurfaceGeometry { if (SurfError || ErrorsFound) { ErrorsFound = true; - ShowFatalError(state, format("{}Errors discovered, program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors discovered, program terminates.", RoutineName)); } } @@ -2947,15 +2986,16 @@ 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, - format("{}Surface=\"{}\" has Outside Boundary Condition=Zone, but Zone=\"{}\" has more than 1 Space.", - RoutineName, - thisSurf.Name.substr(3), - thisSurf.ZoneName)); + ShowWarningError( + state, + EnergyPlus::format("{}Surface=\"{}\" has Outside Boundary Condition=Zone, but Zone=\"{}\" has more than 1 Space.", + RoutineName, + thisSurf.Name.substr(3), + thisSurf.ZoneName)); ShowContinueError(state, - format("Auto-generated surface=\"{}\" will be assigned to Space=\"{}\"", - thisSurf.Name, - state.dataHeatBal->space(thisSurf.spaceNum).Name)); + EnergyPlus::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."); } } @@ -2977,7 +3017,7 @@ namespace SurfaceGeometry { } for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) { if (int(state.dataHeatBal->space(spaceNum).surfaces.size()) == 0) { - ShowWarningError(state, format("{}Space={} has no surfaces.", RoutineName, state.dataHeatBal->space(spaceNum).Name)); + ShowWarningError(state, EnergyPlus::format("{}Space={} has no surfaces.", RoutineName, state.dataHeatBal->space(spaceNum).Name)); } } } @@ -3076,34 +3116,40 @@ namespace SurfaceGeometry { if (((General::rotAzmDiffDeg(baseSurface.Azimuth, subSurface.Azimuth) > errorTolerance) && !baseSurfHoriz) || (std::abs(baseSurface.Tilt - subSurface.Tilt) > errorTolerance)) { surfaceError = true; - ShowSevereError( + ShowSevereError(state, + EnergyPlus::format( + "checkSubSurfAzTiltNorm: Outward facing angle of subsurface differs more than {:.1R} degrees from base surface.", + errorTolerance)); + ShowContinueError( state, - format("checkSubSurfAzTiltNorm: Outward facing angle of subsurface differs more than {:.1R} degrees from base surface.", - errorTolerance)); - ShowContinueError(state, - format("Subsurface=\"{}\" Tilt = {:.1R} Azimuth = {:.1R}", subSurface.Name, subSurface.Tilt, subSurface.Azimuth)); + EnergyPlus::format("Subsurface=\"{}\" Tilt = {:.1R} Azimuth = {:.1R}", subSurface.Name, subSurface.Tilt, subSurface.Azimuth)); ShowContinueError( - state, format("Base surface=\"{}\" Tilt = {:.1R} Azimuth = {:.1R}", baseSurface.Name, baseSurface.Tilt, baseSurface.Azimuth)); + state, + EnergyPlus::format( + "Base surface=\"{}\" Tilt = {:.1R} Azimuth = {:.1R}", baseSurface.Name, baseSurface.Tilt, baseSurface.Azimuth)); } else if (((General::rotAzmDiffDeg(baseSurface.Azimuth, subSurface.Azimuth) > warningTolerance) && !baseSurfHoriz) || (std::abs(baseSurface.Tilt - subSurface.Tilt) > warningTolerance)) { ++state.dataSurfaceGeometry->checkSubSurfAzTiltNormErrCount; if (state.dataSurfaceGeometry->checkSubSurfAzTiltNormErrCount == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - format("checkSubSurfAzTiltNorm: Some Outward Facing angles of subsurfaces differ more than {:.1R} " - "degrees from base surface.", - warningTolerance)); + EnergyPlus::format("checkSubSurfAzTiltNorm: Some Outward Facing angles of subsurfaces differ more than {:.1R} " + "degrees from base surface.", + warningTolerance)); ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual surfaces."); } if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - format("checkSubSurfAzTiltNorm: Outward facing angle of subsurface differs more than {:.1R} degrees from base surface.", - warningTolerance)); - ShowContinueError( - state, format("Subsurface=\"{}\" Tilt = {:.1R} Azimuth = {:.1R}", subSurface.Name, subSurface.Tilt, subSurface.Azimuth)); + EnergyPlus::format( + "checkSubSurfAzTiltNorm: Outward facing angle of subsurface differs more than {:.1R} degrees from base surface.", + warningTolerance)); + ShowContinueError(state, + EnergyPlus::format( + "Subsurface=\"{}\" Tilt = {:.1R} Azimuth = {:.1R}", subSurface.Name, subSurface.Tilt, subSurface.Azimuth)); ShowContinueError( state, - format("Base surface=\"{}\" Tilt = {:.1R} Azimuth = {:.1R}", baseSurface.Name, baseSurface.Tilt, baseSurface.Azimuth)); + EnergyPlus::format( + "Base surface=\"{}\" Tilt = {:.1R} Azimuth = {:.1R}", baseSurface.Name, baseSurface.Tilt, baseSurface.Azimuth)); } } } @@ -3211,7 +3257,8 @@ namespace SurfaceGeometry { int Found = Util::FindItem(GAlphas(1), FlCorners, 4); if (Found == 0) { - ShowSevereError(state, format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), GAlphas(1))); + ShowSevereError(state, + EnergyPlus::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), GAlphas(1))); ErrorsFound = true; } else { state.dataSurface->Corner = Found; @@ -3230,7 +3277,8 @@ namespace SurfaceGeometry { OK = true; } if (!OK) { - ShowSevereError(state, format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), GAlphas(2))); + ShowSevereError(state, + EnergyPlus::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), GAlphas(2))); ErrorsFound = true; } @@ -3246,8 +3294,9 @@ namespace SurfaceGeometry { OK = true; } if (!OK) { - ShowWarningError(state, format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(3), GAlphas(3))); - ShowContinueError(state, format("{} defaults to \"WorldCoordinateSystem\"", s_ipsc->cAlphaFieldNames(3))); + 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))); state.dataSurface->WorldCoordSystem = true; OutMsg += "WorldCoordinateSystem,"; } @@ -3264,8 +3313,9 @@ namespace SurfaceGeometry { OK = true; } if (!OK) { - ShowWarningError(state, format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(4), GAlphas(4))); - ShowContinueError(state, format("{} defaults to \"RelativeToZoneOrigin\"", s_ipsc->cAlphaFieldNames(4))); + 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))); state.dataSurface->DaylRefWorldCoordSystem = false; OutMsg += "RelativeToZoneOrigin,"; } @@ -3282,35 +3332,36 @@ namespace SurfaceGeometry { OK = true; } if (!OK) { - ShowWarningError(state, format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(5), GAlphas(5))); - ShowContinueError(state, format("{} defaults to \"RelativeToZoneOrigin\"", s_ipsc->cAlphaFieldNames(5))); + 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))); state.dataSurfaceGeometry->RectSurfRefWorldCoordSystem = false; OutMsg += "RelativeToZoneOrigin"; } } else if (SELECT_CASE_var == 0) { - ShowSevereError(state, format("{}: Required object not found.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Required object not found.", s_ipsc->cCurrentModuleObject)); OutMsg += "None found in input"; ErrorsFound = true; } else { - ShowSevereError(state, format("{}: Too many objects entered. Only one allowed.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } } if (!state.dataSurface->WorldCoordSystem) { if (state.dataSurface->DaylRefWorldCoordSystem) { - ShowWarningError(state, format("{}: Potential mismatch of coordinate specifications.", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); - ShowContinueError(state, format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), GAlphas(4))); + 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))); } if (state.dataSurfaceGeometry->RectSurfRefWorldCoordSystem) { - ShowWarningError(state, format("{}: Potential mismatch of coordinate specifications.", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); - ShowContinueError(state, format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(5), GAlphas(5))); + 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))); } } else { bool RelWarning = false; @@ -3326,15 +3377,16 @@ namespace SurfaceGeometry { } } if (RelWarning && !state.dataSurfaceGeometry->RectSurfRefWorldCoordSystem) { - ShowWarningError(state, - 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, format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); + 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))); if (GAlphas(5) == "RELATIVE") { - ShowContinueError(state, format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(5), GAlphas(5))); + ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(5), GAlphas(5))); } else if (GAlphas(5) != "ABSOLUTE") { - ShowContinueError(state, format("{}=\"defaults to RELATIVE\".", s_ipsc->cAlphaFieldNames(5))); + ShowContinueError(state, EnergyPlus::format("{}=\"defaults to RELATIVE\".", s_ipsc->cAlphaFieldNames(5))); } } } @@ -3398,9 +3450,10 @@ namespace SurfaceGeometry { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, s_ipsc->cCurrentModuleObject, Loop, NumAlphas, NumNumbers); if (NumAlphas != 2) { - ShowSevereError( - state, - format("{}: Object Definition indicates not = 2 Alpha Objects, Number Indicated={}", s_ipsc->cCurrentModuleObject, NumAlphas)); + ShowSevereError(state, + EnergyPlus::format("{}: Object Definition indicates not = 2 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + NumAlphas)); ErrorsFound = true; } @@ -3457,11 +3510,11 @@ namespace SurfaceGeometry { } if (SchedMinValue < 0.0) { ShowSevereError(state, - format("{}=\"{}\", {}=\"{}\", has schedule values < 0.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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) { @@ -3469,11 +3522,11 @@ namespace SurfaceGeometry { } if (SchedMaxValue > 1.0) { ShowSevereError(state, - format("{}=\"{}\", {}=\"{}\", has schedule values > 1.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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) { @@ -3484,19 +3537,21 @@ namespace SurfaceGeometry { numSides = (NumNumbers - 1) / 3; surfTemp.Sides = numSides; if (mod(NumNumbers - 1, 3) != 0) { - ShowWarningError(state, - format("{}=\"{}\", {}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(1), surfTemp.Sides))); + 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))); } if (numSides < 3) { ShowSevereError(state, - format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(1), - surfTemp.Sides)); + EnergyPlus::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(1), + surfTemp.Sides)); ErrorsFound = true; continue; } @@ -3505,13 +3560,15 @@ namespace SurfaceGeometry { surfTemp.Sides = s_ipsc->rNumericArgs(1); if (numSides > surfTemp.Sides) { ShowWarningError(state, - format("{}=\"{}\", field {}={}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(1), - fmt::to_string(surfTemp.Sides))); - ShowContinueError( - state, format("...but {} were entered. Only the indicated {} will be used.", numSides, s_ipsc->cNumericFieldNames(1))); + 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))); } } surfTemp.Vertex.allocate(surfTemp.Sides); @@ -3573,9 +3630,10 @@ namespace SurfaceGeometry { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, s_ipsc->cCurrentModuleObject, Loop, NumAlphas, NumNumbers); if (NumAlphas != 1) { - ShowSevereError( - state, - format("{}: Object Definition indicates not = 1 Alpha Objects, Number Indicated={}", s_ipsc->cCurrentModuleObject, NumAlphas)); + ShowSevereError(state, + EnergyPlus::format("{}: Object Definition indicates not = 1 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + NumAlphas)); ErrorsFound = true; } @@ -3635,7 +3693,8 @@ namespace SurfaceGeometry { if (surfTemp.Area <= 0.0) { ShowSevereError( state, - format("{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + EnergyPlus::format( + "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ErrorsFound = true; } @@ -3812,17 +3871,17 @@ namespace SurfaceGeometry { if (Item == 1) { if (SurfaceNumAlpha != 9) { ShowSevereError(state, - format("{}: Object Definition indicates not = 9 Alpha Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - SurfaceNumAlpha)); + EnergyPlus::format("{}: Object Definition indicates not = 9 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + SurfaceNumAlpha)); ErrorsFound = true; } } else { if (SurfaceNumAlpha != 8) { ShowSevereError(state, - format("{}: Object Definition indicates not = 8 Alpha Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - SurfaceNumAlpha)); + EnergyPlus::format("{}: Object Definition indicates not = 8 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + SurfaceNumAlpha)); ErrorsFound = true; } } @@ -3862,11 +3921,11 @@ namespace SurfaceGeometry { ClassItem = Util::FindItemInList(s_ipsc->cAlphaArgs(2), BaseSurfCls, 3); if (ClassItem == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { surfTemp.Class = BaseSurfIDs(ClassItem); @@ -3882,23 +3941,23 @@ namespace SurfaceGeometry { if (surfTemp.Construction == 0) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); if (Item == 1) { - ShowContinueError(state, format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); } else { - ShowContinueError(state, format("...because Surface Type={}", BaseSurfCls(ClassItem))); + ShowContinueError(state, EnergyPlus::format("...because Surface Type={}", BaseSurfCls(ClassItem))); } } else { state.dataConstruction->Construct(surfTemp.Construction).IsUsed = true; @@ -3916,11 +3975,11 @@ namespace SurfaceGeometry { surfTemp.Zone = ZoneNum; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::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; @@ -3934,21 +3993,21 @@ namespace SurfaceGeometry { surfTemp.spaceNum = spaceNum; if (surfTemp.Zone != state.dataHeatBal->space(spaceNum).zoneNum) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\" is not in the same zone as the surface.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + 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))); surfTemp.Class = SurfaceClass::Invalid; ErrorsFound = true; } } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); surfTemp.Class = SurfaceClass::Invalid; ErrorsFound = true; } @@ -3971,10 +4030,10 @@ 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, format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("Defaults, constant throughout the year of ({:.1R}) will be used.", - state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::BuildingSurface])); + EnergyPlus::format("Defaults, constant throughout the year of ({:.1R}) will be used.", + state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::BuildingSurface])); } state.dataSurfaceGeometry->NoGroundTempObjWarning = false; } @@ -3987,7 +4046,7 @@ namespace SurfaceGeometry { ShowSevereError(state, "GetHTSurfaceData: Surfaces with interface to GroundFCfactorMethod found but no \"FC Ground " "Temperatures\" were input."); - ShowContinueError(state, format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::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."); @@ -3999,19 +4058,21 @@ namespace SurfaceGeometry { if (surfTemp.Class == SurfaceClass::Wall && !state.dataConstruction->Construct(surfTemp.Construction).TypeIsCfactorWall) { ShowSevereError( state, - format("{}=\"{}\", invalid {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(ArgPointer))); + EnergyPlus::format( + "{}=\"{}\", invalid {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(ArgPointer))); ShowContinueError(state, - format("Construction=\"{}\" is not type Construction:CfactorUndergroundWall.", - state.dataConstruction->Construct(surfTemp.Construction).Name)); + EnergyPlus::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, - format("{}=\"{}\", invalid {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(ArgPointer))); + EnergyPlus::format( + "{}=\"{}\", invalid {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(ArgPointer))); ShowContinueError(state, - format("Construction=\"{}\" is not type Construction:FfactorGroundFloor.", - state.dataConstruction->Construct(surfTemp.Construction).Name)); + EnergyPlus::format("Construction=\"{}\" is not type Construction:FfactorGroundFloor.", + state.dataConstruction->Construct(surfTemp.Construction).Name)); ErrorsFound = true; } } @@ -4020,11 +4081,11 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(surfTemp.ExtBoundCondName, state.dataSurface->OSC, state.dataSurface->TotOSC); if (Found == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer + 1), - s_ipsc->cAlphaArgs(ArgPointer + 1))); + EnergyPlus::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 { @@ -4045,11 +4106,11 @@ namespace SurfaceGeometry { if (s_ipsc->lAlphaFieldBlanks(ArgPointer + 1)) { surfTemp.ExtBoundCondName = surfTemp.Name; ShowSevereError(state, - format("{}=\"{}\", invalid {}=.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer + 1))); - ShowContinueError(state, format("..{}=\"Surface\" must be non-blank.", s_ipsc->cAlphaFieldNames(ArgPointer))); + 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))); ShowContinueError(state, "..This surface will become an adiabatic surface - no doors/windows allowed."); } @@ -4063,11 +4124,11 @@ namespace SurfaceGeometry { if (Found == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::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; } @@ -4083,11 +4144,11 @@ namespace SurfaceGeometry { if (Found == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - state.dataSurfaceGeometry->SurfaceTmp(SurfNum).Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::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; } @@ -4097,9 +4158,10 @@ namespace SurfaceGeometry { if (!state.dataWeather->WeatherFileExists) { ShowSevereError( state, - format("{}=\"{}\", using \"Foundation\" type Outside Boundary Condition requires specification of a weather file", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + EnergyPlus::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"); @@ -4121,19 +4183,20 @@ namespace SurfaceGeometry { surfTemp.OSCPtr = Found; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer + 1), - s_ipsc->cAlphaArgs(ArgPointer + 1))); + EnergyPlus::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, - format("{}=\"{}\", construction may not have an internal source/sink", s_ipsc->cCurrentModuleObject, surfTemp.Name)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", construction may not have an internal source/sink", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } surfTemp.ExtBoundCond = DataSurfaces::KivaFoundation; @@ -4141,11 +4204,11 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(surfTemp.ExtBoundCondName, state.dataSurface->OSCM, state.dataSurface->TotOSCM); if (Found == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer + 1), - s_ipsc->cAlphaArgs(ArgPointer + 1))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer + 1), + s_ipsc->cAlphaArgs(ArgPointer + 1))); ErrorsFound = true; } surfTemp.OSCMPtr = Found; @@ -4159,21 +4222,21 @@ namespace SurfaceGeometry { Util::SameString(s_ipsc->cAlphaArgs(ArgPointer), "GroundBasementPreprocessorUpperWall") || Util::SameString(s_ipsc->cAlphaArgs(ArgPointer), "GroundBasementPreprocessorLowerWall")) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::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\""); @@ -4186,11 +4249,11 @@ namespace SurfaceGeometry { if ((surfTemp.ExtBoundCond != DataSurfaces::ExternalEnvironment) && (surfTemp.ExtBoundCond != DataSurfaces::OtherSideCondModeledExt)) { ShowWarningError(state, - format("{}=\"{}\", {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::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; @@ -4199,11 +4262,11 @@ namespace SurfaceGeometry { surfTemp.ExtSolar = false; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ErrorsFound = true; } @@ -4215,11 +4278,11 @@ namespace SurfaceGeometry { surfTemp.ExtWind = false; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ErrorsFound = true; } @@ -4236,19 +4299,21 @@ namespace SurfaceGeometry { numSides = (SurfaceNumProp - 2) / 3; surfTemp.Sides = numSides; if (mod(SurfaceNumProp - 2, 3) != 0) { - ShowWarningError(state, - format("{}=\"{}\", {}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(2), surfTemp.Sides))); + ShowWarningError( + state, + EnergyPlus::format( + "{}=\"{}\", {}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + EnergyPlus::format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(2), surfTemp.Sides))); } if (numSides < 3) { ShowSevereError(state, - format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(2), - surfTemp.Sides)); + EnergyPlus::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(2), + surfTemp.Sides)); ErrorsFound = true; continue; } @@ -4257,13 +4322,15 @@ namespace SurfaceGeometry { surfTemp.Sides = s_ipsc->rNumericArgs(2); if (numSides > surfTemp.Sides) { ShowWarningError(state, - format("{}=\"{}\", field {}={}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(2), - fmt::to_string(surfTemp.Sides))); - ShowContinueError( - state, format("...but {} were entered. Only the indicated {} will be used.", numSides, s_ipsc->cNumericFieldNames(2))); + 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))); } } surfTemp.Vertex.allocate(surfTemp.Sides); @@ -4272,7 +4339,8 @@ namespace SurfaceGeometry { if (surfTemp.Area <= 0.0) { ShowSevereError( state, - format("{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + EnergyPlus::format( + "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ErrorsFound = true; } @@ -4280,11 +4348,11 @@ namespace SurfaceGeometry { if (Util::SameString(s_ipsc->cAlphaArgs(5), "Surface")) { if (surfTemp.Sides != static_cast(surfTemp.Vertex.size())) { ShowSevereError(state, - format("{}=\"{}\", After CheckConvexity, mismatch between Sides ({}) and size of Vertex ({}).", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - surfTemp.Sides, - surfTemp.Vertex.size())); + EnergyPlus::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; } @@ -4296,7 +4364,8 @@ namespace SurfaceGeometry { if (std::abs(surfTemp.Height - state.dataConstruction->Construct(surfTemp.Construction).Height) > 0.05) { ShowWarningError( state, - format("{}=\"{}\", underground Wall Height = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Height)); + EnergyPlus::format( + "{}=\"{}\", underground Wall Height = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Height)); ShowContinueError(state, "..which does not match its construction height."); } } @@ -4306,15 +4375,16 @@ namespace SurfaceGeometry { if (std::abs(surfTemp.Area - state.dataConstruction->Construct(surfTemp.Construction).Area) > 0.1) { ShowWarningError( state, - format("{}=\"{}\", underground Floor Area = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + EnergyPlus::format( + "{}=\"{}\", underground Floor Area = {:.2T}", 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, - format("{}=\"{}\", underground Floor Perimeter = {:.2T}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - surfTemp.Perimeter)); + EnergyPlus::format("{}=\"{}\", underground Floor Perimeter = {:.2T}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + surfTemp.Perimeter)); ShowContinueError(state, "..which is less than its construction exposed perimeter."); } } @@ -4332,24 +4402,25 @@ namespace SurfaceGeometry { // If we cannot find the referenced surface if (ExtSurfNum == 0) { ShowSevereError(state, - format("{}=\"{}\" references an outside boundary surface that cannot be found:{}", - s_ipsc->cCurrentModuleObject, - state.dataSurfaceGeometry->SurfaceTmp(i).Name, - state.dataSurfaceGeometry->SurfaceTmp(i).ExtBoundCondName)); + EnergyPlus::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, - 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, - 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())); + 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)); + 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())); ErrorsFound = true; } } @@ -4498,7 +4569,8 @@ namespace SurfaceGeometry { if (NumNumbers < 7) { ShowSevereError( state, - format("{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), NumNumbers)); + EnergyPlus::format( + "{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), NumNumbers)); ErrorsFound = true; } @@ -4514,20 +4586,20 @@ namespace SurfaceGeometry { if (surfTemp.Construction == 0) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + 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))); } else { state.dataConstruction->Construct(surfTemp.Construction).IsUsed = true; surfTemp.ConstructionStoredInputValue = surfTemp.Construction; @@ -4543,11 +4615,11 @@ namespace SurfaceGeometry { surfTemp.Zone = ZoneNum; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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; @@ -4560,11 +4632,11 @@ namespace SurfaceGeometry { surfTemp.spaceNum = spaceNum; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); surfTemp.Class = SurfaceClass::Invalid; ErrorsFound = true; } @@ -4577,8 +4649,9 @@ namespace SurfaceGeometry { surfTemp.ExtBoundCond = DataSurfaces::GroundFCfactorMethod; } else if (state.dataConstruction->Construct(surfTemp.Construction).TypeIsCfactorWall) { ErrorsFound = true; - ShowSevereError(state, - format("{}=\"{}\", Construction type is \"Construction:CfactorUndergroundWall\" but invalid for this object.", + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", Construction type is \"Construction:CfactorUndergroundWall\" but invalid for this object.", s_ipsc->cCurrentModuleObject, surfTemp.Name)); } @@ -4588,8 +4661,9 @@ namespace SurfaceGeometry { surfTemp.ExtBoundCond = DataSurfaces::GroundFCfactorMethod; } else if (state.dataConstruction->Construct(surfTemp.Construction).TypeIsFfactorFloor) { ErrorsFound = true; - ShowSevereError(state, - format("{}=\"{}\", Construction type is \"Construction:FfactorGroundFloor\" but invalid for this object.", + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", Construction type is \"Construction:FfactorGroundFloor\" but invalid for this object.", s_ipsc->cCurrentModuleObject, surfTemp.Name)); } @@ -4625,10 +4699,10 @@ 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, format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("Defaults, constant throughout the year of ({:.1R}) will be used.", - state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::BuildingSurface])); + EnergyPlus::format("Defaults, constant throughout the year of ({:.1R}) will be used.", + state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::BuildingSurface])); } state.dataSurfaceGeometry->NoGroundTempObjWarning = false; } @@ -4639,7 +4713,7 @@ namespace SurfaceGeometry { ShowSevereError(state, "GetRectSurfaces: Surfaces with interface to GroundFCfactorMethod found but no \"FC Ground " "Temperatures\" were input."); - ShowContinueError(state, format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::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."); @@ -4677,7 +4751,8 @@ namespace SurfaceGeometry { if (surfTemp.Area <= 0.0) { ShowSevereError( state, - format("{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + EnergyPlus::format( + "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ErrorsFound = true; } @@ -4686,7 +4761,8 @@ namespace SurfaceGeometry { if (std::abs(surfTemp.Height - state.dataConstruction->Construct(surfTemp.Construction).Height) > 0.05) { ShowWarningError( state, - format("{}=\"{}\", underground Wall Height = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Height)); + EnergyPlus::format( + "{}=\"{}\", underground Wall Height = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Height)); ShowContinueError(state, "..which deos not match its construction height."); } } @@ -4695,13 +4771,15 @@ namespace SurfaceGeometry { if (surfTemp.Class == SurfaceClass::Floor && surfTemp.ExtBoundCond == DataSurfaces::GroundFCfactorMethod) { if (std::abs(surfTemp.Area - state.dataConstruction->Construct(surfTemp.Construction).Area) > 0.1) { ShowWarningError( - state, format("{}=\"{}\", underground Floor Area = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + state, + EnergyPlus::format( + "{}=\"{}\", underground Floor Area = {:.2T}", 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, - format( + EnergyPlus::format( "{}=\"{}\", underground Floor Perimeter = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Perimeter)); ShowContinueError(state, "..which is less than its construction exposed perimeter."); } @@ -4958,16 +5036,18 @@ namespace SurfaceGeometry { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, s_ipsc->cCurrentModuleObject, Loop, SurfaceNumAlpha, SurfaceNumProp); if (SurfaceNumAlpha != 6) { - ShowSevereError( - state, - format("{}: Object Definition indicates not = 6 Alpha Objects, Number Indicated={}", s_ipsc->cCurrentModuleObject, SurfaceNumAlpha)); + ShowSevereError(state, + EnergyPlus::format("{}: Object Definition indicates not = 6 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + SurfaceNumAlpha)); ErrorsFound = true; } if (SurfaceNumProp != 15) { - ShowSevereError( - state, - format("{}: Object Definition indicates > 15 Numeric Objects, Number Indicated={}", s_ipsc->cCurrentModuleObject, SurfaceNumAlpha)); + ShowSevereError(state, + EnergyPlus::format("{}: Object Definition indicates > 15 Numeric Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + SurfaceNumAlpha)); ErrorsFound = true; } NeedToAddSurfaces = 0; @@ -5000,8 +5080,9 @@ namespace SurfaceGeometry { auto &surfTemp = state.dataSurfaceGeometry->SurfaceTmp(SurfNum); if (SurfaceNumProp < 12) { - ShowSevereError( - state, format("{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, surfTemp.Name, SurfaceNumProp)); + ShowSevereError(state, + EnergyPlus::format( + "{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, surfTemp.Name, SurfaceNumProp)); ErrorsFound = true; } @@ -5009,11 +5090,11 @@ namespace SurfaceGeometry { ValidChk = Util::FindItemInList(s_ipsc->cAlphaArgs(2), SubSurfCls, 6); if (ValidChk == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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 @@ -5023,11 +5104,11 @@ namespace SurfaceGeometry { if (surfTemp.Construction == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ErrorsFound = true; continue; } @@ -5042,15 +5123,16 @@ namespace SurfaceGeometry { if (!construction.TypeIsWindow && !construction.TypeIsAirBoundary) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" has an opaque surface construction; it should have a window construction.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + EnergyPlus::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, - format("{}=\"{}\": Windows are not allowed to have embedded sources/sinks", s_ipsc->cCurrentModuleObject, surfTemp.Name)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\": Windows are not allowed to have embedded sources/sinks", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); } } @@ -5058,12 +5140,12 @@ namespace SurfaceGeometry { if (state.dataConstruction->Construct(surfTemp.Construction).TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + 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))); } } @@ -5087,11 +5169,11 @@ namespace SurfaceGeometry { state.dataSurfaceGeometry->SurfaceTmp(Found).ExtBoundCondName == state.dataSurfaceGeometry->SurfaceTmp(Found).Name) { // Adiabatic surface, no windows or doors allowed ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::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 " @@ -5099,11 +5181,11 @@ namespace SurfaceGeometry { } } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); surfTemp.ZoneName = "Unknown Zone"; ErrorsFound = true; } @@ -5113,12 +5195,14 @@ namespace SurfaceGeometry { if (surfTemp.ExtBoundCond == DataSurfaces::ExternalEnvironment) { if (!s_ipsc->lAlphaFieldBlanks(5)) { - ShowWarningError(state, - format("{}=\"{}\", invalid field {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(5))); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{}\", invalid field {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(5))); ShowContinueError( state, - format("...when Base surface uses \"Outdoors\" as {}, subsurfaces need to be blank to inherit the outdoor characteristics.", - s_ipsc->cAlphaFieldNames(5))); + EnergyPlus::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."); } } @@ -5127,12 +5211,14 @@ namespace SurfaceGeometry { if (!s_ipsc->lAlphaFieldBlanks(5)) { surfTemp.ExtBoundCondName = s_ipsc->cAlphaArgs(5); } else { - ShowSevereError(state, - format("{}=\"{}\", invalid blank {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(5))); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", invalid blank {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(5))); ShowContinueError( state, - format("...when Base surface uses \"Surface\" as {}, subsurfaces must also specify specific surfaces in the adjacent zone.", - s_ipsc->cAlphaFieldNames(5))); + EnergyPlus::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. ErrorsFound = true; } @@ -5149,11 +5235,11 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(5), state.dataSurface->OSC, state.dataSurface->TotOSC); if (Found == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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 @@ -5186,19 +5272,21 @@ namespace SurfaceGeometry { s_ipsc->rNumericArgs(3) = (SurfaceNumProp - 3) / 3; surfTemp.Sides = s_ipsc->rNumericArgs(3); if (mod(SurfaceNumProp - 3, 3) != 0) { - ShowWarningError(state, - format("{}=\"{}\", {}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(3), surfTemp.Sides))); + 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))); } if (s_ipsc->rNumericArgs(3) < 3) { ShowSevereError(state, - format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(3), - surfTemp.Sides)); + EnergyPlus::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(3), + surfTemp.Sides)); ErrorsFound = true; continue; } @@ -5207,13 +5295,14 @@ namespace SurfaceGeometry { surfTemp.Sides = s_ipsc->rNumericArgs(3); if (numSides > surfTemp.Sides) { ShowWarningError(state, - format("{}=\"{}\", field {}={}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(3), - fmt::to_string(surfTemp.Sides))); - ShowContinueError(state, - format("...but {} were entered. Only the indicated {} will be used.", numSides, s_ipsc->cNumericFieldNames(3))); + EnergyPlus::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))); } } surfTemp.Vertex.allocate(surfTemp.Sides); @@ -5225,13 +5314,13 @@ namespace SurfaceGeometry { if ((surfTemp.Class != SurfaceClass::Window && surfTemp.Class != SurfaceClass::GlassDoor && surfTemp.Class != SurfaceClass::Door) && s_ipsc->rNumericArgs(2) > 1.0) { ShowWarningError(state, - format("{}=\"{}\", invalid {}=[{:.1T}].", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(2), - s_ipsc->rNumericArgs(2))); - ShowContinueError(state, - format("...because {}={} multiplier will be set to 1.0.", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + 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))); surfTemp.Multiplier = 1.0; } @@ -5250,25 +5339,26 @@ namespace SurfaceGeometry { surfTemp.Class == SurfaceClass::TDD_Dome) { if (surfTemp.ExtBoundCond == DataSurfaces::OtherSideCoefNoCalcExt || surfTemp.ExtBoundCond == DataSurfaces::OtherSideCoefCalcExt) { - ShowSevereError( - state, - format("{}=\"{}\", Other side coefficients are not allowed with windows.", s_ipsc->cCurrentModuleObject, surfTemp.Name)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", Other side coefficients are not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } if (surfTemp.ExtBoundCond == DataSurfaces::Ground) { ShowSevereError(state, - format("{}=\"{}\", Exterior boundary condition = Ground is not allowed with windows.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + EnergyPlus::format("{}=\"{}\", Exterior boundary condition = Ground is not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } if (surfTemp.ExtBoundCond == DataSurfaces::KivaFoundation) { ShowSevereError(state, - format("{}=\"{}\", Exterior boundary condition = Foundation is not allowed with windows.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + EnergyPlus::format("{}=\"{}\", Exterior boundary condition = Foundation is not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } @@ -5279,11 +5369,11 @@ namespace SurfaceGeometry { if (surfTemp.Sides == 3) { // Triangular window if (!s_ipsc->cAlphaArgs(6).empty()) { ShowWarningError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(6), - s_ipsc->cAlphaArgs(6))); + EnergyPlus::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."); } @@ -5404,7 +5494,8 @@ namespace SurfaceGeometry { if (NumNumbers < 5) { ShowSevereError( state, - format("{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), NumNumbers)); + EnergyPlus::format( + "{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), NumNumbers)); ErrorsFound = true; } @@ -5420,11 +5511,11 @@ namespace SurfaceGeometry { if (surfTemp.Construction == 0) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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; @@ -5438,16 +5529,16 @@ namespace SurfaceGeometry { if (!construction.TypeIsWindow && !construction.TypeIsAirBoundary) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" has an opaque surface construction; it should have a window construction.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + EnergyPlus::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, - format("{}=\"{}\": Windows are not allowed to have embedded sources/sinks", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + EnergyPlus::format("{}=\"{}\": Windows are not allowed to have embedded sources/sinks", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); } } @@ -5455,11 +5546,11 @@ namespace SurfaceGeometry { if (state.dataConstruction->Construct(surfTemp.Construction).TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); } } @@ -5486,11 +5577,11 @@ namespace SurfaceGeometry { surfTemp.ViewFactorSky = state.dataSurfaceGeometry->SurfaceTmp(Found).ViewFactorSky; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); surfTemp.ZoneName = "Unknown Zone"; ErrorsFound = true; continue; @@ -5499,11 +5590,11 @@ namespace SurfaceGeometry { state.dataSurfaceGeometry->SurfaceTmp(Found).ExtBoundCondName == state.dataSurfaceGeometry->SurfaceTmp(Found).Name) { // Adiabatic surface, no windows or doors allowed ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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 " @@ -5512,13 +5603,14 @@ namespace SurfaceGeometry { if (surfTemp.ExtBoundCond == unreconciledZoneSurface) { // "Surface" Base Surface if (!GettingIZSurfaces) { - ShowSevereError(state, format("{}=\"{}\", invalid use of object", s_ipsc->cCurrentModuleObject, surfTemp.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid use of object", s_ipsc->cCurrentModuleObject, surfTemp.Name)); ShowContinueError( state, - format( + EnergyPlus::format( "...when Base surface uses \"Surface\" as {}, subsurfaces must also specify specific surfaces in the adjacent zone.", s_ipsc->cAlphaFieldNames(5))); - ShowContinueError(state, format("...Please use {}:Interzone to enter this surface.", s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, + EnergyPlus::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; } @@ -5542,10 +5634,10 @@ namespace SurfaceGeometry { ++NeedToAddSubSurfaces; } else { // Interior Window ShowSevereError(state, - format("{}=\"{}\", invalid Interzone Surface, specify {}:InterZone", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cCurrentModuleObject)); + EnergyPlus::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; @@ -5561,9 +5653,10 @@ namespace SurfaceGeometry { surfTemp.ExtBoundCondName = state.dataSurfaceGeometry->SurfaceTmp(Found).ZoneName; // base surface has it surfTemp.ExtBoundCond = unenteredAdjacentZoneSurface; } else { // not correct boundary condition for interzone subsurface - ShowSevereError( - state, - format("{}=\"{}\", invalid Base Surface type for Interzone Surface", s_ipsc->cCurrentModuleObject, surfTemp.Name)); + ShowSevereError(state, + EnergyPlus::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; @@ -5583,13 +5676,14 @@ namespace SurfaceGeometry { surfTemp.Multiplier = int(s_ipsc->rNumericArgs(1)); } else if (s_ipsc->rNumericArgs(1) > 1.0) { ShowWarningError(state, - format("{}=\"{}\", invalid {}=[{:.1T}].", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(1), - s_ipsc->rNumericArgs(1))); - ShowContinueError(state, - format("...because {}={} multiplier will be set to 1.0.", s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + EnergyPlus::format("{}=\"{}\", invalid {}=[{:.1T}].", + 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))); surfTemp.Multiplier = 1.0; } @@ -5604,7 +5698,8 @@ namespace SurfaceGeometry { if (surfTemp.Area <= 0.0) { ShowSevereError( state, - format("{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + EnergyPlus::format( + "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ErrorsFound = true; } @@ -5622,17 +5717,18 @@ namespace SurfaceGeometry { if (surfTemp.ExtBoundCond == DataSurfaces::OtherSideCoefNoCalcExt || surfTemp.ExtBoundCond == DataSurfaces::OtherSideCoefCalcExt) { - ShowSevereError( - state, - format("{}=\"{}\", Other side coefficients are not allowed with windows.", s_ipsc->cCurrentModuleObject, surfTemp.Name)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", Other side coefficients are not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } if (surfTemp.ExtBoundCond == DataSurfaces::Ground) { ShowSevereError(state, - format("{}=\"{}\", Exterior boundary condition = Ground is not allowed with windows.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + EnergyPlus::format("{}=\"{}\", Exterior boundary condition = Ground is not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } @@ -5715,8 +5811,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, format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + ShowContinueError(state, EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, EnergyPlus::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."); @@ -5725,11 +5821,14 @@ namespace SurfaceGeometry { if (state.dataConstruction->Construct(ConstrNum).LayerPoint(Lay) != state.dataConstruction->Construct(ConstrNumSh).LayerPoint(Lay)) { ErrorsFound = true; - ShowSevereError(state, - format(" The glass and gas layers in the shaded and unshaded constructions do not match for window={}", + ShowSevereError( + state, + EnergyPlus::format(" The glass and gas layers in the shaded and unshaded constructions do not match for window={}", surfTemp.Name)); - ShowContinueError(state, format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + ShowContinueError(state, + EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, + EnergyPlus::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); break; } } @@ -5742,8 +5841,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, format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + ShowContinueError(state, EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, EnergyPlus::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 " @@ -5753,11 +5852,14 @@ namespace SurfaceGeometry { if (state.dataConstruction->Construct(ConstrNum).LayerPoint(Lay) != state.dataConstruction->Construct(ConstrNumSh).LayerPoint(Lay + 1)) { ErrorsFound = true; - ShowSevereError(state, - format(" The glass and gas layers in the shaded and unshaded constructions do not match for window={}", + ShowSevereError( + state, + EnergyPlus::format(" The glass and gas layers in the shaded and unshaded constructions do not match for window={}", surfTemp.Name)); - ShowContinueError(state, format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + ShowContinueError(state, + EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, + EnergyPlus::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); break; } } @@ -5767,7 +5869,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, format("A divider cannot be specified for window {}", surfTemp.Name)); + ShowWarningError(state, EnergyPlus::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; @@ -5782,35 +5884,39 @@ 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, format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + ShowContinueError(state, EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, EnergyPlus::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, format("{}: Mismatch in unshaded/shaded inside layer materials. These should match.", cRoutineName)); - ShowContinueError(state, - format("Unshaded construction={}, Material={}", - state.dataConstruction->Construct(ConstrNum).Name, - s_mat->materials(state.dataConstruction->Construct(ConstrNum).LayerPoint(TotLayers))->Name)); - ShowContinueError(state, - format("Shaded construction={}, Material={}", - state.dataConstruction->Construct(ConstrNumSh).Name, - s_mat->materials(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(TotShLayers))->Name)); + 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)); + ShowContinueError( + state, + EnergyPlus::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, format("{}: Mismatch in unshaded/shaded inside layer materials. These should match.", cRoutineName)); + ShowSevereError( + state, EnergyPlus::format("{}: Mismatch in unshaded/shaded inside layer materials. These should match.", cRoutineName)); ShowContinueError(state, - format("Unshaded construction={}, Material={}", - state.dataConstruction->Construct(ConstrNum).Name, - s_mat->materials(state.dataConstruction->Construct(ConstrNum).LayerPoint(1))->Name)); + EnergyPlus::format("Unshaded construction={}, Material={}", + state.dataConstruction->Construct(ConstrNum).Name, + s_mat->materials(state.dataConstruction->Construct(ConstrNum).LayerPoint(1))->Name)); ShowContinueError(state, - format("Shaded construction={}, Material={}", - state.dataConstruction->Construct(ConstrNumSh).Name, - s_mat->materials(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1))->Name)); + EnergyPlus::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) { @@ -5823,25 +5929,26 @@ namespace SurfaceGeometry { (s_mat->materials(MatGap1)->Thickness + s_mat->materials(MatGap2)->Thickness)); if (MatGapCalc > 0.001) { ShowSevereError(state, - format("{}: The gap width(s) for the unshaded window construction {}", - cRoutineName, - state.dataConstruction->Construct(ConstrNum).Name)); + EnergyPlus::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); ShowContinueError(state, "for window " + surfTemp.Name + ", which has a between-glass blind."); - ShowContinueError( - state, - format("..Material={} thickness={:.3R} -", s_mat->materials(MatGap)->Name, s_mat->materials(MatGap)->Thickness)); ShowContinueError(state, - format("..( Material={} thickness={:.3R} +", - s_mat->materials(MatGap1)->Name, - s_mat->materials(MatGap1)->Thickness)); + EnergyPlus::format("..Material={} thickness={:.3R} -", + s_mat->materials(MatGap)->Name, + s_mat->materials(MatGap)->Thickness)); ShowContinueError(state, - format("..Material={} thickness={:.3R} )=[{:.3R}] >.001", - s_mat->materials(MatGap2)->Name, - s_mat->materials(MatGap2)->Thickness, - MatGapCalc)); + EnergyPlus::format("..( Material={} thickness={:.3R} +", + s_mat->materials(MatGap1)->Name, + s_mat->materials(MatGap1)->Thickness)); + ShowContinueError(state, + EnergyPlus::format("..Material={} thickness={:.3R} )=[{:.3R}] >.001", + s_mat->materials(MatGap2)->Name, + s_mat->materials(MatGap2)->Thickness, + MatGapCalc)); ErrorsFound = true; } } else { // Between-glass shade @@ -5850,29 +5957,30 @@ namespace SurfaceGeometry { (s_mat->materials(MatGap1)->Thickness + s_mat->materials(MatGap2)->Thickness + s_mat->materials(MatSh)->Thickness)); if (MatGapCalc > 0.001) { ShowSevereError(state, - format("{}: The gap width(s) for the unshaded window construction {}", - cRoutineName, - state.dataConstruction->Construct(ConstrNum).Name)); + EnergyPlus::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); ShowContinueError(state, "for window " + surfTemp.Name + ", which has a between-glass shade."); - ShowContinueError( - state, - format("..Material={} thickness={:.3R} -", s_mat->materials(MatGap)->Name, s_mat->materials(MatGap)->Thickness)); ShowContinueError(state, - format("...( Material={} thickness={:.3R} +", - s_mat->materials(MatGap1)->Name, - s_mat->materials(MatGap1)->Thickness)); + EnergyPlus::format("..Material={} thickness={:.3R} -", + s_mat->materials(MatGap)->Name, + s_mat->materials(MatGap)->Thickness)); ShowContinueError(state, - format("..Material={} thickness={:.3R} +", - s_mat->materials(MatGap2)->Name, - s_mat->materials(MatGap2)->Thickness)); + EnergyPlus::format("...( Material={} thickness={:.3R} +", + s_mat->materials(MatGap1)->Name, + s_mat->materials(MatGap1)->Thickness)); ShowContinueError(state, - format("..Material={} thickness={:.3R} )=[{:.3R}] >.001", - s_mat->materials(MatSh)->Name, - s_mat->materials(MatSh)->Thickness, - MatGapCalc)); + EnergyPlus::format("..Material={} thickness={:.3R} +", + s_mat->materials(MatGap2)->Name, + s_mat->materials(MatGap2)->Thickness)); + ShowContinueError(state, + EnergyPlus::format("..Material={} thickness={:.3R} )=[{:.3R}] >.001", + s_mat->materials(MatSh)->Name, + s_mat->materials(MatSh)->Thickness, + MatGapCalc)); ErrorsFound = true; } } @@ -5895,14 +6003,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, - format("{}=\"{}\", {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + EnergyPlus::format("{}=\"{}\", {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(FrameField), + s_ipsc->cAlphaArgs(FrameField))); ShowContinueError(state, - format("will be replaced with FrameAndDivider from Window5 Data File entry {}", - state.dataConstruction->Construct(surfTemp.Construction).Name)); + EnergyPlus::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) { @@ -5910,19 +6018,19 @@ namespace SurfaceGeometry { if (surfTemp.FrameDivider == 0) { if (!state.dataConstruction->Construct(surfTemp.Construction).WindowTypeEQL) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(FrameField), + s_ipsc->cAlphaArgs(FrameField))); ErrorsFound = true; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + EnergyPlus::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."); } } @@ -5933,17 +6041,17 @@ namespace SurfaceGeometry { if (surfTemp.FrameDivider > 0) { if (state.dataSurface->FrameDivider(surfTemp.FrameDivider).DividerWidth > 0.0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + EnergyPlus::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."); - ShowContinueError( - state, - format("Divider width = [{:.2R}].", state.dataSurface->FrameDivider(surfTemp.FrameDivider).DividerWidth)); + ShowContinueError(state, + EnergyPlus::format("Divider width = [{:.2R}].", + state.dataSurface->FrameDivider(surfTemp.FrameDivider).DividerWidth)); state.dataSurface->FrameDivider(surfTemp.FrameDivider).DividerWidth = 0.0; } } // End of check if window has divider @@ -5958,11 +6066,11 @@ namespace SurfaceGeometry { if (surfTemp.FrameDivider > 0) { // Equivalent Layer window does not have frame/divider model ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + EnergyPlus::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; } @@ -5993,7 +6101,7 @@ namespace SurfaceGeometry { static_cast(state.dataHeatBal->SolarDistribution) > static_cast(DataHeatBalance::Shadowing::Minimal) && surfTemp.Multiplier > 1.0) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, format("{}: A Multiplier > 1.0 for window/glass door {}", cRoutineName, surfTemp.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -6018,8 +6126,8 @@ namespace SurfaceGeometry { } } if (NumShades != 0) { - ShowSevereError(state, format("{}: Window \"{}\" must not directly reference", cRoutineName, SubSurfaceName)); - ShowContinueError(state, format("a Construction (i.e, \"{}\") with a shading device.", SubSurfaceConstruction)); + ShowSevereError(state, EnergyPlus::format("{}: Window \"{}\" must not directly reference", cRoutineName, SubSurfaceName)); + ShowContinueError(state, EnergyPlus::format("a Construction (i.e, \"{}\") with a shading device.", SubSurfaceConstruction)); ShowContinueError(state, "Use WindowShadingControl to specify a shading device for a window."); ErrorsFound = true; } @@ -6039,7 +6147,8 @@ namespace SurfaceGeometry { } if (dynamic_cast(mat)->GlassTransDirtFactor < 1.0) { - ShowSevereError(state, format("{}: Interior Window or GlassDoor {} has a glass layer with", cRoutineName, SubSurfaceName)); + ShowSevereError( + state, EnergyPlus::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; @@ -6082,10 +6191,10 @@ namespace SurfaceGeometry { } if (state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Area <= 0.0) { ShowSevereError(state, - format("{}: Surface Openings have too much area for base surface={}", - cRoutineName, - state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); - ShowContinueError(state, format("Opening Surface creating error={}", surfTemp.Name)); + 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)); ErrorsFound = true; } // Net area of base surface with unity window multipliers (used in shadowing checks) @@ -6267,8 +6376,10 @@ namespace SurfaceGeometry { s_ipsc->cCurrentModuleObject = "Shading:Zone:Detailed"; state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, s_ipsc->cCurrentModuleObject, Loop, NumAlphas, NumNumbers); if (NumAlphas != 3) { - ShowSevereError( - state, format("{}: Object Definition indicates not = 3 Alpha Objects, Number Indicated={}", s_ipsc->cCurrentModuleObject, NumAlphas)); + ShowSevereError(state, + EnergyPlus::format("{}: Object Definition indicates not = 3 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + NumAlphas)); ErrorsFound = true; } @@ -6317,20 +6428,20 @@ namespace SurfaceGeometry { surfTemp.ZoneName = state.dataSurfaceGeometry->SurfaceTmp(Found).ZoneName; // Necessary to have surface drawn in OutputReports } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } if (surfTemp.ExtBoundCond == unenteredAdjacentZoneSurface) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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; @@ -6338,11 +6449,11 @@ namespace SurfaceGeometry { } if (surfTemp.ExtBoundCond == unreconciledZoneSurface) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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; @@ -6378,19 +6489,21 @@ namespace SurfaceGeometry { s_ipsc->rNumericArgs(1) = (NumNumbers - 1) / 3; surfTemp.Sides = s_ipsc->rNumericArgs(1); if (mod(NumNumbers - 1, 3) != 0) { - ShowWarningError(state, - format("{}=\"{}\", {}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(1), surfTemp.Sides))); + 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))); } if (s_ipsc->rNumericArgs(1) < 3) { ShowSevereError(state, - format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(1), - surfTemp.Sides)); + EnergyPlus::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(1), + surfTemp.Sides)); ErrorsFound = true; continue; } @@ -6513,32 +6626,32 @@ namespace SurfaceGeometry { surfTemp.ZoneName = state.dataSurfaceGeometry->SurfaceTmp(Found).ZoneName; // Necessary to have surface drawn in OutputReports } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; continue; } if (surfTemp.ExtBoundCond == unenteredAdjacentZoneSurface) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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" @@ -6576,10 +6689,10 @@ namespace SurfaceGeometry { if (Length * Depth <= 0.0) { ShowSevereError(state, - format("{}=\"{}\", illegal surface area=[{:.2R}]. Surface will NOT be entered.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - Length * Depth)); + EnergyPlus::format("{}=\"{}\", illegal surface area=[{:.2R}]. Surface will NOT be entered.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + Length * Depth)); continue; } @@ -6659,10 +6772,10 @@ namespace SurfaceGeometry { MakeFin = true; if (Length * Depth <= 0.0) { ShowWarningError(state, - format("{}=Left Fin of \"{}\", illegal surface area=[{:.2R}]. Surface will NOT be entered.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - Length * Depth)); + EnergyPlus::format("{}=Left Fin of \"{}\", illegal surface area=[{:.2R}]. Surface will NOT be entered.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + Length * Depth)); MakeFin = false; } @@ -6762,10 +6875,10 @@ namespace SurfaceGeometry { MakeFin = true; if (Length * Depth <= 0.0) { ShowWarningError(state, - format("{}=Right Fin of \"{}\", illegal surface area=[{:.2R}]. Surface will NOT be entered.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - Length * Depth)); + EnergyPlus::format("{}=Right Fin of \"{}\", illegal surface area=[{:.2R}]. Surface will NOT be entered.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + Length * Depth)); MakeFin = false; } @@ -6930,11 +7043,11 @@ namespace SurfaceGeometry { } else if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { // If Space or SpaceList Name is blank, then throw error. ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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; @@ -6966,11 +7079,11 @@ namespace SurfaceGeometry { state.dataSurface->IntMassObjects(Item).spaceOrSpaceListPtr = SLItem; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::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; @@ -6980,7 +7093,7 @@ namespace SurfaceGeometry { } if (errFlag) { - ShowSevereError(state, format("{}Errors with invalid names in {} objects.", RoutineName, s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::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; } @@ -6988,19 +7101,19 @@ namespace SurfaceGeometry { if (state.dataSurface->IntMassObjects(Item).Construction == 0) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", {} not found={}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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; } @@ -7214,8 +7327,8 @@ namespace SurfaceGeometry { s_ipsc->cNumericFieldNames); SurfNum = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (SurfNum == 0) { - ShowWarningError(state, format("{}=\"{}\", invalid specification", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format(".. not found {}=\"{}\".", s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + 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))); // ErrorsFound =.TRUE. continue; } @@ -7228,9 +7341,10 @@ namespace SurfaceGeometry { WrongSurfaceType = true; } if (WrongSurfaceType) { - ShowSevereError( - state, - format("GetShadingSurfReflectanceData: {}=\"{}\", surface is not a shading surface.", s_ipsc->cCurrentModuleObject, surf.Name)); + ShowSevereError(state, + EnergyPlus::format("GetShadingSurfReflectanceData: {}=\"{}\", surface is not a shading surface.", + s_ipsc->cCurrentModuleObject, + surf.Name)); ErrorsFound = true; continue; } @@ -7243,11 +7357,11 @@ namespace SurfaceGeometry { GlConstrNum = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataConstruction->Construct, state.dataHeatBal->TotConstructs); if (GlConstrNum == 0) { ShowSevereError(state, - format("{}=\"{}\", {} not found={}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->Surface(SurfNum).Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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; @@ -7345,9 +7459,10 @@ namespace SurfaceGeometry { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, s_ipsc->cCurrentModuleObject, Dummy, MaxNumAlphas, MaxNumNumbers); if (MaxNumNumbers != 8) { - ShowSevereError( - state, - format("{}: Object Definition indicates not = 8 Number Objects, Number Indicated={}", s_ipsc->cCurrentModuleObject, MaxNumNumbers)); + ShowSevereError(state, + EnergyPlus::format("{}: Object Definition indicates not = 8 Number Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + MaxNumNumbers)); ErrorsFound = true; } @@ -7391,20 +7506,20 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(state.dataHeatBal->ExtVentedCavity(Item).OSCMName, state.dataSurface->OSCM, state.dataSurface->TotOSCM); if (Found == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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, - format("{}=\"{}\", invalid {} cannot be blank.", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(2))); + EnergyPlus::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; @@ -7428,11 +7543,11 @@ namespace SurfaceGeometry { // Was it set? if (state.dataHeatBal->ExtVentedCavity(Item).BaffleRoughness == Material::SurfaceRoughness::Invalid) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ErrorsFound = true; } @@ -7440,9 +7555,9 @@ namespace SurfaceGeometry { state.dataHeatBal->ExtVentedCavity(Item).NumSurfs = NumAlphas - AlphaOffset; if (state.dataHeatBal->ExtVentedCavity(Item).NumSurfs == 0) { ShowSevereError(state, - format("{}=\"{}\", no underlying surfaces specified. Must have at least one.", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name)); + EnergyPlus::format("{}=\"{}\", no underlying surfaces specified. Must have at least one.", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name)); ErrorsFound = true; continue; } @@ -7452,55 +7567,56 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + EnergyPlus::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, - format("{}=\"{}\", is invalid", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); + ShowSevereError( + state, + EnergyPlus::format("{}=\"{}\", is invalid", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); ShowContinueError(state, - format("...because {}=\"{}\".", - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + EnergyPlus::format("...because {}=\"{}\".", + s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), + s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); ShowContinueError(state, "...is not an OtherSideConditionedModel surface."); ErrorsFound = true; continue; @@ -7539,17 +7655,17 @@ namespace SurfaceGeometry { SurfID = state.dataHeatBal->ExtVentedCavity(Item).SurfPtrs(ThisSurf); if (General::rotAzmDiffDeg(state.dataSurface->Surface(SurfID).Azimuth, AvgAzimuth) > AZITOL) { ShowWarningError(state, - format("{}=\"{}, Surface {} has Azimuth different from others in the associated group.", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - state.dataSurface->Surface(SurfID).Name)); + 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)); } if (std::abs(state.dataSurface->Surface(SurfID).Tilt - AvgTilt) > TILTOL) { ShowWarningError(state, - format("{}=\"{}, Surface {} has Tilt different from others in the associated group.", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - state.dataSurface->Surface(SurfID).Name)); + 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)); } // test that there are no windows. Now allow windows @@ -7581,11 +7697,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, format("{}=\"{}\", invalid .", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); + ShowSevereError( + state, EnergyPlus::format("{}=\"{}\", invalid .", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); ErrorsFound = true; - ShowContinueError( - state, - format("...because field \"{}\" must be greater than Zero=[{:.2T}].", s_ipsc->cNumericFieldNames(5), s_ipsc->rNumericArgs(5))); + ShowContinueError(state, + EnergyPlus::format("...because field \"{}\" must be greater than Zero=[{:.2T}].", + s_ipsc->cNumericFieldNames(5), + s_ipsc->rNumericArgs(5))); continue; } state.dataHeatBal->ExtVentedCavity(Item).AreaRatio = s_ipsc->rNumericArgs(6); @@ -7598,11 +7716,12 @@ namespace SurfaceGeometry { // subscript usage: Replaced by below state.dataHeatBal->ExtVentedCavity(Item).ProjArea = surfaceArea; if (state.dataHeatBal->ExtVentedCavity(Item).ProjArea <= 0.0) { - ShowSevereError(state, format("{}=\"{}\", invalid .", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); + ShowSevereError( + state, EnergyPlus::format("{}=\"{}\", invalid .", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); ErrorsFound = true; ShowContinueError(state, - format("...because gross area of underlying surfaces must be greater than Zero=[{:.2T}].", - state.dataHeatBal->ExtVentedCavity(Item).ProjArea)); + EnergyPlus::format("...because gross area of underlying surfaces must be greater than Zero=[{:.2T}].", + state.dataHeatBal->ExtVentedCavity(Item).ProjArea)); continue; } state.dataHeatBal->ExtVentedCavity(Item).ActualArea = @@ -7688,14 +7807,16 @@ namespace SurfaceGeometry { int Found = Util::FindItemInList(s_ipsc->cAlphaArgs(alpF), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { - ShowSevereError(state, format("{}=\"{}\", did not find matching surface", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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, format("{}: {}, surface is not a floor surface", s_ipsc->cCurrentModuleObject, state.dataSurface->Surface(Found).Name)); - ShowContinueError(state, format("{} will not be used", s_ipsc->cCurrentModuleObject)); + 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)); continue; } @@ -7716,11 +7837,11 @@ namespace SurfaceGeometry { if (calculationMethod != CalculationMethod::TotalExposedPerimeter && calculationMethod != CalculationMethod::ExposedPerimeterFraction && calculationMethod != CalculationMethod::Bysegment) { ShowSevereError(state, - format("{}=\"{}\", {} is not a valid choice for {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - calculationMethod, - s_ipsc->cAlphaFieldNames(alpF))); + EnergyPlus::format("{}=\"{}\", {} is not a valid choice for {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + calculationMethod, + s_ipsc->cAlphaFieldNames(alpF))); ErrorsFound = true; } alpF++; @@ -7733,40 +7854,42 @@ namespace SurfaceGeometry { data.exposedFraction = s_ipsc->rNumericArgs(numF) / state.dataSurface->Surface(Found).Perimeter; if (data.exposedFraction > 1 + tolerance) { ShowWarningError(state, - format("{}: {}, {} is greater than the perimeter of {}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->Surface(Found).Name, - s_ipsc->cNumericFieldNames(numF), - state.dataSurface->Surface(Found).Name)); + 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)); ShowContinueError(state, - format("{} perimeter = {}, {} exposed perimeter = {}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).Perimeter, - s_ipsc->cCurrentModuleObject, - s_ipsc->rNumericArgs(numF))); - ShowContinueError( - state, - format("{} will be set equal to {} perimeter", s_ipsc->cNumericFieldNames(numF), state.dataSurface->Surface(Found).Name)); + EnergyPlus::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)); data.exposedFraction = 1.0; } data.useDetailedExposedPerimeter = false; } else { - ShowWarningError(state, - format("{}: {}, {} set as calculation method, but a value has been set for {}. This value will be ignored.", - s_ipsc->cCurrentModuleObject, - state.dataSurface->Surface(Found).Name, - calculationMethod, - s_ipsc->cNumericFieldNames(numF))); - } - } else { - if (calculationMethod == CalculationMethod::TotalExposedPerimeter) { - ShowSevereError(state, - format("{}: {}, {} set as calculation method, but no value has been set for {}", + ShowWarningError( + state, + EnergyPlus::format("{}: {}, {} set as calculation method, but a value has been set for {}. This value will be ignored.", s_ipsc->cCurrentModuleObject, state.dataSurface->Surface(Found).Name, calculationMethod, s_ipsc->cNumericFieldNames(numF))); + } + } else { + if (calculationMethod == CalculationMethod::TotalExposedPerimeter) { + ShowSevereError(state, + EnergyPlus::format("{}: {}, {} set as calculation method, but no value has been set for {}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->Surface(Found).Name, + calculationMethod, + s_ipsc->cNumericFieldNames(numF))); ErrorsFound = true; } } @@ -7777,21 +7900,22 @@ namespace SurfaceGeometry { data.exposedFraction = s_ipsc->rNumericArgs(numF); data.useDetailedExposedPerimeter = false; } else { - ShowWarningError(state, - format("{}: {}, {} set as calculation method, but a value has been set for {}. This value will be ignored.", - s_ipsc->cCurrentModuleObject, - state.dataSurface->Surface(Found).Name, - calculationMethod, - s_ipsc->cNumericFieldNames(numF))); - } - } else { - if (calculationMethod == CalculationMethod::ExposedPerimeterFraction) { - ShowSevereError(state, - format("{}: {}, {} set as calculation method, but no value has been set for {}", + ShowWarningError( + state, + EnergyPlus::format("{}: {}, {} set as calculation method, but a value has been set for {}. This value will be ignored.", s_ipsc->cCurrentModuleObject, state.dataSurface->Surface(Found).Name, calculationMethod, s_ipsc->cNumericFieldNames(numF))); + } + } else { + if (calculationMethod == CalculationMethod::ExposedPerimeterFraction) { + ShowSevereError(state, + EnergyPlus::format("{}: {}, {} set as calculation method, but no value has been set for {}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->Surface(Found).Name, + calculationMethod, + s_ipsc->cNumericFieldNames(numF))); ErrorsFound = true; } } @@ -7802,17 +7926,17 @@ namespace SurfaceGeometry { if (calculationMethod == CalculationMethod::Bysegment) { if (numRemainingFields != (int)state.dataSurface->Surface(Found).Vertex.size()) { ShowSevereError(state, - 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))); + 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))); ShowContinueError(state, - format("{} number of vertices = {}, {} number of segments = {}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).Vertex.size(), - s_ipsc->cCurrentModuleObject, - numRemainingFields)); + EnergyPlus::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++) { @@ -7831,8 +7955,9 @@ namespace SurfaceGeometry { } } else { if (calculationMethod == CalculationMethod::Bysegment) { - ShowSevereError(state, - format("{}: {}, {} set as calculation method, but no values have been set for Surface Segments Exposed", + ShowSevereError( + state, + EnergyPlus::format("{}: {}, {} set as calculation method, but no values have been set for Surface Segments Exposed", s_ipsc->cCurrentModuleObject, state.dataSurface->Surface(Found).Name, calculationMethod)); @@ -7899,16 +8024,17 @@ namespace SurfaceGeometry { int SurfNum = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataSurface->Surface); if (SurfNum == 0) { ShowSevereError(state, - format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", - RoutineName, - s_ipsc->cCurrentModuleObject, - SurfLocalEnv.Name, - s_ipsc->cAlphaFieldNames(2))); - ShowContinueError(state, - format("{} entered value = \"{}\", no corresponding surface (ref BuildingSurface:Detailed) has been " - "found in the input file.", - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + 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))); ErrorsFound = true; } else { SurfLocalEnv.SurfPtr = SurfNum; @@ -7926,16 +8052,17 @@ namespace SurfaceGeometry { int SurroundingSurfsNum = Util::FindItemInList(s_ipsc->cAlphaArgs(4), state.dataSurface->SurroundingSurfsProperty); if (SurroundingSurfsNum == 0) { ShowSevereError(state, - format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", - RoutineName, - s_ipsc->cCurrentModuleObject, - SurfLocalEnv.Name, - s_ipsc->cAlphaFieldNames(4))); - ShowContinueError(state, - format("{} entered value = \"{}\", no corresponding surrounding surfaces properties has been found " - "in the input file.", - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + 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))); ErrorsFound = true; } else { SurfLocalEnv.SurroundingSurfsPtr = SurroundingSurfsNum; @@ -7955,15 +8082,16 @@ namespace SurfaceGeometry { DataLoopNode::ObjectIsParent); if (NodeNum == 0 && OutAirNodeManager::CheckOutAirNodeNumber(state, NodeNum)) { ShowSevereError(state, - format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", - RoutineName, - s_ipsc->cCurrentModuleObject, - SurfLocalEnv.Name, - s_ipsc->cAlphaFieldNames(5))); - ShowContinueError(state, - format("{} entered value = \"{}\", no corresponding outdoor air node has been found in the input file.", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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))); ErrorsFound = true; } else { SurfLocalEnv.OutdoorAirNodePtr = NodeNum; @@ -7975,16 +8103,16 @@ namespace SurfaceGeometry { int GndSurfsNum = Util::FindItemInList(s_ipsc->cAlphaArgs(6), state.dataSurface->GroundSurfsProperty); if (GndSurfsNum == 0) { ShowSevereError(state, - format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", - RoutineName, - s_ipsc->cCurrentModuleObject, - SurfLocalEnv.Name, - s_ipsc->cAlphaFieldNames(6))); + EnergyPlus::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", + RoutineName, + s_ipsc->cCurrentModuleObject, + SurfLocalEnv.Name, + s_ipsc->cAlphaFieldNames(6))); ShowContinueError( state, - format("{} entered value = \"{}\", no corresponding ground surfaces object has been found in the input file.", - s_ipsc->cAlphaFieldNames(6), - s_ipsc->cAlphaArgs(6))); + EnergyPlus::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; @@ -8100,13 +8228,15 @@ 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, format("{} = \"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, SrdSurfsProp.Name)); + ShowSevereError(state, + EnergyPlus::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, format("{} = \"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, SrdSurfsProp.Name)); + ShowSevereError(state, + EnergyPlus::format("{} = \"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, SrdSurfsProp.Name)); ShowContinueError(state, "Check number of input fields for each surrounding surface."); ErrorsFound = true; continue; @@ -8292,14 +8422,15 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { - ShowSevereError(state, format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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, - format("{}=\"{}\", multiple SurfaceProperty:HeatBalanceSourceTerm objects applied to the same surface.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::format("{}=\"{}\", multiple SurfaceProperty:HeatBalanceSourceTerm objects applied to the same surface.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -8316,8 +8447,9 @@ 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, - format("{}=\"SurfaceProperty:HeatBalanceSourceTerm\", cannot be specified for OtherSideCoefficient Surface={}", + ShowSevereError( + state, + EnergyPlus::format("{}=\"SurfaceProperty:HeatBalanceSourceTerm\", cannot be specified for OtherSideCoefficient Surface={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; @@ -8327,8 +8459,10 @@ namespace SurfaceGeometry { if (state.dataSurface->Surface(Found).outsideHeatSourceTermSched == nullptr && state.dataSurface->Surface(Found).insideHeatSourceTermSched == nullptr) { - ShowSevereError( - state, format("{}=\"{}\", no schedule defined for additional heat source.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", no schedule defined for additional heat source.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } } @@ -8359,7 +8493,8 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { - ShowSevereError(state, format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFoundSingleSurf = true; } @@ -8380,11 +8515,11 @@ namespace SurfaceGeometry { state.dataHeatBal->AnyCondFD = true; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFoundSingleSurf = true; } } @@ -8430,11 +8565,11 @@ namespace SurfaceGeometry { state.dataHeatBal->AnyCondFD = true; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ErrorsFoundMultiSurf = true; } } @@ -8615,11 +8750,11 @@ namespace SurfaceGeometry { } else { SurfacesOfType = false; ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFoundMultiSurf = true; } } @@ -8627,10 +8762,11 @@ namespace SurfaceGeometry { if (!SurfacesOfType) { ShowWarningError( state, - 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))); + 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))); } if (ErrorsFoundMultiSurf) { ErrorsFound = true; @@ -8671,11 +8807,11 @@ namespace SurfaceGeometry { state.dataHeatBal->AnyCondFD = true; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFoundSurfList = true; } } @@ -8685,8 +8821,9 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(Item1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { - ShowSevereError(state, format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("Name of surface not found = \"{}\"", s_ipsc->cAlphaArgs(Item1))); + 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))); ErrorsFoundSurfList = true; } @@ -8731,11 +8868,11 @@ namespace SurfaceGeometry { state.dataHeatBal->AnyCondFD = true; } else { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFoundByConstruct = true; } } @@ -8743,11 +8880,11 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(3), state.dataConstruction->Construct, state.dataHeatBal->TotConstructs); if (Found == 0) { ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ErrorsFoundByConstruct = true; } @@ -8788,31 +8925,35 @@ namespace SurfaceGeometry { msgneeded = false; if (NumEMPDMat > 0 && !state.dataHeatBal->AnyEMPD) { - ShowWarningError(state, - format("The input file includes {} MaterialProperty:MoisturePenetrationDepth:Settings objects but the moisture " - "penetration depth algorithm is not used anywhere.", - NumEMPDMat)); + ShowWarningError( + state, + EnergyPlus::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, - format("The input file includes {} MaterialProperty:PhaseChange objects but the conduction finite difference algorithm " - "is not used anywhere.", - NumPCMat)); + ShowWarningError( + state, + EnergyPlus::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, - format("The input file includes {} MaterialProperty:VariableThermalConductivity objects but the conduction finite " - "difference algorithm is not used anywhere.", - NumVTCMat)); + ShowWarningError( + state, + EnergyPlus::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, - format("The input file includes {} MaterialProperty:HeatAndMoistureTransfer:* objects but the combined heat and " - "moisture finite difference algorithm is not used anywhere.", - SumHAMTMat)); + 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)); msgneeded = true; } if (msgneeded) { @@ -8930,24 +9071,24 @@ namespace SurfaceGeometry { "An interior surface is defined as two surfaces with reverse constructions. The HeatTransferAlgorithm in " "both constructions should be same."); ShowContinueError(state, - format("The HeatTransferAlgorithm of Surface: {}, is {}", - surf.Name, - DataSurfaces::HeatTransAlgoStrs[static_cast(surf.HeatTransferAlgorithm)])); + EnergyPlus::format("The HeatTransferAlgorithm of Surface: {}, is {}", + surf.Name, + DataSurfaces::HeatTransAlgoStrs[static_cast(surf.HeatTransferAlgorithm)])); ShowContinueError(state, - format("The HeatTransferAlgorithm of Surface: {}, is {}", - extSurf.Name, - DataSurfaces::HeatTransAlgoStrs[static_cast(extSurf.HeatTransferAlgorithm)])); + EnergyPlus::format("The HeatTransferAlgorithm of Surface: {}, is {}", + extSurf.Name, + DataSurfaces::HeatTransAlgoStrs[static_cast(extSurf.HeatTransferAlgorithm)])); if (surf.HeatTransferAlgorithm > extSurf.HeatTransferAlgorithm) { ShowContinueError(state, - format("The HeatTransferAlgorithm of Surface: {}, is assigned to {}. Simulation continues.", - extSurf.Name, - DataSurfaces::HeatTransAlgoStrs[static_cast(surf.HeatTransferAlgorithm)])); + EnergyPlus::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, - format("The HeatTransferAlgorithm of Surface: {}, is assigned to {}. Simulation continues.", - surf.Name, - DataSurfaces::HeatTransAlgoStrs[static_cast(extSurf.HeatTransferAlgorithm)])); + EnergyPlus::format("The HeatTransferAlgorithm of Surface: {}, is assigned to {}. Simulation continues.", + surf.Name, + DataSurfaces::HeatTransAlgoStrs[static_cast(extSurf.HeatTransferAlgorithm)])); surf.HeatTransferAlgorithm = extSurf.HeatTransferAlgorithm; } } @@ -9216,29 +9357,31 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - format("{}Distance between two vertices < .01, possibly coincident. for Surface={}, in Zone={}", - RoutineName, - surfTemp.Name, - surfTemp.ZoneName)); + EnergyPlus::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); if (printPoppedFirst) { - ShowContinueError(state, format("Vertex [{}]=({:.2R},{:.2R},{:.2R})", poppedVertexIndex, it->x, it->y, it->z)); - ShowContinueError(state, format("Vertex [{}]=({:.2R},{:.2R},{:.2R})", keptVertexIndex, itKept->x, itKept->y, itKept->z)); + ShowContinueError(state, EnergyPlus::format("Vertex [{}]=({:.2R},{:.2R},{:.2R})", poppedVertexIndex, it->x, it->y, it->z)); + ShowContinueError(state, + EnergyPlus::format("Vertex [{}]=({:.2R},{:.2R},{:.2R})", keptVertexIndex, itKept->x, itKept->y, itKept->z)); } else { - ShowContinueError(state, format("Vertex [{}]=({:.2R},{:.2R},{:.2R})", keptVertexIndex, itKept->x, itKept->y, itKept->z)); - ShowContinueError(state, format("Vertex [{}]=({:.2R},{:.2R},{:.2R})", poppedVertexIndex, it->x, it->y, it->z)); + ShowContinueError(state, + EnergyPlus::format("Vertex [{}]=({:.2R},{:.2R},{:.2R})", keptVertexIndex, itKept->x, itKept->y, itKept->z)); + ShowContinueError(state, EnergyPlus::format("Vertex [{}]=({:.2R},{:.2R},{:.2R})", poppedVertexIndex, it->x, it->y, it->z)); } } ++state.dataErrTracking->TotalCoincidentVertices; if (nSides <= 3) { if (state.dataGlobal->DisplayExtraWarnings) { ShowContinueError(state, - format("Cannot Drop Vertex [{}]; Number of Surface Sides at minimum. This surface is now a " - "degenerate surface.", - poppedVertexIndex)); + EnergyPlus::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 @@ -9247,7 +9390,7 @@ namespace SurfaceGeometry { } if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, format("Dropping Vertex [{}].", poppedVertexIndex)); + ShowContinueError(state, EnergyPlus::format("Dropping Vertex [{}].", poppedVertexIndex)); } --nSides; vertices.erase(it); @@ -9267,43 +9410,45 @@ namespace SurfaceGeometry { surfTemp.Vertex, SurfWorldAz, SurfTilt, surfTemp.lcsx, surfTemp.lcsy, surfTemp.lcsz, surfTemp.NewellSurfaceNormalVector); dotp = dot(surfTemp.NewellSurfaceNormalVector, TestVector); if (surfTemp.Class == SurfaceClass::Roof && dotp < -0.000001) { - TiltString = format("{:.1R}", SurfTilt); - ShowWarningError(state, - format("{}Roof/Ceiling is upside down! Tilt angle=[{}], should be near 0, Surface=\"{}\", in Zone=\"{}\".", - RoutineName, - TiltString, - surfTemp.Name, - surfTemp.ZoneName)); + 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)); ShowContinueError(state, "Automatic fix is attempted."); ReverseAndRecalculate(state, SurfNum, surfTemp.Sides, SurfWorldAz, SurfTilt); } else if (surfTemp.Class == SurfaceClass::Roof && SurfTilt > 80.0) { - TiltString = format("{:.1R}", SurfTilt); + TiltString = EnergyPlus::format("{:.1R}", SurfTilt); ShowWarningError( state, - format("{}Roof/Ceiling is not oriented correctly! Tilt angle=[{}], should be near 0, Surface=\"{}\", in Zone=\"{}\".", - RoutineName, - TiltString, - surfTemp.Name, - surfTemp.ZoneName)); + EnergyPlus::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 = format("{:.1R}", SurfTilt); + TiltString = EnergyPlus::format("{:.1R}", SurfTilt); ShowWarningError(state, - format("{}Floor is upside down! Tilt angle=[{}], should be near 180, Surface=\"{}\", in Zone=\"{}\".", - RoutineName, - TiltString, - surfTemp.Name, - surfTemp.ZoneName)); + EnergyPlus::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 = format("{:.1R}", SurfTilt); - ShowWarningError(state, - format("{}Floor is not oriented correctly! Tilt angle=[{}], should be near 180, Surface=\"{}\", in Zone=\"{}\".", - RoutineName, - TiltString, - surfTemp.Name, - surfTemp.ZoneName)); + 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)); } surfTemp.Azimuth = SurfWorldAz; surfTemp.Tilt = SurfTilt; @@ -9346,7 +9491,7 @@ namespace SurfaceGeometry { TransformVertsByAspect(state, SurfNum, surfTemp.Sides); } else { - ShowFatalError(state, format("{}Called with less than 2 sides, Surface={}", RoutineName, surfTemp.Name)); + ShowFatalError(state, EnergyPlus::format("{}Called with less than 2 sides, Surface={}", RoutineName, surfTemp.Name)); } // Preliminary Height/Width @@ -9410,14 +9555,16 @@ namespace SurfaceGeometry { Vectors::DetermineAzimuthAndTilt( surfTemp.Vertex, SurfAzimuth, SurfTilt, surfTemp.lcsx, surfTemp.lcsy, surfTemp.lcsz, surfTemp.NewellSurfaceNormalVector); if (surfTemp.Class == SurfaceClass::Roof && SurfTilt > 80.0) { - TiltString = format("{:.1R}", SurfTilt); - ShowWarningError( - state, - format("{}Roof/Ceiling is still upside down! Tilt angle=[{}], should be near 0, please fix manually.", RoutineName, TiltString)); + 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)); } if (surfTemp.Class == SurfaceClass::Floor && SurfTilt < 158.2) { // 40% grade! - ShowWarningError( - state, format("{}Floor is still upside down! Tilt angle=[{}], should be near 180, please fix manually.", RoutineName, TiltString)); + ShowWarningError(state, + EnergyPlus::format( + "{}Floor is still upside down! Tilt angle=[{}], should be near 180, please fix manually.", RoutineName, TiltString)); } } @@ -9626,11 +9773,11 @@ namespace SurfaceGeometry { windowShadingControl.ZoneIndex = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataHeatBal->Zone); if (windowShadingControl.ZoneIndex == 0) { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } @@ -9640,21 +9787,21 @@ namespace SurfaceGeometry { // INTERIORSHADE or EXTERIORSHADE if (s_ipsc->cAlphaArgs(3) == "INTERIORNONINSULATINGSHADE" || s_ipsc->cAlphaArgs(3) == "INTERIORINSULATINGSHADE") { ShowWarningError(state, - format("{}=\"{}\" is using obsolete {}=\"{}\", changing to \"InteriorShade\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format("{}=\"{}\" is using obsolete {}=\"{}\", changing to \"ExteriorShade\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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"; } @@ -9664,11 +9811,11 @@ namespace SurfaceGeometry { if (Found <= 1) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } else { windowShadingControl.ShadingType = DataSurfaces::WinShadingType(Found); } @@ -9719,11 +9866,11 @@ namespace SurfaceGeometry { if (windowShadingControl.multiSurfaceControl == DataSurfaces::MultiSurfaceControl::Invalid) { windowShadingControl.multiSurfaceControl = DataSurfaces::MultiSurfaceControl::Sequential; ShowWarningError(state, - format("{}=\"{}\" should be either SEQUENTIAL or GROUP {}=\"{}\", defaulting to \"SEQUENTIAL\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(13), - s_ipsc->cAlphaArgs(13))); + EnergyPlus::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) { @@ -9735,9 +9882,9 @@ namespace SurfaceGeometry { } } else { ShowSevereError(state, - format("{}=\"{}\" invalid. Must reference at least one Fenestration Surface object name.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::format("{}=\"{}\" invalid. Must reference at least one Fenestration Surface object name.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); } windowShadingControl.shadingControlType = static_cast( @@ -9750,11 +9897,11 @@ namespace SurfaceGeometry { windowShadingControl.shadingControlType == DataSurfaces::WindowShadingControlType::OnIfScheduled)) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" for exterior screens.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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."); } @@ -9768,25 +9915,28 @@ namespace SurfaceGeometry { windowShadingControl.shadingControlType == DataSurfaces::WindowShadingControlType::OnIfScheduled)) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" for exterior screens.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{}=\"{}\", {} is blank.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name, s_ipsc->cAlphaFieldNames(4))); + EnergyPlus::format( + "{}=\"{}\", {} is blank.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name, s_ipsc->cAlphaFieldNames(4))); ShowContinueError(state, "A valid construction is required."); ErrorsFound = true; } else { ShowSevereError( state, - format("{}=\"{}\", {} is invalid.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name, s_ipsc->cAlphaFieldNames(4))); - ShowContinueError(state, format("Construction=\"{}\" was used. A valid construction is required.", s_ipsc->cAlphaArgs(4))); + EnergyPlus::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))); ErrorsFound = true; } } @@ -9796,7 +9946,8 @@ namespace SurfaceGeometry { windowShadingControl.shadingControlType != DataSurfaces::WindowShadingControlType::AlwaysOff && windowShadingControl.shadingControlType != DataSurfaces::WindowShadingControlType::OnIfScheduled && windowShadingControl.shadingControlType != DataSurfaces::WindowShadingControlType::HiGlare) { - ShowWarningError(state, format("{}=\"{}\", The first SetPoint is zero.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name)); + ShowWarningError( + state, EnergyPlus::format("{}=\"{}\", The first SetPoint is zero.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name)); ShowContinueError(state, "..You may have forgotten to specify that setpoint."); } @@ -9815,26 +9966,26 @@ namespace SurfaceGeometry { (!windowShadingControl.ShadingControlIsScheduled)) { // CR 7709 BG ErrorsFound = true; ShowSevereError(state, - format("{} = \"{}\" invalid, {} must be set to \"Yes\" for {} = OnIfScheduleAllows", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(7), - s_ipsc->cAlphaFieldNames(5))); + EnergyPlus::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, - format("{}=\"{}\" invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ShowContinueError(state, - format("...{} must be SwitchableGlazing for this control, but entered type=\"{}\".", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::format("...{} must be SwitchableGlazing for this control, but entered type=\"{}\".", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } DataSurfaces::WinShadingType ShTyp = windowShadingControl.ShadingType; @@ -9843,68 +9994,76 @@ namespace SurfaceGeometry { if (IShadedConst == 0 && IShadingDevice == 0) { ShowSevereError(state, - format("{}=\"{}\" has no matching shaded construction or shading device.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name)); + EnergyPlus::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, - format("{}=\"{}\" has {}= SwitchableGlazing but no matching shaded construction", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format("{}=\"{}\" has {}= InteriorShade or ExteriorShade but matching shading device is not a window 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, format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); + ShowContinueError(state, + EnergyPlus::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, - format("{}=\"{}\" has {}= ExteriorScreen but matching shading device is not a window screen", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); + 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)); ErrorsFound = true; } if ((ShTyp == DataSurfaces::WinShadingType::IntBlind || ShTyp == DataSurfaces::WinShadingType::ExtBlind) && s_mat->materials(IShadingDevice)->group != Material::Group::Blind) { - ShowSevereError(state, - format("{}=\"{}\" has {}= InteriorBlind or ExteriorBlind but matching shading device is not a window 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, format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); + ShowContinueError(state, + EnergyPlus::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, - format("{}=\"{}\" has {}= BetweenGlassShade or BetweenGlassBlind and", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, - format("{} is specified. This is illegal. Specify shaded construction instead.", s_ipsc->cAlphaFieldNames(8))); + EnergyPlus::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))); ErrorsFound = true; } } else if (IShadedConst > 0 && IShadingDevice > 0) { IShadingDevice = 0; ShowWarningError(state, - format("{}=\"{}\" Both {} and {} are specified.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaFieldNames(9))); - ShowContinueError( - state, format("The {}=\"{}\" will be used.", s_ipsc->cAlphaFieldNames(4), state.dataConstruction->Construct(IShadedConst).Name)); + 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)); } // If type = interior or exterior shade or blind require that the shaded construction @@ -9920,75 +10079,75 @@ namespace SurfaceGeometry { if (s_mat->materials(state.dataConstruction->Construct(IShadedConst).LayerPoint(NLayers))->group != Material::Group::Shade) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("of {}=\"{}\" should have a shade layer on the inside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(43), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(43), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("of {}=\"{}\" should have a shade layer on the outside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("of {}=\"{}\" should have a screen layer on the outside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("of {}=\"{}\" should have a blind layer on the inside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("of {}=\"{}\" should have a blind layer on the outside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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) { @@ -10007,15 +10166,15 @@ namespace SurfaceGeometry { if (BGShadeBlindError) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("of {}=\"{}\" should have two or three glass layers and a", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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) { @@ -10035,15 +10194,15 @@ namespace SurfaceGeometry { if (BGShadeBlindError) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("of {}=\"{}\" should have two or three glass layers and a", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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."); } } @@ -10051,31 +10210,34 @@ namespace SurfaceGeometry { if (IShadingDevice > 0) { if ((ShTyp == DataSurfaces::WinShadingType::IntShade || ShTyp == DataSurfaces::WinShadingType::ExtShade) && s_mat->materials(IShadingDevice)->group != Material::Group::Shade) { - ShowSevereError(state, - format("{}=\"{}\" has {}= InteriorShade or ExteriorShade but matching shading device is not a window 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, format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); + ShowContinueError(state, EnergyPlus::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, - format("{}=\"{}\" has {}= ExteriorScreen but matching shading device is not an exterior window 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, format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); + ShowContinueError(state, EnergyPlus::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, - format("{}=\"{}\" has {}= InteriorBlind or ExteriorBlind but matching shading device is not a window 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, format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); + ShowContinueError(state, EnergyPlus::format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); ErrorsFound = true; } } @@ -10103,21 +10265,23 @@ namespace SurfaceGeometry { ErrorsFound = true; ShowSevereError( state, - format("InitialAssociateWindowShadingControlFenestration: \"{}\", invalid because it is not an exterior window.", - surfTemp.Name)); - ShowContinueError( - state, - format(".. It appears on WindowShadingControl object: \"{}", state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); + EnergyPlus::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)); } // check to make sure the window is not using equivalent layer window construction if (state.dataConstruction->Construct(surfTemp.Construction).WindowTypeEQL) { ErrorsFound = true; - ShowSevereError(state, format("InitialAssociateWindowShadingControlFenestration: =\"{}\", invalid \".", surfTemp.Name)); + ShowSevereError(state, + EnergyPlus::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, - format(".. It appears on WindowShadingControl object: \"{}", state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); + ShowContinueError(state, + EnergyPlus::format(".. It appears on WindowShadingControl object: \"{}", + state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); surfTemp.activeWindowShadingControl = 0; } } @@ -10141,12 +10305,12 @@ namespace SurfaceGeometry { // this error condition should not occur since the rearrangement of Surface() from SurfureTmp() is reliable. ErrorsFound = true; ShowSevereError(state, - format("FinalAssociateWindowShadingControlFenestration: Fenestration surface named \"{}\" has " - "WindowShadingContol index that does not match the initial index assigned.", - state.dataSurface->Surface(fenestrationIndex).Name)); + EnergyPlus::format("FinalAssociateWindowShadingControlFenestration: Fenestration surface named \"{}\" has " + "WindowShadingContol index that does not match the initial index assigned.", + state.dataSurface->Surface(fenestrationIndex).Name)); ShowContinueError(state, - format("This occurs while WindowShadingControl object: \"{}\" is being evaluated. ", - state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); + EnergyPlus::format("This occurs while WindowShadingControl object: \"{}\" is being evaluated. ", + state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); } } } @@ -10163,14 +10327,15 @@ namespace SurfaceGeometry { for (auto wsc = std::next(theSurf.windowShadingControlList.begin()); wsc != theSurf.windowShadingControlList.end(); ++wsc) { if (!isWindowShadingControlSimilar(state, firstWindowShadingControl, *wsc)) { ErrorsFound = true; - ShowSevereError(state, - format("CheckWindowShadingControlSimilarForWindow: Fenestration surface named \"{}\" has multiple " + ShowSevereError( + state, + EnergyPlus::format("CheckWindowShadingControlSimilarForWindow: Fenestration surface named \"{}\" has multiple " "WindowShadingContols that are not similar.", theSurf.Name)); ShowContinueError(state, - format("for: \"{} and: {}", - state.dataSurface->WindowShadingControl(firstWindowShadingControl).Name, - state.dataSurface->WindowShadingControl(*wsc).Name)); + EnergyPlus::format("for: \"{} and: {}", + state.dataSurface->WindowShadingControl(firstWindowShadingControl).Name, + state.dataSurface->WindowShadingControl(*wsc).Name)); } } } @@ -10255,9 +10420,9 @@ namespace SurfaceGeometry { if (state.dataSurface->StormWindow(StormWinNum).DateOn == state.dataSurface->StormWindow(StormWinNum).DateOff) { ShowSevereError(state, - format("{}: Date On = Date Off -- not allowed, occurred in WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - StormWinNum)); + EnergyPlus::format("{}: Date On = Date Off -- not allowed, occurred in WindowProperty:StormWindow Input #{}", + s_ipsc->cCurrentModuleObject, + StormWinNum)); ErrorsFound = true; } @@ -10283,19 +10448,19 @@ namespace SurfaceGeometry { if (state.dataSurface->StormWindow(StormWinNum).DayOfMonthOn > oneBasedDaysInMonth[state.dataSurface->StormWindow(StormWinNum).MonthOn]) { ShowSevereError(state, - format("{}: Date On (Day of Month) [{}], invalid for WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->StormWindow(StormWinNum).DayOfMonthOn, - StormWinNum)); + EnergyPlus::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, - format("{}: Date On Month [{}], invalid for WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->StormWindow(StormWinNum).MonthOn, - StormWinNum)); + EnergyPlus::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; @@ -10303,19 +10468,19 @@ namespace SurfaceGeometry { if (state.dataSurface->StormWindow(StormWinNum).DayOfMonthOff > oneBasedDaysInMonth[state.dataSurface->StormWindow(StormWinNum).MonthOff]) { ShowSevereError(state, - format("{}: Date Off (Day of Month) [{}], invalid for WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->StormWindow(StormWinNum).DayOfMonthOff, - StormWinNum)); + EnergyPlus::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, - format("{}: Date Off Month [{}], invalid for WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->StormWindow(StormWinNum).MonthOff, - StormWinNum)); + EnergyPlus::format("{}: Date Off Month [{}], invalid for WindowProperty:StormWindow Input #{}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->StormWindow(StormWinNum).MonthOff, + StormWinNum)); ErrorsFound = true; } @@ -10325,13 +10490,13 @@ namespace SurfaceGeometry { // Require BaseWindowNum be that of an exterior window int SurfNum = state.dataSurface->StormWindow(StormWinNum).BaseWindowNum; if (SurfNum == 0) { - ShowSevereError(state, format("{}=\"{}\" invalid.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::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, format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowSevereError(state, format("cannot be used with surface={}", surf.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("cannot be used with surface={}", surf.Name)); ShowContinueError(state, "because that surface is not an exterior window."); ErrorsFound = true; } @@ -10341,27 +10506,28 @@ namespace SurfaceGeometry { int MatNum = state.dataSurface->StormWindow(StormWinNum).StormWinMaterialNum; if (SurfNum > 0) { if (MatNum == 0) { - ShowSevereError(state, format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("{}=\"{}\" not found as storm window layer.", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + 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))); ErrorsFound = true; } else { if (s_mat->materials(MatNum)->group != Material::Group::Glass) { - ShowSevereError(state, format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - format("{}=\"{}must be a WindowMaterial:Glazing or WindowMaterial:Glazing:RefractionExtinctionMethod", - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + 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))); ErrorsFound = true; } } // Error if base window has airflow control if (state.dataSurface->SurfWinAirflowControlType(SurfNum) != DataSurfaces::WindowAirFlowControlType::Invalid) { - ShowSevereError( - state, - 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, + EnergyPlus::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; } } @@ -10372,14 +10538,16 @@ 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, format("{}=\"{}\" check times that storm window", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError( + state, EnergyPlus::format("{}=\"{}\" check times that storm window", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - 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, format("these times may be reversed for your building latitude={:.2R} deg.", state.dataEnvrn->Latitude)); + 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)); + ShowContinueError( + state, EnergyPlus::format("these times may be reversed for your building latitude={:.2R} deg.", state.dataEnvrn->Latitude)); } } } @@ -10446,7 +10614,7 @@ namespace SurfaceGeometry { int SurfNum = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (SurfNum == 0) { - ShowSevereError(state, format("{}=\"{}\" not found.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" not found.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } // Check that associated surface is a 2- or 3-pane exterior window @@ -10467,9 +10635,10 @@ namespace SurfaceGeometry { } } if (WrongSurfaceType) { - ShowSevereError( - state, - format("{}=\"{}\" is not an exterior window with 2 or 3 glass layers.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\" is not an exterior window with 2 or 3 glass layers.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } } @@ -10478,34 +10647,34 @@ namespace SurfaceGeometry { if (s_ipsc->cAlphaArgs(2) != "INDOORAIR" && s_ipsc->cAlphaArgs(2) != "OUTDOORAIR") { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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, - format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, format("..when {}=\"{}\"", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + 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))); } // Error if illegal airflow control type @@ -10513,64 +10682,64 @@ namespace SurfaceGeometry { s_ipsc->cAlphaArgs(4) != "SCHEDULEDONLY") { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::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, - format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + EnergyPlus::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, - format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); - ShowContinueError(state, format("..when {}=\"{}\"", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + 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))); } // 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, - format("{}=\"{}has {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}has {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("..but {}=\"{}If specified, the {} will be ignored.", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5), - s_ipsc->cAlphaFieldNames(5))); + EnergyPlus::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, - format("{}=\"{}has {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}has {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("..but {}=\"{}\". If specified, the {} will be ignored.", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5), - s_ipsc->cAlphaFieldNames(5))); + EnergyPlus::format("..but {}=\"{}\". If specified, the {} will be ignored.", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5), + s_ipsc->cAlphaFieldNames(5))); } if (SurfNum > 0) { @@ -10599,16 +10768,17 @@ namespace SurfaceGeometry { DataZoneEquipment::GetReturnAirNodeForZone(state, surf.Zone, retNodeName, callDescription); if (state.dataSurface->SurfWinAirflowReturnNodePtr(SurfNum) == 0) { ShowSevereError(state, - format("{}{}=\"{}\", airflow window return air node not found for {} = {}", - routineName, - s_ipsc->cCurrentModuleObject, - surf.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + EnergyPlus::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, - format("{}=\"{}\" did not find a matching return air node.", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); + ShowContinueError(state, + EnergyPlus::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 " @@ -10632,16 +10802,16 @@ namespace SurfaceGeometry { ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6)); ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", has {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\", has {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - format("..and {}=\"{}\", but no {} specified.", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5), - s_ipsc->cAlphaFieldNames(6))); + EnergyPlus::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) { @@ -10653,9 +10823,9 @@ namespace SurfaceGeometry { // Warning if associated window is an interior window if (surf.ExtBoundCond != DataSurfaces::ExternalEnvironment && !ErrorsFound) { ShowWarningError(state, - format("{}=\"{}\", is an Interior window; cannot be an airflow window.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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 @@ -10666,10 +10836,10 @@ namespace SurfaceGeometry { if (dynamic_cast(s_mat->materials(MatGapFlow))->gases[0].type != Material::GasType::Air) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", Gas type not air in airflow gap of construction {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - state.dataConstruction->Construct(ConstrNum).Name)); + EnergyPlus::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) { @@ -10690,9 +10860,9 @@ namespace SurfaceGeometry { Material::GasType::Air) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", gas type must be air on either side of the shade/blind", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + EnergyPlus::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 } @@ -10721,7 +10891,7 @@ namespace SurfaceGeometry { if (TotKivaStgs > 1) { ErrorsFound = true; - ShowSevereError(state, format("Multiple {} objects found. Only one is allowed.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Multiple {} objects found. Only one is allowed.", s_ipsc->cCurrentModuleObject)); } if (TotKivaStgs == 1) { @@ -10780,10 +10950,10 @@ namespace SurfaceGeometry { } else { ErrorsFound = true; ShowSevereError(state, - format("{}, {} is not a valid choice for {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(alpF), - s_ipsc->cAlphaFieldNames(alpF))); + EnergyPlus::format("{}, {} is not a valid choice for {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(alpF), + s_ipsc->cAlphaFieldNames(alpF))); } } alpF++; @@ -10795,10 +10965,10 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->kivaManager.settings.deepGroundBoundary != HeatBalanceKivaManager::KivaManager::Settings::AUTO) { ErrorsFound = true; ShowSevereError(state, - format("{}, {} should not be set to Autocalculate unless {} is set to Autoselect", - s_ipsc->cCurrentModuleObject, - s_ipsc->cNumericFieldNames(numF), - s_ipsc->cAlphaFieldNames(alpF - 1))); + 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))); } } else { state.dataSurfaceGeometry->kivaManager.settings.deepGroundDepth = s_ipsc->rNumericArgs(numF); @@ -10894,11 +11064,11 @@ namespace SurfaceGeometry { if (m->group != Material::Group::Regular || m->ROnly) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -10918,11 +11088,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + EnergyPlus::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); @@ -10932,15 +11102,17 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + 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))); } numF++; if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + 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))); } numF++; } @@ -10951,22 +11123,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -10981,11 +11153,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + EnergyPlus::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); @@ -10995,8 +11167,9 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + 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))); } numF++; } @@ -11007,22 +11180,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11042,11 +11215,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + EnergyPlus::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); @@ -11056,15 +11229,17 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + 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))); } numF++; if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + 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))); } numF++; } @@ -11075,22 +11250,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11105,11 +11280,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + EnergyPlus::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); @@ -11119,8 +11294,9 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + 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))); } numF++; } @@ -11141,11 +11317,11 @@ namespace SurfaceGeometry { if (fndInput.wallConstructionIndex == 0) { ErrorsFound = true; ShowSevereError(state, - format("Did not find matching construction for {}=\"{}\", {}, missing construction = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::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); @@ -11153,11 +11329,11 @@ namespace SurfaceGeometry { if (c.TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Cannot be a window construction"); continue; } @@ -11172,22 +11348,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11202,11 +11378,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + EnergyPlus::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); @@ -11216,8 +11392,9 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + 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))); } numF++; } @@ -11228,10 +11405,10 @@ namespace SurfaceGeometry { int numBlocks = numRemainingFields / 4; if (mod(numRemainingFields, 4) != 0) { ShowWarningError(state, - format("{}=\"{}\", number of Block fields not even multiple of 4. Will read in {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - numBlocks)); + EnergyPlus::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; @@ -11240,22 +11417,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::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, - format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11264,10 +11441,10 @@ namespace SurfaceGeometry { } else { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", {} is required and not given.", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF))); + EnergyPlus::format("{}=\"{}\", {} is required and not given.", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF))); continue; } alpF++; @@ -11282,11 +11459,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + EnergyPlus::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); @@ -11452,13 +11629,15 @@ 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, format("{}=\"{}\" has zeros for all coefficients.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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, format("{}=\"{}\" has zeros for all coefficients.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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."); } @@ -11468,14 +11647,14 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(10)) { state.dataSurface->OSC(OSCNum).MinLimitPresent = true; state.dataSurface->OSC(OSCNum).MinTempLimit = s_ipsc->rNumericArgs(10); - cOSCLimitsString = format("{:.3R}", s_ipsc->rNumericArgs(10)); + cOSCLimitsString = EnergyPlus::format("{:.3R}", s_ipsc->rNumericArgs(10)); } else { cOSCLimitsString = "N/A"; } if (!s_ipsc->lNumericFieldBlanks(11)) { state.dataSurface->OSC(OSCNum).MaxLimitPresent = true; state.dataSurface->OSC(OSCNum).MaxTempLimit = s_ipsc->rNumericArgs(11); - cOSCLimitsString += format(",{:.3R}", s_ipsc->rNumericArgs(10)); + cOSCLimitsString += EnergyPlus::format(",{:.3R}", s_ipsc->rNumericArgs(10)); } else { cOSCLimitsString += ",N/A"; } @@ -11493,7 +11672,7 @@ namespace SurfaceGeometry { print(state.files.eio, "{}\n", OSCFormat1); } if (state.dataSurface->OSC(Loop).SurfFilmCoef > 0.0) { - s_ipsc->cAlphaArgs(1) = format("{:.3R}", state.dataSurface->OSC(Loop).SurfFilmCoef); + s_ipsc->cAlphaArgs(1) = EnergyPlus::format("{:.3R}", state.dataSurface->OSC(Loop).SurfFilmCoef); SetupOutputVariable(state, "Surface Other Side Coefficients Exterior Air Drybulb Temperature", Constant::Units::C, @@ -11509,7 +11688,8 @@ namespace SurfaceGeometry { "Other Side Coefficients,{},{},{},{:.3R},{:.3R},{:.3R},{:.3R},{:.3R},{},{},{:.3R},{:.3R},{}\n", state.dataSurface->OSC(Loop).Name, s_ipsc->cAlphaArgs(1), - (state.dataSurface->OSC(Loop).constTempSched != nullptr) ? "N/A" : format("{:.2R}", state.dataSurface->OSC(Loop).ConstTemp), + (state.dataSurface->OSC(Loop).constTempSched != nullptr) ? "N/A" + : EnergyPlus::format("{:.2R}", state.dataSurface->OSC(Loop).ConstTemp), state.dataSurface->OSC(Loop).ConstTempCoef, state.dataSurface->OSC(Loop).ExtDryBulbCoef, state.dataSurface->OSC(Loop).GroundTempCoef, @@ -11775,10 +11955,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, format("Invalid movable insulation material for {}:", s_ipsc->cCurrentModuleObject)); - ShowSevereError( - state, format("...Movable insulation material type specified = {}", cMaterialGroupType(static_cast(MaterialLayerGroup)))); - ShowSevereError(state, format("...Movable insulation material name specified = {}", s_ipsc->cAlphaArgs(3))); + 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))); ErrorsFound = true; } @@ -11799,15 +11980,15 @@ namespace SurfaceGeometry { if (thisMaterial->Resistance <= 0.0) { if (thisMaterial->Conductivity <= 0.0 || thisMaterial->Thickness <= 0.0) { ShowSevereError(state, - format("{}, {}=\"{}\", invalid material.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}, {}=\"{}\", invalid material.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "\"Outside\", invalid material for movable insulation."); ShowContinueError(state, - format("Material=\"{}\",Resistance=[{:.3R}], must be > 0 for use in Movable Insulation.", - thisMaterial->Name, - thisMaterial->Resistance)); + EnergyPlus::format("Material=\"{}\",Resistance=[{:.3R}], must be > 0 for use in Movable Insulation.", + thisMaterial->Name, + thisMaterial->Resistance)); ErrorsFound = true; } else if (thisMaterial->Conductivity > 0.0) { thisMaterial->Resistance = thisMaterial->Thickness / thisMaterial->Conductivity; @@ -11817,15 +11998,15 @@ namespace SurfaceGeometry { if (thisMaterial->Conductivity <= 0.0) { if (thisMaterial->Resistance <= 0.0) { ShowSevereError(state, - format("{}, {}=\"{}\", invalid material.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}, {}=\"{}\", invalid material.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "\"Outside\", invalid material for movable insulation."); ShowContinueError(state, - format("Material=\"{}\",Conductivity=[{:.3R}], must be > 0 for use in Movable Insulation.", - thisMaterial->Name, - thisMaterial->Conductivity)); + EnergyPlus::format("Material=\"{}\",Conductivity=[{:.3R}], must be > 0 for use in Movable Insulation.", + thisMaterial->Name, + thisMaterial->Conductivity)); ErrorsFound = true; } } @@ -11846,15 +12027,15 @@ namespace SurfaceGeometry { if (thisMaterial->Resistance <= 0.0) { if (thisMaterial->Conductivity <= 0.0 || thisMaterial->Thickness <= 0.0) { ShowSevereError(state, - format("{}, {}=\"{}\", invalid material.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}, {}=\"{}\", invalid material.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "\"Inside\", invalid material for movable insulation."); ShowContinueError(state, - format("Material=\"{}\",Resistance=[{:.3R}], must be > 0 for use in Movable Insulation.", - thisMaterial->Name, - thisMaterial->Resistance)); + EnergyPlus::format("Material=\"{}\",Resistance=[{:.3R}], must be > 0 for use in Movable Insulation.", + thisMaterial->Name, + thisMaterial->Resistance)); ErrorsFound = true; } else if (thisMaterial->Conductivity > 0.0) { thisMaterial->Resistance = thisMaterial->Thickness / thisMaterial->Conductivity; @@ -11867,7 +12048,8 @@ namespace SurfaceGeometry { } // switch (inulationType) if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Window) { - ShowSevereError(state, format("{}, {}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowSevereError( + state, EnergyPlus::format("{}, {}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "invalid use on a Window. Use WindowShadingControl instead."); ErrorsFound = true; } @@ -11910,10 +12092,11 @@ namespace SurfaceGeometry { int countNotFullyEnclosedZones = 0; for (auto &thisZone : state.dataHeatBal->Zone) { if (!thisZone.HasFloor) { - ShowWarningError(state, - 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, + 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)); } Real64 SumAreas = 0.0; @@ -11980,8 +12163,9 @@ namespace SurfaceGeometry { CalcVolume = oppositeWallArea * distanceBetweenOppositeWalls; volCalcMethod = ZoneVolumeCalcMethod::OpWallAreaTimesDistance; } else if (thisZone.Volume == Constant::AutoCalculate) { // no user entered zone volume - ShowSevereError(state, - format("For zone: {} it is not possible to calculate the volume from the surrounding surfaces so either provide the " + 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)); CalcVolume = 0.; @@ -11993,10 +12177,11 @@ namespace SurfaceGeometry { if (!isZoneEnclosed) { ++countNotFullyEnclosedZones; if (state.dataGlobal->DisplayExtraWarnings) { // report missing - ShowWarningError(state, - 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, + 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)); switch (volCalcMethod) { case ZoneVolumeCalcMethod::FloorAreaTimesHeight1: ShowContinueError(state, @@ -12048,8 +12233,10 @@ namespace SurfaceGeometry { } ShowContinueError(state, surfaceNames); } - ShowContinueError(state, format(" Vertex start {{ {:.4R}, {:.4R}, {:.4R}}}", edge.start.x, edge.start.y, edge.start.z)); - ShowContinueError(state, format(" Vertex end {{ {:.4R}, {:.4R}, {:.4R}}}", edge.end.x, edge.end.y, edge.end.z)); + ShowContinueError( + state, EnergyPlus::format(" Vertex start {{ {:.4R}, {:.4R}, {:.4R}}}", edge.start.x, edge.start.y, edge.start.z)); + ShowContinueError(state, + EnergyPlus::format(" Vertex end {{ {:.4R}, {:.4R}, {:.4R}}}", edge.end.x, edge.end.y, edge.end.z)); } } } @@ -12075,12 +12262,14 @@ namespace SurfaceGeometry { // Warn user of using specified Zone Volume ShowWarningError( state, - format("Entered Volume entered for Zone=\"{}\" significantly different from calculated Volume", thisZone.Name)); - ShowContinueError(state, - format("Entered Zone Volume value={:.2R}, Calculated Zone Volume value={:.2R}, entered volume will be " - "used in calculations.", - thisZone.Volume, - CalcVolume)); + EnergyPlus::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 " + "used in calculations.", + thisZone.Volume, + CalcVolume)); } } } @@ -12095,8 +12284,8 @@ namespace SurfaceGeometry { } if (thisZone.Volume <= 0.0) { - ShowWarningError(state, format("Indicated Zone Volume <= 0.0 for Zone={}", thisZone.Name)); - ShowContinueError(state, format("The calculated Zone Volume was={:.2R}", thisZone.Volume)); + ShowWarningError(state, EnergyPlus::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."); thisZone.Volume = 10.; @@ -12175,9 +12364,9 @@ namespace SurfaceGeometry { state, "CalculateZoneVolume: 1 zone is not fully enclosed. For more details use: Output:Diagnostics,DisplayExtrawarnings; "); } else if (countNotFullyEnclosedZones > 1) { ShowWarningError(state, - format("CalculateZoneVolume: {} zones are not fully enclosed. For more details use: " - "Output:Diagnostics,DisplayExtrawarnings; ", - countNotFullyEnclosedZones)); + EnergyPlus::format("CalculateZoneVolume: {} zones are not fully enclosed. For more details use: " + "Output:Diagnostics,DisplayExtrawarnings; ", + countNotFullyEnclosedZones)); } } } @@ -12794,18 +12983,18 @@ namespace SurfaceGeometry { if (!IsCoPlanar) { if (OutOfLine > 0.01) { ShowSevereError(state, - format("{}Suspected non-planar surface:\"{}\", Max \"out of line\"={:.5T} at Vertex # {}", - RoutineName, - surf.Name, - OutOfLine, - LastVertexInError)); + EnergyPlus::format("{}Suspected non-planar surface:\"{}\", Max \"out of line\"={:.5T} at Vertex # {}", + RoutineName, + surf.Name, + OutOfLine, + LastVertexInError)); } else { ShowWarningError(state, - format("{}Possible non-planar surface:\"{}\", Max \"out of line\"={:.5T} at Vertex # {}", - RoutineName, - surf.Name, - OutOfLine, - LastVertexInError)); + EnergyPlus::format("{}Possible non-planar surface:\"{}\", Max \"out of line\"={:.5T} at Vertex # {}", + RoutineName, + surf.Name, + OutOfLine, + LastVertexInError)); } // ErrorInSurface=.TRUE. } @@ -12896,7 +13085,7 @@ namespace SurfaceGeometry { Vectors::PlaneEquation( state.dataSurface->Surface(surf.BaseSurf).Vertex, state.dataSurface->Surface(surf.BaseSurf).Sides, BasePlane, SError); if (SError) { - ShowSevereError(state, format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); + ShowSevereError(state, EnergyPlus::format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); ErrorInSurface = true; } ThisReveal = -Vectors::Pt2Plane(surf.Vertex(2), BasePlane); @@ -12924,11 +13113,12 @@ namespace SurfaceGeometry { MakeEquivalentRectangle(state, ThisSurf, ErrorsFound); if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, format("{}Suspected 4-sided but non-rectangular Window, Door or GlassDoor:", RoutineName)); + ShowWarningError(state, + EnergyPlus::format("{}Suspected 4-sided but non-rectangular Window, Door or GlassDoor:", RoutineName)); ShowContinueError( state, - format("Surface={} is transformed into an equivalent rectangular surface with the same area and aspect ratio. ", - surf.Name)); + EnergyPlus::format( + "Surface={} is transformed into an equivalent rectangular surface with the same area and aspect ratio. ", surf.Name)); } } @@ -12964,13 +13154,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, format("{}Base Surface=\"{}\", ", RoutineName, state.dataSurface->Surface(surf.BaseSurf).Name)); - ShowContinueError(state, - format("Window Surface=\"{}\" area (with frame) is too large to fit on the surface.", surf.Name)); + 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)); ShowContinueError(state, - format("Base surface area (-windows and doors)=[{:.2T}] m2, frame area=[{:.2T}] m2.", - state.dataSurface->Surface(surf.BaseSurf).Area, - state.dataSurface->SurfWinFrameArea(ThisSurf))); + EnergyPlus::format("Base surface area (-windows and doors)=[{:.2T}] m2, frame area=[{:.2T}] m2.", + state.dataSurface->Surface(surf.BaseSurf).Area, + state.dataSurface->SurfWinFrameArea(ThisSurf))); ErrorInSurface = true; } state.dataSurface->Surface(surf.BaseSurf).Area -= state.dataSurface->SurfWinFrameArea(ThisSurf); @@ -12984,16 +13175,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, format("{}Divider area exceeds glazed opening for window {}", RoutineName, surf.Name)); + ShowSevereError(state, EnergyPlus::format("{}Divider area exceeds glazed opening for window {}", RoutineName, surf.Name)); ShowContinueError(state, - format("Window surface area=[{:.2T}] m2, divider area=[{:.2T}] m2.", - surf.Area, - state.dataSurface->SurfWinDividerArea(ThisSurf))); + EnergyPlus::format("Window surface area=[{:.2T}] m2, divider area=[{:.2T}] m2.", + surf.Area, + state.dataSurface->SurfWinDividerArea(ThisSurf))); ErrorInSurface = true; } surf.Area -= state.dataSurface->SurfWinDividerArea(ThisSurf); // Glazed area if (DivArea <= 0.0) { - ShowWarningError(state, format("{}Calculated Divider Area <= 0.0 for Window={}", RoutineName, surf.Name)); + ShowWarningError(state, EnergyPlus::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."); } @@ -13036,7 +13227,7 @@ namespace SurfaceGeometry { Vectors::PlaneEquation( state.dataSurface->Surface(surf.BaseSurf).Vertex, state.dataSurface->Surface(surf.BaseSurf).Sides, BasePlane, SError); if (SError) { - ShowSevereError(state, format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); + ShowSevereError(state, EnergyPlus::format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); ErrorInSurface = true; } ThisReveal = -Vectors::Pt2Plane(surf.Vertex(2), BasePlane); @@ -13154,7 +13345,7 @@ namespace SurfaceGeometry { } break; default: { // Error Condition - ShowSevereError(state, format("{}Incorrect surface shape number.", RoutineName), OptionalOutputFileRef{state.files.eso}); + ShowSevereError(state, EnergyPlus::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; @@ -13239,10 +13430,10 @@ namespace SurfaceGeometry { ProcessSurfaceVertices(state, ThisBaseSurface, ErrorsFound); } else { - ShowSevereError(state, format("{}Developer error for Subsurface={}", RoutineName, surf.Name)); + ShowSevereError(state, EnergyPlus::format("{}Developer error for Subsurface={}", RoutineName, surf.Name)); ShowContinueError(state, - format("Base surface={} vertices must be processed before any subsurfaces.", - state.dataSurface->Surface(ThisBaseSurface).Name)); + EnergyPlus::format("Base surface={} vertices must be processed before any subsurfaces.", + state.dataSurface->Surface(ThisBaseSurface).Name)); ShowFatalError(state, std::string{RoutineName}); } } @@ -13290,10 +13481,10 @@ namespace SurfaceGeometry { DotSelfX23 = magnitude_squared(x23); if (DotSelfX23 <= Constant::OneMillionth) { - ShowSevereError(state, format("CalcCoordinateTransformation: Invalid dot product, surface=\"{}\":", surf.Name)); + ShowSevereError(state, EnergyPlus::format("CalcCoordinateTransformation: Invalid dot product, surface=\"{}\":", surf.Name)); for (int I = 1; I <= surf.Sides; ++I) { auto const &point = surf.Vertex(I); - ShowContinueError(state, format(" ({:8.3F},{:8.3F},{:8.3F})", point.x, point.y, point.z)); + ShowContinueError(state, EnergyPlus::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}); @@ -13464,7 +13655,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, format("Window={} has more than 3 glass layers; a storm window cannot be applied.", surf.Name)); + ShowFatalError(state, EnergyPlus::format("Window={} has more than 3 glass layers; a storm window cannot be applied.", surf.Name)); } // create unshaded construction with storm window @@ -13506,7 +13697,8 @@ namespace SurfaceGeometry { s_mat->materials(MatBetweenGlassSh)->group == Material::Group::Blind) { ShAndSt = true; } else { - ShowContinueError(state, format("Window={} has a shaded construction to which a storm window cannot be applied.", surf.Name)); + ShowContinueError( + state, EnergyPlus::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."); @@ -13529,7 +13721,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 = format("{}{}MM", namePrefix, mmDistance); // Name of created air layer material + std::string MatNameStAir = EnergyPlus::format("{}{}MM", namePrefix, mmDistance); // Name of created air layer material int matNum = Material::GetMaterialNum(state, MatNameStAir); if (matNum != 0) { return matNum; @@ -13739,12 +13931,13 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - format("SurfaceGeometry: ModifyWindow: Window {} uses the Window5 Data File Construction {}", - surfTemp.Name, - state.dataConstruction->Construct(IConst).Name)); - ShowContinueError(state, format("The height {:.3R}(m) or width (m) of this window differs by more than 10%{:.3R}", H, W)); + EnergyPlus::format("SurfaceGeometry: ModifyWindow: Window {} uses the Window5 Data File Construction {}", + surfTemp.Name, + state.dataConstruction->Construct(IConst).Name)); ShowContinueError(state, - format("from the corresponding height {:.3R} (m) or width (m) on the Window5 Data file.{:.3R}", h1, w1)); + EnergyPlus::format("The height {:.3R}(m) or width (m) of this window differs by more than 10%{:.3R}", H, W)); + ShowContinueError( + state, EnergyPlus::format("from the corresponding height {:.3R} (m) or width (m) on the Window5 Data file.{:.3R}", h1, w1)); 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."); } else { @@ -13755,10 +13948,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, - format("Subsurfaces have too much area for base surface={}", state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); - ShowContinueError(state, format("Subsurface creating error={}", surfTemp.Name)); + 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)); ErrorsFound = true; } @@ -13779,9 +13972,10 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowMessage(state, - format("SurfaceGeometry: ModifyWindow: Window {} has been replaced with the Window 5/6 two glazing system=\"{}\".", - surfTemp.Name, - state.dataConstruction->Construct(IConst).Name)); + EnergyPlus::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."); } else { ++state.dataSurfaceGeometry->Warning2Count; @@ -13795,9 +13989,10 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - format("SurfaceGeometry: ModifyWindow: Interior Window {} has been replaced with the Window 5/6 two glazing system=\"{}\".", - surfTemp.Name, - state.dataConstruction->Construct(IConst).Name)); + EnergyPlus::format( + "SurfaceGeometry: ModifyWindow: Interior Window {} has been replaced with the Window 5/6 two glazing system=\"{}\".", + surfTemp.Name, + state.dataConstruction->Construct(IConst).Name)); ShowContinueError( state, "Please check to make sure interior window is correct. Note that originally entered dimensions are overridden."); } else { @@ -13808,10 +14003,11 @@ namespace SurfaceGeometry { } else { // Interior window, specified not entered - ShowSevereError(state, format("SurfaceGeometry: ModifyWindow: Interior Window {} is a window in an adjacent zone.", surfTemp.Name)); - ShowContinueError( - state, - format("Attempted to add/reverse Window 5/6 multiple glazing system=\"{}\".", state.dataConstruction->Construct(IConst).Name)); + ShowSevereError( + state, EnergyPlus::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)); ShowContinueError(state, "Cannot use these Window 5/6 constructs for these Interior Windows. Program will terminate."); ErrorsFound = true; } @@ -13985,11 +14181,12 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Area <= 0.0) { ShowSevereError(state, - format("SurfaceGeometry: ModifyWindow: Subsurfaces have too much area for base surface={}", - state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); - ShowContinueError(state, format("Subsurface (window) creating error={}", surfTemp.Name)); - ShowContinueError(state, - format("This window has been replaced by two windows from the Window5 Data File of total area {:.2R} m2", AreaNew)); + 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)); + ShowContinueError( + state, + EnergyPlus::format("This window has been replaced by two windows from the Window5 Data File of total area {:.2R} m2", AreaNew)); ErrorsFound = true; } @@ -14306,13 +14503,15 @@ namespace SurfaceGeometry { NewAspectRatio = rNumerics(2); transformPlane = cAlphas(1); if (transformPlane != "XY") { - ShowWarningError(state, format("{}: invalid {}=\"{}...ignored.", CurrentModuleObject, s_ipsc->cAlphaFieldNames(1), cAlphas(1))); + ShowWarningError( + state, EnergyPlus::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, format("{}: must use Relative Coordinate System. Transform request ignored.", CurrentModuleObject)); + ShowWarningError(state, + EnergyPlus::format("{}: must use Relative Coordinate System. Transform request ignored.", CurrentModuleObject)); state.dataSurfaceGeometry->noTransform = true; state.dataSurface->AspectTransform = false; } @@ -14406,7 +14605,7 @@ namespace SurfaceGeometry { Real64 TotalArea(surface.GrossArea); if (TotalArea <= 0.0) { // catch a problem.... - ShowWarningError(state, format("CalcSurfaceCentroid: zero area surface, for surface={}", surface.Name)); + ShowWarningError(state, EnergyPlus::format("CalcSurfaceCentroid: zero area surface, for surface={}", surface.Name)); continue; } @@ -14471,13 +14670,13 @@ namespace SurfaceGeometry { } else { if (!surface.Name.empty()) { - ShowWarningError(state, format("CalcSurfaceCentroid: caught problem with # of sides, for surface={}", surface.Name)); - ShowContinueError(state, format("... number of sides must be >= 3, this surface # sides={}", surface.Sides)); + 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)); } else { - ShowWarningError(state, format("CalcSurfaceCentroid: caught problem with # of sides, for surface=#{}", ThisSurf)); + ShowWarningError(state, EnergyPlus::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, format("... number of sides must be >= 3, this surface # sides={}", surface.Sides)); + ShowContinueError(state, EnergyPlus::format("... number of sides must be >= 3, this surface # sides={}", surface.Sides)); } centroid = 0.0; } @@ -14494,11 +14693,12 @@ namespace SurfaceGeometry { } // loop through surfaces if (negZcount > 0) { - ShowWarningError(state, format("CalcSurfaceCentroid: {} Surfaces have the Z coordinate < 0.", negZcount)); + ShowWarningError(state, EnergyPlus::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, - format("...in any calculations, Outside temperatures will be the outside temperature + {:.3R} for these surfaces.", - state.dataEnvrn->WeatherFileTempModCoeff)); + ShowContinueError( + state, + EnergyPlus::format("...in any calculations, Outside temperatures will be the outside temperature + {:.3R} for these surfaces.", + state.dataEnvrn->WeatherFileTempModCoeff)); ShowContinueError(state, "...that is, these surfaces will have conditions as though at ground level."); } } @@ -14637,8 +14837,9 @@ namespace SurfaceGeometry { RadiantOrSolar = "Solar"; state.dataViewFactor->EnclSolInfo.allocate(state.dataGlobal->numSpaces); } else { - ShowFatalError( - state, format("{}: Illegal call to this function. Second argument must be 'RadiantEnclosures' or 'SolarEnclosures'", RoutineName)); + ShowFatalError(state, + EnergyPlus::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(), @@ -14662,8 +14863,9 @@ namespace SurfaceGeometry { if (!state.dataGlobal->DisplayExtraWarnings) { ++errorCount; } else { - ShowSevereError( - state, format("{}: Surface=\"{}\" uses Construction:AirBoundary in a non-interzone surface.", RoutineName, surf.Name)); + ShowSevereError(state, + EnergyPlus::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 @@ -14688,7 +14890,7 @@ namespace SurfaceGeometry { ++enclosureNum; auto &thisEnclosure = Enclosures(enclosureNum); thisSideEnclosureNum = enclosureNum; - thisEnclosure.Name = format("{} Enclosure {}", RadiantOrSolar, enclosureNum); + thisEnclosure.Name = EnergyPlus::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; @@ -14815,7 +15017,8 @@ namespace SurfaceGeometry { } } if (errorCount > 0) { - ShowSevereError(state, format("{}: {} surfaces use Construction:AirBoundary in non-interzone surfaces.", RoutineName, errorCount)); + ShowSevereError( + state, EnergyPlus::format("{}: {} surfaces use Construction:AirBoundary in non-interzone surfaces.", RoutineName, errorCount)); ShowContinueError(state, "For explicit details on each use, use Output:Diagnostics,DisplayExtraWarnings;"); } } @@ -15071,12 +15274,12 @@ namespace SurfaceGeometry { B = Z; } else { // This condition should not be reached if the surfaces are guaranteed to be planar already - ShowSevereError(state, format("CheckConvexity: Surface=\"{}\" is non-planar.", surfaceTmp.Name)); + ShowSevereError(state, EnergyPlus::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); static constexpr std::string_view ErrFmt = " ({:8.3F},{:8.3F},{:8.3F})"; - ShowContinueError(state, format(ErrFmt, point.x, point.y, point.z)); + ShowContinueError(state, EnergyPlus::format(ErrFmt, point.x, point.y, point.z)); } } } @@ -15116,9 +15319,10 @@ namespace SurfaceGeometry { colinearIndex -= NSides; } if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError( - state, - format("CheckConvexity: Surface=\"{}\", vertex {} is colinear with previous and next.", surfaceTmp.Name, colinearIndex)); + ShowWarningError(state, + EnergyPlus::format("CheckConvexity: Surface=\"{}\", vertex {} is colinear with previous and next.", + surfaceTmp.Name, + colinearIndex)); } ++state.dataErrTracking->TotalCoincidentVertices; surfCollinearVerts.push_back(colinearIndex); @@ -15138,9 +15342,9 @@ namespace SurfaceGeometry { !state.dataSysVars->SutherlandHodgman && (state.dataSysVars->shadingMethod == DataSystemVariables::ShadingMethod::PolygonClipping)) { ShowWarningError(state, - format("CheckConvexity: Zone=\"{}\", Surface=\"{}\" is non-convex.", - state.dataHeatBal->Zone(surfaceTmp.Zone).Name, - surfaceTmp.Name)); + EnergyPlus::format("CheckConvexity: Zone=\"{}\", Surface=\"{}\" is non-convex.", + state.dataHeatBal->Zone(surfaceTmp.Zone).Name, + surfaceTmp.Name)); int Np1 = n + 1; if (Np1 > NSides) { Np1 -= NSides; @@ -15149,10 +15353,10 @@ namespace SurfaceGeometry { if (Np2 > NSides) { Np2 -= NSides; } - ShowContinueError(state, format("...vertex {} to vertex {} to vertex {}", n, Np1, Np2)); - ShowContinueError(state, format("...vertex {}=[{:.2R},{:.2R},{:.2R}]", n, X(n), Y(n), Z(n))); - ShowContinueError(state, format("...vertex {}=[{:.2R},{:.2R},{:.2R}]", Np1, X(n + 1), Y(n + 1), Z(n + 1))); - ShowContinueError(state, format("...vertex {}=[{:.2R},{:.2R},{:.2R}]", Np2, X(n + 2), Y(n + 2), Z(n + 2))); + ShowContinueError(state, EnergyPlus::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))); // ShowContinueError(state, format("...theta angle=[{:.6R}]", Theta)); // ShowContinueError(state, format("...last theta angle=[{:.6R}]", LastTheta)); } @@ -15171,12 +15375,13 @@ namespace SurfaceGeometry { if (NSides - M >= 3) { surfaceTmp.Sides = NSides - M; if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, - format("CheckConvexity: Surface=\"{}\" has [{}] collinear points that have been removed.", surfaceTmp.Name, M)); + ShowWarningError( + state, + EnergyPlus::format("CheckConvexity: Surface=\"{}\" has [{}] collinear points that have been removed.", surfaceTmp.Name, M)); } } else { // too many if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, format("CheckConvexity: Surface=\"{}\" has [{}] collinear points.", surfaceTmp.Name, M)); + ShowWarningError(state, EnergyPlus::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; @@ -15199,9 +15404,9 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - format("CheckConvexity: Surface=\"{}\": The vertex points has been reprocessed as Sides = {}", - surfaceTmp.Name, - surfaceTmp.Sides)); + EnergyPlus::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 adb6d7b73e3..557f0b5259f 100644 --- a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc +++ b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc @@ -146,7 +146,7 @@ namespace SurfaceGroundHeatExchanger { } } // If we didn't find it, fatal - ShowFatalError(state, format("Surface Ground Heat Exchanger: Error getting inputs for pipe named: {}", objectName)); + ShowFatalError(state, EnergyPlus::format("Surface Ground Heat Exchanger: Error getting inputs for pipe named: {}", objectName)); // Shut up the compiler return nullptr; } @@ -231,15 +231,17 @@ namespace SurfaceGroundHeatExchanger { Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataConstruction->Construct); if (state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).ConstructionNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } // Error checking for surfaces, zones, and construction information if (!state.dataConstruction->Construct(state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).ConstructionNum).SourceSinkPresent) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, "Construction must have internal source/sink and be referenced by a ConstructionProperty:InternalHeatSource object"); ErrorsFound = true; @@ -258,8 +260,9 @@ namespace SurfaceGroundHeatExchanger { NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).InletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -276,8 +279,9 @@ namespace SurfaceGroundHeatExchanger { NodeInputManager::CompFluidStream::Primary, ObjectIsNotParent); if (state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).OutletNodeNum == 0) { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -294,16 +298,18 @@ namespace SurfaceGroundHeatExchanger { state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).TubeSpacing = state.dataIPShortCut->rNumericArgs(3); if (state.dataIPShortCut->rNumericArgs(2) == 0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } if (state.dataIPShortCut->rNumericArgs(3) == 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(3), state.dataIPShortCut->rNumericArgs(3))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(3), state.dataIPShortCut->rNumericArgs(3))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } @@ -312,16 +318,18 @@ namespace SurfaceGroundHeatExchanger { state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).SurfaceLength = state.dataIPShortCut->rNumericArgs(4); state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).SurfaceWidth = state.dataIPShortCut->rNumericArgs(5); if (state.dataIPShortCut->rNumericArgs(4) <= 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(4), state.dataIPShortCut->rNumericArgs(4))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(4), state.dataIPShortCut->rNumericArgs(4))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } if (state.dataIPShortCut->rNumericArgs(5) <= 0.0) { - ShowSevereError(state, - format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value must be greater than 0.0"); ErrorsFound = true; } @@ -332,8 +340,9 @@ namespace SurfaceGroundHeatExchanger { } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(5), "EXPOSED")) { state.dataSurfaceGroundHeatExchangers->SurfaceGHE(Item).LowerSurfCond = SurfCond_Exposed; } else { - ShowSevereError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Only \"Ground\" or \"Exposed\" is allowed."); ErrorsFound = true; } @@ -342,7 +351,7 @@ namespace SurfaceGroundHeatExchanger { // final error check if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", cCurrentModuleObject)); } // Set up the output variables @@ -437,8 +446,8 @@ namespace SurfaceGroundHeatExchanger { if (!state.dataEnvrn->GroundTempInputs[(int)DataEnvironment::GroundTempType::Shallow]) { ShowWarningError(state, "GetSurfaceGroundHeatExchanger: No \"Site:GroundTemperature:Shallow\" were input."); ShowContinueError(state, - format("Defaults, constant throughout the year of ({:.1R}) will be used.", - state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::Shallow])); + EnergyPlus::format("Defaults, constant throughout the year of ({:.1R}) will be used.", + state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::Shallow])); } state.dataSurfaceGroundHeatExchangers->NoSurfaceGroundTempObjWarning = false; } @@ -690,8 +699,10 @@ namespace SurfaceGroundHeatExchanger { // Check for non-convergence if (iter > Maxiter) { if (this->ConvErrIndex1 == 0) { - ShowWarningMessage( - state, format("CalcSurfaceGroundHeatExchanger=\"{}\", Did not converge (part 1), Iterations={}", this->Name, Maxiter)); + ShowWarningMessage(state, + EnergyPlus::format("CalcSurfaceGroundHeatExchanger=\"{}\", Did not converge (part 1), Iterations={}", + this->Name, + Maxiter)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( @@ -791,9 +802,10 @@ namespace SurfaceGroundHeatExchanger { // Check for non-convergence if (iter1 > Maxiter1) { if (this->ConvErrIndex2 == 0) { - ShowWarningMessage( - state, - format("CalcSurfaceGroundHeatExchanger=\"{}\", Did not converge (part 2), Iterations={}", this->Name, Maxiter)); + ShowWarningMessage(state, + EnergyPlus::format("CalcSurfaceGroundHeatExchanger=\"{}\", Did not converge (part 2), Iterations={}", + this->Name, + Maxiter)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( @@ -813,8 +825,10 @@ namespace SurfaceGroundHeatExchanger { // Check for non-convergence if (iter > Maxiter) { if (this->ConvErrIndex3 == 0) { - ShowWarningMessage( - state, format("CalcSurfaceGroundHeatExchanger=\"{}\", Did not converge (part 3), Iterations={}", this->Name, Maxiter)); + ShowWarningMessage(state, + EnergyPlus::format("CalcSurfaceGroundHeatExchanger=\"{}\", Did not converge (part 3), Iterations={}", + this->Name, + Maxiter)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( @@ -1148,9 +1162,10 @@ namespace SurfaceGroundHeatExchanger { if (this->FrozenErrIndex1 == 0) { ShowWarningMessage( state, - format("GroundHeatExchanger:Surface=\"{}\", water is frozen; Model not valid. Calculated Water Temperature=[{:.2R}] C", - this->Name, - this->InletTemp)); + EnergyPlus::format( + "GroundHeatExchanger:Surface=\"{}\", water is frozen; Model not valid. Calculated Water Temperature=[{:.2R}] C", + this->Name, + this->InletTemp)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, diff --git a/src/EnergyPlus/SwimmingPool.cc b/src/EnergyPlus/SwimmingPool.cc index 95e380827f2..a90c4c2c2e0 100644 --- a/src/EnergyPlus/SwimmingPool.cc +++ b/src/EnergyPlus/SwimmingPool.cc @@ -117,8 +117,9 @@ SwimmingPoolData *SwimmingPoolData::factory(EnergyPlusData &state, std::string c } } // If we didn't find it, fatal - ShowFatalError(state, - format("LocalSwimmingPoolFactory: Error getting inputs or index for swimming pool named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError( + state, + EnergyPlus::format("LocalSwimmingPoolFactory: Error getting inputs or index for swimming pool named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -248,10 +249,12 @@ void GetSwimmingPool(EnergyPlusData &state) state.dataSwimmingPools->Pool(Item).AvgDepth = Numbers(1); if (state.dataSwimmingPools->Pool(Item).AvgDepth < MinDepth) { - ShowWarningError(state, format("{}{}=\"{} has an average depth that is too small.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, + EnergyPlus::format("{}{}=\"{} has an average depth that is too small.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The pool average depth has been reset to the minimum allowed depth."); } else if (state.dataSwimmingPools->Pool(Item).AvgDepth > MaxDepth) { - ShowSevereError(state, format("{}{}=\"{} has an average depth that is too large.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, + EnergyPlus::format("{}{}=\"{} has an average depth that is too large.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The pool depth must be less than the maximum average depth of 10 meters."); ErrorsFound = true; } @@ -279,23 +282,27 @@ void GetSwimmingPool(EnergyPlusData &state) state.dataSwimmingPools->Pool(Item).CoverEvapFactor = Numbers(2); if (state.dataSwimmingPools->Pool(Item).CoverEvapFactor < MinCoverFactor) { - ShowWarningError(state, format("{}{}=\"{} has an evaporation cover factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError( + state, EnergyPlus::format("{}{}=\"{} has an evaporation cover factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The evaporation cover factor has been reset to zero."); state.dataSwimmingPools->Pool(Item).CoverEvapFactor = MinCoverFactor; } else if (state.dataSwimmingPools->Pool(Item).CoverEvapFactor > MaxCoverFactor) { - ShowWarningError(state, - format("{}{}=\"{} has an evaporation cover factor greater than one.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError( + state, + EnergyPlus::format("{}{}=\"{} has an evaporation cover factor greater than one.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The evaporation cover factor has been reset to one."); state.dataSwimmingPools->Pool(Item).CoverEvapFactor = MaxCoverFactor; } state.dataSwimmingPools->Pool(Item).CoverConvFactor = Numbers(3); if (state.dataSwimmingPools->Pool(Item).CoverConvFactor < MinCoverFactor) { - ShowWarningError(state, format("{}{}=\"{} has a convection cover factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError( + state, EnergyPlus::format("{}{}=\"{} has a convection cover factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The convection cover factor has been reset to zero."); state.dataSwimmingPools->Pool(Item).CoverConvFactor = MinCoverFactor; } else if (state.dataSwimmingPools->Pool(Item).CoverConvFactor > MaxCoverFactor) { - ShowWarningError(state, format("{}{}=\"{} has a convection cover factor greater than one.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError( + state, EnergyPlus::format("{}{}=\"{} has a convection cover factor greater than one.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The convection cover factor has been reset to one."); state.dataSwimmingPools->Pool(Item).CoverConvFactor = MaxCoverFactor; } @@ -304,13 +311,15 @@ void GetSwimmingPool(EnergyPlusData &state) if (state.dataSwimmingPools->Pool(Item).CoverSWRadFactor < MinCoverFactor) { ShowWarningError( state, - format("{}{}=\"{} has a short-wavelength radiation cover factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); + EnergyPlus::format( + "{}{}=\"{} has a short-wavelength radiation cover factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The short-wavelength radiation cover factor has been reset to zero."); state.dataSwimmingPools->Pool(Item).CoverSWRadFactor = MinCoverFactor; } else if (state.dataSwimmingPools->Pool(Item).CoverSWRadFactor > MaxCoverFactor) { ShowWarningError( state, - format("{}{}=\"{} has a short-wavelength radiation cover factor greater than one.", RoutineName, CurrentModuleObject, Alphas(1))); + EnergyPlus::format( + "{}{}=\"{} has a short-wavelength radiation cover factor greater than one.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The short-wavelength radiation cover factor has been reset to one."); state.dataSwimmingPools->Pool(Item).CoverSWRadFactor = MaxCoverFactor; } @@ -318,13 +327,16 @@ void GetSwimmingPool(EnergyPlusData &state) state.dataSwimmingPools->Pool(Item).CoverLWRadFactor = Numbers(5); if (state.dataSwimmingPools->Pool(Item).CoverLWRadFactor < MinCoverFactor) { ShowWarningError( - state, format("{}{}=\"{} has a long-wavelength radiation cover factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); + state, + EnergyPlus::format( + "{}{}=\"{} has a long-wavelength radiation cover factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The long-wavelength radiation cover factor has been reset to zero."); state.dataSwimmingPools->Pool(Item).CoverLWRadFactor = MinCoverFactor; } else if (state.dataSwimmingPools->Pool(Item).CoverLWRadFactor > MaxCoverFactor) { ShowWarningError( state, - format("{}{}=\"{} has a long-wavelength radiation cover factor greater than one.", RoutineName, CurrentModuleObject, Alphas(1))); + EnergyPlus::format( + "{}{}=\"{} has a long-wavelength radiation cover factor greater than one.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The long-wavelength radiation cover factor has been reset to one."); state.dataSwimmingPools->Pool(Item).CoverLWRadFactor = MaxCoverFactor; } @@ -357,8 +369,8 @@ void GetSwimmingPool(EnergyPlusData &state) state.dataSwimmingPools->Pool(Item).WaterVolFlowMax = Numbers(6); state.dataSwimmingPools->Pool(Item).MiscPowerFactor = Numbers(7); if (state.dataSwimmingPools->Pool(Item).MiscPowerFactor < MinPowerFactor) { - ShowWarningError(state, - format("{}{}=\"{} has a miscellaneous power factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError( + state, EnergyPlus::format("{}{}=\"{} has a miscellaneous power factor less than zero.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The miscellaneous power factor has been reset to zero."); state.dataSwimmingPools->Pool(Item).MiscPowerFactor = MinPowerFactor; } @@ -374,7 +386,8 @@ void GetSwimmingPool(EnergyPlusData &state) state.dataSwimmingPools->Pool(Item).MaxNumOfPeople = Numbers(8); if (state.dataSwimmingPools->Pool(Item).MaxNumOfPeople < 0.0) { ShowWarningError( - state, format("{}{}=\"{} was entered with negative people. This is not allowed.", RoutineName, CurrentModuleObject, Alphas(1))); + state, + EnergyPlus::format("{}{}=\"{} was entered with negative people. This is not allowed.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The number of people has been reset to zero."); state.dataSwimmingPools->Pool(Item).MaxNumOfPeople = 0.0; } @@ -400,7 +413,7 @@ void GetSwimmingPool(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in swimming pool input. Preceding conditions cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in swimming pool input. Preceding conditions cause termination.", RoutineName)); } } @@ -412,38 +425,43 @@ void SwimmingPoolData::ErrorCheckSetupPoolSurface( static constexpr std::string_view CurrentModuleObject("SwimmingPool:Indoor"); if (this->SurfacePtr <= 0) { - ShowSevereError(state, format("{}Invalid {} = {}", RoutineName, cAlphaField2, Alpha2)); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, Alpha1)); + ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaField2, Alpha2)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alpha1)); ErrorsFound = true; } else if (state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(this->SurfacePtr)) { - ShowSevereError(state, format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alpha1)); - ShowContinueError(state, format("{}=\"{}\" has been used in another radiant system, ventilated slab, or pool.", cAlphaField2, Alpha2)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alpha1)); + ShowContinueError(state, + EnergyPlus::format("{}=\"{}\" has been used in another radiant system, ventilated slab, or pool.", cAlphaField2, Alpha2)); ShowContinueError(state, "A single surface can only be a radiant system, a ventilated slab, or a pool. It CANNOT be more than one of these."); 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, - format("{} is a pool and is attempting to use a non-CTF solution algorithm. This is not allowed. Use the CTF solution " + 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)); ErrorsFound = true; } else if (state.dataSurface->Surface(this->SurfacePtr).Class == DataSurfaces::SurfaceClass::Window) { - ShowSevereError(state, - 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.", + 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)); ErrorsFound = true; } else if (state.dataSurface->intMovInsuls(this->SurfacePtr).matNum > 0) { - ShowSevereError(state, - format("{} is a pool and has movable insulation. This is not allowed. Remove the movable insulation for this surface.", + 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)); ErrorsFound = true; } else if (state.dataConstruction->Construct(state.dataSurface->Surface(this->SurfacePtr).Construction).SourceSinkPresent) { ShowSevereError( state, - 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)); + EnergyPlus::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; } else { // ( Pool( Item ).SurfacePtr > 0 ) state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(this->SurfacePtr) = true; @@ -451,7 +469,8 @@ 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, format("{}{}=\"{} contains a surface name that is NOT a floor.", RoutineName, CurrentModuleObject, Alpha1)); + ShowSevereError(state, + EnergyPlus::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; @@ -540,19 +559,20 @@ void SwimmingPoolData::initialize(EnergyPlusData &state, bool const FirstHVACIte if (this->CurActivityFactor < MinActivityFactor) { this->CurActivityFactor = MinActivityFactor; ShowWarningError(state, - format("{}: Swimming Pool =\"{} Activity Factor Schedule =\"{} has a negative value. This is not allowed.", - RoutineName, - this->Name, - this->activityFactorSched->Name)); + EnergyPlus::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, - format("{}: Swimming Pool =\"{} Activity Factor Schedule =\"{} has a value larger than 10. This is not allowed.", - RoutineName, - this->Name, - this->activityFactorSched->Name)); + 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)); ShowContinueError(state, "The activity factor has been reset to unity."); } } else { @@ -573,20 +593,20 @@ void SwimmingPoolData::initialize(EnergyPlusData &state, bool const FirstHVACIte if (this->peopleHeatGainSched != nullptr) { if (HeatGainPerPerson < 0.0) { ShowWarningError(state, - format("{}: Swimming Pool =\"{} Heat Gain Schedule =\"{} has a negative value. This is not allowed.", - RoutineName, - this->Name, - this->peopleHeatGainSched->Name)); + EnergyPlus::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, - format("{}: Swimming Pool =\"{} People Schedule =\"{} has a negative value. This is not allowed.", - RoutineName, - this->Name, - this->peopleSched->Name)); + EnergyPlus::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; } @@ -604,19 +624,20 @@ 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, - 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, + EnergyPlus::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, - format("{}: Swimming Pool =\"{} Cover Schedule =\"{} has a negative value. This is not allowed.", - RoutineName, - this->Name, - this->coverSched->Name)); + EnergyPlus::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; } @@ -818,7 +839,7 @@ void SwimmingPoolData::initSwimmingPoolPlantLoopIndex(EnergyPlusData &state) PlantUtilities::ScanPlantLoopsForObject( state, this->Name, DataPlant::PlantEquipmentType::SwimmingPool_Indoor, this->HWplantLoc, errFlag, _, _, _, this->WaterInletNode, _); if (errFlag) { - ShowFatalError(state, format("{}: Program terminated due to previous condition(s).", RoutineName)); + ShowFatalError(state, EnergyPlus::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 9ccd3cfe651..2724818808d 100644 --- a/src/EnergyPlus/SystemAvailabilityManager.cc +++ b/src/EnergyPlus/SystemAvailabilityManager.cc @@ -917,8 +917,8 @@ namespace Avail { } if (diffThermoMgr.TempDiffOff > diffThermoMgr.TempDiffOn) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("The {} is greater than the {}.", cNumericFieldNames(2), cNumericFieldNames(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("The {} is greater than the {}.", cNumericFieldNames(2), cNumericFieldNames(1))); ErrorsFound = true; } @@ -1233,7 +1233,7 @@ namespace Avail { lNumericFieldBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } // GetSysAvailManagerInputs() @@ -1360,27 +1360,31 @@ namespace Avail { if (am.type == ManagerType::DiffThermo && Num != availMgr.NumAvailManagers) { ShowWarningError( - state, format("GetPlantLoopData/GetPlantAvailabilityManager: AvailabilityManager:DifferentialThermostat=\"{}\".", am.Name)); + state, + EnergyPlus::format("GetPlantLoopData/GetPlantAvailabilityManager: AvailabilityManager:DifferentialThermostat=\"{}\".", + am.Name)); ShowContinueError( state, "...is not the last manager on the AvailabilityManagerAssignmentList. Any remaining managers will not be used."); - ShowContinueError(state, format("Occurs in AvailabilityManagerAssignmentList =\"{}\".", AvailabilityListName)); + ShowContinueError(state, EnergyPlus::format("Occurs in AvailabilityManagerAssignmentList =\"{}\".", AvailabilityListName)); } if (am.type == ManagerType::NightVent || am.type == ManagerType::NightCycle) { - ShowSevereError(state, - format("GetPlantLoopData/GetPlantAvailabilityManager: Invalid System Availability Manager Type entered=\"{}\".", + ShowSevereError( + state, + EnergyPlus::format("GetPlantLoopData/GetPlantAvailabilityManager: Invalid System Availability Manager Type entered=\"{}\".", managerTypeNames[(int)am.type])); ShowContinueError(state, "...this manager is not used in a Plant Loop."); - ShowContinueError(state, format("Occurs in AvailabilityManagerAssignmentList=\"{}\".", AvailabilityListName)); + ShowContinueError(state, EnergyPlus::format("Occurs in AvailabilityManagerAssignmentList=\"{}\".", AvailabilityListName)); ErrorsFound = true; } } // End of Num Loop } else { if (!AvailabilityListName.empty()) { - ShowWarningError(state, - format("GetPlantLoopData/GetPlantAvailabilityManager: AvailabilityManagerAssignmentList={} not found in lists. No " - "availability will be used.", - AvailabilityListName)); + ShowWarningError( + state, + EnergyPlus::format("GetPlantLoopData/GetPlantAvailabilityManager: AvailabilityManagerAssignmentList={} not found in lists. No " + "availability will be used.", + AvailabilityListName)); } availMgr.NumAvailManagers = 0; availMgr.availStatus = Status::NoAction; @@ -1439,19 +1443,22 @@ namespace Avail { if (am.type == ManagerType::DiffThermo && Num != availMgr.NumAvailManagers) { ShowWarningError( - state, format("GetAirPathData/GetAirLoopAvailabilityManager: AvailabilityManager:DifferentialThermostat=\"{}\".", am.Name)); + state, + EnergyPlus::format("GetAirPathData/GetAirLoopAvailabilityManager: AvailabilityManager:DifferentialThermostat=\"{}\".", + am.Name)); ShowContinueError( state, "...is not the last manager on the AvailabilityManagerAssignmentList. Any remaining managers will not be used."); - ShowContinueError(state, format("Occurs in AvailabilityManagerAssignmentList=\"{}\".", am.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in AvailabilityManagerAssignmentList=\"{}\".", am.Name)); } } // End of Num Loop } else { if (!AvailabilityListName.empty()) { - ShowWarningError(state, - format("GetAirPathData/GetAirLoopAvailabilityManager: AvailabilityManagerAssignmentList={} not found in lists. No " - "availability will be used.", - AvailabilityListName)); + ShowWarningError( + state, + EnergyPlus::format("GetAirPathData/GetAirLoopAvailabilityManager: AvailabilityManagerAssignmentList={} not found in lists. No " + "availability will be used.", + AvailabilityListName)); } availMgr.NumAvailManagers = 0; availMgr.availStatus = Status::NoAction; @@ -1510,10 +1517,11 @@ namespace Avail { assert(am.type != ManagerType::Invalid); if (am.type == ManagerType::DiffThermo && Num != availMgr.NumAvailManagers) { - ShowWarningError(state, format("GetZoneEqAvailabilityManager: AvailabilityManager:DifferentialThermostat=\"{}\".", am.Name)); + ShowWarningError( + state, EnergyPlus::format("GetZoneEqAvailabilityManager: AvailabilityManager:DifferentialThermostat=\"{}\".", am.Name)); ShowContinueError( state, "...is not the last manager on the AvailabilityManagerAssignmentList. Any remaining managers will not be used."); - ShowContinueError(state, format("Occurs in AvailabilityManagerAssignmentList=\"{}\".", am.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in AvailabilityManagerAssignmentList=\"{}\".", am.Name)); } } // End of Num Loop } @@ -1714,7 +1722,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcSchedSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:Scheduled not found: {}", SysAvailName)); + ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:Scheduled not found: {}", SysAvailName)); } } break; @@ -1725,7 +1733,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcSchedOnSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:ScheduledOn not found: {}", SysAvailName)); + ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:ScheduledOn not found: {}", SysAvailName)); } } break; @@ -1736,7 +1744,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcSchedOffSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:ScheduledOff not found: {}", SysAvailName)); + ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:ScheduledOff not found: {}", SysAvailName)); } } break; @@ -1747,7 +1755,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcNCycSysAvailMgr(state, SysAvailNum, PriAirSysNum, ZoneEquipType, CompNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:NightCycle not found: {}", SysAvailName)); + ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:NightCycle not found: {}", SysAvailName)); } } break; @@ -1758,7 +1766,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcOptStartSysAvailMgr(state, SysAvailNum, PriAirSysNum, ZoneEquipType, CompNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:OptimumStart not found: {}", SysAvailName)); + ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:OptimumStart not found: {}", SysAvailName)); } } break; @@ -1769,7 +1777,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcNVentSysAvailMgr(state, SysAvailNum, PriAirSysNum, present(ZoneEquipType)); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:NightVentilation not found: {}", SysAvailName)); + ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:NightVentilation not found: {}", SysAvailName)); } } break; @@ -1780,7 +1788,8 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcDiffTSysAvailMgr(state, SysAvailNum, previousStatus); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:DifferentialThermostat not found: {}", SysAvailName)); + ShowFatalError(state, + EnergyPlus::format("SimSysAvailManager: AvailabilityManager:DifferentialThermostat not found: {}", SysAvailName)); } } break; case ManagerType::HiTempTOff: { // 'AvailabilityManager:HighTemperatureTurnOff' @@ -1790,7 +1799,8 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcHiTurnOffSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOff not found: {}", SysAvailName)); + ShowFatalError(state, + EnergyPlus::format("SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOff not found: {}", SysAvailName)); } } break; case ManagerType::HiTempTOn: { // 'AvailabilityManager:HighTemperatureTurnOn' @@ -1800,7 +1810,8 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcHiTurnOnSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOn not found: {}", SysAvailName)); + ShowFatalError(state, + EnergyPlus::format("SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOn not found: {}", SysAvailName)); } } break; case ManagerType::LoTempTOff: { // 'AvailabilityManager:LowTemperatureTurnOff' @@ -1810,7 +1821,8 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcLoTurnOffSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOff not found: {}", SysAvailName)); + ShowFatalError(state, + EnergyPlus::format("SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOff not found: {}", SysAvailName)); } } break; @@ -1821,14 +1833,14 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcLoTurnOnSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, format("SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOn not found: {}", SysAvailName)); + ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOn not found: {}", SysAvailName)); } } break; default: { - ShowSevereError(state, format("AvailabilityManager Type not found: {}", type)); - ShowContinueError(state, format("Occurs in Manager={}", SysAvailName)); + ShowSevereError(state, EnergyPlus::format("AvailabilityManager Type not found: {}", type)); + ShowContinueError(state, EnergyPlus::format("Occurs in Manager={}", SysAvailName)); ShowFatalError(state, "Preceding condition causes termination."); } } @@ -2036,8 +2048,9 @@ namespace Avail { case NightCycleControlType::OnAny: case NightCycleControlType::OnZoneFansOnly: { if (ZoneCompNCControlType(SysAvailNum)) { - ShowWarningError(state, - format("AvailabilityManager:NightCycle = {}, is specified for a ZoneHVAC component.", nightCycleMgr.Name)); + ShowWarningError( + state, + EnergyPlus::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; @@ -3854,20 +3867,22 @@ 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), - 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), + EnergyPlus::format("Maximum value should be 7. However, the maximum value in the schedule is {:.1T}", SchedMax)); ErrorsFound = true; } if (SchedMin < 0.0) { - ShowSevereCustomField(state, - eoh, - ipsc->cAlphaFieldNames(4), - ipsc->cAlphaArgs(4), - 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), + EnergyPlus::format("Minimum value should be 0. However, the minimum value in the schedule is {:.1T}", SchedMin)); ErrorsFound = true; } @@ -3894,10 +3909,10 @@ namespace Avail { if (NumNumbers > 0) { hybridVentMgr.MaxWindSpeed = ipsc->rNumericArgs(1); if (ipsc->rNumericArgs(1) > 40.0 || ipsc->rNumericArgs(1) < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is beyond the range.", ipsc->cNumericFieldNames(1))); - ShowContinueError(state, - format("The input value is {:.0T}. The allowed value must be >= 0 and <= 40 m/s", ipsc->rNumericArgs(1))); + 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))); ErrorsFound = true; } } @@ -3906,38 +3921,40 @@ namespace Avail { if (NumNumbers > 1) { hybridVentMgr.MinOutdoorTemp = ipsc->rNumericArgs(2); if (ipsc->rNumericArgs(2) > 100.0 || ipsc->rNumericArgs(2) < -100.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is beyond the range.", ipsc->cNumericFieldNames(2))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(2))); ShowContinueError( - state, format("The input value is {:.0T}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(2))); + state, + EnergyPlus::format("The input value is {:.0T}. 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, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is beyond the range.", ipsc->cNumericFieldNames(3))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(3))); ShowContinueError( - state, format("The input value is {:.0T}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(3))); + state, + EnergyPlus::format("The input value is {:.0T}. 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, - format("{}{}=\"{}\" The {} must be less than the {}", - RoutineName, - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cNumericFieldNames(2), - ipsc->cNumericFieldNames(3))); + EnergyPlus::format("{}{}=\"{}\" The {} must be less than the {}", + RoutineName, + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cNumericFieldNames(2), + ipsc->cNumericFieldNames(3))); ShowContinueError(state, - format("The {} is {:.0T}. The {} is {:.0T}.", - ipsc->cNumericFieldNames(2), - ipsc->rNumericArgs(2), - ipsc->cNumericFieldNames(3), - ipsc->rNumericArgs(3))); + EnergyPlus::format("The {} is {:.0T}. The {} is {:.0T}.", + ipsc->cNumericFieldNames(2), + ipsc->rNumericArgs(2), + ipsc->cNumericFieldNames(3), + ipsc->rNumericArgs(3))); ErrorsFound = true; } @@ -3945,38 +3962,40 @@ namespace Avail { if (NumNumbers > 3) { hybridVentMgr.MinOutdoorEnth = ipsc->rNumericArgs(4); if (ipsc->rNumericArgs(4) > 300000.0 || ipsc->rNumericArgs(4) < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is beyond the range.", ipsc->cNumericFieldNames(4))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(4))); ShowContinueError( - state, format("The input value is {:.0T}. The allowed value must be between 0 and 300000 J/kg", ipsc->rNumericArgs(4))); + state, + EnergyPlus::format("The input value is {:.0T}. 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, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is beyond the range.", ipsc->cNumericFieldNames(5))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(5))); ShowContinueError( - state, format("The input value is {:.0T}. The allowed value must be between 0 and 300000 J/kg", ipsc->rNumericArgs(5))); + state, + EnergyPlus::format("The input value is {:.0T}. 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, - format("{}{}=\"{}\" The {} must be less than the {}", - RoutineName, - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cNumericFieldNames(4), - ipsc->cNumericFieldNames(5))); + EnergyPlus::format("{}{}=\"{}\" The {} must be less than the {}", + RoutineName, + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cNumericFieldNames(4), + ipsc->cNumericFieldNames(5))); ShowContinueError(state, - format("The {} is {:.0T}. The {} is {:.0T}.", - ipsc->cNumericFieldNames(4), - ipsc->rNumericArgs(4), - ipsc->cNumericFieldNames(5), - ipsc->rNumericArgs(5))); + EnergyPlus::format("The {} is {:.0T}. The {} is {:.0T}.", + ipsc->cNumericFieldNames(4), + ipsc->rNumericArgs(4), + ipsc->cNumericFieldNames(5), + ipsc->rNumericArgs(5))); ErrorsFound = true; } @@ -3984,38 +4003,40 @@ namespace Avail { if (NumNumbers > 5) { hybridVentMgr.MinOutdoorDewPoint = ipsc->rNumericArgs(6); if (ipsc->rNumericArgs(6) > 100.0 || ipsc->rNumericArgs(6) < -100.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is beyond the range.", ipsc->cNumericFieldNames(6))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(6))); ShowContinueError( - state, format("The input value is {:.0T}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(6))); + state, + EnergyPlus::format("The input value is {:.0T}. 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, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("{} is beyond the range.", ipsc->cNumericFieldNames(7))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(7))); ShowContinueError( - state, format("The input value is {:.0T}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(7))); + state, + EnergyPlus::format("The input value is {:.0T}. 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, - format("{}{}=\"{}\" The {} must be less than the {}", - RoutineName, - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cNumericFieldNames(6), - ipsc->cNumericFieldNames(7))); + EnergyPlus::format("{}{}=\"{}\" The {} must be less than the {}", + RoutineName, + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cNumericFieldNames(6), + ipsc->cNumericFieldNames(7))); ShowContinueError(state, - format("The {} is {:.0T}. The {} is {:.0T}.", - ipsc->cNumericFieldNames(6), - ipsc->rNumericArgs(6), - ipsc->cNumericFieldNames(7), - ipsc->rNumericArgs(7))); + EnergyPlus::format("The {} is {:.0T}. The {} is {:.0T}.", + ipsc->cNumericFieldNames(6), + ipsc->rNumericArgs(6), + ipsc->cNumericFieldNames(7), + ipsc->rNumericArgs(7))); ErrorsFound = true; } @@ -4038,32 +4059,34 @@ namespace Avail { } else { GetCurveMinMaxValues(state, hybridVentMgr.OpeningFactorFWS, CurveMin, CurveMax); if (CurveMin < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("The minimum wind speed used in {}=\"{}should be greater than or equal to 0.0 (m/s)", - ipsc->cAlphaFieldNames(7), - ipsc->cAlphaArgs(7))); + 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))); 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, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, - 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, format("{}=\"{}\".", ipsc->cAlphaFieldNames(7), ipsc->cAlphaArgs(7))); - ShowContinueError(state, format("Curve output at the minimum wind speed = {:.3T}", CurveVal)); + ShowSevereError(state, EnergyPlus::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)); ErrorsFound = true; } CurveVal = CurveValue(state, hybridVentMgr.OpeningFactorFWS, CurveMax); if (CurveVal > 1.0) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, - 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, format("{}=\"{}\".", ipsc->cAlphaFieldNames(7), ipsc->cAlphaArgs(7))); - ShowContinueError(state, format("Curve output at the maximum wind speed = {:.3T}", CurveVal)); + 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)); ErrorsFound = true; } // Check curve type @@ -4096,10 +4119,10 @@ namespace Avail { } else if (hybridVentMgr.afnControlTypeSched != nullptr) { ShowWarningCustom(state, eoh, - format("{} and {} cannot be used at the same time, {} is disabled.", - ipsc->cAlphaFieldNames(8), - ipsc->cAlphaFieldNames(9), - ipsc->cAlphaFieldNames(9))); + EnergyPlus::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); @@ -4121,28 +4144,30 @@ namespace Avail { } if (state.afn->simulation_control.type == AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowWarningError(state, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); + ShowWarningError(state, EnergyPlus::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, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); + ShowWarningError(state, EnergyPlus::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, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError( state, - format("The Zone name specified in the Ventilation object {}", - state.dataHeatBal->Zone(state.dataHeatBal->Ventilation(hybridVentMgr.VentilationPtr).ZonePtr).Name)); - ShowContinueError(state, format("is not equal to the {}=\"{}\".", ipsc->cAlphaFieldNames(3), ipsc->cAlphaArgs(3))); + 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))); ErrorsFound = true; } if (state.afn->simulation_control.type != AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); ShowContinueError(state, "The simple airflow objects are used for natural ventilation calculation."); ShowContinueError( state, @@ -4157,9 +4182,9 @@ namespace Avail { if (hybridVentMgr.simpleControlTypeSched != nullptr && hybridVentMgr.controlModeSched->getMaxVal(state) == 4.0) { ShowSevereCustom(state, eoh, - format("The outdoor ventilation air control type defined in {} cannot work together with {}", - ipsc->cAlphaArgs(4), - ipsc->cAlphaFieldNames(9))); + EnergyPlus::format("The outdoor ventilation air control type defined in {} cannot work together with {}", + ipsc->cAlphaArgs(4), + ipsc->cAlphaFieldNames(9))); ErrorsFound = true; } @@ -4177,13 +4202,13 @@ namespace Avail { if (state.dataAvail->HybridVentData(SysAvailNum - 1).afnControlTypeSched != nullptr) { if (state.dataAvail->HybridVentData(SysAvailNum).simpleControlTypeSched != nullptr) { ShowSevereError(state, - format("The AirflowNetwork model is used for natural ventilation calculation in {}=\"{}\"", - cCurrentModuleObject, - state.dataAvail->HybridVentData(SysAvailNum - 1).Name)); + EnergyPlus::format("The AirflowNetwork model is used for natural ventilation calculation in {}=\"{}\"", + cCurrentModuleObject, + state.dataAvail->HybridVentData(SysAvailNum - 1).Name)); ShowContinueError(state, - format("The simple airflow objects are used for natural ventilation calculation in {}=\"{}\"", - cCurrentModuleObject, - state.dataAvail->HybridVentData(SysAvailNum).Name)); + EnergyPlus::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; } @@ -4191,13 +4216,13 @@ namespace Avail { if (state.dataAvail->HybridVentData(SysAvailNum - 1).simpleControlTypeSched != nullptr) { if (state.dataAvail->HybridVentData(SysAvailNum).afnControlTypeSched != nullptr) { ShowSevereError(state, - format("The Airflow Network model is used for natural ventilation calculation in {}=\"{}\"", - cCurrentModuleObject, - state.dataAvail->HybridVentData(SysAvailNum).Name)); + EnergyPlus::format("The Airflow Network model is used for natural ventilation calculation in {}=\"{}\"", + cCurrentModuleObject, + state.dataAvail->HybridVentData(SysAvailNum).Name)); ShowContinueError(state, - format("The simple airflow objects are used for natural ventilation calculation in {}=\"{}\"", - cCurrentModuleObject, - state.dataAvail->HybridVentData(SysAvailNum - 1).Name)); + EnergyPlus::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; } @@ -4206,7 +4231,7 @@ namespace Avail { } if (ErrorsFound) { - ShowFatalError(state, format("{} Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{} Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } // Set up output variables @@ -4356,10 +4381,10 @@ namespace Avail { } if (!zoneFound) { ShowSevereError(state, - format("{}, The controlled zone ={} is not served by this Air Loop={}", - managerTypeNames[(int)hybridVentMgr.type], - hybridVentMgr.ControlZoneName, - hybridVentMgr.AirLoopName)); + EnergyPlus::format("{}, The controlled zone ={} is not served by this Air Loop={}", + managerTypeNames[(int)hybridVentMgr.type], + hybridVentMgr.ControlZoneName, + hybridVentMgr.AirLoopName)); ErrorsFound = true; } } @@ -4375,19 +4400,21 @@ namespace Avail { (HybridVentNum != SysAvailNum)) { if (ControlledZoneNum == state.dataAvail->HybridVentData(HybridVentNum).ControlledZoneNum && ControlledZoneNum > 0) { - ShowWarningError( - state, - format("AvailabilityManager:HybridVentilation = \"{}\" has the controlled zone name = \"{}\".", - state.dataAvail->HybridVentData(HybridVentNum).Name, - state.dataAvail->HybridVentData(HybridVentNum).ControlZoneName)); + ShowWarningError(state, + EnergyPlus::format( + "AvailabilityManager:HybridVentilation = \"{}\" has the controlled zone name = \"{}\".", + state.dataAvail->HybridVentData(HybridVentNum).Name, + state.dataAvail->HybridVentData(HybridVentNum).ControlZoneName)); ShowContinueError( state, - format("This controlled zone already has hybrid ventilation control through this air loop = \"{}\".", - hybridVentMgr.AirLoopName)); + EnergyPlus::format( + "This controlled zone already has hybrid ventilation control through this air loop = \"{}\".", + hybridVentMgr.AirLoopName)); ShowContinueError( state, - format("Only AvailabilityManager:HybridVentilation = \"{}\" will be simulated. Simulation continues...", - hybridVentMgr.Name)); + EnergyPlus::format( + "Only AvailabilityManager:HybridVentilation = \"{}\" will be simulated. Simulation continues...", + hybridVentMgr.Name)); } else { state.dataAvail->HybridVentData(HybridVentNum).SimHybridVentSysAvailMgr = true; } @@ -4403,20 +4430,22 @@ namespace Avail { if (hybridVentMgr.ControlledZoneNum == 0) { ShowSevereError(state, - format("{}, The controlled zone is not defined correctly ={}", - managerTypeNames[(int)hybridVentMgr.type], - hybridVentMgr.ControlZoneName)); + EnergyPlus::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, - format("GetHybridVentilationInputs: AvailabilityManager:HybridVentilation =\"{}\"", hybridVentMgr.Name)); - ShowContinueError(state, - format("Ventilation Control Mode Schedule Name =\"{}\", When the schedule value is 5 or 6, operative " - "temperature control is requested. ", - hybridVentMgr.controlModeSched->Name)); + 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)); ShowContinueError(state, "However, AdaptiveASH55 is not entered in the Thermal Comfort Model Type fields in the People object."); ErrorsFound = true; @@ -4439,9 +4468,9 @@ namespace Avail { } if (AirLoopCount > 1) { ShowSevereError(state, - format("{}, The AirLoopHVAC name found more than once={}", - managerTypeNames[(int)state.dataAvail->HybridVentData(SysAvailIndex).type], - state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); + EnergyPlus::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; } @@ -4715,9 +4744,10 @@ namespace Avail { } } break; default: { - ShowSevereError(state, - format("{}: incorrect Control Type: {}", managerTypeNames[(int)hybridVentMgr.type], hybridVentMgr.AirLoopName)); - ShowFatalError(state, format("Errors found in getting {} Control mode value", managerTypeNames[(int)hybridVentMgr.type])); + 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])); } } @@ -4746,9 +4776,9 @@ namespace Avail { ++hybridVentMgr.SingleHCErrCount; if (hybridVentMgr.SingleHCErrCount < 2) { ShowWarningError(state, - format("Hybrid ventilation control: {}: The zone temperature control type is " - "ThermostatSetpoint:SingleHeatingOrCooling. Natural ventilation is not allowed.", - hybridVentMgr.AirLoopName)); + EnergyPlus::format("Hybrid ventilation control: {}: The zone temperature control type is " + "ThermostatSetpoint:SingleHeatingOrCooling. Natural ventilation is not allowed.", + hybridVentMgr.AirLoopName)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -4782,8 +4812,9 @@ namespace Avail { if (hybridVentMgr.DewPointNoRHErrCount < 2) { ShowWarningError( state, - format("Hybrid ventilation control: Dew point control mode is selected, but no ZoneControl:Humidistat object={}", - hybridVentMgr.AirLoopName)); + EnergyPlus::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, ""); @@ -4822,13 +4853,14 @@ namespace Avail { if (!found && state.dataZoneCtrls->NumHumidityControlZones > 0) { ++hybridVentMgr.DewPointErrCount; if (hybridVentMgr.DewPointErrCount < 2) { - ShowWarningError(state, - format("Hybrid ventilation control: The zone for dew point control mode is different from the zone for " - "ZoneControl:Humidistat={}", - hybridVentMgr.AirLoopName)); - ShowContinueError( + ShowWarningError( state, - format("The Zone name for hybrid control is {}. Humidistat has no impact", state.dataHeatBal->Zone(ZoneNum).Name)); + EnergyPlus::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)); 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 d5115faa710..85b4b4fb41c 100644 --- a/src/EnergyPlus/SystemReports.cc +++ b/src/EnergyPlus/SystemReports.cc @@ -2351,9 +2351,10 @@ void CreateEnergyReportStructure(EnergyPlusData &state) thisSubSubComponent.NodeNumOut = OutletNodeNumbers(SubSubCompNum); NumLeft = BranchNodeConnections::GetNumChildren(state, SubCompTypes(SubSubCompNum), SubCompNames(SubSubCompNum)); if (NumLeft > 0) { - ShowSevereError( - state, - format("Hanging Children for component={}:{}", thisSubSubComponent.TypeOf, SubCompNames(SubSubCompNum))); + ShowSevereError(state, + EnergyPlus::format("Hanging Children for component={}:{}", + thisSubSubComponent.TypeOf, + SubCompNames(SubSubCompNum))); } } } @@ -4948,14 +4949,15 @@ void reportAirLoopToplogy(EnergyPlusData &state) int rowCounter = 1; for (int airLoopNum = 1; airLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++airLoopNum) { auto &pas = state.dataAirSystemsData->PrimaryAirSystems(airLoopNum); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirLoopName, format("{}", rowCounter), pas.Name); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirLoopName, EnergyPlus::format("{}", rowCounter), pas.Name); ++rowCounter; for (int BranchNum = 1; BranchNum <= pas.NumBranches; ++BranchNum) { auto &pasBranch = pas.Branch(BranchNum); if (pas.Splitter.Exists) { for (int outNum : pas.Splitter.BranchNumOut) { if (outNum == BranchNum) { - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSplitName, format("{}", rowCounter), pas.Splitter.Name); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSplitName, EnergyPlus::format("{}", rowCounter), pas.Splitter.Name); break; } } @@ -4966,19 +4968,22 @@ void reportAirLoopToplogy(EnergyPlusData &state) state, pas.Name, pasBranch.Name, pasBranch.DuctType, pasBranchComp.TypeOf, pasBranchComp.Name, rowCounter); for (int SubCompNum = 1; SubCompNum <= pasBranchComp.NumSubComps; ++SubCompNum) { auto &pasBranchSubComp = pasBranchComp.SubComp(SubCompNum); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSubCompType, format("{}", rowCounter), pasBranchSubComp.TypeOf); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSubCompName, format("{}", rowCounter), pasBranchSubComp.Name); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSubCompType, EnergyPlus::format("{}", rowCounter), pasBranchSubComp.TypeOf); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSubCompName, EnergyPlus::format("{}", rowCounter), pasBranchSubComp.Name); fillAirloopToplogyComponentRow( state, pas.Name, pasBranch.Name, pasBranch.DuctType, pasBranchComp.TypeOf, pasBranchComp.Name, rowCounter); for (int SubSubCompNum = 1; SubSubCompNum <= pasBranchSubComp.NumSubSubComps; ++SubSubCompNum) { auto &pasBranchSubSubComp = pasBranchSubComp.SubSubComp(SubSubCompNum); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSubCompType, format("{}", rowCounter), pasBranchSubComp.TypeOf); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSubCompName, format("{}", rowCounter), pasBranchSubComp.Name); + state, orp->pdchTopAirSubCompType, EnergyPlus::format("{}", rowCounter), pasBranchSubComp.TypeOf); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSubSubCompType, format("{}", rowCounter), pasBranchSubSubComp.TypeOf); + state, orp->pdchTopAirSubCompName, EnergyPlus::format("{}", rowCounter), pasBranchSubComp.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSubSubCompName, format("{}", rowCounter), pasBranchSubSubComp.Name); + state, orp->pdchTopAirSubSubCompType, EnergyPlus::format("{}", rowCounter), pasBranchSubSubComp.TypeOf); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSubSubCompName, EnergyPlus::format("{}", rowCounter), pasBranchSubSubComp.Name); fillAirloopToplogyComponentRow( state, pas.Name, pasBranch.Name, pasBranch.DuctType, pasBranchComp.TypeOf, pasBranchComp.Name, rowCounter); } @@ -4987,7 +4992,8 @@ void reportAirLoopToplogy(EnergyPlusData &state) if (pas.Mixer.Exists) { for (int inNum : pas.Mixer.BranchNumIn) { if (inNum == BranchNum) { - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirMixName, format("{}", rowCounter - 1), pas.Mixer.Name); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirMixName, EnergyPlus::format("{}", rowCounter - 1), pas.Mixer.Name); break; } } @@ -5010,21 +5016,23 @@ void reportAirLoopToplogy(EnergyPlusData &state) for (int airLoopNum = 1; airLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++airLoopNum) { auto &pas = state.dataAirSystemsData->PrimaryAirSystems(airLoopNum); auto &thisAtoZInfo = state.dataAirLoop->AirToZoneNodeInfo(airLoopNum); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirDemandName, format("{}", rowCounter), thisAtoZInfo.AirLoopName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); ++rowCounter; for (int ductNum = 1; ductNum <= thisAtoZInfo.NumSupplyNodes; ++ductNum) { auto &thisBranch = pas.Branch(thisAtoZInfo.SupplyDuctBranchNum(ductNum)); if (thisAtoZInfo.SupplyAirPathNum(ductNum) > 0) { auto &thisSupplyPath = state.dataZoneEquip->SupplyAirPath(thisAtoZInfo.SupplyAirPathNum(ductNum)); for (int compNum = 1; compNum <= thisSupplyPath.NumOfComponents; ++compNum) { - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirDemandName, format("{}", rowCounter), thisAtoZInfo.AirLoopName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSupplyBranchName, format("{}", rowCounter), thisBranch.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyDuctType, format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); + state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyPCompType, format("{}", rowCounter), thisSupplyPath.ComponentType(compNum)); + state, orp->pdchTopAirSupplyBranchName, EnergyPlus::format("{}", rowCounter), thisBranch.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyPCompName, format("{}", rowCounter), thisSupplyPath.ComponentName(compNum)); + state, orp->pdchTopAirSupplyDuctType, EnergyPlus::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSupplyPCompType, EnergyPlus::format("{}", rowCounter), thisSupplyPath.ComponentType(compNum)); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSupplyPCompName, EnergyPlus::format("{}", rowCounter), thisSupplyPath.ComponentName(compNum)); ++rowCounter; } if (thisBranch.DuctType == HVAC::AirDuctType::Cooling || thisBranch.DuctType == HVAC::AirDuctType::Main) { @@ -5040,27 +5048,33 @@ void reportAirLoopToplogy(EnergyPlusData &state) } if (thisCoolADU.SupplyAirPathExists) { int spCompNum = thisSupplyPath.OutletNodeSupplyPathCompNum(thisCoolADU.SupplyAirPathOutNodeIndex); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyPCompType, format("{}", rowCounter), thisSupplyPath.ComponentType(spCompNum)); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyPCompName, format("{}", rowCounter), thisSupplyPath.ComponentName(spCompNum)); + 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->pdchTopAirDemandName, format("{}", rowCounter), thisAtoZInfo.AirLoopName); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyBranchName, format("{}", rowCounter), thisBranch.Name); + state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyDuctType, format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); + state, orp->pdchTopAirSupplyBranchName, EnergyPlus::format("{}", rowCounter), thisBranch.Name); + OutputReportPredefined::PreDefTableEntry(state, + orp->pdchTopAirSupplyDuctType, + EnergyPlus::format("{}", rowCounter), + HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirZoneName, format("{}", rowCounter), thisZoneEquipConfig.ZoneName); + state, orp->pdchTopAirZoneName, EnergyPlus::format("{}", rowCounter), thisZoneEquipConfig.ZoneName); auto &aduIndex = zel.EquipIndex(thisCoolADU.AirDistUnitIndex); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirTermUnitType, - format("{}", rowCounter), + EnergyPlus::format("{}", rowCounter), state.dataDefineEquipment->AirDistUnit(aduIndex).EquipType(1)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirTermUnitName, - format("{}", rowCounter), + EnergyPlus::format("{}", rowCounter), state.dataDefineEquipment->AirDistUnit(aduIndex).EquipName(1)); if (thisAtoZInfo.ReturnAirPathNum(1) > 0) { auto &thisReturnPath = state.dataZoneEquip->ReturnAirPath(thisAtoZInfo.ReturnAirPathNum(1)); @@ -5070,11 +5084,11 @@ void reportAirLoopToplogy(EnergyPlusData &state) if (retPathCompNum > 0) { OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirReturnPCompType, - format("{}", rowCounter), + EnergyPlus::format("{}", rowCounter), thisReturnPath.ComponentType(retPathCompNum)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirReturnPCompName, - format("{}", rowCounter), + EnergyPlus::format("{}", rowCounter), thisReturnPath.ComponentName(retPathCompNum)); } break; @@ -5097,27 +5111,33 @@ void reportAirLoopToplogy(EnergyPlusData &state) } if (thisHeatADU.SupplyAirPathExists) { int spCompNum = thisSupplyPath.OutletNodeSupplyPathCompNum(thisHeatADU.SupplyAirPathOutNodeIndex); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyPCompType, format("{}", rowCounter), thisSupplyPath.ComponentType(spCompNum)); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyPCompName, format("{}", rowCounter), thisSupplyPath.ComponentName(spCompNum)); + 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->pdchTopAirDemandName, format("{}", rowCounter), thisAtoZInfo.AirLoopName); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyBranchName, format("{}", rowCounter), thisBranch.Name); + state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyDuctType, format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); + state, orp->pdchTopAirSupplyBranchName, EnergyPlus::format("{}", rowCounter), thisBranch.Name); + OutputReportPredefined::PreDefTableEntry(state, + orp->pdchTopAirSupplyDuctType, + EnergyPlus::format("{}", rowCounter), + HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirZoneName, format("{}", rowCounter), thisZoneEquipConfig.ZoneName); + state, orp->pdchTopAirZoneName, EnergyPlus::format("{}", rowCounter), thisZoneEquipConfig.ZoneName); auto &aduIndex = zel.EquipIndex(thisHeatADU.AirDistUnitIndex); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirTermUnitType, - format("{}", rowCounter), + EnergyPlus::format("{}", rowCounter), state.dataDefineEquipment->AirDistUnit(aduIndex).EquipType(1)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirTermUnitName, - format("{}", rowCounter), + EnergyPlus::format("{}", rowCounter), state.dataDefineEquipment->AirDistUnit(aduIndex).EquipName(1)); if (thisAtoZInfo.ReturnAirPathNum(1) > 0) { auto &thisReturnPath = state.dataZoneEquip->ReturnAirPath(thisAtoZInfo.ReturnAirPathNum(1)); @@ -5126,11 +5146,11 @@ void reportAirLoopToplogy(EnergyPlusData &state) if (retPathCompNum > 0) { OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirReturnPCompType, - format("{}", rowCounter), + EnergyPlus::format("{}", rowCounter), thisReturnPath.ComponentType(retPathCompNum)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirReturnPCompName, - format("{}", rowCounter), + EnergyPlus::format("{}", rowCounter), thisReturnPath.ComponentName(retPathCompNum)); } } @@ -5141,27 +5161,31 @@ void reportAirLoopToplogy(EnergyPlusData &state) } } else { - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirDemandName, format("{}", rowCounter), thisAtoZInfo.AirLoopName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSupplyBranchName, format("{}", rowCounter), thisBranch.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyDuctType, format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); + 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]); ++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, format("{}", rowCounter), thisAtoZInfo.AirLoopName); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); if (compNum == thisReturnPath.OutletRetPathCompNum) { auto &thisBranch = pas.Branch(pas.InletBranchNum[0]); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSupplyBranchName, format("{}", rowCounter), thisBranch.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyDuctType, format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); + state, orp->pdchTopAirSupplyBranchName, EnergyPlus::format("{}", rowCounter), thisBranch.Name); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSupplyDuctType, EnergyPlus::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); } OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirReturnPCompType, format("{}", rowCounter), thisReturnPath.ComponentType(compNum)); + state, orp->pdchTopAirReturnPCompType, EnergyPlus::format("{}", rowCounter), thisReturnPath.ComponentType(compNum)); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirReturnPCompName, format("{}", rowCounter), thisReturnPath.ComponentName(compNum)); + state, orp->pdchTopAirReturnPCompName, EnergyPlus::format("{}", rowCounter), thisReturnPath.ComponentName(compNum)); ++rowCounter; } } @@ -5181,11 +5205,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, format("{}", rowCounter), loopName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirBranchName, format("{}", rowCounter), branchName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSupplyBranchType, format("{}", rowCounter), HVAC::airDuctTypeNames[(int)ductType]); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirCompType, format("{}", rowCounter), compType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirCompName, format("{}", rowCounter), compName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirLoopName, EnergyPlus::format("{}", rowCounter), loopName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirBranchName, EnergyPlus::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); ++rowCounter; } @@ -5204,7 +5229,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, format("{}", rowCounter), zoneName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpName, EnergyPlus::format("{}", rowCounter), zoneName); ++rowCounter; if (!state.dataZoneEquip->ZoneEquipConfig(zoneNum).IsControlled) { continue; @@ -5215,17 +5240,21 @@ 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, format("{}", rowCounter), zelSubEquipData.TypeOf); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpSubCompName, format("{}", rowCounter), zelSubEquipData.Name); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopZnEqpSubCompType, EnergyPlus::format("{}", rowCounter), zelSubEquipData.TypeOf); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopZnEqpSubCompName, EnergyPlus::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, format("{}", rowCounter), zelSubEquipData.TypeOf); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpSubCompName, format("{}", rowCounter), zelSubEquipData.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopZnEqpSubSubCompType, format("{}", rowCounter), zelSubSubEquipData.TypeOf); + state, orp->pdchTopZnEqpSubCompType, EnergyPlus::format("{}", rowCounter), zelSubEquipData.TypeOf); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopZnEqpSubCompName, EnergyPlus::format("{}", rowCounter), zelSubEquipData.Name); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopZnEqpSubSubCompType, EnergyPlus::format("{}", rowCounter), zelSubSubEquipData.TypeOf); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopZnEqpSubSubCompName, format("{}", rowCounter), zelSubSubEquipData.Name); + state, orp->pdchTopZnEqpSubSubCompName, EnergyPlus::format("{}", rowCounter), zelSubSubEquipData.Name); fillZoneEquipToplogyComponentRow(state, zoneName, zelEquipData.TypeOf, zelEquipData.Name, rowCounter); } } @@ -5241,9 +5270,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, format("{}", rowCounter), zoneName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpCompType, format("{}", rowCounter), compType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpCompName, format("{}", rowCounter), compName); + 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); ++rowCounter; } diff --git a/src/EnergyPlus/TARCOGArgs.cc b/src/EnergyPlus/TARCOGArgs.cc index 3c6173abe76..696605ad568 100644 --- a/src/EnergyPlus/TARCOGArgs.cc +++ b/src/EnergyPlus/TARCOGArgs.cc @@ -368,7 +368,7 @@ int ArgCheck(EnergyPlusData &state, for (int i = 1; i <= nlayer - 1; ++i) { if (gap(i) <= 0.0) { ArgCheck = 20; - ErrorMessage = format("Gap width is less than (or equal to) zero. Gap #{:3}", i); + ErrorMessage = EnergyPlus::format("Gap width is less than (or equal to) zero. Gap #{:3}", i); return ArgCheck; } } @@ -376,7 +376,7 @@ int ArgCheck(EnergyPlusData &state, for (int i = 1; i <= nlayer; ++i) { if (thick(i) <= 0.0) { ArgCheck = 21; - ErrorMessage = format("Layer width is less than (or equal to) zero. Layer #{:3}", i); + ErrorMessage = EnergyPlus::format("Layer width is less than (or equal to) zero. Layer #{:3}", i); return ArgCheck; } if ((i < nlayer) && IsShadingLayer(LayerType(i)) && IsShadingLayer(LayerType(i + 1))) { @@ -421,7 +421,7 @@ int ArgCheck(EnergyPlusData &state, for (int i = 1; i <= nlayer; ++i) { if (scon(i) <= 0.0) { ArgCheck = 26; - ErrorMessage = format("Layer {:3} has conductivity which is less or equal to zero.", i); + ErrorMessage = EnergyPlus::format("Layer {:3} has conductivity which is less or equal to zero.", i); return ArgCheck; } @@ -431,10 +431,11 @@ int ArgCheck(EnergyPlusData &state, { ArgCheck = 22; - ErrorMessage = format("Incorrect layer type for layer #{:3}" - ". Layer type can either be 0 (glazing layer), 1 (Venetian blind), 2 (woven shade), 3 (perforated), 4 (diffuse " - "shade) or 5 (bsdf).", - i); + ErrorMessage = + EnergyPlus::format("Incorrect layer type for layer #{:3}" + ". Layer type can either be 0 (glazing layer), 1 (Venetian blind), 2 (woven shade), 3 (perforated), 4 (diffuse " + "shade) or 5 (bsdf).", + i); return ArgCheck; } @@ -454,32 +455,33 @@ int ArgCheck(EnergyPlusData &state, LayerType(i) == TARCOGParams::TARCOGLayerType::VENETBLIND_VERT) { // Venetian blind specific: if (SlatThick(i) <= 0) { ArgCheck = 31; - ErrorMessage = format("Invalid slat thickness (must be >0). Layer #{:3}", i); + ErrorMessage = EnergyPlus::format("Invalid slat thickness (must be >0). Layer #{:3}", i); return ArgCheck; } if (SlatWidth(i) <= 0.0) { ArgCheck = 32; - ErrorMessage = format("Invalid slat width (must be >0). Layer #{:3}", i); + ErrorMessage = EnergyPlus::format("Invalid slat width (must be >0). Layer #{:3}", i); return ArgCheck; } if ((SlatAngle(i) < -90.0) || (SlatAngle(i) > 90.0)) { ArgCheck = 33; - ErrorMessage = format("Invalid slat angle (must be between -90 and 90). Layer #{:3}", i); + ErrorMessage = EnergyPlus::format("Invalid slat angle (must be between -90 and 90). Layer #{:3}", i); return ArgCheck; } if (SlatCond(i) <= 0.0) { ArgCheck = 34; - ErrorMessage = format("Invalid conductivity of slat material (must be >0). Layer #{:3}", i); + ErrorMessage = EnergyPlus::format("Invalid conductivity of slat material (must be >0). Layer #{:3}", i); return ArgCheck; } if (SlatSpacing(i) <= 0.0) { ArgCheck = 35; - ErrorMessage = format("Invalid slat spacing (must be >0). Layer #{:3}", i); + ErrorMessage = EnergyPlus::format("Invalid slat spacing (must be >0). Layer #{:3}", i); return ArgCheck; } if ((SlatCurve(i) != 0.0) && (std::abs(SlatCurve(i)) <= (SlatWidth(i) / 2.0))) { ArgCheck = 36; - ErrorMessage = format("Invalid curvature radius (absolute value must be >SlatWidth/2, or 0 for flat slats). Layer #{:3}", i); + ErrorMessage = + EnergyPlus::format("Invalid curvature radius (absolute value must be >SlatWidth/2, or 0 for flat slats). Layer #{:3}", i); return ArgCheck; } @@ -493,7 +495,7 @@ int ArgCheck(EnergyPlusData &state, if ((i == 1) || (i == (nlayer + 1))) { ErrorMessage = "One of environments (inside or outside) has pressure which is less than zero."; } else { - ErrorMessage = format("One of gaps has pressure which is less than zero. Gap #{:3}", i); + ErrorMessage = EnergyPlus::format("One of gaps has pressure which is less than zero. Gap #{:3}", i); } return ArgCheck; } @@ -692,17 +694,17 @@ void PrepVariablesISO15099(int const nlayer, rir(k1 + 1) = 1 - tir(k1) - emis(k1 + 1); if ((tir(k1) < 0.0) || (tir(k1) > 1.0) || (tir(k1 + 1) < 0.0) || (tir(k1 + 1) > 1.0)) { nperr = 4; - ErrorMessage = format("Layer transmissivity is our of range (<0 or >1). Layer #{:3}", k); + ErrorMessage = EnergyPlus::format("Layer transmissivity is our of range (<0 or >1). Layer #{:3}", k); return; } if ((emis(k1) < 0.0) || (emis(k1) > 1.0) || (emis(k1 + 1) < 0.0) || (emis(k1 + 1) > 1.0)) { nperr = 14; - ErrorMessage = format("Layer emissivity is our of range (<0 or >1). Layer #{:3}", k); + ErrorMessage = EnergyPlus::format("Layer emissivity is our of range (<0 or >1). Layer #{:3}", k); return; } if ((rir(k1) < 0.0) || (rir(k1) > 1.0) || (rir(k1 + 1) < 0.0) || (rir(k1 + 1) > 1.0)) { nperr = 3; - ErrorMessage = format("Layer reflectivity is our of range (<0 or >1). Layer #{:3}", k); + ErrorMessage = EnergyPlus::format("Layer reflectivity is our of range (<0 or >1). Layer #{:3}", k); return; } } diff --git a/src/EnergyPlus/ThermalChimney.cc b/src/EnergyPlus/ThermalChimney.cc index d87f8e8f18b..96a7862ac12 100644 --- a/src/EnergyPlus/ThermalChimney.cc +++ b/src/EnergyPlus/ThermalChimney.cc @@ -195,16 +195,18 @@ namespace ThermalChimney { state.dataThermalChimneys->ThermalChimneySys(Loop).RealZonePtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->Zone); if (state.dataThermalChimneys->ThermalChimneySys(Loop).RealZonePtr == 0) { - ShowSevereError(state, format("{}=\"{} invalid Zone", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, format("invalid - not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, EnergyPlus::format("{}=\"{} invalid Zone", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + EnergyPlus::format("invalid - not found {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } else if (!state.dataHeatBal->Zone(state.dataThermalChimneys->ThermalChimneySys(Loop).RealZonePtr).HasWindow) { - ShowSevereError(state, format("{}=\"{} invalid Zone", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("{}=\"{} invalid Zone", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - format("...invalid - no window(s) in {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::format("...invalid - no window(s) in {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError(state, "...thermal chimney zones must have window(s)."); ErrorsFound = true; } @@ -221,22 +223,22 @@ namespace ThermalChimney { state.dataThermalChimneys->ThermalChimneySys(Loop).AbsorberWallWidth = state.dataIPShortCut->rNumericArgs(1); if (state.dataThermalChimneys->ThermalChimneySys(Loop).AbsorberWallWidth < 0.0) { ShowSevereError(state, - format("{}=\"{} invalid {} must be >= 0, entered value=[{:.2R}].", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(1), - state.dataIPShortCut->rNumericArgs(1))); + EnergyPlus::format("{}=\"{} invalid {} must be >= 0, entered value=[{:.2R}].", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(1), + state.dataIPShortCut->rNumericArgs(1))); ErrorsFound = true; } state.dataThermalChimneys->ThermalChimneySys(Loop).AirOutletCrossArea = state.dataIPShortCut->rNumericArgs(2); if (state.dataThermalChimneys->ThermalChimneySys(Loop).AirOutletCrossArea < 0.0) { ShowSevereError(state, - format("{}=\"{} invalid {} must be >= 0, entered value=[{:.2R}].", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(2), - state.dataIPShortCut->rNumericArgs(2))); + EnergyPlus::format("{}=\"{} invalid {} must be >= 0, entered value=[{:.2R}].", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(2), + state.dataIPShortCut->rNumericArgs(2))); ErrorsFound = true; } @@ -244,11 +246,11 @@ namespace ThermalChimney { if ((state.dataThermalChimneys->ThermalChimneySys(Loop).DischargeCoeff <= 0.0) || (state.dataThermalChimneys->ThermalChimneySys(Loop).DischargeCoeff > 1.0)) { ShowSevereError(state, - format("{}=\"{} invalid {} must be > 0 and <=1.0, entered value=[{:.2R}].", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3), - state.dataIPShortCut->rNumericArgs(3))); + EnergyPlus::format("{}=\"{} invalid {} must be > 0 and <=1.0, entered value=[{:.2R}].", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(3), + state.dataIPShortCut->rNumericArgs(3))); ErrorsFound = true; } @@ -290,55 +292,55 @@ namespace ThermalChimney { //!! Error trap for zones that do not exist or zones not in the zone the thermal chimney is in if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == 0) { ShowSevereError(state, - format("{}=\"{} invalid {}=\"{}\" not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(TCZoneNum + 3), - state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3))); + EnergyPlus::format("{}=\"{} invalid {}=\"{}\" not found.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(TCZoneNum + 3), + state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3))); ErrorsFound = true; } else if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == state.dataThermalChimneys->ThermalChimneySys(Loop).RealZonePtr) { ShowSevereError(state, - format("{}=\"{} invalid reference {}=\"{}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{} invalid reference {}=\"{}", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError(state, - format("...must not have same zone as reference= {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(TCZoneNum + 3), - state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3))); + EnergyPlus::format("...must not have same zone as reference= {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(TCZoneNum + 3), + state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3))); ErrorsFound = true; } if (state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet(TCZoneNum) < 0.0) { ShowSevereError(state, - format("{}=\"{} invalid {} must be >= 0, entered value=[{:.2R}].", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3 * TCZoneNum + 1), - state.dataIPShortCut->rNumericArgs(3 * TCZoneNum + 1))); + EnergyPlus::format("{}=\"{} invalid {} must be >= 0, entered value=[{:.2R}].", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(3 * TCZoneNum + 1), + state.dataIPShortCut->rNumericArgs(3 * TCZoneNum + 1))); ErrorsFound = true; } if ((state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) <= 0.0) || (state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) > 1.0)) { ShowSevereError(state, - format("{}=\"{} invalid {} must be > 0 and <=1.0, entered value=[{:.2R}].", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3 * TCZoneNum + 2), - state.dataIPShortCut->rNumericArgs(3 * TCZoneNum + 2))); + EnergyPlus::format("{}=\"{} invalid {} must be > 0 and <=1.0, entered value=[{:.2R}].", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(3 * TCZoneNum + 2), + state.dataIPShortCut->rNumericArgs(3 * TCZoneNum + 2))); ErrorsFound = true; } if (state.dataThermalChimneys->ThermalChimneySys(Loop).EachAirInletCrossArea(TCZoneNum) < 0.0) { ShowSevereError(state, - format("{}=\"{} invalid {} must be >= 0, entered value=[{:.2R}].", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3 * TCZoneNum + 3), - state.dataIPShortCut->rNumericArgs(3 * TCZoneNum + 3))); + EnergyPlus::format("{}=\"{} invalid {} must be >= 0, entered value=[{:.2R}].", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(3 * TCZoneNum + 3), + state.dataIPShortCut->rNumericArgs(3 * TCZoneNum + 3))); ErrorsFound = true; } @@ -349,10 +351,10 @@ namespace ThermalChimney { // Error trap if the sum of fractions is not equal to 1.0 if (std::abs(AllRatiosSummed - 1.0) > FlowFractionTolerance) { ShowSevereError(state, - format("{}=\"{} invalid sum of fractions, must be =1.0, entered value (summed from entries)=[{:.4R}].", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - AllRatiosSummed)); + EnergyPlus::format("{}=\"{} invalid sum of fractions, must be =1.0, entered value (summed from entries)=[{:.4R}].", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + AllRatiosSummed)); ErrorsFound = true; } @@ -585,8 +587,9 @@ namespace ThermalChimney { ++TCZoneNum1) { if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum1)) { - ShowSevereError(state, - format("Only one ZoneThermalChimney object allowed per zone but zone {} has two ZoneThermalChimney " + ShowSevereError( + state, + EnergyPlus::format("Only one ZoneThermalChimney object allowed per zone but zone {} has two ZoneThermalChimney " "objects associated with it", state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); ErrorsFound = true; @@ -595,8 +598,9 @@ namespace ThermalChimney { for (TCZoneNum1 = 1; TCZoneNum1 <= TCZoneNum - 1; ++TCZoneNum1) { if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum1)) { - ShowSevereError(state, - format("Only one ZoneThermalChimney object allowed per zone but zone {} has two ZoneThermalChimney " + ShowSevereError( + state, + EnergyPlus::format("Only one ZoneThermalChimney object allowed per zone but zone {} has two ZoneThermalChimney " "objects associated with it", state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); ErrorsFound = true; @@ -606,8 +610,9 @@ namespace ThermalChimney { for (TCZoneNum1 = 1; TCZoneNum1 <= TCZoneNum - 1; ++TCZoneNum1) { if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum1)) { - ShowSevereError(state, - format("Only one ZoneThermalChimney object allowed per zone but zone {} has two ZoneThermalChimney " + ShowSevereError( + state, + EnergyPlus::format("Only one ZoneThermalChimney object allowed per zone but zone {} has two ZoneThermalChimney " "objects associated with it", state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); ErrorsFound = true; @@ -631,9 +636,9 @@ namespace ThermalChimney { if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == state.dataThermalChimneys->ThermalChimneySys(Loop1).ZonePtr(TCZoneNum1)) { ShowSevereError(state, - format("Only one ZoneThermalChimney object allowed per zone but zone {} has two " - "ZoneThermalChimney objects associated with it", - state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); + EnergyPlus::format("Only one ZoneThermalChimney object allowed per zone but zone {} has two " + "ZoneThermalChimney objects associated with it", + state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); ErrorsFound = true; } } @@ -645,9 +650,9 @@ namespace ThermalChimney { if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == state.dataThermalChimneys->ThermalChimneySys(Loop1).ZonePtr(TCZoneNum1)) { ShowSevereError(state, - format("Only one ZoneThermalChimney object allowed per zone but zone {} has two " - "ZoneThermalChimney objects associated with it", - state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); + EnergyPlus::format("Only one ZoneThermalChimney object allowed per zone but zone {} has two " + "ZoneThermalChimney objects associated with it", + state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); ErrorsFound = true; } } @@ -660,9 +665,9 @@ namespace ThermalChimney { if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == state.dataThermalChimneys->ThermalChimneySys(Loop1).ZonePtr(TCZoneNum1)) { ShowSevereError(state, - format("Only one ZoneThermalChimney object allowed per zone but zone {} has two " - "ZoneThermalChimney objects associated with it", - state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); + EnergyPlus::format("Only one ZoneThermalChimney object allowed per zone but zone {} has two " + "ZoneThermalChimney objects associated with it", + state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum))); ErrorsFound = true; } } @@ -674,7 +679,7 @@ namespace ThermalChimney { } // IF (TotThermalChimney > 1) THEN if (ErrorsFound) { - ShowFatalError(state, format("{} Errors found in input. Preceding condition(s) cause termination.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{} Errors found in input. Preceding condition(s) cause termination.", cCurrentModuleObject)); } } diff --git a/src/EnergyPlus/ThermalComfort.cc b/src/EnergyPlus/ThermalComfort.cc index a5d10c9630f..747fcd13eda 100644 --- a/src/EnergyPlus/ThermalComfort.cc +++ b/src/EnergyPlus/ThermalComfort.cc @@ -613,11 +613,13 @@ namespace ThermalComfort { } else { state.dataThermalComforts->CloUnit = people.clothingSched->getCurrentVal(); ShowWarningError( - state, format("PEOPLE=\"{}\", Scheduled clothing value will be used rather than clothing calculation method.", people.Name)); + state, + EnergyPlus::format("PEOPLE=\"{}\", Scheduled clothing value will be used rather than clothing calculation method.", + people.Name)); } break; default: - ShowSevereError(state, format("PEOPLE=\"{}\", Incorrect Clothing Type", people.Name)); + ShowSevereError(state, EnergyPlus::format("PEOPLE=\"{}\", Incorrect Clothing Type", people.Name)); } if (state.dataRoomAir->anyNonMixingRoomAirModel && state.dataRoomAir->IsZoneCrossVent(state.dataThermalComforts->ZoneNum)) { @@ -635,7 +637,8 @@ namespace ThermalComfort { if (people.AirVelErrIndex == 0) { ShowWarningMessage( state, - format("PEOPLE=\"{}\", Air velocity is beyond the reasonable range (0.1,0.5) for thermal comfort control.", people.Name)); + EnergyPlus::format("PEOPLE=\"{}\", Air velocity is beyond the reasonable range (0.1,0.5) for thermal comfort control.", + people.Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -1528,11 +1531,13 @@ namespace ThermalComfort { } else { state.dataThermalComforts->CloUnit = people.clothingSched->getCurrentVal(); ShowWarningError( - state, format("PEOPLE=\"{}\", Scheduled clothing value will be used rather than clothing calculation method.", people.Name)); + state, + EnergyPlus::format("PEOPLE=\"{}\", Scheduled clothing value will be used rather than clothing calculation method.", + people.Name)); } } break; default: - ShowSevereError(state, format("PEOPLE=\"{}\", Incorrect Clothing Type", people.Name)); + ShowSevereError(state, EnergyPlus::format("PEOPLE=\"{}\", Incorrect Clothing Type", people.Name)); } state.dataThermalComforts->AirVel = people.airVelocitySched->getCurrentVal(); @@ -1984,16 +1989,16 @@ namespace ThermalComfort { // Error trap for surfaces that do not exist or surfaces not in the zone if (thisAngFacList.SurfacePtr(SurfNum) == 0) { ShowSevereError(state, - format("{}: invalid {}, entered value={}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(SurfNum + 1), - state.dataIPShortCut->cAlphaArgs(SurfNum + 1))); + EnergyPlus::format("{}: invalid {}, entered value={}", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(SurfNum + 1), + state.dataIPShortCut->cAlphaArgs(SurfNum + 1))); ShowContinueError(state, - format("ref {}={} not found in {}={}", - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::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? @@ -2003,18 +2008,18 @@ namespace ThermalComfort { } if (thisAngFacList.EnclosurePtr != thisSurf.RadEnclIndex) { ShowWarningError(state, - format("{}: For {}=\"{}\", surfaces are not all in the same radiant enclosure.", - routineName, - cCurrentModuleObject, - thisAngFacList.Name)); + EnergyPlus::format("{}: For {}=\"{}\", surfaces are not all in the same radiant enclosure.", + routineName, + cCurrentModuleObject, + thisAngFacList.Name)); ShowContinueError(state, - format("... Surface=\"{}\" is in enclosure=\"{}\"", - state.dataSurface->Surface(thisAngFacList.SurfacePtr(1)).Name, - state.dataViewFactor->EnclRadInfo(thisAngFacList.EnclosurePtr).Name)); + EnergyPlus::format("... Surface=\"{}\" is in enclosure=\"{}\"", + state.dataSurface->Surface(thisAngFacList.SurfacePtr(1)).Name, + state.dataViewFactor->EnclRadInfo(thisAngFacList.EnclosurePtr).Name)); ShowContinueError(state, - format("... Surface=\"{}\" is in enclosure=\"{}\"", - thisSurf.Name, - state.dataViewFactor->EnclRadInfo(thisSurf.RadEnclIndex).Name)); + EnergyPlus::format("... Surface=\"{}\" is in enclosure=\"{}\"", + thisSurf.Name, + state.dataViewFactor->EnclRadInfo(thisSurf.RadEnclIndex).Name)); } } @@ -2022,11 +2027,13 @@ namespace ThermalComfort { } if (std::abs(AllAngleFacSummed - 1.0) > AngleFacLimit) { - ShowSevereError(state, format("{}=\"{}\", invalid - Sum[AngleFactors]", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - format("...Sum of Angle Factors [{:.3R}] should not deviate from expected sum [1.0] by more than limit [{:.3R}].", - AllAngleFacSummed, - AngleFacLimit)); + ShowSevereError( + state, EnergyPlus::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}].", + AllAngleFacSummed, + AngleFacLimit)); ErrorsFound = true; } } @@ -2043,21 +2050,22 @@ 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, format("{}{}=\"{}\", invalid", routineName, cCurrentModuleObject, thisPeople.AngleFactorListName)); - ShowContinueError(state, format("... Angle Factor List Name not found for PEOPLE=\"{}\"", thisPeople.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", routineName, cCurrentModuleObject, thisPeople.AngleFactorListName)); + ShowContinueError(state, EnergyPlus::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(state, - format("{}{}=\"{}\", radiant enclosure mismatch.", routineName, cCurrentModuleObject, thisAngFacList.Name)); - ShowContinueError( + ShowWarningError( state, - 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)); + 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)); } } } @@ -2173,13 +2181,15 @@ namespace ThermalComfort { } else { if (state.dataThermalComforts->FirstTimeError) { int spaceNum = thisSurface.spaceNum; - ShowWarningError(state, - format("CalcSurfaceWeightedMRT: Areas*Inside surface emissivities are summing to zero for Enclosure=\"{}\"", - thisRadEnclosure.Name)); - ShowContinueError(state, - 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, format("for Surface={}", thisSurface.Name)); + 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)); state.dataThermalComforts->FirstTimeError = false; CalcSurfaceWeightedMRT = state.dataZoneTempPredictorCorrector->spaceHeatBalance(spaceNum).MAT; if (AverageWithSurface) { @@ -2428,23 +2438,25 @@ namespace ThermalComfort { } // if any zones should be warning print it out if (showWarning) { - ShowWarningError(state, format("More than 4% of time ({:.1R} hours) uncomfortable in one or more zones ", allowedHours)); + ShowWarningError(state, EnergyPlus::format("More than 4% of time ({:.1R} hours) uncomfortable in one or more zones ", allowedHours)); ShowContinueError(state, "Based on ASHRAE 55-2004 graph (Section 5.2.1.1)"); if (state.dataEnvrn->RunPeriodEnvironment) { - ShowContinueError(state, - format("During Environment [{}]: {}", state.dataEnvrn->EnvironmentStartEnd, state.dataEnvrn->EnvironmentName)); - } else { ShowContinueError( state, - format("During SizingPeriod Environment [{}]: {}", state.dataEnvrn->EnvironmentStartEnd, state.dataEnvrn->EnvironmentName)); + EnergyPlus::format("During Environment [{}]: {}", state.dataEnvrn->EnvironmentStartEnd, state.dataEnvrn->EnvironmentName)); + } else { + ShowContinueError(state, + EnergyPlus::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) { if (state.dataThermalComforts->ThermalComfortInASH55(iZone).totalTimeNotEither > allowedHours) { ShowContinueError(state, - format("{:.1R} hours were uncomfortable in zone: {}", - state.dataThermalComforts->ThermalComfortInASH55(iZone).totalTimeNotEither, - state.dataHeatBal->Zone(iZone).Name)); + EnergyPlus::format("{:.1R} hours were uncomfortable in zone: {}", + state.dataThermalComforts->ThermalComfortInASH55(iZone).totalTimeNotEither, + state.dataHeatBal->Zone(iZone).Name)); } } } diff --git a/src/EnergyPlus/TranspiredCollector.cc b/src/EnergyPlus/TranspiredCollector.cc index 5b155862b77..30f1815c303 100644 --- a/src/EnergyPlus/TranspiredCollector.cc +++ b/src/EnergyPlus/TranspiredCollector.cc @@ -153,26 +153,28 @@ namespace TranspiredCollector { if (CompIndex == 0) { UTSCNum = Util::FindItemInList(CompName, state.dataTranspiredCollector->UTSC); if (UTSCNum == 0) { - ShowFatalError(state, format("Transpired Collector not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("Transpired Collector not found={}", CompName)); } CompIndex = UTSCNum; } else { UTSCNum = CompIndex; if (UTSCNum > state.dataTranspiredCollector->NumUTSC || UTSCNum < 1) { - ShowFatalError(state, - format("SimTranspiredCollector: Invalid CompIndex passed={}, Number of Transpired Collectors={}, UTSC name={}", - UTSCNum, - state.dataTranspiredCollector->NumUTSC, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimTranspiredCollector: Invalid CompIndex passed={}, Number of Transpired Collectors={}, UTSC name={}", + UTSCNum, + state.dataTranspiredCollector->NumUTSC, + CompName)); } if (state.dataTranspiredCollector->CheckEquipName(UTSCNum)) { if (CompName != state.dataTranspiredCollector->UTSC(UTSCNum).Name) { - ShowFatalError(state, - format("SimTranspiredCollector: Invalid CompIndex passed={}, Transpired Collector name={}, stored Transpired " - "Collector Name for that index={}", - UTSCNum, - CompName, - state.dataTranspiredCollector->UTSC(UTSCNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimTranspiredCollector: Invalid CompIndex passed={}, Transpired Collector name={}, stored Transpired " + "Collector Name for that index={}", + UTSCNum, + CompName, + state.dataTranspiredCollector->UTSC(UTSCNum).Name)); } state.dataTranspiredCollector->CheckEquipName(UTSCNum) = false; } @@ -283,8 +285,9 @@ namespace TranspiredCollector { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, CurrentModuleObject, Dummy, MaxNumAlphas, MaxNumNumbers); if (MaxNumNumbers != 11) { - ShowSevereError(state, - format("GetTranspiredCollectorInput: {} Object Definition indicates not = 11 Number Objects, Number Indicated={}", + ShowSevereError( + state, + EnergyPlus::format("GetTranspiredCollectorInput: {} Object Definition indicates not = 11 Number Objects, Number Indicated={}", CurrentModuleObject, MaxNumNumbers)); ErrorsFound = true; @@ -326,8 +329,9 @@ namespace TranspiredCollector { state, CurrentModuleMultiObject, Dummy, MaxNumAlphasSplit, MaxNumNumbersSplit); if (MaxNumNumbersSplit != 0) { - ShowSevereError(state, - format("GetTranspiredCollectorInput: {} Object Definition indicates not = 0 Number Objects, Number Indicated={}", + ShowSevereError( + state, + EnergyPlus::format("GetTranspiredCollectorInput: {} Object Definition indicates not = 0 Number Objects, Number Indicated={}", CurrentModuleMultiObject, MaxNumNumbersSplit)); ErrorsFound = true; @@ -346,8 +350,9 @@ namespace TranspiredCollector { SplitterNameOK(ItemSplit) = true; state.dataTranspiredCollector->UTSC(Item).NumOASysAttached = std::floor(NumAlphasSplit / 4.0); if (mod((NumAlphasSplit), 4) != 1) { - ShowSevereError(state, - format("GetTranspiredCollectorInput: {} Object Definition indicates not uniform quadtuples of nodes for {}", + ShowSevereError( + state, + EnergyPlus::format("GetTranspiredCollectorInput: {} Object Definition indicates not uniform quadtuples of nodes for {}", CurrentModuleMultiObject, AlphasSplit(1))); ErrorsFound = true; @@ -420,11 +425,11 @@ namespace TranspiredCollector { Found = Util::FindItemInList(state.dataTranspiredCollector->UTSC(Item).OSCMName, state.dataSurface->OSCM); if (Found == 0) { ShowSevereError(state, - format("{} not found={} in {} ={}", - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataTranspiredCollector->UTSC(Item).OSCMName, - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("{} not found={} in {} ={}", + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataTranspiredCollector->UTSC(Item).OSCMName, + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; } state.dataTranspiredCollector->UTSC(Item).OSCMPtr = Found; @@ -507,11 +512,11 @@ namespace TranspiredCollector { state.dataTranspiredCollector->UTSC(Item).Layout = Layout_Square; } else { ShowSevereError(state, - format("{} has incorrect entry of {} in {} ={}", - state.dataIPShortCut->cAlphaFieldNames(9), - Alphas(9), - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("{} has incorrect entry of {} in {} ={}", + state.dataIPShortCut->cAlphaFieldNames(9), + Alphas(9), + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; continue; } @@ -522,11 +527,11 @@ namespace TranspiredCollector { state.dataTranspiredCollector->UTSC(Item).Correlation = Correlation_VanDeckerHollandsBrunger2001; } else { ShowSevereError(state, - format("{} has incorrect entry of {} in {} ={}", - state.dataIPShortCut->cAlphaFieldNames(10), - Alphas(9), - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("{} has incorrect entry of {} in {} ={}", + state.dataIPShortCut->cAlphaFieldNames(10), + Alphas(9), + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; continue; } @@ -555,19 +560,21 @@ namespace TranspiredCollector { // Was it set? if (state.dataTranspiredCollector->UTSC(Item).CollRoughness == Material::SurfaceRoughness::Invalid) { ShowSevereError(state, - format("{} has incorrect entry of {} in {} ={}", - state.dataIPShortCut->cAlphaFieldNames(11), - Alphas(11), - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("{} has incorrect entry of {} in {} ={}", + state.dataIPShortCut->cAlphaFieldNames(11), + Alphas(11), + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; } AlphaOffset = 11; state.dataTranspiredCollector->UTSC(Item).NumSurfs = NumAlphas - AlphaOffset; if (state.dataTranspiredCollector->UTSC(Item).NumSurfs == 0) { - ShowSevereError( - state, format("No underlying surfaces specified in {} ={}", CurrentModuleObject, state.dataTranspiredCollector->UTSC(Item).Name)); + ShowSevereError(state, + EnergyPlus::format("No underlying surfaces specified in {} ={}", + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; continue; } @@ -577,59 +584,62 @@ namespace TranspiredCollector { Found = Util::FindItemInList(Alphas(ThisSurf + AlphaOffset), state.dataSurface->Surface); if (Found == 0) { ShowSevereError(state, - format("Surface Name not found={} in {} ={}", - Alphas(ThisSurf + AlphaOffset), - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("Surface Name not found={} in {} ={}", + Alphas(ThisSurf + AlphaOffset), + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; continue; } // check that surface is appropriate, Heat transfer, Sun, Wind, if (!state.dataSurface->Surface(Found).HeatTransSurf) { ShowSevereError(state, - format("Surface {} not of Heat Transfer type in {} ={}", - Alphas(ThisSurf + AlphaOffset), - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("Surface {} not of Heat Transfer type in {} ={}", + Alphas(ThisSurf + AlphaOffset), + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; continue; } if (!state.dataSurface->Surface(Found).ExtSolar) { ShowSevereError(state, - format("Surface {} not exposed to sun in {} ={}", - Alphas(ThisSurf + AlphaOffset), - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("Surface {} not exposed to sun in {} ={}", + Alphas(ThisSurf + AlphaOffset), + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; continue; } if (!state.dataSurface->Surface(Found).ExtWind) { ShowSevereError(state, - format("Surface {} not exposed to wind in {} ={}", - Alphas(ThisSurf + AlphaOffset), - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("Surface {} not exposed to wind in {} ={}", + Alphas(ThisSurf + AlphaOffset), + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; continue; } if (state.dataSurface->Surface(Found).ExtBoundCond != OtherSideCondModeledExt) { ShowSevereError(state, - format("Surface {} does not have OtherSideConditionsModel for exterior boundary conditions in {} ={}", - Alphas(ThisSurf + AlphaOffset), - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("Surface {} does not have OtherSideConditionsModel for exterior boundary conditions in {} ={}", + Alphas(ThisSurf + AlphaOffset), + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ErrorsFound = true; continue; } // check surface orientation, warn if upside down if ((state.dataSurface->Surface(Found).Tilt < -95.0) || (state.dataSurface->Surface(Found).Tilt > 95.0)) { - ShowWarningError(state, format("Suspected input problem with collector surface = {}", Alphas(ThisSurf + AlphaOffset))); - ShowContinueError( - state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataTranspiredCollector->UTSC(Item).Name)); + ShowWarningError(state, + EnergyPlus::format("Suspected input problem with collector surface = {}", Alphas(ThisSurf + AlphaOffset))); + ShowContinueError(state, + EnergyPlus::format("Entered in {} = {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); ShowContinueError(state, "Surface used for solar collector faces down"); - ShowContinueError( - state, format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", state.dataSurface->Surface(Found).Tilt)); + ShowContinueError(state, + EnergyPlus::format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", + state.dataSurface->Surface(Found).Tilt)); } state.dataTranspiredCollector->UTSC(Item).SurfPtrs(ThisSurf) = Found; @@ -660,17 +670,17 @@ namespace TranspiredCollector { SurfID = state.dataTranspiredCollector->UTSC(Item).SurfPtrs(ThisSurf); if (General::rotAzmDiffDeg(state.dataSurface->Surface(SurfID).Azimuth, AvgAzimuth) > 15.0) { ShowWarningError(state, - format("Surface {} has Azimuth different from others in the group associated with {} ={}", - state.dataSurface->Surface(SurfID).Name, - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::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, - format("Surface {} has Tilt different from others in the group associated with {} ={}", - state.dataSurface->Surface(SurfID).Name, - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::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 @@ -705,9 +715,10 @@ namespace TranspiredCollector { state.dataTranspiredCollector->UTSC(Item).Height = Numbers(5); state.dataTranspiredCollector->UTSC(Item).PlenGapThick = Numbers(6); if (state.dataTranspiredCollector->UTSC(Item).PlenGapThick <= 0.0) { - ShowSevereError( - state, - format("Plenum gap must be greater than Zero in {} ={}", CurrentModuleObject, state.dataTranspiredCollector->UTSC(Item).Name)); + ShowSevereError(state, + EnergyPlus::format("Plenum gap must be greater than Zero in {} ={}", + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); continue; } state.dataTranspiredCollector->UTSC(Item).PlenCrossArea = Numbers(7); @@ -723,9 +734,9 @@ namespace TranspiredCollector { state.dataTranspiredCollector->UTSC(Item).ProjArea = surfaceArea; if (state.dataTranspiredCollector->UTSC(Item).ProjArea == 0) { ShowSevereError(state, - format("Gross area of underlying surfaces is zero in {} ={}", - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + EnergyPlus::format("Gross area of underlying surfaces is zero in {} ={}", + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); continue; } state.dataTranspiredCollector->UTSC(Item).ActualArea = @@ -929,17 +940,18 @@ namespace TranspiredCollector { if (ControlNode > 0) { if (state.dataLoopNodes->Node(ControlNode).TempSetPoint == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError( - state, format("Missing temperature setpoint for UTSC {}", state.dataTranspiredCollector->UTSC(UTSCUnitNum).Name)); + ShowSevereError(state, + EnergyPlus::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 { // need call to EMS to check node CheckIfNodeSetPointManagedByEMS(state, ControlNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { - ShowSevereError( - state, - format("Missing temperature setpoint for UTSC {}", state.dataTranspiredCollector->UTSC(UTSCUnitNum).Name)); + ShowSevereError(state, + EnergyPlus::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"); } @@ -1118,10 +1130,11 @@ 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, - format("Solar Collector:Unglazed Transpired=\"{}\", Suction velocity is outside of range for a good design", - state.dataTranspiredCollector->UTSC(UTSCNum).Name)); - ShowContinueErrorTimeStamp(state, format("Suction velocity ={:.4R}", Vsuction)); + ShowWarningMessage( + state, + EnergyPlus::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"); } @@ -1563,9 +1576,9 @@ namespace TranspiredCollector { } if (SurfacePtr == 0) { - ShowFatalError( - state, - format("Invalid surface passed to GetTranspiredCollectorIndex, Surface name = {}", state.dataSurface->Surface(SurfacePtr).Name)); + ShowFatalError(state, + EnergyPlus::format("Invalid surface passed to GetTranspiredCollectorIndex, Surface name = {}", + state.dataSurface->Surface(SurfacePtr).Name)); } UTSCNum = 0; @@ -1581,8 +1594,8 @@ namespace TranspiredCollector { if (!Found) { ShowFatalError(state, - format("Did not find surface in UTSC description in GetTranspiredCollectorIndex, Surface name = {}", - state.dataSurface->Surface(SurfacePtr).Name)); + EnergyPlus::format("Did not find surface in UTSC description in GetTranspiredCollectorIndex, Surface name = {}", + state.dataSurface->Surface(SurfacePtr).Name)); } else { UTSCIndex = UTSCNum; @@ -1634,7 +1647,7 @@ namespace TranspiredCollector { if (WhichUTSC != 0) { NodeNum = state.dataTranspiredCollector->UTSC(WhichUTSC).InletNode(1); } else { - ShowSevereError(state, format("GetAirInletNodeNum: Could not find TranspiredCollector = \"{}\"", UTSCName)); + ShowSevereError(state, EnergyPlus::format("GetAirInletNodeNum: Could not find TranspiredCollector = \"{}\"", UTSCName)); ErrorsFound = true; NodeNum = 0; } @@ -1669,7 +1682,7 @@ namespace TranspiredCollector { if (WhichUTSC != 0) { NodeNum = state.dataTranspiredCollector->UTSC(WhichUTSC).OutletNode(1); } else { - ShowSevereError(state, format("GetAirOutletNodeNum: Could not find TranspiredCollector = \"{}\"", UTSCName)); + ShowSevereError(state, EnergyPlus::format("GetAirOutletNodeNum: Could not find TranspiredCollector = \"{}\"", UTSCName)); ErrorsFound = true; NodeNum = 0; } diff --git a/src/EnergyPlus/UFADManager.cc b/src/EnergyPlus/UFADManager.cc index ee977510da7..59faa883ba0 100644 --- a/src/EnergyPlus/UFADManager.cc +++ b/src/EnergyPlus/UFADManager.cc @@ -257,7 +257,8 @@ namespace RoomAir { if (zoneU.WinWidth <= 0.0) { ShowWarningError( state, - format("For RoomAirSettings:UnderFloorAirDistributionExterior for Zone {} there are no exterior windows.", zoneU.ZoneName)); + EnergyPlus::format("For RoomAirSettings:UnderFloorAirDistributionExterior for Zone {} there are no exterior windows.", + zoneU.ZoneName)); ShowContinueError(state, " The zone will be treated as a UFAD interior zone"); } } // if (model == RoomAirModel::UFADExt) @@ -286,11 +287,11 @@ namespace RoomAir { (zoneU.A_Kc != Constant::AutoCalculate || zoneU.B_Kc != Constant::AutoCalculate || zoneU.C_Kc != Constant::AutoCalculate || zoneU.D_Kc != Constant::AutoCalculate || zoneU.E_Kc != Constant::AutoCalculate)) { ShowWarningError(state, - format("For {} for Zone {}, input for Coefficients A - E will be " - "ignored when Floor Diffuser Type = {}.", - cCMO, - zoneU.ZoneName, - diffuserNamesUC[(int)zoneU.DiffuserType])); + EnergyPlus::format("For {} for Zone {}, input for Coefficients A - E will be " + "ignored when Floor Diffuser Type = {}.", + cCMO, + zoneU.ZoneName, + diffuserNamesUC[(int)zoneU.DiffuserType])); ShowContinueError(state, " To input these Coefficients, use Floor Diffuser Type = Custom."); } @@ -321,10 +322,10 @@ namespace RoomAir { } else if (zoneU.A_Kc == Constant::AutoCalculate || zoneU.B_Kc == Constant::AutoCalculate || zoneU.C_Kc == Constant::AutoCalculate || zoneU.D_Kc == Constant::AutoCalculate || zoneU.E_Kc == Constant::AutoCalculate) { ShowFatalError(state, - format("For {} for Zone {}, input for Coefficients A - E must be " - "specified when Floor Diffuser Type = Custom.", - cCMO, - zoneU.ZoneName)); + EnergyPlus::format("For {} for Zone {}, input for Coefficients A - E must be " + "specified when Floor Diffuser Type = Custom.", + cCMO, + zoneU.ZoneName)); } if (zoneU.PowerPerPlume == Constant::AutoCalculate) { @@ -459,9 +460,9 @@ namespace RoomAir { if (std::abs(ZInfSurf - ZSupSurf) < 1.e-10) { ShowSevereError(state, "RoomAirModelUFAD:HcUCSDUF: Surface values will cause divide by zero."); - ShowContinueError(state, format("Zone=\"{}\", Surface=\"{}\".", state.dataHeatBal->Zone(surf.Zone).Name, surf.Name)); - ShowContinueError(state, format("ZInfSurf=[{:.4R}], LayH=[{:.4R}].", ZInfSurf, LayH)); - ShowContinueError(state, format("ZSupSurf=[{:.4R}], LayH=[{:.4R}].", ZSupSurf, LayH)); + ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Surface=\"{}\".", state.dataHeatBal->Zone(surf.Zone).Name, surf.Name)); + ShowContinueError(state, EnergyPlus::format("ZInfSurf=[{:.4R}], LayH=[{:.4R}].", ZInfSurf, LayH)); + ShowContinueError(state, EnergyPlus::format("ZSupSurf=[{:.4R}], LayH=[{:.4R}].", ZSupSurf, LayH)); ShowFatalError(state, "...Previous condition causes termination."); } @@ -1118,8 +1119,9 @@ namespace RoomAir { } else if (HeightComfort >= HeightUpSubzoneAve && HeightComfort <= CeilingHeight) { state.dataRoomAir->TCMF(ZoneNum) = state.dataRoomAir->ZTMX(ZoneNum); } else { - ShowFatalError(state, - format("UFAD comfort height is above ceiling or below floor in Zone: {}", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("UFAD comfort height is above ceiling or below floor in Zone: {}", state.dataHeatBal->Zone(ZoneNum).Name)); } } @@ -1138,8 +1140,8 @@ namespace RoomAir { state.dataHeatBalFanSys->TempTstatAir(ZoneNum) = state.dataRoomAir->ZTMX(ZoneNum); } else { ShowFatalError(state, - format("Underfloor air distribution thermostat height is above ceiling or below floor in Zone: {}", - state.dataHeatBal->Zone(ZoneNum).Name)); + EnergyPlus::format("Underfloor air distribution thermostat height is above ceiling or below floor in Zone: {}", + state.dataHeatBal->Zone(ZoneNum).Name)); } } @@ -1579,8 +1581,9 @@ namespace RoomAir { } else if (HeightComfort >= HeightUpSubzoneAve && HeightComfort <= CeilingHeight) { state.dataRoomAir->TCMF(ZoneNum) = state.dataRoomAir->ZTMX(ZoneNum); } else { - ShowFatalError(state, - format("UFAD comfort height is above ceiling or below floor in Zone: {}", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("UFAD comfort height is above ceiling or below floor in Zone: {}", state.dataHeatBal->Zone(ZoneNum).Name)); } } @@ -1599,8 +1602,8 @@ namespace RoomAir { state.dataHeatBalFanSys->TempTstatAir(ZoneNum) = state.dataRoomAir->ZTMX(ZoneNum); } else { ShowFatalError(state, - format("Underfloor air distribution thermostat height is above ceiling or below floor in Zone: {}", - state.dataHeatBal->Zone(ZoneNum).Name)); + EnergyPlus::format("Underfloor air distribution thermostat height is above ceiling or below floor in Zone: {}", + state.dataHeatBal->Zone(ZoneNum).Name)); } } diff --git a/src/EnergyPlus/UnitHeater.cc b/src/EnergyPlus/UnitHeater.cc index 5d0a024f4cc..7596c8eebbe 100644 --- a/src/EnergyPlus/UnitHeater.cc +++ b/src/EnergyPlus/UnitHeater.cc @@ -138,25 +138,25 @@ namespace UnitHeater { if (CompIndex == 0) { UnitHeatNum = Util::FindItemInList(CompName, state.dataUnitHeaters->UnitHeat); if (UnitHeatNum == 0) { - ShowFatalError(state, format("SimUnitHeater: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimUnitHeater: Unit not found={}", CompName)); } CompIndex = UnitHeatNum; } else { UnitHeatNum = CompIndex; if (UnitHeatNum > state.dataUnitHeaters->NumOfUnitHeats || UnitHeatNum < 1) { ShowFatalError(state, - format("SimUnitHeater: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - UnitHeatNum, - state.dataUnitHeaters->NumOfUnitHeats, - CompName)); + EnergyPlus::format("SimUnitHeater: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + UnitHeatNum, + state.dataUnitHeaters->NumOfUnitHeats, + CompName)); } if (state.dataUnitHeaters->CheckEquipName(UnitHeatNum)) { if (CompName != state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name) { ShowFatalError(state, - format("SimUnitHeater: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - UnitHeatNum, - CompName, - state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + EnergyPlus::format("SimUnitHeater: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + UnitHeatNum, + CompName, + state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); } state.dataUnitHeaters->CheckEquipName(UnitHeatNum) = false; } @@ -319,21 +319,22 @@ namespace UnitHeater { FanVolFlow = fan->maxAirFlowRate; if (FanVolFlow != DataSizing::AutoSize && unitHeat.MaxAirVolFlow != DataSizing::AutoSize && FanVolFlow < unitHeat.MaxAirVolFlow) { - ShowSevereError(state, format("Specified in {} = {}", CurrentModuleObject, unitHeat.Name)); + ShowSevereError(state, EnergyPlus::format("Specified in {} = {}", CurrentModuleObject, unitHeat.Name)); ShowContinueError( state, - format("...air flow rate ({:.7T}) in fan object {} is less than the unit heater maximum supply air flow rate ({:.7T}).", - FanVolFlow, - unitHeat.FanName, - unitHeat.MaxAirVolFlow)); + EnergyPlus::format( + "...air flow rate ({:.7T}) in fan object {} is less than the unit heater maximum supply air flow rate ({:.7T}).", + FanVolFlow, + unitHeat.FanName, + unitHeat.MaxAirVolFlow)); ShowContinueError(state, "...the fan flow rate must be greater than or equal to the unit heater maximum supply air flow rate."); ErrorsFound = true; } else if (FanVolFlow == DataSizing::AutoSize && unitHeat.MaxAirVolFlow != DataSizing::AutoSize) { - ShowWarningError(state, format("Specified in {} = {}", CurrentModuleObject, unitHeat.Name)); + ShowWarningError(state, EnergyPlus::format("Specified in {} = {}", CurrentModuleObject, unitHeat.Name)); ShowContinueError(state, "...the fan flow rate is autosized while the unit heater flow rate is not."); ShowContinueError(state, "...this can lead to unexpected results where the fan flow rate is less than required."); } else if (FanVolFlow != DataSizing::AutoSize && unitHeat.MaxAirVolFlow == DataSizing::AutoSize) { - ShowWarningError(state, format("Specified in {} = {}", CurrentModuleObject, unitHeat.Name)); + ShowWarningError(state, EnergyPlus::format("Specified in {} = {}", CurrentModuleObject, unitHeat.Name)); ShowContinueError(state, "...the unit heater flow rate is autosized while the fan flow rate is not."); ShowContinueError(state, "...this can lead to unexpected results where the fan flow rate is less than required."); } @@ -354,8 +355,8 @@ namespace UnitHeater { case HCoilType::Gas: break; default: { - ShowSevereError(state, format("Illegal {} = {}", cAlphaFields(7), Alphas(7))); - ShowContinueError(state, format("Occurs in {}={}", CurrentModuleObject, unitHeat.Name)); + ShowSevereError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(7), Alphas(7))); + ShowContinueError(state, EnergyPlus::format("Occurs in {}={}", CurrentModuleObject, unitHeat.Name)); ErrorsFound = true; errFlag = true; } @@ -367,7 +368,7 @@ namespace UnitHeater { unitHeat.HCoilName = Alphas(8); ValidateComponent(state, Alphas(7), unitHeat.HCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("specified in {} = \"{}\"", CurrentModuleObject, unitHeat.Name)); + ShowContinueError(state, EnergyPlus::format("specified in {} = \"{}\"", CurrentModuleObject, unitHeat.Name)); ErrorsFound = true; } else { // The heating coil control node is necessary for hot water and steam coils, but not necessary for an @@ -384,7 +385,7 @@ namespace UnitHeater { } // Other error checks should trap before it gets to this point in the code, but including just in case. if (errFlag) { - ShowContinueError(state, format("that was specified in {} = \"{}\"", CurrentModuleObject, unitHeat.Name)); + ShowContinueError(state, EnergyPlus::format("that was specified in {} = \"{}\"", CurrentModuleObject, unitHeat.Name)); ErrorsFound = true; } } @@ -407,8 +408,8 @@ namespace UnitHeater { unitHeat.FanOperatesDuringNoHeating = Alphas(10); if ((!Util::SameString(unitHeat.FanOperatesDuringNoHeating, "Yes")) && (!Util::SameString(unitHeat.FanOperatesDuringNoHeating, "No"))) { ErrorsFound = true; - ShowSevereError(state, format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); - ShowContinueError(state, format("Occurs in {}={}", CurrentModuleObject, unitHeat.Name)); + ShowSevereError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowContinueError(state, EnergyPlus::format("Occurs in {}={}", CurrentModuleObject, unitHeat.Name)); } else if (Util::SameString(unitHeat.FanOperatesDuringNoHeating, "No")) { unitHeat.FanOffNoHeating = true; } @@ -432,8 +433,8 @@ namespace UnitHeater { if (!lAlphaBlanks(12)) { unitHeat.HVACSizingIndex = Util::FindItemInList(Alphas(12), state.dataSize->ZoneHVACSizing); if (unitHeat.HVACSizingIndex == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(12), Alphas(12))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, unitHeat.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(12), Alphas(12))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, unitHeat.Name)); ErrorsFound = true; } } @@ -453,11 +454,12 @@ namespace UnitHeater { } if (ZoneNodeNotFound) { ShowSevereError(state, - format("{} = \"{}\". Unit heater air inlet node name must be the same as a zone exhaust node name.", - CurrentModuleObject, - unitHeat.Name)); + EnergyPlus::format("{} = \"{}\". Unit heater air inlet node name must be the same as a zone exhaust node name.", + CurrentModuleObject, + unitHeat.Name)); ShowContinueError(state, "..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError(state, format("..Unit heater air inlet node name = {}", state.dataLoopNodes->NodeID(unitHeat.AirInNode))); + ShowContinueError(state, + EnergyPlus::format("..Unit heater air inlet node name = {}", state.dataLoopNodes->NodeID(unitHeat.AirInNode))); ErrorsFound = true; } // check that unit heater air outlet node is a zone inlet node. @@ -476,11 +478,12 @@ namespace UnitHeater { } if (ZoneNodeNotFound) { ShowSevereError(state, - format("{} = \"{}\". Unit heater air outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - unitHeat.Name)); + EnergyPlus::format("{} = \"{}\". Unit heater air outlet node name must be the same as a zone inlet node name.", + CurrentModuleObject, + unitHeat.Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError(state, format("..Unit heater air outlet node name = {}", state.dataLoopNodes->NodeID(unitHeat.AirOutNode))); + ShowContinueError(state, + EnergyPlus::format("..Unit heater air outlet node name = {}", state.dataLoopNodes->NodeID(unitHeat.AirOutNode))); ErrorsFound = true; } @@ -512,7 +515,7 @@ namespace UnitHeater { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input", RoutineName)); } // Setup Report variables for the Unit Heaters, CurrentModuleObject='ZoneHVAC:UnitHeater' @@ -637,8 +640,9 @@ namespace UnitHeater { _, _); if (errFlag) { - ShowContinueError(state, - format("Reference Unit=\"{}\", type=ZoneHVAC:UnitHeater", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + ShowContinueError( + state, + EnergyPlus::format("Reference Unit=\"{}\", type=ZoneHVAC:UnitHeater", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ShowFatalError(state, "InitUnitHeater: Program terminated due to previous condition(s)."); } @@ -656,8 +660,9 @@ namespace UnitHeater { if (DataZoneEquipment::CheckZoneEquipmentList(state, "ZoneHVAC:UnitHeater", state.dataUnitHeaters->UnitHeat(Loop).Name)) { continue; } - ShowSevereError(state, - format("InitUnitHeater: Unit=[UNIT HEATER,{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + ShowSevereError( + state, + EnergyPlus::format("InitUnitHeater: Unit=[UNIT HEATER,{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", state.dataUnitHeaters->UnitHeat(Loop).Name)); } } @@ -961,7 +966,8 @@ 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, format("Occurs in ZoneHVAC:UnitHeater Object={}", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + state, + EnergyPlus::format("Occurs in ZoneHVAC:UnitHeater Object={}", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ErrorsFound = true; } } @@ -1045,12 +1051,13 @@ namespace UnitHeater { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater {}", - state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); - ShowContinueError(state, - format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + EnergyPlus::format("SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater {}", + state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ShowContinueError( - state, format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowDes)); + state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", + MaxVolHotWaterFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1148,8 +1155,9 @@ namespace UnitHeater { } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, - format("Occurs in ZoneHVAC:UnitHeater Object={}", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + ShowContinueError( + state, + EnergyPlus::format("Occurs in ZoneHVAC:UnitHeater Object={}", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ErrorsFound = true; } state.dataUnitHeaters->UnitHeat(UnitHeatNum).MaxVolHotSteamFlow = MaxVolHotSteamFlowDes; @@ -1172,11 +1180,13 @@ namespace UnitHeater { if ((std::abs(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser) / MaxVolHotSteamFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater {}", - state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); - ShowContinueError(state, format("User-Specified Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowUser)); - ShowContinueError(state, - format("differs from Design Size Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowDes)); + EnergyPlus::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( + state, + EnergyPlus::format("differs from Design Size Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } diff --git a/src/EnergyPlus/UnitVentilator.cc b/src/EnergyPlus/UnitVentilator.cc index 26a7e1b0cd3..4c163fb4ea7 100644 --- a/src/EnergyPlus/UnitVentilator.cc +++ b/src/EnergyPlus/UnitVentilator.cc @@ -153,25 +153,26 @@ namespace UnitVentilator { if (CompIndex == 0) { UnitVentNum = Util::FindItemInList(CompName, state.dataUnitVentilators->UnitVent); if (UnitVentNum == 0) { - ShowFatalError(state, format("SimUnitVentilator: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimUnitVentilator: Unit not found={}", CompName)); } CompIndex = UnitVentNum; } else { UnitVentNum = CompIndex; if (UnitVentNum > state.dataUnitVentilators->NumOfUnitVents || UnitVentNum < 1) { ShowFatalError(state, - format("SimUnitVentilator: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - UnitVentNum, - state.dataUnitVentilators->NumOfUnitVents, - CompName)); + EnergyPlus::format("SimUnitVentilator: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + UnitVentNum, + state.dataUnitVentilators->NumOfUnitVents, + CompName)); } if (state.dataUnitVentilators->CheckEquipName(UnitVentNum)) { if (CompName != state.dataUnitVentilators->UnitVent(UnitVentNum).Name) { - ShowFatalError(state, - format("SimUnitVentilator: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - UnitVentNum, - CompName, - state.dataUnitVentilators->UnitVent(UnitVentNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimUnitVentilator: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + UnitVentNum, + CompName, + state.dataUnitVentilators->UnitVent(UnitVentNum).Name)); } state.dataUnitVentilators->CheckEquipName(UnitVentNum) = false; } @@ -409,23 +410,23 @@ namespace UnitVentilator { unitVent.fanAvailSched = fan->availSched; // Get the fan's availability schedule FanVolFlow = fan->maxAirFlowRate; if (FanVolFlow != DataSizing::AutoSize && unitVent.MaxAirVolFlow != DataSizing::AutoSize && FanVolFlow < unitVent.MaxAirVolFlow) { - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); ShowContinueError(state, - format("...air flow rate [{:.7T}] in fan object {} is less than the unit ventilator maximum " - "supply air flow rate [{:.7T}].", - FanVolFlow, - unitVent.FanName, - unitVent.MaxAirVolFlow)); + EnergyPlus::format("...air flow rate [{:.7T}] in fan object {} is less than the unit ventilator maximum " + "supply air flow rate [{:.7T}].", + FanVolFlow, + unitVent.FanName, + unitVent.MaxAirVolFlow)); ShowContinueError(state, "...the fan flow rate must be greater than or equal to the unit ventilator maximum supply " "air flow rate."); ErrorsFound = true; } else if (FanVolFlow == DataSizing::AutoSize && unitVent.MaxAirVolFlow != DataSizing::AutoSize) { - ShowWarningError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); ShowContinueError(state, "...the fan flow rate is autosized while the unit ventilator flow rate is not."); ShowContinueError(state, "...this can lead to unexpected results where the fan flow rate is less than required."); } else if (FanVolFlow != DataSizing::AutoSize && unitVent.MaxAirVolFlow == DataSizing::AutoSize) { - ShowWarningError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); ShowContinueError(state, "...the unit ventilator flow rate is autosized while the fan flow rate is not."); ShowContinueError(state, "...this can lead to unexpected results where the fan flow rate is less than required."); } @@ -450,7 +451,8 @@ namespace UnitVentilator { if (!lAlphaBlanks(8)) { OutAirNodeManager::CheckAndAddAirNodeNumber(state, unitVent.OutsideAirNode, IsValid); if (!IsValid) { - ShowWarningError(state, format("{}{} Adding {}={}", RoutineName, CurrentModuleObject, cAlphaFields(8), Alphas(8))); + ShowWarningError(state, + EnergyPlus::format("{}{} Adding {}={}", RoutineName, CurrentModuleObject, cAlphaFields(8), Alphas(8))); } } @@ -477,15 +479,19 @@ namespace UnitVentilator { unitVent.OutsideAirNode = unitVent.ATMixerPriNode; unitVent.OAMixerOutNode = unitVent.ATMixerOutNode; if (!lAlphaBlanks(8) || !lAlphaBlanks(9) || !lAlphaBlanks(10)) { - ShowWarningError(state, format("{}{}=\"{}\" is connected to central DOA.", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowWarningError(state, + EnergyPlus::format("{}{}=\"{}\" is connected to central DOA.", RoutineName, CurrentModuleObject, unitVent.Name)); if (!lAlphaBlanks(8)) { - ShowContinueError(state, format("... input field {} should have been blank. Specified = {}", cAlphaFields(8), Alphas(8))); + ShowContinueError( + state, EnergyPlus::format("... input field {} should have been blank. Specified = {}", cAlphaFields(8), Alphas(8))); } if (!lAlphaBlanks(9)) { - ShowContinueError(state, format("... input field {} should have been blank. Specified = {}", cAlphaFields(9), Alphas(9))); + ShowContinueError( + state, EnergyPlus::format("... input field {} should have been blank. Specified = {}", cAlphaFields(9), Alphas(9))); } if (!lAlphaBlanks(10)) { - ShowContinueError(state, format("... input field {} should have been blank. Specified = {}", cAlphaFields(10), Alphas(10))); + ShowContinueError( + state, EnergyPlus::format("... input field {} should have been blank. Specified = {}", cAlphaFields(10), Alphas(10))); } } } @@ -535,8 +541,8 @@ namespace UnitVentilator { if (!lAlphaBlanks(20)) { unitVent.HVACSizingIndex = Util::FindItemInList(Alphas(20), state.dataSize->ZoneHVACSizing); if (unitVent.HVACSizingIndex == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(20), Alphas(20))); - ShowContinueError(state, format("Occurs in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(20), Alphas(20))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); ErrorsFound = true; } } @@ -568,7 +574,7 @@ namespace UnitVentilator { unitVent.HCoilName = Alphas(16); ValidateComponent(state, cHeatingCoilType, unitVent.HCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); ErrorsFound = true; } else { // The heating coil control node is necessary for a hot water coil, but not necessary for electric or gas. @@ -598,8 +604,8 @@ namespace UnitVentilator { unitVent.HotControlOffset = 0.001; } } else { // heating coil is required for these options - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); - ShowContinueError(state, format("a heating coil is required for {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowContinueError(state, EnergyPlus::format("a heating coil is required for {}=\"{}\".", cAlphaFields(13), Alphas(13))); ErrorsFound = true; } // IF (.NOT. lAlphaBlanks(15)) THEN - from the start of heating coil information } // is option both or heating only @@ -624,9 +630,10 @@ namespace UnitVentilator { } else if (Util::SameString(unitVent.CCoilPlantType, "Coil:Cooling:Water:DetailedGeometry")) { unitVent.CoolingCoilType = DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling; } else { - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); - ShowContinueError(state, format("For: {}=\"{}\".", cAlphaFields(17), Alphas(17))); - ShowContinueError(state, format("Invalid Coil Type={}, Name={}", unitVent.CCoilPlantType, unitVent.CCoilPlantName)); + 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, "must be \"Coil:Cooling:Water\", \"Coil:Cooling:Water:DetailedGeometry\" or, " "\"CoilSystem:Cooling:Water:HeatExchangerAssisted\"."); @@ -639,7 +646,7 @@ namespace UnitVentilator { unitVent.CCoilName = Alphas(18); ValidateComponent(state, cCoolingCoilType, unitVent.CCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); ErrorsFound = true; } else { if (unitVent.CCoilType != CoolCoilType::HXAssisted) { @@ -659,7 +666,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, format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); + ShowContinueError(state, EnergyPlus::format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); ErrorsFound = true; } } @@ -672,8 +679,8 @@ namespace UnitVentilator { unitVent.ColdControlOffset = 0.001; } } else { // Cooling Coil is required for this/these options - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); - ShowContinueError(state, format("a cooling coil is required for {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowContinueError(state, EnergyPlus::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 } @@ -695,15 +702,17 @@ namespace UnitVentilator { state.dataZoneEquip->ZoneEquipConfig(unitVent.ZonePtr).ReturnNode); } if (!InletNodeFound) { - ShowSevereError(state, - format("{} = \"{}\". Unit ventilator air inlet node name must be the same either as a zone exhaust node name " + 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)); 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, - format("..Unit ventilator unit air inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); + ShowContinueError( + state, + EnergyPlus::format("..Unit ventilator unit air inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); ErrorsFound = true; } } @@ -716,12 +725,14 @@ namespace UnitVentilator { } } if (ZoneNodeNotFound) { - ShowSevereError(state, - format("{} = \"{}\". Unit ventilator air outlet node name must be the same as a zone inlet node name.", + ShowSevereError( + state, + EnergyPlus::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, format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); + ShowContinueError( + state, EnergyPlus::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); ErrorsFound = true; } } else { @@ -735,25 +746,28 @@ namespace UnitVentilator { } } if (ZoneNodeNotFound) { - ShowSevereError(state, - format("{} = \"{}\". Unit ventilator air outlet node name must be the same as a zone inlet node name.", + ShowSevereError( + state, + EnergyPlus::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, - format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); + ShowContinueError( + state, + EnergyPlus::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); ErrorsFound = true; } // check that the air mixer out node is the unit ventilator air inlet node if (unitVent.AirInNode != unitVent.ATMixerOutNode) { - ShowSevereError(state, - format("{} = \"{}\". unit ventilator air inlet node name must be the same as the mixer outlet node name.", + ShowSevereError( + state, + EnergyPlus::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, - format("..Unit ventilator air inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); + ShowContinueError( + state, EnergyPlus::format("..Unit ventilator air inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); ErrorsFound = true; } } @@ -762,12 +776,14 @@ namespace UnitVentilator { if (unitVent.AirOutNode != unitVent.ATMixerSecNode) { ShowSevereError( state, - format("{} = \"{}\". unit ventilator air outlet node name must be the same as the mixer secondary air inlet node name.", - CurrentModuleObject, - unitVent.Name)); + EnergyPlus::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, - format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); + ShowContinueError( + state, + EnergyPlus::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); ErrorsFound = true; } @@ -781,12 +797,13 @@ namespace UnitVentilator { } if (ZoneNodeNotFound) { ShowSevereError(state, - format("{} = \"{}\". Air mixer outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - unitVent.Name)); + EnergyPlus::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, - format("..Air terminal mixer outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.ATMixerOutNode))); + ShowContinueError( + state, + EnergyPlus::format("..Air terminal mixer outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.ATMixerOutNode))); ErrorsFound = true; } else { bool ExhastNodeNotFound = true; @@ -808,15 +825,16 @@ namespace UnitVentilator { state.dataZoneEquip->ZoneEquipConfig(unitVent.ZonePtr).ReturnNode); } if (!InletNodeFound) { - ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowSevereError(state, EnergyPlus::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 " "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, - format("..UnitVentilator inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); + ShowContinueError( + state, + EnergyPlus::format("..UnitVentilator inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); ErrorsFound = true; } } @@ -878,7 +896,7 @@ namespace UnitVentilator { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input.", RoutineName)); } // Setup Report variables for the Unit Ventilators, CurrentModuleObject='ZoneHVAC:UnitVentilator' @@ -1028,7 +1046,7 @@ namespace UnitVentilator { PlantUtilities::ScanPlantLoopsForObject( state, unitVent.HCoilName, unitVent.HeatingCoilType, unitVent.HWplantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, format("Reference Unit=\"{}\", type=ZoneHVAC:UnitVentilator", unitVent.Name)); + ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type=ZoneHVAC:UnitVentilator", unitVent.Name)); ShowFatalError(state, "InitUnitVentilator: Program terminated due to previous condition(s)."); } @@ -1040,14 +1058,15 @@ namespace UnitVentilator { PlantUtilities::ScanPlantLoopsForObject( state, unitVent.CCoilPlantName, unitVent.CoolingCoilType, unitVent.CWPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, format("Reference Unit=\"{}\", type=ZoneHVAC:UnitVentilator", unitVent.Name)); + ShowContinueError(state, EnergyPlus::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, format("InitUnitVentilator: Unit={}, invalid cooling coil type. Program terminated.", unitVent.Name)); + ShowFatalError(state, + EnergyPlus::format("InitUnitVentilator: Unit={}, invalid cooling coil type. Program terminated.", unitVent.Name)); } } state.dataUnitVentilators->MyPlantScanFlag(UnitVentNum) = false; @@ -1061,10 +1080,10 @@ namespace UnitVentilator { if (DataZoneEquipment::CheckZoneEquipmentList(state, "ZoneHVAC:UnitVentilator", state.dataUnitVentilators->UnitVent(Loop).Name)) { continue; } - ShowSevereError( - state, - format("InitUnitVentilator: Unit=[UNIT VENTILATOR,{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataUnitVentilators->UnitVent(Loop).Name)); + ShowSevereError(state, + EnergyPlus::format( + "InitUnitVentilator: Unit=[UNIT VENTILATOR,{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + state.dataUnitVentilators->UnitVent(Loop).Name)); } } @@ -1093,8 +1112,9 @@ namespace UnitVentilator { if (unitVent.OutAirMassFlow > unitVent.MaxAirMassFlow) { unitVent.OutAirMassFlow = unitVent.MaxAirMassFlow; unitVent.MinOutAirMassFlow = unitVent.OutAirMassFlow * (unitVent.MinOutAirVolFlow / unitVent.OutAirVolFlow); - ShowWarningError(state, - format("Outdoor air mass flow rate higher than unit flow rate, reset to unit flow rate for {}", unitVent.Name)); + ShowWarningError( + state, + EnergyPlus::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 @@ -1672,12 +1692,14 @@ namespace UnitVentilator { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(OutAirVolFlowDes - OutAirVolFlowUser) / OutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeUnitVentilator: Potential issue with equipment sizing for {} {}", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); - ShowContinueError(state, format("User-Specified Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); + EnergyPlus::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( - state, format("differs from Design Size Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowDes)); + state, + EnergyPlus::format("differs from Design Size Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1733,13 +1755,14 @@ namespace UnitVentilator { if ((std::abs(MinOutAirVolFlowDes - MinOutAirVolFlowUser) / MinOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\".", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); - ShowContinueError(state, - format("User-Specified Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", MinOutAirVolFlowUser)); + EnergyPlus::format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\".", + state.dataUnitVentilators->cMO_UnitVentilator, + unitVent.Name)); ShowContinueError( - state, format("differs from Design Size Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", MinOutAirVolFlowDes)); + state, EnergyPlus::format("User-Specified Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", MinOutAirVolFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", + MinOutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1782,8 +1805,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, - format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); + ShowContinueError( + state, EnergyPlus::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); ErrorsFound = true; } } @@ -1876,13 +1899,14 @@ namespace UnitVentilator { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeUnitVentilator: Potential issue with equipment sizing for {} {}", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); - ShowContinueError(state, - format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + EnergyPlus::format("SizeUnitVentilator: Potential issue with equipment sizing for {} {}", + state.dataUnitVentilators->cMO_UnitVentilator, + unitVent.Name)); ShowContinueError( - state, format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowDes)); + state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", + MaxVolHotWaterFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1984,7 +2008,8 @@ namespace UnitVentilator { } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); + ShowContinueError( + state, EnergyPlus::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); ErrorsFound = true; } unitVent.MaxVolHotSteamFlow = MaxVolHotSteamFlowDes; @@ -2007,12 +2032,14 @@ namespace UnitVentilator { if ((std::abs(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser) / MaxVolHotSteamFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\"", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); - ShowContinueError(state, format("User-Specified Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowUser)); - ShowContinueError(state, - format("differs from Design Size Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowDes)); + EnergyPlus::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( + state, + EnergyPlus::format("differs from Design Size Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2066,8 +2093,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, - format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); + ShowContinueError( + state, EnergyPlus::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); ErrorsFound = true; } } @@ -2127,11 +2154,13 @@ namespace UnitVentilator { if (MaxVolColdWaterFlowDes < 0.0) { ShowWarningError(state, "Autosizing of water flow resulted in negative value."); - ShowContinueError(state, - format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); + ShowContinueError( + state, + EnergyPlus::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); ShowContinueError(state, "...Sizing information found during sizing simulation:"); - ShowContinueError(state, format("...Calculated coil design load = {:.3T} W", DesCoolingLoad)); - ShowContinueError(state, format("...Calculated water flow rate = {:.3T} m3/s", MaxVolColdWaterFlowDes)); + 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, "...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."); @@ -2162,13 +2191,15 @@ namespace UnitVentilator { if ((std::abs(MaxVolColdWaterFlowDes - MaxVolColdWaterFlowUser) / MaxVolColdWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\"", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); - ShowContinueError(state, - format("User-Specified Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); + EnergyPlus::format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\"", + state.dataUnitVentilators->cMO_UnitVentilator, + unitVent.Name)); ShowContinueError( - state, format("differs from Design Size Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowDes)); + state, + EnergyPlus::format("User-Specified Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Cold Water Flow of {:.5R} [m3/s]", + MaxVolColdWaterFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2463,8 +2494,9 @@ namespace UnitVentilator { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, - format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); + ShowFatalError( + state, + EnergyPlus::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); } } break; default: { @@ -2546,8 +2578,9 @@ namespace UnitVentilator { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, - format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); + ShowFatalError( + state, + EnergyPlus::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); } } break; default: { @@ -2701,8 +2734,9 @@ namespace UnitVentilator { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, - format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); + ShowFatalError( + state, + EnergyPlus::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); } } break; default: { @@ -2777,8 +2811,9 @@ namespace UnitVentilator { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, - format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); + ShowFatalError( + state, + EnergyPlus::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 123b403da79..6599b5d9811 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -208,7 +208,8 @@ namespace UnitarySystems { return &dSpec; } } - ShowSevereError(state, format("Design Specification MultiSpeed Heat Pump factory: Error getting inputs for system named: {}", objectName)); + ShowSevereError( + state, EnergyPlus::format("Design Specification MultiSpeed Heat Pump factory: Error getting inputs for system named: {}", objectName)); return nullptr; } @@ -308,11 +309,12 @@ namespace UnitarySystems { } } } else { - ShowSevereError(state, format("{}: Error getting inputs for system named: {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, + EnergyPlus::format("{}: Error getting inputs for system named: {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, - format("Number of speed inputs ({:.0T} is less than number of speeds ({:.0T}).", - Real64(numSpeedInputs), - Real64(maxSpeeds))); + EnergyPlus::format("Number of speed inputs ({:.0T} is less than number of speeds ({:.0T}).", + Real64(numSpeedInputs), + Real64(maxSpeeds))); errorsFound = true; } } @@ -336,7 +338,7 @@ namespace UnitarySystems { return &sys; } } - ShowFatalError(state, format("UnitarySystem factory: Error getting inputs for system named: {}", objectName)); + ShowFatalError(state, EnergyPlus::format("UnitarySystem factory: Error getting inputs for system named: {}", objectName)); return nullptr; } @@ -357,7 +359,8 @@ namespace UnitarySystems { return index; } } - ShowSevereError(state, format("getDesignSpecMSHPIndex: did not find UnitarySystemPerformance:Multispeed name ={}. Check inputs", objectName)); + ShowSevereError( + state, EnergyPlus::format("getDesignSpecMSHPIndex: did not find UnitarySystemPerformance:Multispeed name ={}. Check inputs", objectName)); return index; } @@ -462,7 +465,7 @@ namespace UnitarySystems { state.dataAirLoop->AirLoopControlInfo(AirLoopNum).cycFanSched = this->m_fanOpModeSched; } else if (AirLoopNum < 0) { if (this->m_ControlType == UnitarySysCtrlType::CCMASHRAE) { - ShowSevereError(state, format("{}: {}", this->UnitType, this->Name)); + ShowSevereError(state, EnergyPlus::format("{}: {}", this->UnitType, this->Name)); ShowContinueError(state, " Invalid application of Control Type = SingleZoneVAV in outdoor air system."); ShowFatalError(state, "InitUnitarySystems: Program terminated for previous conditions."); } @@ -491,15 +494,18 @@ namespace UnitarySystems { if (this->m_ActualFanVolFlowRate == this->m_MaxHeatAirVolFlow && this->m_ActualFanVolFlowRate == this->m_MaxCoolAirVolFlow && this->m_ActualFanVolFlowRate == this->m_MaxNoCoolHeatAirVolFlow) { - ShowWarningError(state, format("{} \"{}\"", this->UnitType, this->Name)); - ShowContinueError( - state, format("...For fan type and name = {} \"{}\"", HVAC::fanTypeNames[(int)this->m_FanType], this->m_FanName)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", this->UnitType, this->Name)); + ShowContinueError(state, + EnergyPlus::format("...For fan type and name = {} \"{}\"", + HVAC::fanTypeNames[(int)this->m_FanType], + this->m_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."); - ShowContinueError(state, - format("...Fan volumetric flow rate = {:.5R} m3/s.", this->m_ActualFanVolFlowRate)); - ShowContinueError(state, format("...Unitary system volumetric flow rate = {:.5R} m3/s.", this->m_MaxHeatAirVolFlow)); + ShowContinueError( + state, EnergyPlus::format("...Fan volumetric flow rate = {:.5R} m3/s.", this->m_ActualFanVolFlowRate)); + ShowContinueError( + state, EnergyPlus::format("...Unitary system volumetric flow rate = {:.5R} m3/s.", this->m_MaxHeatAirVolFlow)); } } } @@ -1067,10 +1073,10 @@ namespace UnitarySystems { if (this->m_FaultyCoilSATFlag) { if (this->m_ControlType != UnitarySysCtrlType::Setpoint) { ShowWarningError(state, - format("{}: {}", - state.dataFaultsMgr->FaultsCoilSATSensor(this->m_FaultyCoilSATIndex).type, - state.dataFaultsMgr->FaultsCoilSATSensor(this->m_FaultyCoilSATIndex).Name)); - ShowContinueError(state, format("For : {}: {}", this->UnitType, this->Name)); + EnergyPlus::format("{}: {}", + state.dataFaultsMgr->FaultsCoilSATSensor(this->m_FaultyCoilSATIndex).type, + state.dataFaultsMgr->FaultsCoilSATSensor(this->m_FaultyCoilSATIndex).Name)); + ShowContinueError(state, EnergyPlus::format("For : {}: {}", this->UnitType, this->Name)); ShowContinueError(state, "The specified unitary system is not controlled on leaving air temperature. The coil SAT sensor " "fault model will not be applied."); @@ -1211,11 +1217,12 @@ namespace UnitarySystems { cCoilName = thisCoil.Name; coilSHR = (thisCoil.NumOfSpeeds == 0) ? thisCoil.RatedSHR(1) : thisCoil.RatedSHR(thisCoil.NumOfSpeeds); } else { - ShowWarningError(state, - format("Developer Error in Heat Pump ACCA Sizing: cooling coil not found for {}:{} with coil type = {}.", - this->UnitType, - this->Name, - HVAC::cAllCoilTypes(this->m_CoolingCoilType_Num))); + ShowWarningError( + state, + EnergyPlus::format("Developer Error in Heat Pump ACCA Sizing: cooling coil not found for {}:{} with coil type = {}.", + this->UnitType, + this->Name, + HVAC::cAllCoilTypes(this->m_CoolingCoilType_Num))); } } if (this->m_HeatingCoilType_Num == HVAC::Coil_HeatingWaterToAirHPSimple) { @@ -1230,8 +1237,9 @@ namespace UnitarySystems { auto const &thisCoil = state.dataDXCoils->DXCoil(this->m_HeatingCoilIndex); hCoilName = thisCoil.Name; } else { - ShowSevereError(state, - format("Developer Error in Heat Pump ACCA Sizing: heating coil not found for {}:{} with coil type = {}.", + ShowSevereError( + state, + EnergyPlus::format("Developer Error in Heat Pump ACCA Sizing: heating coil not found for {}:{} with coil type = {}.", this->UnitType, this->Name, HVAC::cAllCoilTypes(this->m_HeatingCoilType_Num))); @@ -1325,12 +1333,13 @@ namespace UnitarySystems { coilOutNode = this->SuppCoilOutletNodeNum; } - ShowSevereError(state, format("checkNodeSetPoint: Missing {} set point in {} = {}", coilTypes[CoilType], this->UnitType, this->Name)); + ShowSevereError( + state, EnergyPlus::format("checkNodeSetPoint: Missing {} set point in {} = {}", coilTypes[CoilType], this->UnitType, this->Name)); ShowContinueError(state, - format("...Setpoint is required at system air outlet node = {} or {} coil air outlet node = {}", - state.dataLoopNodes->NodeID(this->AirOutNode), - coilTypes[CoilType], - state.dataLoopNodes->NodeID(coilOutNode))); + EnergyPlus::format("...Setpoint is required at system air outlet node = {} or {} coil air outlet node = {}", + state.dataLoopNodes->NodeID(this->AirOutNode), + coilTypes[CoilType], + state.dataLoopNodes->NodeID(coilOutNode))); SetPointErrorFlag = true; } return SetPointErrorFlag; @@ -1351,13 +1360,15 @@ namespace UnitarySystems { if (state.dataLoopNodes->Node(ControlNode).TempSetPoint == DataLoopNode::SensedNodeFlagValue && this->m_ControlType == UnitarySysCtrlType::Setpoint) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, format("{}: Missing temperature setpoint for unitary system = {}", this->UnitType, this->Name)); + ShowSevereError(state, + EnergyPlus::format("{}: Missing temperature setpoint for unitary system = {}", this->UnitType, this->Name)); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the coil control node."); SetPointErrorFlag = true; } else { EMSManager::CheckIfNodeSetPointManagedByEMS(state, ControlNode, HVAC::CtrlVarType::Temp, SetPointErrorFlag); if (SetPointErrorFlag) { - ShowSevereError(state, format("{}: Missing temperature setpoint for unitary system = {}", this->UnitType, this->Name)); + ShowSevereError(state, + EnergyPlus::format("{}: Missing temperature setpoint for unitary system = {}", this->UnitType, this->Name)); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the coil control node."); ShowContinueError(state, " or use an EMS actuator to establish a temperature setpoint at the coil control node."); } @@ -1368,16 +1379,18 @@ namespace UnitarySystems { this->m_ControlType == UnitarySysCtrlType::Setpoint && CoilType == CoolingCoil) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel && state.dataLoopNodes->Node(this->CoolCoilOutletNodeNum).HumRatMax == DataLoopNode::SensedNodeFlagValue) { - ShowSevereError(state, - format("{}: Missing humidity ratio setpoint (HUMRATMAX) for unitary system = {}", this->UnitType, this->Name)); + ShowSevereError( + state, + EnergyPlus::format("{}: Missing humidity ratio setpoint (HUMRATMAX) for unitary system = {}", this->UnitType, this->Name)); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the coil control node."); SetPointErrorFlag = true; } else if (state.dataGlobal->AnyEnergyManagementSystemInModel) { EMSManager::CheckIfNodeSetPointManagedByEMS(state, ControlNode, HVAC::CtrlVarType::MaxHumRat, SetPointErrorFlag); if (SetPointErrorFlag) { - ShowSevereError( - state, - format("{}: Missing maximum humidity ratio setpoint (HUMRATMAX) for unitary system = {}", this->UnitType, this->Name)); + ShowSevereError(state, + EnergyPlus::format("{}: Missing maximum humidity ratio setpoint (HUMRATMAX) for unitary system = {}", + this->UnitType, + this->Name)); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the coil control node."); ShowContinueError(state, " or use an EMS actuator to establish a maximum humidity ratio setpoint."); } @@ -1708,7 +1721,7 @@ namespace UnitarySystems { this->m_MaxCoolAirVolFlow = DataSizing::AutoSize; } else { // should never happen - ShowSevereError(state, format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Illegal entry for Cooling Supply Air Flow Rate Method."); } @@ -1874,7 +1887,7 @@ namespace UnitarySystems { EqSizing.DesHeatingLoad = HeatCapAtPeak; } else { // should never happen - ShowSevereError(state, format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Illegal entry for Heating Supply Air Flow Rate Method."); } @@ -2215,7 +2228,7 @@ namespace UnitarySystems { this->m_DesignFanVolFlowRate = this->m_ActualFanVolFlowRate; } if (this->m_DesignFanVolFlowRate <= 0.0) { - ShowWarningError(state, format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowFatalError(state, "Unable to determine fan air flow rate."); } } @@ -2461,13 +2474,16 @@ namespace UnitarySystems { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(CoolOutAirVolFlowDes - CoolOutAirVolFlowUser) / CoolOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); - ShowContinueError( + ShowMessage( state, - format("User-Specified Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", CoolOutAirVolFlowUser)); + EnergyPlus::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); ShowContinueError(state, - format("differs from Design Size Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", - CoolOutAirVolFlowDes)); + EnergyPlus::format("User-Specified Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", + CoolOutAirVolFlowUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", + CoolOutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2511,13 +2527,16 @@ namespace UnitarySystems { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(HeatOutAirVolFlowDes - HeatOutAirVolFlowUser) / HeatOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); - ShowContinueError( + ShowMessage( state, - format("User-Specified Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", HeatOutAirVolFlowUser)); + EnergyPlus::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); ShowContinueError(state, - format("differs from Design Size Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", - HeatOutAirVolFlowDes)); + EnergyPlus::format("User-Specified Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", + HeatOutAirVolFlowUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", + HeatOutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2565,14 +2584,18 @@ namespace UnitarySystems { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(NoCoolHeatOutAirVolFlowDes - NoCoolHeatOutAirVolFlowUser) / NoCoolHeatOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); - ShowContinueError(state, - format("User-Specified Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", - NoCoolHeatOutAirVolFlowUser)); + ShowMessage( + state, + EnergyPlus::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); ShowContinueError( state, - format("differs from Design Size Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", - NoCoolHeatOutAirVolFlowDes)); + EnergyPlus::format("User-Specified Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", + NoCoolHeatOutAirVolFlowUser)); + ShowContinueError( + state, + EnergyPlus::format( + "differs from Design Size Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", + NoCoolHeatOutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2675,12 +2698,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, format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Number of cooling speeds does not match coil object."); ShowFatalError(state, - format("Cooling coil = {}: {}", - state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).VarSpeedCoilType, - state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).Name)); + EnergyPlus::format("Cooling coil = {}: {}", + state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).VarSpeedCoilType, + state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).Name)); } state.dataSize->DXCoolCap = VariableSpeedCoils::GetCoilCapacityVariableSpeed( state, HVAC::cAllCoilTypes(this->m_CoolingCoilType_Num), this->m_CoolingCoilName, ErrFound); @@ -2754,9 +2777,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, format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Number of cooling speeds does not match coil object."); - ShowFatalError(state, format("Cooling coil = Coil:Cooling:DX: {}", newCoil.name)); + ShowFatalError(state, EnergyPlus::format("Cooling coil = Coil:Cooling:DX: {}", newCoil.name)); } // Use discrete/continuous control algorithm regardless of number of speeds @@ -2835,9 +2858,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, format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Number of cooling speeds does not match coil object."); - ShowFatalError(state, format("Cooling coil = Coil:Cooling:DX: {}", newCoil.name)); + ShowFatalError(state, EnergyPlus::format("Cooling coil = Coil:Cooling:DX: {}", newCoil.name)); } // Use discrete/continuous control algorithm regardless of number of speeds @@ -3010,16 +3033,18 @@ namespace UnitarySystems { this->m_HeatingCoilType_Num == HVAC::Coil_HeatingGas_MultiStage) { if (state.dataUnitarySystems->designSpecMSHP[MSHPIndex].heatingVolFlowRatio[Iter - 1] < 1.0 && this->m_ControlType == UnitarySysCtrlType::Setpoint) { - ShowWarningError(state, format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError( - state, format("Design specification object = {}", state.dataUnitarySystems->designSpecMSHP[MSHPIndex].name)); + state, + EnergyPlus::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, - format("Speed {} Supply Air Flow Ratio During Heating Operation will be set = 1.0 and the simulation continues", - Iter)); + EnergyPlus::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; } } @@ -3076,12 +3101,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, format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Number of heating speeds does not match coil object."); ShowFatalError(state, - format("Heating coil = {}: {}", - state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).VarSpeedCoilType, - state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).Name)); + EnergyPlus::format("Heating coil = {}: {}", + state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).VarSpeedCoilType, + state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).Name)); } if (this->m_NumOfSpeedHeating > 0) { @@ -3611,7 +3636,7 @@ namespace UnitarySystems { this->ControlZoneMassFlowFrac = state.dataUnitarySystems->initLoadBasedControlCntrlZoneTerminalUnitMassFlowRateMax / SumOfMassFlowRateMax; } else { - ShowSevereError(state, format("{} = {}", this->UnitType, this->Name)); + ShowSevereError(state, EnergyPlus::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; } @@ -3675,7 +3700,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, format("{} = {}", this->UnitType, this->Name)); + ShowSevereError(state, EnergyPlus::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 " @@ -3683,8 +3708,8 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = min(this->m_MaxCoolAirVolFlow, this->m_MaxHeatAirVolFlow) - 0.01; ShowContinueError( state, - format(" The SingleZoneVAV control No Load Supply Air Flow Rate is reset to {:.5T} and the simulation continues.", - this->m_MaxNoCoolHeatAirVolFlow)); + EnergyPlus::format(" The SingleZoneVAV control No Load Supply Air Flow Rate is reset to {:.5T} and the simulation continues.", + this->m_MaxNoCoolHeatAirVolFlow)); } } } @@ -3879,7 +3904,7 @@ namespace UnitarySystems { this->m_CoolingCoilType_Num = HVAC::CoilDX_Cooling; this->m_CoolingCoilIndex = CoilCoolingDX::factory(state, this->m_CoolingCoilName); if (this->m_CoolingCoilIndex == -1) { - ShowFatalError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowFatalError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); } else { // set variable speed coil flag as necessary auto &newCoil = state.dataCoilCoolingDX->coilCoolingDXs[this->m_CoolingCoilIndex]; @@ -3929,7 +3954,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, format("specified in {} = \"{}\".", cCurrentModuleObject, input_data.oa_mixer_name)); + ShowContinueError(state, EnergyPlus::format("specified in {} = \"{}\".", cCurrentModuleObject, input_data.oa_mixer_name)); errorsFound = true; errFlag = false; } else { @@ -3937,7 +3962,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, format("that was specified in {} = {}", cCurrentModuleObject, input_data.oa_mixer_name)); + ShowContinueError(state, EnergyPlus::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 +3975,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, format("Missing one of {} Outdoor Air Mixer inputs.", cCurrentModuleObject)); - ShowContinueError(state, format("..OutdoorAir:Mixer type = {}", input_data.oa_mixer_type)); - ShowContinueError(state, format("..OutdoorAir:Mixer name = {}", input_data.oa_mixer_name)); + 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)); errorsFound = true; } this->m_HeatConvTol = input_data.heat_conv_tol; @@ -4020,7 +4045,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, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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 +4056,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, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When Control Type = Load or SingleZoneVAV"); ShowContinueError(state, - format(" Controlling Zone or Thermostat Location must be a valid zone name, zone name = {}", - input_data.controlling_zone_or_thermostat_location)); + EnergyPlus::format(" Controlling Zone or Thermostat Location must be a valid zone name, zone name = {}", + input_data.controlling_zone_or_thermostat_location)); errorsFound = true; } } @@ -4059,10 +4084,11 @@ namespace UnitarySystems { AirNodeFound = true; } if (!AirNodeFound && this->ControlZoneNum > 0) { - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find Air Node (Zone with Humidistat)."); - ShowContinueError( - state, format("specified Controlling Zone or Thermostat Location name = {}", input_data.controlling_zone_or_thermostat_location)); + ShowContinueError(state, + EnergyPlus::format("specified Controlling Zone or Thermostat Location name = {}", + input_data.controlling_zone_or_thermostat_location)); errorsFound = true; } } @@ -4091,8 +4117,9 @@ 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, - format("{} = \"{}\". System has local as well as central outdoor air specified", cCurrentModuleObject, this->Name)); + ShowSevereError( + state, + EnergyPlus::format("{} = \"{}\". System has local as well as central outdoor air specified", cCurrentModuleObject, this->Name)); errorsFound = true; } @@ -4183,15 +4210,16 @@ namespace UnitarySystems { } if (!ZoneExhaustNodeFound && !InducedNodeFound) { // Exhaust Node was not found - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, - format("Incorrect or misspelled Air Inlet Node Name or Exhaust Node Name or Induced Node Name. = {}", - input_data.air_inlet_node_name)); + EnergyPlus::format("Incorrect or misspelled Air Inlet Node Name or Exhaust Node Name or Induced Node Name. = {}", + input_data.air_inlet_node_name)); ShowContinueError( state, - 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)); + 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)); ShowContinueError(state, "or Induced Air Outlet Node Name specified in AirLoopHVAC:ReturnPlenum object."); errorsFound = true; } else if (!ZoneInletNodeFound) { @@ -4200,8 +4228,9 @@ namespace UnitarySystems { int ZoneInletNum = 0; ZoneInletNodeExists = searchZoneInletNodes(state, this->AirOutNode, InletControlledZoneNum, ZoneInletNum); if (!ZoneInletNodeExists) { - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Incorrect or misspelled Air Outlet Node Name = {}", input_data.air_outlet_node_name)); + 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)); ShowContinueError(state, "Node name does not match any controlled zone inlet node name. Check ZoneHVAC:EquipmentConnections " "object inputs."); @@ -4239,11 +4268,11 @@ namespace UnitarySystems { AirNodeFound = true; } if (!AirNodeFound && this->ControlZoneNum > 0) { - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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 = {}", input_data.controlling_zone_or_thermostat_location)); + ShowContinueError(state, + EnergyPlus::format("specified Controlling Zone or Thermostat Location name = {}", + input_data.controlling_zone_or_thermostat_location)); errorsFound = true; } @@ -4272,11 +4301,11 @@ namespace UnitarySystems { AirNodeFound = true; } if (!AirNodeFound && this->ControlZoneNum > 0) { - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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 = {}", - input_data.controlling_zone_or_thermostat_location)); + EnergyPlus::format("specified Controlling Zone or Thermostat Location name = {}", + input_data.controlling_zone_or_thermostat_location)); errorsFound = true; } } @@ -4304,11 +4333,11 @@ namespace UnitarySystems { if (zoneName.empty() && this->ControlZoneNum > 0) { zoneName = state.dataHeatBal->Zone(this->ControlZoneNum).Name; } - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find proper connections for AirLoopHVAC or ZoneHVAC system."); - ShowContinueError(state, format("specified Controlling Zone or Thermostat Location name = {}", zoneName)); + ShowContinueError(state, EnergyPlus::format("specified Controlling Zone or Thermostat Location name = {}", zoneName)); if (!AirNodeFound && !ZoneEquipmentFound) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find air node (zone with thermostat)."); // ShowContinueError(state, format("specified {} = {}", cAlphaFields(iControlZoneAlphaNum), Alphas(iControlZoneAlphaNum))); ShowContinueError(state, @@ -4332,10 +4361,10 @@ namespace UnitarySystems { if (!input_data.design_spec_zonehvac_sizing_object_name.empty()) { this->m_HVACSizingIndex = Util::FindItemInList(input_data.design_spec_zonehvac_sizing_object_name, state.dataSize->ZoneHVACSizing); if (this->m_HVACSizingIndex == 0) { - ShowSevereError( - state, - format("Design Specification ZoneHVAC Sizing Object Name = {} not found.", input_data.design_spec_zonehvac_sizing_object_name)); - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, this->Name)); + 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)); errorsFound = true; } } @@ -4375,8 +4404,8 @@ namespace UnitarySystems { this->m_FanExists = true; this->m_FanName = loc_m_FanName; } else if (!loc_m_FanName.empty() || !loc_fanType.empty()) { - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Invalid Fan Type or Name: Fan Name = {}, Fan Type = {}", loc_m_FanName, loc_fanType)); + 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)); errorsFound = true; } @@ -4394,8 +4423,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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Fan Placement = {}", input_data.fan_placement)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Fan Placement = {}", input_data.fan_placement)); errorsFound = true; } @@ -4447,7 +4476,7 @@ namespace UnitarySystems { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from DX heating coil @@ -4455,7 +4484,7 @@ namespace UnitarySystems { // Get DX heating coil index DXCoils::GetDXCoilIndex(state, this->m_HeatingCoilName, this->m_HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4482,13 +4511,13 @@ namespace UnitarySystems { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4514,12 +4543,12 @@ namespace UnitarySystems { this->m_DXHeatingCoil = true; ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4538,12 +4567,12 @@ namespace UnitarySystems { this->m_HeatingCoilType_Num == HVAC::Coil_HeatingGas_MultiStage) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { HeatingCoils::GetCoilIndex(state, this->m_HeatingCoilName, this->m_HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4561,12 +4590,12 @@ namespace UnitarySystems { this->m_HeatingCoilType_Num == HVAC::Coil_HeatingDesuperheater) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4589,12 +4618,12 @@ namespace UnitarySystems { } else if (this->m_HeatingCoilType_Num == HVAC::Coil_HeatingWater) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4614,13 +4643,13 @@ namespace UnitarySystems { } else if (this->m_HeatingCoilType_Num == HVAC::Coil_HeatingSteam) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); errorsFound = true; errFlag = false; } else { @@ -4650,14 +4679,14 @@ namespace UnitarySystems { this->m_DXHeatingCoil = true; ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); errorsFound = true; errFlag = false; } else { @@ -4677,13 +4706,13 @@ namespace UnitarySystems { this->m_DXHeatingCoil = true; ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); errorsFound = true; errFlag = false; } else { @@ -4698,14 +4727,14 @@ namespace UnitarySystems { } else if (this->m_HeatingCoilType_Num == HVAC::Coil_UserDefined) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); errorsFound = true; errFlag = false; } else { @@ -4720,8 +4749,8 @@ namespace UnitarySystems { } } else if (this->m_HeatCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Heating Coil Object Type = {}", this->m_HeatingCoilTypeName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Object Type = {}", this->m_HeatingCoilTypeName)); errorsFound = true; } // IF (this->m_HeatingCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. if (this->m_DXHeatingCoil) { @@ -4763,7 +4792,7 @@ namespace UnitarySystems { if (this->m_CoolingCoilType_Num == HVAC::CoilDX_CoolingSingleSpeed || this->m_CoolingCoilType_Num == HVAC::CoilDX_CoolingTwoSpeed) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from DX cooling coil @@ -4779,7 +4808,7 @@ namespace UnitarySystems { // Get DX cooling coil index DXCoils::GetDXCoilIndex(state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, isNotOK); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { if (state.dataGlobal->DoCoilDirectSolutions && this->m_CoolingCoilType_Num == HVAC::CoilDX_CoolingSingleSpeed) { @@ -4834,14 +4863,14 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::CoilDX_Cooling) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { @@ -4873,7 +4902,7 @@ namespace UnitarySystems { this->SpeedSHR.resize(this->m_NumOfSpeedCooling + 1); } if (this->m_ControlType == UnitarySysCtrlType::Setpoint) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Setpoint control is not available for SubcoolReheat cooling coil. Load control is forced. " "Simulation continues."); @@ -4908,7 +4937,7 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::CoilDX_CoolingTwoStageWHumControl) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from DX cooling coil @@ -4916,7 +4945,7 @@ namespace UnitarySystems { // Get DX cooling coil index DXCoils::GetDXCoilIndex(state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, isNotOK); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { auto &thisCoolCoil = state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex); @@ -4954,7 +4983,7 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::CoilDX_CoolingHXAssisted) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heat exchanger assisted cooling coil @@ -4962,7 +4991,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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -4971,7 +5000,7 @@ namespace UnitarySystems { std::string ChildCoolingCoilType = HVACHXAssistedCoolingCoil::GetHXDXCoilType(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -4979,7 +5008,7 @@ namespace UnitarySystems { int childCCIndex = CoilCoolingDX::factory(state, ChildCoolingCoilName); if (childCCIndex < 0) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -5001,7 +5030,7 @@ namespace UnitarySystems { this->m_coolingCoilAvailSched = DXCoils::GetDXCoilAvailSched(state, ChildCoolingCoilType, ChildCoolingCoilName, errFlag); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -5011,7 +5040,7 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5024,7 +5053,7 @@ namespace UnitarySystems { errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5034,13 +5063,13 @@ namespace UnitarySystems { this->m_MaxCoolAirVolFlow = VariableSpeedCoils::GetCoilAirFlowRateVariableSpeed(state, ChildCoolingCoilType, ChildCoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } this->m_CondenserNodeNum = VariableSpeedCoils::GetVSCoilCondenserInletNode(state, ChildCoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5053,7 +5082,7 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5064,7 +5093,7 @@ namespace UnitarySystems { CoolingCoilOutletNode = HVACHXAssistedCoolingCoil::GetCoilOutletNode(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5098,7 +5127,7 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::CoilWater_CoolingHXAssisted) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heat exchanger assisted cooling coil @@ -5109,7 +5138,7 @@ namespace UnitarySystems { HVACHXAssistedCoolingCoil::GetHXDXCoilName(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5117,7 +5146,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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5130,7 +5159,7 @@ namespace UnitarySystems { this->CoolCoilFluidInletNode = WaterCoils::GetCoilWaterInletNode(state, HVAC::cAllCoilTypes(ActualCoolCoilType), HXCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5141,7 +5170,7 @@ namespace UnitarySystems { CoolingCoilOutletNode = HVACHXAssistedCoolingCoil::GetCoilOutletNode(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5153,7 +5182,7 @@ namespace UnitarySystems { this->m_DesignCoolingCapacity = DataSizing::AutoSize; } if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5177,13 +5206,13 @@ namespace UnitarySystems { this->m_CoolingCoilType_Num == HVAC::Coil_CoolingWaterToAirHPVSEquationFit) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -5230,12 +5259,12 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::CoilDX_MultiSpeedCooling) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -5269,14 +5298,14 @@ namespace UnitarySystems { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5298,14 +5327,14 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::Coil_CoolingWaterToAirHPSimple) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5350,14 +5379,14 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::Coil_CoolingWaterToAirHP) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5383,14 +5412,14 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::Coil_UserDefined) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5407,14 +5436,14 @@ namespace UnitarySystems { } else if (this->m_CoolingCoilType_Num == HVAC::CoilDX_PackagedThermalStorageCooling) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5436,7 +5465,7 @@ namespace UnitarySystems { } } else { // IF(.NOT. lAlphaBlanks(16))THEN - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); // ShowContinueError(state, format("Illegal {} = {}", cAlphaFields(iCoolingCoilTypeAlphaNum), Alphas(iCoolingCoilTypeAlphaNum))); errorsFound = true; } @@ -5512,7 +5541,7 @@ namespace UnitarySystems { if (Util::SameString(input_data.use_doas_dx_cooling_coil, "Yes")) { this->m_ISHundredPercentDOASDXCoil = true; if (this->m_CoolingCoilType_Num == HVAC::Coil_CoolingAirToAirVariableSpeed) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::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; @@ -5539,15 +5568,15 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Invalid entry for Minimum Supply Air Temperature = {:.4R}", this->DesignMinOutletTemp)); + ShowWarningError(state, EnergyPlus::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; } @@ -5571,18 +5600,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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Inconsistent moisture control inputs."); - ShowContinueError(state, format("Dehumidification Control Type = {}", input_data.dehumidification_control_type)); - ShowContinueError(state, format("Latent Load Control = {}", input_data.latent_load_control)); + 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, "Humidity/Moisture may not be controlled with these settings."); } } else { if ((this->m_RunOnLatentLoad || this->m_RunOnLatentOnlyWithSensible) && this->m_ControlType == UnitarySysCtrlType::Load) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Inconsistent moisture control inputs."); - ShowContinueError(state, format("Dehumidification Control Type = {}", input_data.dehumidification_control_type)); - ShowContinueError(state, format("Latent Load Control = {}", input_data.latent_load_control)); + 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, "Humidity/Moisture will not be controlled with these settings."); this->m_RunOnLatentLoad = false; this->m_RunOnLatentOnlyWithSensible = false; @@ -5615,14 +5644,14 @@ namespace UnitarySystems { ValidateComponent(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -5648,12 +5677,12 @@ namespace UnitarySystems { ValidateComponent(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -5675,13 +5704,13 @@ namespace UnitarySystems { ValidateComponent(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); errorsFound = true; errFlag = false; } else { @@ -5707,14 +5736,14 @@ namespace UnitarySystems { } else if (this->m_SuppHeatCoilType_Num == HVAC::Coil_UserDefined) { ValidateComponent(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); errorsFound = true; errFlag = false; } else { @@ -5727,8 +5756,8 @@ namespace UnitarySystems { } } else { // Illegal reheating coil type - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Supplemental Heating Coil Type = {}", this->m_SuppHeatCoilTypeName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Illegal Supplemental Heating Coil Type = {}", this->m_SuppHeatCoilTypeName)); errorsFound = true; } // IF (this->SuppHeatCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -5901,11 +5930,11 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { if (this->m_MaxCoolAirVolFlow <= HVAC::SmallAirVolFlow && this->m_CoolCoilExists) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = SupplyAirFlowRate."); - ShowContinueError( - state, - format("Suspicious Cooling Supply Air Flow Rate = {:.7R} when cooling coil is present.", this->m_MaxCoolAirVolFlow)); + ShowContinueError(state, + EnergyPlus::format("Suspicious Cooling Supply Air Flow Rate = {:.7R} when cooling coil is present.", + this->m_MaxCoolAirVolFlow)); } if (this->m_MaxCoolAirVolFlow < 0.0) { errorsFound = true; @@ -5913,7 +5942,7 @@ namespace UnitarySystems { } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -5925,12 +5954,13 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError( state, - format("Suspicious Cooling Supply Air Flow Rate Per Floor Area = {:.7R} [m3/s/m2] when cooling coil is present.", - this->m_MaxCoolAirVolFlow)); + EnergyPlus::format( + "Suspicious Cooling Supply Air Flow Rate Per Floor Area = {:.7R} [m3/s/m2] when cooling coil is present.", + this->m_MaxCoolAirVolFlow)); if (this->m_MaxCoolAirVolFlow < 0.0) { errorsFound = true; } @@ -5939,13 +5969,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -5957,12 +5987,13 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FractionOfAutosizedCoolingValue."); - ShowContinueError(state, - format("Suspicious Cooling Fraction of Autosized Cooling Supply Air Flow Rate = {:.7R} [m3/s/m3] " - "when cooling coil is present.", - this->m_MaxCoolAirVolFlow)); + ShowContinueError( + state, + EnergyPlus::format("Suspicious Cooling Fraction of Autosized Cooling Supply Air Flow Rate = {:.7R} [m3/s/m3] " + "when cooling coil is present.", + this->m_MaxCoolAirVolFlow)); if (this->m_MaxCoolAirVolFlow < 0.0) { errorsFound = true; } @@ -5970,13 +6001,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -5988,12 +6019,12 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FlowPerCoolingCapacity."); ShowContinueError(state, - format("Suspicious Cooling Supply Air Flow Rate Per Unit of Capacity = {:.7R} [m3/s/W] when " - "cooling coil is present.", - this->m_MaxCoolAirVolFlow)); + EnergyPlus::format("Suspicious Cooling Supply Air Flow Rate Per Unit of Capacity = {:.7R} [m3/s/W] when " + "cooling coil is present.", + this->m_MaxCoolAirVolFlow)); if (this->m_MaxCoolAirVolFlow < 0.0) { errorsFound = true; } @@ -6001,13 +6032,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6016,7 +6047,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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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 { @@ -6035,18 +6066,18 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { if (this->m_MaxHeatAirVolFlow <= HVAC::SmallAirVolFlow && this->m_HeatCoilExists) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = SupplyAirFlowRate."); - ShowContinueError( - state, - format("Suspicious Heating Supply Air Flow Rate = {:.7R} when heating coil is present.", this->m_MaxHeatAirVolFlow)); + ShowContinueError(state, + EnergyPlus::format("Suspicious Heating Supply Air Flow Rate = {:.7R} when heating coil is present.", + this->m_MaxHeatAirVolFlow)); } if (this->m_MaxHeatAirVolFlow < 0.0) { errorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6057,12 +6088,13 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError( state, - format("Suspicious Heating Supply Air Flow Rate Per Floor Area = {:.7R} [m3/s/m2] when heating coil is present.", - this->m_MaxHeatAirVolFlow)); + EnergyPlus::format( + "Suspicious Heating Supply Air Flow Rate Per Floor Area = {:.7R} [m3/s/m2] when heating coil is present.", + this->m_MaxHeatAirVolFlow)); } if (this->m_MaxHeatAirVolFlow < 0.0) { errorsFound = true; @@ -6071,13 +6103,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { // AutoSized input is not allowed - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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,12 +6120,13 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FractionOfAutosizedHeatingValue."); - ShowContinueError(state, - format("Suspicious Heating Fraction of Autosized Heating Supply Air Flow Rate = {:.7R} [m3/s/m3] " - "when heating coil is present.", - this->m_MaxHeatAirVolFlow)); + ShowContinueError( + state, + EnergyPlus::format("Suspicious Heating Fraction of Autosized Heating Supply Air Flow Rate = {:.7R} [m3/s/m3] " + "when heating coil is present.", + this->m_MaxHeatAirVolFlow)); if (this->m_MaxHeatAirVolFlow < 0.0) { errorsFound = true; } @@ -6101,13 +6134,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6118,12 +6151,12 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FlowPerHeatingCapacity."); ShowContinueError(state, - format("Suspicious Heating Supply Air Flow Rate Per Unit of Capacity = {:.7R} [m3/s/W] when " - "heating coil is present.", - this->m_MaxHeatAirVolFlow)); + EnergyPlus::format("Suspicious Heating Supply Air Flow Rate Per Unit of Capacity = {:.7R} [m3/s/W] when " + "heating coil is present.", + this->m_MaxHeatAirVolFlow)); if (this->m_MaxHeatAirVolFlow < 0.0) { errorsFound = true; } @@ -6131,13 +6164,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6145,7 +6178,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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); if (loc_m_HeatingSAFMethod.empty()) { ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method is blank."); } else { @@ -6169,15 +6202,16 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { if (this->m_MaxNoCoolHeatAirVolFlow < 0.0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = SupplyAirFlowRate"); - ShowContinueError(state, format("Illegal No Load Supply Air Flow Rate = {:.7R}", this->m_MaxNoCoolHeatAirVolFlow)); + ShowContinueError(state, + EnergyPlus::format("Illegal No Load Supply Air Flow Rate = {:.7R}", this->m_MaxNoCoolHeatAirVolFlow)); errorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6188,11 +6222,11 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = loc_m_NoCoolHeatSAFMethod_SAFlowPerFloorArea; if (this->m_MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxNoCoolHeatAirVolFlow <= 0.0001) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerFloorArea."); - ShowContinueError( - state, - format("Suspicious No Load Supply Air Flow Rate Per Floor Area = {:.7R} [m3/s/m2]", this->m_MaxNoCoolHeatAirVolFlow)); + ShowContinueError(state, + EnergyPlus::format("Suspicious No Load Supply Air Flow Rate Per Floor Area = {:.7R} [m3/s/m2]", + this->m_MaxNoCoolHeatAirVolFlow)); } if (this->m_MaxNoCoolHeatAirVolFlow < 0.0) { errorsFound = true; @@ -6201,13 +6235,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { // AutoSized input is not allowed - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6218,12 +6252,13 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = loc_m_NoCoolHeatSAFMethod_FracOfAutosizedCoolingSAFlow; if (this->m_MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxNoCoolHeatAirVolFlow <= HVAC::SmallAirVolFlow) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FractionOfAutosizedCoolingValue."); ShowContinueError( state, - format("Suspicious No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation = {:.7R} [m3/s/m3].", - this->m_MaxNoCoolHeatAirVolFlow)); + EnergyPlus::format( + "Suspicious No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation = {:.7R} [m3/s/m3].", + this->m_MaxNoCoolHeatAirVolFlow)); if (this->m_MaxNoCoolHeatAirVolFlow < 0.0) { errorsFound = true; } @@ -6231,14 +6266,14 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6249,12 +6284,13 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = loc_m_NoCoolHeatSAFMethod_FracOfAutosizedHeatingSAFlow; if (this->m_MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxNoCoolHeatAirVolFlow <= HVAC::SmallAirVolFlow) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FractionOfAutosizedHeatingValue."); ShowContinueError( state, - format("Suspicious No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation = {:.7R} [m3/s/m3].", - this->m_MaxNoCoolHeatAirVolFlow)); + EnergyPlus::format( + "Suspicious No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation = {:.7R} [m3/s/m3].", + this->m_MaxNoCoolHeatAirVolFlow)); if (this->m_MaxNoCoolHeatAirVolFlow < 0.0) { errorsFound = true; } @@ -6262,14 +6298,14 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6280,12 +6316,13 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerCoolingCapacity."); ShowContinueError( state, - format("Suspicious No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation = {:.7R} [m3/s/W].", - this->m_MaxNoCoolHeatAirVolFlow)); + EnergyPlus::format( + "Suspicious No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation = {:.7R} [m3/s/W].", + this->m_MaxNoCoolHeatAirVolFlow)); if (this->m_MaxNoCoolHeatAirVolFlow < 0.0) { errorsFound = true; } @@ -6293,13 +6330,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6310,12 +6347,13 @@ 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerHeatingCapacity."); ShowContinueError( state, - format("Suspicious No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation = {:.7R} [m3/s/W].", - this->m_MaxNoCoolHeatAirVolFlow)); + EnergyPlus::format( + "Suspicious No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation = {:.7R} [m3/s/W].", + this->m_MaxNoCoolHeatAirVolFlow)); if (this->m_MaxNoCoolHeatAirVolFlow < 0.0) { errorsFound = true; } @@ -6323,13 +6361,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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; @@ -6343,13 +6381,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, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Control Type = {}", input_data.control_type)); + ShowWarningError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Control Type = {}", input_data.control_type)); + ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Control Type = {}", input_data.control_type)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate cannot be 0."); errorsFound = true; } @@ -6363,7 +6401,7 @@ namespace UnitarySystems { if (this->m_FanExists) { if (this->m_CoolCoilExists) { if (loc_m_CoolingSAFMethod.empty()) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::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 @@ -6385,7 +6423,7 @@ namespace UnitarySystems { } if (this->m_HeatCoilExists) { if (loc_m_HeatingSAFMethod.empty()) { - ShowWarningError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::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 @@ -6427,19 +6465,19 @@ namespace UnitarySystems { if (this->m_CoolingCoilType_Num == HVAC::CoilDX_Cooling && this->m_DehumidControlType_Num == DehumCtrlType::Multimode) { int numCoolingCoilModes = state.dataCoilCoolingDX->coilCoolingDXs[this->m_CoolingCoilIndex].getNumModes(); if (numCoolingCoilModes == 1) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Dehumidification Control Type = {}", input_data.dehumidification_control_type)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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, - format("Cooling coil named: {} has only one mode", state.dataCoilCoolingDX->coilCoolingDXs[this->m_CoolingCoilIndex].name)); + ShowContinueError(state, + EnergyPlus::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_CoolingCoilType_Num != HVAC::CoilDX_CoolingHXAssisted && this->m_CoolingCoilType_Num != HVAC::CoilDX_CoolingTwoStageWHumControl && this->m_CoolingCoilType_Num != HVAC::CoilWater_CoolingHXAssisted && this->m_DehumidControlType_Num == DehumCtrlType::Multimode) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Dehumidification Control Type = {}", input_data.dehumidification_control_type)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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 { @@ -6470,10 +6508,10 @@ namespace UnitarySystems { this->m_CoolingCoilUpstream = false; } if (ZoneEquipmentFound) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "ZoneHVAC equipment must contain a fan object."); - ShowContinueError(state, format("specified Supply Fan Object Type = {}", loc_fanType)); - ShowContinueError(state, format("specified Supply Fan Name = {}", loc_m_FanName)); + ShowContinueError(state, EnergyPlus::format("specified Supply Fan Object Type = {}", loc_fanType)); + ShowContinueError(state, EnergyPlus::format("specified Supply Fan Name = {}", loc_m_FanName)); errorsFound = true; } } @@ -6486,85 +6524,98 @@ namespace UnitarySystems { tmpAirInletNode = this->m_OAMixerNodes[3]; // mixed air node } if (FanInletNode != tmpAirInletNode) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); + 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))); } 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, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); + 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))); } errorsFound = true; } if (this->m_CoolingCoilUpstream) { if (FanOutletNode != CoolingCoilInletNode && this->m_CoolCoilExists && this->m_FanExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + 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))); errorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode && this->m_CoolCoilExists && this->m_HeatCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError(state, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); errorsFound = true; } if (this->m_SuppCoilExists) { if (SupHeatCoilOutletNode != this->AirOutNode) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The reheat coil outlet node name must be the same as the unitary system outlet node name."); - ShowContinueError(state, - format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); - ShowContinueError(state, format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + 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))); 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, - format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + 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))); errorsFound = true; } } } else { // IF(this->CoolingCoilUpstream)THEN if (FanOutletNode != HeatingCoilInletNode && this->m_FanExists && this->m_HeatCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); errorsFound = true; } if (HeatingCoilOutletNode != CoolingCoilInletNode && this->m_CoolCoilExists && this->m_HeatCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The heating coil outlet node name must be the same as the cooling coil inlet node name."); - ShowContinueError(state, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + 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))); errorsFound = true; } if (CoolingCoilOutletNode != this->AirOutNode && this->m_CoolCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + 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))); errorsFound = true; } } @@ -6578,110 +6629,131 @@ namespace UnitarySystems { if (this->m_CoolingCoilUpstream) { if (CoolingCoilInletNode != tmpAirInletNode && CoolingCoilInletNode != 0 && this->m_FanExists) { if (this->OAMixerExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, - format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); - ShowContinueError(state, format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); + 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))); } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); - ShowContinueError(state, format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); + 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))); } errorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode && this->m_CoolCoilExists && this->m_HeatCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError(state, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + 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))); errorsFound = true; } if (HeatingCoilOutletNode != FanInletNode && this->m_HeatCoilExists && this->m_FanExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + 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))); errorsFound = true; } if (this->m_SuppCoilExists) { if (FanOutletNode != SupHeatCoilInletNode && this->m_FanExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + 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))); errorsFound = true; } if (SupHeatCoilOutletNode != this->AirOutNode) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The reheat coil outlet node name must be the same as the unitary system outlet node name."); - ShowContinueError(state, - format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); - ShowContinueError(state, format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + 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))); errorsFound = true; } } else { if (FanOutletNode != this->AirOutNode && this->m_FanExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + 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))); errorsFound = true; } } } else { // IF(this->CoolingCoilUpstream)THEN if (HeatingCoilInletNode != tmpAirInletNode && HeatingCoilInletNode != 0 && this->m_FanExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, - format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); - ShowContinueError(state, format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); + 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))); } 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, format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); - ShowContinueError(state, format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); + 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))); } errorsFound = true; } if (HeatingCoilOutletNode != CoolingCoilInletNode && this->m_HeatCoilExists && this->m_CoolCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The heating coil outlet node name must be the same as the cooling coil inlet node name."); - ShowContinueError(state, format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + 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))); errorsFound = true; } if (CoolingCoilOutletNode != FanInletNode && this->m_CoolCoilExists && this->m_FanExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + 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))); errorsFound = true; } if (FanOutletNode != this->AirOutNode && this->m_FanExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + 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))); errorsFound = true; } } @@ -6749,7 +6821,7 @@ namespace UnitarySystems { if (this->m_HeatingCoilType_Num != HVAC::CoilDX_HeatingEmpirical && this->m_HeatingCoilType_Num != HVAC::CoilDX_MultiSpeedHeating && this->m_HeatingCoilType_Num != HVAC::Coil_HeatingAirToAirVariableSpeed) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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"); @@ -6757,7 +6829,7 @@ namespace UnitarySystems { } } } else if (this->m_MaxHeatAirVolFlow == 0.0 && !this->m_FanExists && !this->m_CoolCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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"); @@ -6766,23 +6838,25 @@ namespace UnitarySystems { if (FanVolFlowRate != DataSizing::AutoSize && this->m_FanExists) { if (FanVolFlowRate < this->m_MaxCoolAirVolFlow && this->m_MaxCoolAirVolFlow != DataSizing::AutoSize && this->m_CoolCoilExists) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError( state, - 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)); + 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)); 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, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError( state, - 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)); + 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)); 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; @@ -6822,7 +6896,7 @@ namespace UnitarySystems { this->m_MinOATCompressorCooling = -1000.0; } if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } @@ -6837,7 +6911,7 @@ namespace UnitarySystems { this->m_MinOATCompressorHeating = -1000.0; } if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } @@ -6870,7 +6944,7 @@ namespace UnitarySystems { } } if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } @@ -6915,19 +6989,20 @@ namespace UnitarySystems { DXCoils::SetMSHPDXCoilHeatRecoveryFlag(state, this->m_HeatingCoilIndex); } if (errFlag) { - ShowContinueError(state, format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; // errFlag = false; // not used after this point, uncomment if needed } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Illegal Heat Recovery Water Inlet Node Name = {}", input_data.heat_recovery_water_inlet_node_name)); - ShowContinueError(state, - format("Illegal Heat Recovery Water Outlet Node Name = {}", input_data.heat_recovery_water_outlet_node_name)); + 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)); ShowContinueError(state, "... heat recovery nodes must be specified when Design Heat Recovery Water Flow Rate" " is greater than 0."); - ShowContinueError(state, format("... Design Heat Recovery Water Flow Rate = {:.7R}", this->m_DesignHRWaterVolumeFlow)); + ShowContinueError(state, EnergyPlus::format("... Design Heat Recovery Water Flow Rate = {:.7R}", this->m_DesignHRWaterVolumeFlow)); errorsFound = true; } } @@ -6964,20 +7039,23 @@ namespace UnitarySystems { std::string MultispeedType = (this->m_DesignSpecMSHPIndex == -1) ? "Fan:SystemModel" : "UnitarySystemPerformance:Multispeed"; int NumOfSpeed = VariableSpeedCoils::GetVSCoilNumOfSpeeds(state, this->m_HeatingCoilName, errorsFound); if (errorsFound) { - ShowSevereError(state, - format("{} = {} is not found. Please check the input.", cCurrentModuleObject, this->m_HeatingCoilName)); + ShowSevereError( + state, + EnergyPlus::format("{} = {} is not found. Please check the input.", cCurrentModuleObject, this->m_HeatingCoilName)); } if (NumOfSpeed != this->m_NumOfSpeedHeating) { - ShowWarningError(state, format("{} = {}.", cCurrentModuleObject, this->m_HeatingCoilName)); + ShowWarningError(state, EnergyPlus::format("{} = {}.", cCurrentModuleObject, this->m_HeatingCoilName)); ShowContinueError(state, - format("... The number of heating coil speeds in the {} = {:.0R}", - MultispeedType, - double(this->m_NumOfSpeedHeating))); + EnergyPlus::format("... The number of heating coil speeds in the {} = {:.0R}", + MultispeedType, + double(this->m_NumOfSpeedHeating))); ShowContinueError( state, - format("... The number of heating coil speeds in Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit = {:.0R}", - double(NumOfSpeed))); - ShowContinueError(state, format("... The number of heating coil speeds in the {} will be used.", MultispeedType)); + 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)); } } } break; @@ -7007,29 +7085,34 @@ namespace UnitarySystems { std::string MultispeedType = (this->m_DesignSpecMSHPIndex == -1) ? "Fan:SystemModel" : "UnitarySystemPerformance:Multispeed"; int NumOfSpeed = VariableSpeedCoils::GetVSCoilNumOfSpeeds(state, this->m_CoolingCoilName, errorsFound); if (errorsFound) { - ShowSevereError(state, - format("{} = {} is not found. Please check the input.", cCurrentModuleObject, this->m_CoolingCoilName)); + ShowSevereError( + state, + EnergyPlus::format("{} = {} is not found. Please check the input.", cCurrentModuleObject, this->m_CoolingCoilName)); } if (NumOfSpeed != this->m_NumOfSpeedCooling) { - ShowWarningError(state, format("{} = {}.", cCurrentModuleObject, this->m_CoolingCoilName)); + ShowWarningError(state, EnergyPlus::format("{} = {}.", cCurrentModuleObject, this->m_CoolingCoilName)); ShowContinueError(state, - format("... The number of Cooling coil speeds in the {} = {:.0R}", - MultispeedType, - double(this->m_NumOfSpeedCooling))); + EnergyPlus::format("... The number of Cooling coil speeds in the {} = {:.0R}", + MultispeedType, + double(this->m_NumOfSpeedCooling))); ShowContinueError( state, - format("... The number of heating coil speeds in Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit = {:.0R}", - double(NumOfSpeed))); - ShowContinueError(state, format("... The number of Cooling coil speeds in the {} will be used.", MultispeedType)); + 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)); } } } break; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "... one or both of the following inputs are invalid."); - ShowContinueError(state, format("Field Design Specification Multispeed Object Type = {}", this->m_DesignSpecMultispeedHPType)); - ShowContinueError(state, format("Field Design Specification Multispeed Object Name = {}", this->m_DesignSpecMultispeedHPName)); + 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)); errorsFound = true; } } else if (this->m_DesignSpecMultispeedHPType.empty() && this->m_DesignSpecMultispeedHPName.empty()) { @@ -7095,11 +7178,11 @@ namespace UnitarySystems { this->m_HeatingCoilType_Num == HVAC::Coil_HeatingWaterToAirHPVSEquationFit) && this->m_sysType == SysType::PackagedWSHP)) { ShowWarningError(state, - format("{} = {} with Fan:SystemModel is used in \"{}\"", - cCurrentModuleObject, - this->Name, - this->input_specs.supply_fan_name)); - ShowContinueError(state, format("...The number of speed = {:.0R}.", double(fanSystem->numSpeeds))); + EnergyPlus::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."); } } @@ -7107,20 +7190,23 @@ namespace UnitarySystems { } } else if ((this->m_DesignSpecMultispeedHPType.empty() && !this->m_DesignSpecMultispeedHPName.empty()) || (!this->m_DesignSpecMultispeedHPType.empty() && this->m_DesignSpecMultispeedHPName.empty())) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "... one or both of the following inputs are invalid."); - ShowContinueError(state, format("Field Design Specification Multispeed Object Type = {}", this->m_DesignSpecMultispeedHPType)); - ShowContinueError(state, format("Field Design Specification Multispeed Object Name = {}", this->m_DesignSpecMultispeedHPName)); + 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)); errorsFound = true; } if (this->m_DiscreteSpeedCoolingCoil) { if (this->m_NumOfSpeedCooling == 0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, - format("... Cooling coil object type requires valid {} for cooling to be specified with number of speeds > 0", - unitarySysHeatPumpPerformanceObjectType)); + 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)); errorsFound = true; } } @@ -7131,10 +7217,11 @@ namespace UnitarySystems { } if (this->m_NumOfSpeedHeating == 0) { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, - format("... Heating coil object type requires valid {} for heating to be specified with number of speeds > 0", - unitarySysHeatPumpPerformanceObjectType)); + 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)); errorsFound = true; } } @@ -7153,14 +7240,14 @@ namespace UnitarySystems { } else { if (this->m_DesignSpecMSHPIndex > -1) { if (this->m_CompPointerMSHP->m_SingleModeFlag) { - ShowSevereError(state, format("{}: {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::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, - format("The input cooling coil type = {} and the input heating coil type = {}", - input_data.cooling_coil_object_type, - this->m_HeatingCoilTypeName)); + EnergyPlus::format("The input cooling coil type = {} and the input heating coil type = {}", + input_data.cooling_coil_object_type, + this->m_HeatingCoilTypeName)); } } } @@ -7221,14 +7308,15 @@ namespace UnitarySystems { this->m_CoolingCoilType_Num != HVAC::Coil_CoolingWaterDetailed && this->m_CoolingCoilType_Num != HVAC::CoilDX_CoolingSingleSpeed && this->m_CoolingCoilType_Num != HVAC::Coil_CoolingAirToAirVariableSpeed) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, format("{}: {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::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, - 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, + 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)); } // mark this coil as non-ASHRAE90 type this->m_ValidASHRAECoolCoil = false; @@ -7239,29 +7327,31 @@ namespace UnitarySystems { this->m_HeatingCoilType_Num != HVAC::CoilDX_HeatingEmpirical && this->m_HeatingCoilType_Num != HVAC::Coil_HeatingAirToAirVariableSpeed) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, format("{}: {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, EnergyPlus::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, - format("The input heating coil type = {}. This coil will not be modeled using the ASHRAE 90.1 algorithm.", - this->m_HeatingCoilTypeName)); + ShowContinueError( + state, + EnergyPlus::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, format("{}: {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Invalid entry for Dehumidification Control Type = {}", input_data.dehumidification_control_type)); + ShowWarningError(state, EnergyPlus::format("{}: {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError( + state, EnergyPlus::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, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Invalid entry for Latent Load Control: {}", input_data.latent_load_control)); + ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::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."); @@ -7270,8 +7360,8 @@ namespace UnitarySystems { this->m_RunOnLatentOnlyWithSensible = false; } if (this->m_MaxNoCoolHeatAirVolFlow == 0.0) { // 0 min air flow not allowed for SZVAV - ShowSevereError(state, format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("Control Type = {}", input_data.control_type)); + ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("Control Type = {}", input_data.control_type)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate cannot be 0."); errorsFound = true; } @@ -7695,9 +7785,10 @@ namespace UnitarySystems { WaterCoils::SetWaterCoilData(state, HRCoilIndex, errFound, _, _, heatRecoveryCoil); if (errFound) { if (HRCoilIndex == 0) { - ShowContinueError(state, format("...cooling coil {} must be of type Coil:Cooling:Water.", HRWaterCoolingCoilName)); + ShowContinueError(state, + EnergyPlus::format("...cooling coil {} must be of type Coil:Cooling:Water.", HRWaterCoolingCoilName)); } - ShowContinueError(state, format("...occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", cCurrentModuleObject, thisObjectName)); } errorsFound = errorsFound || errFound; } @@ -7718,9 +7809,10 @@ namespace UnitarySystems { } if (errorsFound) { - ShowFatalError( - state, - format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", routineName, cCurrentModuleObject)); + ShowFatalError(state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + routineName, + cCurrentModuleObject)); } } } @@ -8398,7 +8490,7 @@ namespace UnitarySystems { case UnitarySysCtrlType::Load: case UnitarySysCtrlType::CCMASHRAE: { if (AirLoopNum == -1) { // This IF-THEN routine is just for ZoneHVAC:OutdoorAirUnit - ShowWarningError(state, format("{} \"{}\"", this->UnitType, this->Name)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", this->UnitType, this->Name)); ShowFatalError(state, "...Load based control is not allowed when used with ZoneHVAC:OutdoorAirUnit"); } @@ -9888,13 +9980,15 @@ namespace UnitarySystems { if (SolFlag == -1) { if (std::abs(ZoneLoad - TempSensOutput) > HVAC::SmallLoad) { if (this->MaxIterIndex == 0) { - ShowWarningMessage(state, format("Coil control failed to converge for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage( + state, EnergyPlus::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, - format("Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} " - "(watts), and the simulation continues.", - ZoneLoad, - TempSensOutput)); + ShowContinueErrorTimeStamp( + state, + EnergyPlus::format("Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} " + "(watts), and the simulation continues.", + ZoneLoad, + TempSensOutput)); } ShowRecurringWarningErrorAtEnd(state, this->UnitType + " \"" + this->Name + @@ -9906,10 +10000,11 @@ namespace UnitarySystems { } } else if (SolFlag == -2) { if (this->RegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, format("Coil control failed for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, EnergyPlus::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, format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); + state, + EnergyPlus::format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); } ShowRecurringWarningErrorAtEnd( state, @@ -9942,10 +10037,11 @@ namespace UnitarySystems { (state.dataUnitarySystems->CoolingLoad && ZoneLoad < SensOutputOff)) { // if this is still true then print valid warnings if (this->RegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, format("Coil control failed for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, EnergyPlus::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, format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); + state, + EnergyPlus::format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); } ShowRecurringWarningErrorAtEnd( state, @@ -10361,13 +10457,14 @@ namespace UnitarySystems { if (SolFlagLat == -1) { if (std::abs(state.dataUnitarySystems->MoistureLoad - TempLatOutput) > HVAC::SmallLoad) { if (this->warnIndex.m_LatMaxIterIndex == 0) { - ShowWarningMessage(state, format("Coil control failed to converge for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, EnergyPlus::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, - format("Latent load to be met = {:.2T} (watts), Latent output = {:.2T} (watts), and the simulation continues.", - state.dataUnitarySystems->MoistureLoad, - TempLatOutput)); + EnergyPlus::format( + "Latent load to be met = {:.2T} (watts), Latent output = {:.2T} (watts), and the simulation continues.", + state.dataUnitarySystems->MoistureLoad, + TempLatOutput)); } ShowRecurringWarningErrorAtEnd( state, @@ -10379,11 +10476,11 @@ namespace UnitarySystems { } } else if (SolFlagLat == -2) { if (this->warnIndex.m_LatRegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, format("Coil control failed for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, EnergyPlus::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, - format("Latent load to be met = {:.2T} (watts), and the simulation continues.", state.dataUnitarySystems->MoistureLoad)); + ShowContinueErrorTimeStamp(state, + EnergyPlus::format("Latent load to be met = {:.2T} (watts), and the simulation continues.", + state.dataUnitarySystems->MoistureLoad)); } ShowRecurringWarningErrorAtEnd(state, this->UnitType + " \"" + this->Name + @@ -10394,10 +10491,11 @@ namespace UnitarySystems { } } else if (SolFlagLat == -2) { if (this->warnIndex.m_LatRegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, format("Coil control failed for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, EnergyPlus::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, format("Latent load to be met = {:.2T} (watts), and the simulation continues.", state.dataUnitarySystems->MoistureLoad)); + ShowContinueErrorTimeStamp(state, + EnergyPlus::format("Latent load to be met = {:.2T} (watts), and the simulation continues.", + state.dataUnitarySystems->MoistureLoad)); } ShowRecurringWarningErrorAtEnd(state, this->UnitType + " \"" + this->Name + @@ -10549,28 +10647,29 @@ namespace UnitarySystems { } this->m_MyCheckFlag = false; if (this->m_ZoneSequenceCoolingNum == 0 || this->m_ZoneSequenceHeatingNum == 0) { - ShowSevereError(state, - format("{} \"{}\": Airloop air terminal in the zone equipment list for zone = {} not it or is not allowed " + ShowSevereError( + 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, - format("Subroutine InitLoadBasedControl: Errors it in getting {} input. Preceding condition(s) causes termination.", - this->UnitType)); + ShowFatalError(state, + EnergyPlus::format( + "Subroutine InitLoadBasedControl: Errors it in getting {} input. Preceding condition(s) causes termination.", + this->UnitType)); } } if (this->m_ZoneInletNode == 0) { ShowSevereError(state, - format("{} \"{}\": The zone inlet node in the controlled zone ({}) is not found.", - this->UnitType, - this->Name, - state.dataHeatBal->Zone(this->ControlZoneNum).Name)); - ShowFatalError( - state, - format("Subroutine InitLoadBasedControl: Errors found in getting {} input. Preceding condition(s) causes termination.", - this->UnitType)); + 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)); } } @@ -10860,7 +10959,7 @@ namespace UnitarySystems { ShowWarningError(state, "ZoneControl:Thermostat:StagedDualSetpoint is found, but is not applied to this UnitarySystem " "object with UnitarySystemPerformance:Multispeed type = "); - ShowContinueError(state, format("{}. Please make correction. Simulation continues...", this->Name)); + ShowContinueError(state, EnergyPlus::format("{}. Please make correction. Simulation continues...", this->Name)); this->m_MyStagedFlag = false; } } @@ -12418,8 +12517,9 @@ namespace UnitarySystems { this->m_HeatCompPartLoadRatio = PartLoadRatio * double(CompressorOn); } break; default: { - ShowFatalError( - state, format("CalcUnitaryHeatingSystem: Invalid Unitary System coil type = {}", HVAC::cAllCoilTypes(this->m_HeatingCoilType_Num))); + ShowFatalError(state, + EnergyPlus::format("CalcUnitaryHeatingSystem: Invalid Unitary System coil type = {}", + HVAC::cAllCoilTypes(this->m_HeatingCoilType_Num))); } break; } @@ -12577,9 +12677,9 @@ namespace UnitarySystems { if (useMaxedSpeed) { this->m_CoilSpeedErrIdx++; ShowRecurringWarningErrorAtEnd(state, - 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), + 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), this->m_CoilSpeedErrIdx, this->m_EMSOverrideSuppCoilSpeedNumValue, this->m_EMSOverrideSuppCoilSpeedNumValue, @@ -12798,7 +12898,8 @@ namespace UnitarySystems { this->m_SpeedNum = this->m_NumOfSpeedCooling; useMaxedSpeed = true; if (this->m_CoilSpeedErrIdx == 0) { - ShowWarningMessage(state, format("Wrong coil speed EMS override value, for unit=\"{}", this->m_CoolingCoilName)); + ShowWarningMessage(state, + EnergyPlus::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."); } @@ -12818,7 +12919,8 @@ namespace UnitarySystems { this->m_CoolingSpeedNum = 0; this->m_SpeedNum = 0; if (this->m_CoilSpeedErrIdx == 0) { - ShowWarningMessage(state, format("Wrong coil speed EMS override value, for unit=\"{}", this->m_CoolingCoilName)); + ShowWarningMessage(state, + EnergyPlus::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, @@ -13372,11 +13474,13 @@ namespace UnitarySystems { ++this->warnIndex.m_HXAssistedSensPLRIter; ShowWarningError( state, - format("{} - Iteration limit exceeded calculating DX unit sensible part-load ratio for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + EnergyPlus::format( + "{} - Iteration limit exceeded calculating DX unit 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, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); } @@ -13394,12 +13498,13 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_HXAssistedSensPLRFail < 1) { ++this->warnIndex.m_HXAssistedSensPLRFail; - ShowWarningError(state, - format("{} - DX unit sensible part-load ratio calculation unexpectedly failed: " - "part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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:"); } @@ -13418,12 +13523,13 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_HXAssistedSensPLRFail2 < 1) { ++this->warnIndex.m_HXAssistedSensPLRFail2; - ShowWarningError(state, - format("{} - DX unit sensible part-load ratio calculation failed: part-load ratio limits " - "exceeded, for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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:"); } @@ -13630,9 +13736,10 @@ namespace UnitarySystems { }; General::SolveRoot(state, Acc, MaxIte, SolFla, PartLoadFrac, f, 0.0, 1.0); } else { - ShowMessage(state, format(" For :{}=\"{}\"", this->UnitType, this->Name)); - ShowFatalError(state, - format("ControlCoolingSystemToSP: Invalid cooling coil type = {}", HVAC::cAllCoilTypes(CoilType_Num))); + ShowMessage(state, EnergyPlus::format(" For :{}=\"{}\"", this->UnitType, this->Name)); + ShowFatalError( + state, + EnergyPlus::format("ControlCoolingSystemToSP: Invalid cooling coil type = {}", HVAC::cAllCoilTypes(CoilType_Num))); } } } @@ -13934,11 +14041,13 @@ namespace UnitarySystems { ++this->warnIndex.m_HXAssistedCRLatPLRIter; ShowWarningError( state, - format("{} - Iteration limit exceeded calculating DX unit latent part-load ratio for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated latent part-load ratio = {:.3R}", (ReqOutput / FullOutput))); - ShowContinueError(state, format("Calculated latent part-load ratio = {:.3R}", PartLoadFrac)); + EnergyPlus::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)); ShowContinueErrorTimeStamp(state, "The calculated latent part-load ratio will be used and the simulation " "continues. Occurrence info:"); @@ -13959,12 +14068,13 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_HXAssistedCRLatPLRFail < 1) { ++this->warnIndex.m_HXAssistedCRLatPLRFail; - ShowWarningError(state, - format("{} - DX unit latent part-load ratio calculation failed unexpectedly: part-load " - "ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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:"); } @@ -13983,12 +14093,13 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_HXAssistedCRLatPLRFail2 < 1) { ++this->warnIndex.m_HXAssistedCRLatPLRFail2; - ShowWarningError(state, - format("{} - DX unit latent part-load ratio calculation failed: part-load ratio limits " - "exceeded, for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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:"); } @@ -14330,11 +14441,13 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_SensPLRIter < 1) { ++this->warnIndex.m_SensPLRIter; - ShowWarningError(state, - format("{} - Iteration limit exceeded calculating part-load ratio for unit = {}", this->UnitType, this->Name)); - ShowContinueError(state, - format("Estimated part-load ratio = {:.3R}", (FullOutput != 0 ? (ReqOutput / FullOutput) : PartLoadFrac))); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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))); + 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 { ShowRecurringWarningErrorAtEnd( @@ -14353,11 +14466,12 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_SensPLRFail < 1) { ++this->warnIndex.m_SensPLRFail; - ShowWarningError(state, - format("{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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( @@ -14375,11 +14489,14 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_LatPLRIter < 1) { ++this->warnIndex.m_LatPLRIter; - ShowWarningError( - state, format("{} - Iteration limit exceeded calculating latent part-load ratio for unit = {}", this->UnitType, this->Name)); - ShowContinueError(state, - format("Estimated part-load ratio = {:.3R}", (FullOutput != 0 ? (ReqOutput / FullOutput) : PartLoadFrac))); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError(state, + EnergyPlus::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))); + 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:"); } ShowRecurringWarningErrorAtEnd( @@ -14400,11 +14517,12 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_LatPLRFail < 1) { ++this->warnIndex.m_LatPLRFail; - ShowWarningError(state, - format("{} - latent part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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:"); } ShowRecurringWarningErrorAtEnd(state, @@ -15045,10 +15163,10 @@ namespace UnitarySystems { // should never get here, user defined coil cannot be controlled and has already been simulated } break; default: { - ShowMessage(state, format(" For :{}=\"{}\"", this->UnitType, this->Name)); - ShowFatalError( - state, - format("ControlHeatingSystemToSP: Invalid heating coil type = {}", HVAC::cAllCoilTypes(this->m_HeatingCoilType_Num))); + ShowMessage(state, EnergyPlus::format(" For :{}=\"{}\"", this->UnitType, this->Name)); + ShowFatalError(state, + EnergyPlus::format("ControlHeatingSystemToSP: Invalid heating coil type = {}", + HVAC::cAllCoilTypes(this->m_HeatingCoilType_Num))); } break; } } @@ -15067,11 +15185,12 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_HeatCoilSensPLRIter < 1) { ++this->warnIndex.m_HeatCoilSensPLRIter; - ShowWarningError( - state, - format("{} - Iteration limit exceeded calculating sensible part-load ratio for unit = {}", this->UnitType, this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError(state, + EnergyPlus::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, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); } else { @@ -15089,11 +15208,12 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_HeatCoilSensPLRFail < 1) { ++this->warnIndex.m_HeatCoilSensPLRFail; - ShowWarningError(state, - format("{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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 { @@ -15466,23 +15586,25 @@ namespace UnitarySystems { Psychrometrics::PsyDeltaHSenFnTdb2W2Tdb1W1(outletNode.Temp, outletNode.HumRat, inletNode.Temp, inletNode.HumRat); ++this->warnIndex.m_SuppHeatCoilSensPLRIter; - ShowWarningError(state, - format("{} - Iteration limit exceeded calculating sensible part-load ratio for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); - ShowContinueError(state, format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); + ShowWarningError( + state, + EnergyPlus::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, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); } else { - ShowRecurringWarningErrorAtEnd(state, - 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); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::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); } } // IF(.NOT. WarmupFlag)THEN } else if (SolFla == -2) { @@ -15497,18 +15619,20 @@ namespace UnitarySystems { ++this->warnIndex.m_SuppHeatCoilSensPLRFail; ShowWarningError( state, - format("{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); - ShowContinueError(state, format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); + EnergyPlus::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, - format("{} \"{}\" - sensible part-load ratio calculation failed error continues. Sensible PLR statistics follow.", - this->UnitType, - this->Name), + EnergyPlus::format( + "{} \"{}\" - sensible part-load ratio calculation failed error continues. Sensible PLR statistics follow.", + this->UnitType, + this->Name), this->warnIndex.m_SuppHeatCoilSensPLRFailIndex, PartLoadFrac, PartLoadFrac); @@ -17035,10 +17159,10 @@ namespace UnitarySystems { } } if (!UnitarySysFound) { - ShowSevereError(state, format("{}System not found = UnitarySystem \"{}\"", RoutineName, UnitarySysName)); + ShowSevereError(state, EnergyPlus::format("{}System not found = UnitarySystem \"{}\"", RoutineName, UnitarySysName)); } } else { - ShowSevereError(state, format("{}System not found = UnitarySystem \"{}\"", RoutineName, UnitarySysName)); + ShowSevereError(state, EnergyPlus::format("{}System not found = UnitarySystem \"{}\"", RoutineName, UnitarySysName)); } } diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index eb5a58b3211..54f125e2e02 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -103,8 +103,9 @@ namespace UserDefinedComponents { } } // If we didn't find it, fatal - ShowFatalError(state, - format("LocalUserDefinedPlantComponentFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError( + state, + EnergyPlus::format("LocalUserDefinedPlantComponentFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -148,9 +149,10 @@ namespace UserDefinedComponents { // throw warning ShowFatalError( state, - format("SimUserDefinedPlantComponent: did not find where called from. Loop number called from ={}, loop side called from ={}.", - calledFromLocation.loopNum, - calledFromLocation.loopSideNum)); + EnergyPlus::format( + "SimUserDefinedPlantComponent: did not find where called from. Loop number called from ={}, loop side called from ={}.", + calledFromLocation.loopNum, + calledFromLocation.loopSideNum)); } } @@ -259,20 +261,21 @@ namespace UserDefinedComponents { } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > state.dataUserDefinedComponents->NumUserCoils) { - ShowFatalError(state, - format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", - CompNum, - state.dataUserDefinedComponents->NumUserCoils, - EquipName)); + ShowFatalError( + state, + EnergyPlus::format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", + CompNum, + state.dataUserDefinedComponents->NumUserCoils, + EquipName)); } if (state.dataUserDefinedComponents->CheckUserCoilName(CompNum)) { if (EquipName != state.dataUserDefinedComponents->UserCoil(CompNum).Name) { - ShowFatalError( - state, - format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", - CompNum, - EquipName, - state.dataUserDefinedComponents->UserCoil(CompNum).Name)); + ShowFatalError(state, + EnergyPlus::format( + "SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", + CompNum, + EquipName, + state.dataUserDefinedComponents->UserCoil(CompNum).Name)); } state.dataUserDefinedComponents->CheckUserCoilName(CompNum) = false; } @@ -370,20 +373,21 @@ namespace UserDefinedComponents { } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > state.dataUserDefinedComponents->NumUserZoneAir) { - ShowFatalError(state, - format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", - CompNum, - state.dataUserDefinedComponents->NumUserZoneAir, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", + CompNum, + state.dataUserDefinedComponents->NumUserZoneAir, + CompName)); } if (state.dataUserDefinedComponents->CheckUserZoneAirName(CompNum)) { if (CompName != state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).Name) { - ShowFatalError( - state, - format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", - CompNum, - CompName, - state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).Name)); + ShowFatalError(state, + EnergyPlus::format( + "SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", + CompNum, + CompName, + state.dataUserDefinedComponents->UserZoneAirHVAC(CompNum).Name)); } state.dataUserDefinedComponents->CheckUserZoneAirName(CompNum) = false; } @@ -493,20 +497,21 @@ namespace UserDefinedComponents { } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > state.dataUserDefinedComponents->NumUserAirTerminals) { - ShowFatalError(state, - format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", - CompNum, - state.dataUserDefinedComponents->NumUserAirTerminals, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", + CompNum, + state.dataUserDefinedComponents->NumUserAirTerminals, + CompName)); } if (state.dataUserDefinedComponents->CheckUserAirTerminal(CompNum)) { if (CompName != state.dataUserDefinedComponents->UserAirTerminal(CompNum).Name) { - ShowFatalError( - state, - format("SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", - CompNum, - CompName, - state.dataUserDefinedComponents->UserAirTerminal(CompNum).Name)); + ShowFatalError(state, + EnergyPlus::format( + "SimUserDefinedPlantComponent: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", + CompNum, + CompName, + state.dataUserDefinedComponents->UserAirTerminal(CompNum).Name)); } state.dataUserDefinedComponents->CheckUserAirTerminal(CompNum) = false; } @@ -621,8 +626,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserPlantComp(CompLoop).simCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).simCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::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."); @@ -709,8 +714,9 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).initCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(aArgCount + 4)); if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).initCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(aArgCount + 4), cAlphaArgs(aArgCount + 4))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(aArgCount + 4), cAlphaArgs(aArgCount + 4))); + ShowContinueError(state, EnergyPlus::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."); @@ -732,8 +738,9 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).simCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(aArgCount + 5)); if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Loop(ConnectionLoop).simCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(aArgCount + 4), cAlphaArgs(aArgCount + 4))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError( + state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(aArgCount + 4), cAlphaArgs(aArgCount + 4))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "Program Manager Name not found as EMS Program, API callback, or Python Plugin."); ErrorsFound = true; } @@ -947,8 +954,9 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserPlantComp(CompLoop).Zone.ZoneNum = Util::FindItemInList(cAlphaArgs(31), state.dataHeatBal->Zone); if (state.dataUserDefinedComponents->UserPlantComp(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError(state, - format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(31))); + ShowSevereError( + state, + EnergyPlus::format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(31))); ErrorsFound = true; } else { state.dataUserDefinedComponents->UserPlantComp(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1042,7 +1050,7 @@ namespace UserDefinedComponents { } } if (MgrCountTest == 0) { - ShowSevereError(state, format("Invalid {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "At least one program calling manager is needed."); ErrorsFound = true; } @@ -1050,7 +1058,7 @@ namespace UserDefinedComponents { } // NumUserPlantComps > 0 if (ErrorsFound) { - ShowFatalError(state, format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); } cCurrentModuleObject = "Coil:UserDefined"; @@ -1098,8 +1106,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserCoil(CompLoop).simCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserCoil(CompLoop).simCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::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."); @@ -1121,8 +1129,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserCoil(CompLoop).initCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserCoil(CompLoop).initCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, EnergyPlus::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."); @@ -1356,8 +1364,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, format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(13))); + ShowSevereError(state, + EnergyPlus::format( + "{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(13))); ErrorsFound = true; } else { state.dataUserDefinedComponents->UserCoil(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1430,7 +1439,7 @@ namespace UserDefinedComponents { } // NumUserCoils > 0 if (ErrorsFound) { - ShowFatalError(state, format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); } } @@ -1499,8 +1508,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).simCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).simCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::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."); @@ -1522,8 +1531,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).initCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).initCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, EnergyPlus::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."); @@ -1843,8 +1852,9 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).Zone.ZoneNum = Util::FindItemInList(cAlphaArgs(16), state.dataHeatBal->Zone); if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError(state, - format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(16))); + ShowSevereError( + state, + EnergyPlus::format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(16))); ErrorsFound = true; } else { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1915,7 +1925,7 @@ namespace UserDefinedComponents { } // NumUserZoneAir > 0 if (ErrorsFound) { - ShowFatalError(state, format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); } } @@ -1980,8 +1990,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).simCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).simCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::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."); @@ -2003,8 +2013,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).initCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).initCallbackIndex == -1) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, EnergyPlus::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."); @@ -2120,13 +2130,14 @@ namespace UserDefinedComponents { // one assumes if there isn't one assigned, it's an error? if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).ADUNum == 0) { ShowSevereError(state, - format("GetUserDefinedComponents: No matching Air Distribution Unit for {} = {}", - cCurrentModuleObject, - state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Name)); - ShowContinueError(state, - format("...should have outlet node={}", - state.dataLoopNodes->NodeID( - state.dataUserDefinedComponents->UserAirTerminal(CompLoop).AirConnection.OutletNodeNum))); + 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))); // ErrorsFound=.TRUE. } @@ -2142,13 +2153,14 @@ namespace UserDefinedComponents { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); ShowContinueError( state, - format("{} already connects to another zone", - state.dataLoopNodes->NodeID( - state.dataUserDefinedComponents->UserAirTerminal(CompLoop).AirConnection.OutletNodeNum))); + EnergyPlus::format( + "{} already connects to another zone", + state.dataLoopNodes->NodeID( + state.dataUserDefinedComponents->UserAirTerminal(CompLoop).AirConnection.OutletNodeNum))); ShowContinueError(state, - format("Occurs for terminal unit {} = {}", - cCurrentModuleObject, - state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Name)); + EnergyPlus::format("Occurs for terminal unit {} = {}", + cCurrentModuleObject, + state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Name)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -2390,8 +2402,9 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Zone.ZoneNum = Util::FindItemInList(cAlphaArgs(14), state.dataHeatBal->Zone); if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError(state, - format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(14))); + ShowSevereError( + state, + EnergyPlus::format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(14))); ErrorsFound = true; } else { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Zone.DeviceHasInternalGains = true; @@ -2462,7 +2475,7 @@ namespace UserDefinedComponents { } // NumUserZoneAir > 0 if (ErrorsFound) { - ShowFatalError(state, format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); } } @@ -2976,7 +2989,8 @@ namespace UserDefinedComponents { } if (CoilIndex == 0) { - ShowSevereError(state, format("{}, GetUserDefinedCoilIndex: User Defined Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, + EnergyPlus::format("{}, GetUserDefinedCoilIndex: User Defined Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; } } @@ -3010,7 +3024,7 @@ namespace UserDefinedComponents { } if (CoilIndex == 0) { - ShowSevereError(state, format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilAirInletNode = 0; } else { @@ -3047,7 +3061,7 @@ namespace UserDefinedComponents { } if (CoilIndex == 0) { - ShowSevereError(state, format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, EnergyPlus::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 42fec4f46e1..9319e8350d2 100644 --- a/src/EnergyPlus/UtilityRoutines.cc +++ b/src/EnergyPlus/UtilityRoutines.cc @@ -326,13 +326,13 @@ namespace Util { if (NumOfNames > 0) { int Found = FindItem(NameToVerify, NamesList, NumOfNames); if (Found != 0) { - ShowSevereError(state, format("{}, duplicate name={}", StringToDisplay, NameToVerify)); + ShowSevereError(state, EnergyPlus::format("{}, duplicate name={}", StringToDisplay, NameToVerify)); ErrorFound = true; } } if (NameToVerify.empty()) { - ShowSevereError(state, format("{}, cannot be blank", StringToDisplay)); + ShowSevereError(state, EnergyPlus::format("{}, cannot be blank", StringToDisplay)); ErrorFound = true; IsBlank = true; } else { @@ -362,13 +362,13 @@ namespace Util { if (NumOfNames > 0) { int Found = FindItem(NameToVerify, NamesList, NumOfNames); if (Found != 0) { - ShowSevereError(state, format("{}, duplicate name={}", StringToDisplay, NameToVerify)); + ShowSevereError(state, EnergyPlus::format("{}, duplicate name={}", StringToDisplay, NameToVerify)); ErrorFound = true; } } if (NameToVerify.empty()) { - ShowSevereError(state, format("{}, cannot be blank", StringToDisplay)); + ShowSevereError(state, EnergyPlus::format("{}, cannot be blank", StringToDisplay)); ErrorFound = true; IsBlank = true; } else { @@ -379,7 +379,7 @@ namespace Util { bool IsNameEmpty(EnergyPlusData &state, std::string &NameToVerify, std::string_view StringToDisplay, bool &ErrorFound) { if (NameToVerify.empty()) { - ShowSevereError(state, format("{} Name, cannot be blank", StringToDisplay)); + ShowSevereError(state, EnergyPlus::format("{} Name, cannot be blank", StringToDisplay)); ErrorFound = true; NameToVerify = "xxxxx"; return true; @@ -404,9 +404,10 @@ namespace Util { // sent to this routine. if (ptrToBeSet <= 0) { // No valid pointer--error in user input errorFound = true; - ShowSevereError(state, format("Object = {} with the Name = {} has an invalid Design Object Name = {}.", itemType, itemName, nameToBeSet)); + ShowSevereError( + state, EnergyPlus::format("Object = {} with the Name = {} has an invalid Design Object Name = {}.", itemType, itemName, nameToBeSet)); ShowContinueError(state, " The Design Object Name was not found or was left blank. This is not allowed."); - ShowContinueError(state, format(" A valid Design Object Name must be provided for any {} object.", itemType)); + ShowContinueError(state, EnergyPlus::format(" A valid Design Object Name must be provided for any {} object.", itemType)); } } @@ -443,9 +444,9 @@ namespace Util { if (state.files.outputControl.perflog) { fsPerfLog.open(state.dataStrGlobals->outputPerfLogFilePath, std::fstream::out); // open file normally if (!fsPerfLog) { - ShowFatalError( - state, - format("appendPerfLog: Could not open file \"{}\" for output (write).", state.dataStrGlobals->outputPerfLogFilePath)); + ShowFatalError(state, + EnergyPlus::format("appendPerfLog: Could not open file \"{}\" for output (write).", + state.dataStrGlobals->outputPerfLogFilePath)); } fsPerfLog << state.dataUtilityRoutines->appendPerfLog_headerRow << std::endl; fsPerfLog << state.dataUtilityRoutines->appendPerfLog_valuesRow << std::endl; @@ -454,9 +455,9 @@ namespace Util { if (state.files.outputControl.perflog) { fsPerfLog.open(state.dataStrGlobals->outputPerfLogFilePath, std::fstream::app); // append to already existing file if (!fsPerfLog) { - ShowFatalError( - state, - format("appendPerfLog: Could not open file \"{}\" for output (append).", state.dataStrGlobals->outputPerfLogFilePath)); + ShowFatalError(state, + EnergyPlus::format("appendPerfLog: Could not open file \"{}\" for output (append).", + state.dataStrGlobals->outputPerfLogFilePath)); } fsPerfLog << state.dataUtilityRoutines->appendPerfLog_valuesRow << std::endl; } @@ -556,14 +557,15 @@ int AbortEnergyPlus(EnergyPlusData &state) state.dataResultsFramework->resultsFramework->SimulationInformation.setNumErrorsSizing(NumWarningsDuringSizing, NumSevereDuringSizing); state.dataResultsFramework->resultsFramework->SimulationInformation.setNumErrorsSummary(NumWarnings, NumSevere); - ShowMessage( - state, - format("EnergyPlus Warmup Error Summary. During Warmup: {} Warning; {} Severe Errors.", NumWarningsDuringWarmup, NumSevereDuringWarmup)); - ShowMessage( - state, - format("EnergyPlus Sizing Error Summary. During Sizing: {} Warning; {} Severe Errors.", NumWarningsDuringSizing, NumSevereDuringSizing)); - ShowMessage( - state, format("EnergyPlus Terminated--Fatal Error Detected. {} Warning; {} Severe Errors; Elapsed Time={}", NumWarnings, NumSevere, Elapsed)); + ShowMessage(state, + EnergyPlus::format( + "EnergyPlus Warmup Error Summary. During Warmup: {} Warning; {} Severe Errors.", NumWarningsDuringWarmup, NumSevereDuringWarmup)); + ShowMessage(state, + EnergyPlus::format( + "EnergyPlus Sizing Error Summary. During Sizing: {} Warning; {} Severe Errors.", NumWarningsDuringSizing, NumSevereDuringSizing)); + ShowMessage(state, + EnergyPlus::format( + "EnergyPlus Terminated--Fatal Error Detected. {} Warning; {} Severe Errors; Elapsed Time={}", NumWarnings, NumSevere, Elapsed)); DisplayString(state, "EnergyPlus Run Time=" + Elapsed); { @@ -663,7 +665,7 @@ int EndEnergyPlus(EnergyPlusData &state) state.dataSysVars->runtimeTimer.tock(); if (state.dataGlobal->createPerfLog) { - Util::appendPerfLog(state, "Run Time [seconds]", format("{:.2R}", state.dataSysVars->runtimeTimer.elapsedSeconds())); + Util::appendPerfLog(state, "Run Time [seconds]", EnergyPlus::format("{:.2R}", state.dataSysVars->runtimeTimer.elapsedSeconds())); } const std::string Elapsed = state.dataSysVars->runtimeTimer.formatAsHourMinSecs(); state.dataResultsFramework->resultsFramework->SimulationInformation.setRunTime(Elapsed); @@ -676,13 +678,15 @@ int EndEnergyPlus(EnergyPlusData &state) Util::appendPerfLog(state, "Number of Warnings", NumWarnings); Util::appendPerfLog(state, "Number of Severe", NumSevere, true); // last item so write the perfLog file } + ShowMessage(state, + EnergyPlus::format( + "EnergyPlus Warmup Error Summary. During Warmup: {} Warning; {} Severe Errors.", NumWarningsDuringWarmup, NumSevereDuringWarmup)); + ShowMessage(state, + EnergyPlus::format( + "EnergyPlus Sizing Error Summary. During Sizing: {} Warning; {} Severe Errors.", NumWarningsDuringSizing, NumSevereDuringSizing)); ShowMessage( state, - format("EnergyPlus Warmup Error Summary. During Warmup: {} Warning; {} Severe Errors.", NumWarningsDuringWarmup, NumSevereDuringWarmup)); - ShowMessage( - state, - format("EnergyPlus Sizing Error Summary. During Sizing: {} Warning; {} Severe Errors.", NumWarningsDuringSizing, NumSevereDuringSizing)); - ShowMessage(state, format("EnergyPlus Completed Successfully-- {} Warning; {} Severe Errors; Elapsed Time={}", NumWarnings, NumSevere, Elapsed)); + EnergyPlus::format("EnergyPlus Completed Successfully-- {} Warning; {} Severe Errors; Elapsed Time={}", NumWarnings, NumSevere, Elapsed)); DisplayString(state, "EnergyPlus Run Time=" + Elapsed); { @@ -889,12 +893,13 @@ ShowFatalError(EnergyPlusData &state, std::string const &ErrorMessage, OptionalO using namespace DataErrorTracking; - ShowErrorMessage(state, format(" ** Fatal ** {}", ErrorMessage), OutUnit1, OutUnit2); + ShowErrorMessage(state, EnergyPlus::format(" ** Fatal ** {}", ErrorMessage), OutUnit1, OutUnit2); DisplayString(state, "**FATAL:" + ErrorMessage); ShowErrorMessage(state, " ...Summary of Errors that led to program termination:", OutUnit1, OutUnit2); - ShowErrorMessage(state, format(" ..... Reference severe error count={}", state.dataErrTracking->TotalSevereErrors), OutUnit1, OutUnit2); - ShowErrorMessage(state, format(" ..... Last severe error={}", state.dataErrTracking->LastSevereError), OutUnit1, OutUnit2); + ShowErrorMessage( + state, EnergyPlus::format(" ..... Reference severe error count={}", state.dataErrTracking->TotalSevereErrors), OutUnit1, OutUnit2); + ShowErrorMessage(state, EnergyPlus::format(" ..... Last severe error={}", state.dataErrTracking->LastSevereError), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, 2, ErrorMessage, 1); if (state.dataSQLiteProcedures->sqlite->sqliteWithinTransaction()) { @@ -935,7 +940,7 @@ void ShowSevereError(EnergyPlusData &state, std::string const &ErrorMessage, Opt if (state.dataGlobal->DoingSizing) { ++state.dataErrTracking->TotalSevereErrorsDuringSizing; } - ShowErrorMessage(state, format(" ** Severe ** {}", ErrorMessage), OutUnit1, OutUnit2); + ShowErrorMessage(state, EnergyPlus::format(" ** Severe ** {}", ErrorMessage), OutUnit1, OutUnit2); state.dataErrTracking->LastSevereError = ErrorMessage; // Could set a variable here that gets checked at some point? @@ -968,7 +973,7 @@ void ShowSevereMessage(EnergyPlusData &state, std::string const &ErrorMessage, O } } - ShowErrorMessage(state, format(" ** Severe ** {}", ErrorMessage), OutUnit1, OutUnit2); + ShowErrorMessage(state, EnergyPlus::format(" ** Severe ** {}", ErrorMessage), OutUnit1, OutUnit2); state.dataErrTracking->LastSevereError = ErrorMessage; // Could set a variable here that gets checked at some point? @@ -994,7 +999,7 @@ void ShowContinueError(EnergyPlusData &state, std::string const &Message, Option // METHODOLOGY EMPLOYED: // Calls ShowErrorMessage utility routine. - ShowErrorMessage(state, format(" ** ~~~ ** {}", Message), OutUnit1, OutUnit2); + ShowErrorMessage(state, EnergyPlus::format(" ** ~~~ ** {}", Message), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->updateSQLiteErrorRecord(Message); } @@ -1033,14 +1038,14 @@ void ShowContinueErrorTimeStamp(EnergyPlusData &state, std::string const &Messag } if (len(Message) < 50) { - const std::string m = format("{}{}{}, at Simulation time={} {}", - Message, - cEnvHeader, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); - - ShowErrorMessage(state, format(" ** ~~~ ** {}", m), OutUnit1, OutUnit2); + 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); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->updateSQLiteErrorRecord(m); } @@ -1048,13 +1053,13 @@ void ShowContinueErrorTimeStamp(EnergyPlusData &state, std::string const &Messag state.dataGlobal->errorCallback(Error::Continue, m); } } else { - const std::string postfix = format("{}{}, at Simulation time={} {}", - cEnvHeader, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); - ShowErrorMessage(state, format(" ** ~~~ ** {}", Message)); - ShowErrorMessage(state, format(" ** ~~~ ** {}", postfix), OutUnit1, OutUnit2); + 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); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->updateSQLiteErrorRecord(Message); } @@ -1081,7 +1086,7 @@ void ShowMessage(EnergyPlusData &state, std::string const &Message, OptionalOutp if (Message.empty()) { ShowErrorMessage(state, " *************", OutUnit1, OutUnit2); } else { - ShowErrorMessage(state, format(" ************* {}", Message), OutUnit1, OutUnit2); + ShowErrorMessage(state, EnergyPlus::format(" ************* {}", Message), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, -1, Message, 0); } @@ -1119,7 +1124,7 @@ void ShowWarningError(EnergyPlusData &state, std::string const &ErrorMessage, Op if (state.dataGlobal->DoingSizing) { ++state.dataErrTracking->TotalWarningErrorsDuringSizing; } - ShowErrorMessage(state, format(" ** Warning ** {}", ErrorMessage), OutUnit1, OutUnit2); + ShowErrorMessage(state, EnergyPlus::format(" ** Warning ** {}", ErrorMessage), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, 0, ErrorMessage, 1); @@ -1151,7 +1156,7 @@ void ShowWarningMessage(EnergyPlusData &state, std::string const &ErrorMessage, } } - ShowErrorMessage(state, format(" ** Warning ** {}", ErrorMessage), OutUnit1, OutUnit2); + ShowErrorMessage(state, EnergyPlus::format(" ** Warning ** {}", ErrorMessage), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, 0, ErrorMessage, 0); } @@ -1563,7 +1568,7 @@ void SummarizeErrors(EnergyPlusData &state) EndC = len(thisMoreDetails) - 1; while (EndC != std::string::npos) { EndC = index(thisMoreDetails.substr(StartC), "") { break; } @@ -1611,9 +1616,9 @@ void ShowRecurringErrors(EnergyPlusData &state) ShowMessage(state, ""); ShowMessage(state, error.Message); - ShowMessage(state, format("{} This error occurred {} total times;", StatMessageStart, error.Count)); - ShowMessage(state, format("{} during Warmup {} times;", StatMessageStart, error.WarmupCount)); - ShowMessage(state, format("{} during Sizing {} times.", StatMessageStart, error.SizingCount)); + 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)); if (state.dataSQLiteProcedures->sqlite) { if (warning) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, 0, error.Message.substr(15), error.Count); @@ -1632,28 +1637,28 @@ void ShowRecurringErrors(EnergyPlusData &state) } std::string StatMessage; if (error.ReportMax) { - std::string MaxOut = format("{:.6f}", error.MaxValue); + std::string MaxOut = EnergyPlus::format("{:.6f}", error.MaxValue); StatMessage += " Max=" + MaxOut; if (!error.MaxUnits.empty()) { StatMessage += ' ' + error.MaxUnits; } } if (error.ReportMin) { - std::string MinOut = format("{:.6f}", error.MinValue); + std::string MinOut = EnergyPlus::format("{:.6f}", error.MinValue); StatMessage += " Min=" + MinOut; if (!error.MinUnits.empty()) { StatMessage += ' ' + error.MinUnits; } } if (error.ReportSum) { - std::string SumOut = format("{:.6f}", error.SumValue); + std::string SumOut = EnergyPlus::format("{:.6f}", error.SumValue); StatMessage += " Sum=" + SumOut; if (!error.SumUnits.empty()) { StatMessage += ' ' + error.SumUnits; } } if (error.ReportMax || error.ReportMin || error.ReportSum) { - ShowMessage(state, format("{}{}", StatMessageStart, StatMessage)); + ShowMessage(state, EnergyPlus::format("{}{}", StatMessageStart, StatMessage)); } } ShowMessage(state, ""); @@ -1662,74 +1667,78 @@ void ShowRecurringErrors(EnergyPlusData &state) void ShowSevereDuplicateName(EnergyPlusData &state, ErrorObjectHeader const &eoh) { - ShowSevereError(state, format("{}: {} = {}, duplicate name.", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, EnergyPlus::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, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - format("{} cannot be empty{}.", fieldName, depFieldName.empty() ? "" : format(" when {} = {}", depFieldName, depFieldVal))); + EnergyPlus::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, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, item not found.", fieldName, fieldVal)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, item not found.", fieldName, fieldVal)); } void ShowDetailedSevereItemNotFound(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowSevereError(state, format("{}: {} = {}, item not found.", eoh.routineName, fieldName, fieldVal)); - ShowContinueError(state, format("{} = {}, item not found.", fieldName, fieldVal)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}, item not found.", eoh.routineName, fieldName, fieldVal)); + ShowContinueError(state, EnergyPlus::format("{} = {}, item not found.", fieldName, fieldVal)); } void ShowSevereItemNotFoundAudit(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName), OptionalOutputFileRef{state.files.audit}); - ShowContinueError(state, format("{} = {}, item not found.", fieldName, fieldVal), OptionalOutputFileRef{state.files.audit}); + 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}); } void ShowSevereDuplicateAssignment( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal, std::string_view prevVal) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, field previously assigned to {}.", fieldName, fieldVal, prevVal)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::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, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, invalid key.", fieldName, fieldVal)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, invalid key.", fieldName, fieldVal)); if (!msg.empty()) { - ShowContinueError(state, format(msg)); + ShowContinueError(state, EnergyPlus::format(msg)); } } void ShowSevereInvalidBool(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, invalid boolean (\"Yes\"/\"No\").", fieldName, fieldVal)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, invalid boolean (\"Yes\"/\"No\").", fieldName, fieldVal)); } void ShowSevereCustom(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{}", msg)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } void ShowSevereCustomAudit(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName), OptionalOutputFileRef{state.files.audit}); - ShowContinueError(state, format("{}", msg), OptionalOutputFileRef{state.files.audit}); + ShowSevereError( + state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName), OptionalOutputFileRef{state.files.audit}); + ShowContinueError(state, EnergyPlus::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, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, {}", fieldName, fieldValue, msg)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, {}", fieldName, fieldValue, msg)); } void ShowSevereBadMin(EnergyPlusData &state, @@ -1740,10 +1749,10 @@ void ShowSevereBadMin(EnergyPlusData &state, Real64 minVal, std::string_view msg) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMin == Clusive::In ? ">=" : ">", minVal)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMin == Clusive::In ? ">=" : ">", minVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -1755,10 +1764,10 @@ void ShowSevereBadMax(EnergyPlusData &state, Real64 maxVal, std::string_view msg) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -1772,37 +1781,37 @@ void ShowSevereBadMinMax(EnergyPlusData &state, Real64 maxVal, std::string_view msg) { - ShowSevereError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - format("{} = {}, but must be {} {} and {} {}", - fieldName, - fieldVal, - cluMin == Clusive::In ? ">=" : ">", - minVal, - cluMax == Clusive::In ? "<=" : "<", - maxVal)); + EnergyPlus::format("{} = {}, but must be {} {} and {} {}", + fieldName, + fieldVal, + cluMin == Clusive::In ? ">=" : ">", + minVal, + cluMax == Clusive::In ? "<=" : "<", + maxVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } void ShowWarningItemNotFound(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, item not found", fieldName, fieldVal)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, item not found", fieldName, fieldVal)); } void ShowWarningCustom(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{}", msg)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } void ShowWarningCustomField( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, {}", fieldName, fieldValue, msg)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, {}", fieldName, fieldValue, msg)); } void ShowWarningInvalidKey(EnergyPlusData &state, @@ -1812,18 +1821,18 @@ void ShowWarningInvalidKey(EnergyPlusData &state, std::string_view defaultVal, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, invalid key, {} will be used.", fieldName, fieldVal, defaultVal)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, invalid key, {} will be used.", fieldName, fieldVal, defaultVal)); if (!msg.empty()) { - ShowContinueError(state, format(msg)); + ShowContinueError(state, EnergyPlus::format(msg)); } } void ShowWarningInvalidBool( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal, std::string_view defaultVal) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, invalid boolean (\"Yes\"/\"No\"), {} will be used.", fieldName, fieldVal, 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)); } void ShowWarningEmptyField(EnergyPlusData &state, @@ -1833,35 +1842,35 @@ void ShowWarningEmptyField(EnergyPlusData &state, std::string_view depFieldName, std::string_view depFieldVal) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} is empty.", fieldName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} is empty.", fieldName)); if (!depFieldName.empty()) { - ShowContinueError(state, format("Cannot be empty when {} = {}", depFieldName, depFieldVal)); + ShowContinueError(state, EnergyPlus::format("Cannot be empty when {} = {}", depFieldName, depFieldVal)); } if (!defaultVal.empty()) { - ShowContinueError(state, format("{} will be used.", defaultVal)); + ShowContinueError(state, EnergyPlus::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, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} is not empty.", fieldName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} is not empty.", fieldName)); if (!depFieldName.empty()) { - ShowContinueError(state, format("{} is ignored when {} = {}.", fieldName, depFieldName, depFieldValue)); + ShowContinueError(state, EnergyPlus::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, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); if (defaultVal.empty()) { - ShowContinueError(state, format("{} = {}, item not found.", fieldName, fieldVal)); + ShowContinueError(state, EnergyPlus::format("{} = {}, item not found.", fieldName, fieldVal)); } else { - ShowContinueError(state, format("{} = {}, item not found, {} will be used.", fieldName, fieldVal, defaultVal)); + ShowContinueError(state, EnergyPlus::format("{} = {}, item not found, {} will be used.", fieldName, fieldVal, defaultVal)); } } @@ -1873,10 +1882,10 @@ void ShowWarningBadMin(EnergyPlusData &state, Real64 minVal, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMin == Clusive::In ? ">=" : ">", minVal)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMin == Clusive::In ? ">=" : ">", minVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -1888,11 +1897,11 @@ void ShowWarningBadMax(EnergyPlusData &state, Real64 maxVal, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); - ShowContinueError(state, format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, EnergyPlus::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); + ShowContinueError(state, EnergyPlus::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } @@ -1906,17 +1915,17 @@ void ShowWarningBadMinMax(EnergyPlusData &state, Real64 maxVal, std::string_view msg) { - ShowWarningError(state, format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - format("{} = {}, but must be {} {} and {} {}", - fieldName, - fieldVal, - cluMin == Clusive::In ? ">=" : ">", - minVal, - cluMax == Clusive::In ? "<=" : "<", - maxVal)); + EnergyPlus::format("{} = {}, but must be {} {} and {} {}", + fieldName, + fieldVal, + cluMin == Clusive::In ? ">=" : ">", + minVal, + cluMax == Clusive::In ? "<=" : "<", + maxVal)); if (!msg.empty()) { - ShowContinueError(state, format("{}", msg)); + ShowContinueError(state, EnergyPlus::format("{}", msg)); } } diff --git a/src/EnergyPlus/VariableSpeedCoils.cc b/src/EnergyPlus/VariableSpeedCoils.cc index e310b024857..19598b430ed 100644 --- a/src/EnergyPlus/VariableSpeedCoils.cc +++ b/src/EnergyPlus/VariableSpeedCoils.cc @@ -138,25 +138,27 @@ namespace VariableSpeedCoils { if (CompIndex == 0) { DXCoilNum = Util::FindItemInList(CompName, state.dataVariableSpeedCoils->VarSpeedCoil); if (DXCoilNum == 0) { - ShowFatalError(state, format("WaterToAirHPVSWEquationFit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("WaterToAirHPVSWEquationFit not found={}", CompName)); } CompIndex = DXCoilNum; } else { DXCoilNum = CompIndex; if (DXCoilNum > state.dataVariableSpeedCoils->NumVarSpeedCoils || DXCoilNum < 1) { - ShowFatalError(state, - format("SimVariableSpeedCoils: Invalid CompIndex passed={}, Number of Water to Air HPs={}, WaterToAir HP name={}", - DXCoilNum, - state.dataVariableSpeedCoils->NumVarSpeedCoils, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimVariableSpeedCoils: Invalid CompIndex passed={}, Number of Water to Air HPs={}, WaterToAir HP name={}", + DXCoilNum, + state.dataVariableSpeedCoils->NumVarSpeedCoils, + CompName)); } if (!CompName.empty() && CompName != state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name) { ShowFatalError( state, - format("SimVariableSpeedCoils: Invalid CompIndex passed={}, WaterToAir HP name={}, stored WaterToAir HP Name for that index={}", - DXCoilNum, - CompName, - state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name)); + EnergyPlus::format( + "SimVariableSpeedCoils: Invalid CompIndex passed={}, WaterToAir HP name={}, stored WaterToAir HP Name for that index={}", + DXCoilNum, + CompName, + state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name)); } } @@ -351,8 +353,9 @@ namespace VariableSpeedCoils { cFieldName = "Number of Speeds"; if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } @@ -361,9 +364,10 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + 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)); ErrorsFound = true; } @@ -379,30 +383,33 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string fieldName; - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_total_cooling_capacity"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_total_cooling_capacity"); varSpeedCoil.MSRatedTotCap(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_sensible_heat_ratio"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_sensible_heat_ratio"); varSpeedCoil.MSRatedSHR(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_cooling_cop"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_cooling_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); varSpeedCoil.MSRatedWaterVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_waste_heat_fraction_of_input_power_at_rated_conditions"); + fieldName = + EnergyPlus::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); - std::string fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_temperature_curve_name"); + std::string fieldValue = + EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_temperature_curve_name"); std::string cFieldName_curve = - format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); + EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); std::string const coolCapFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolCapFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -423,16 +430,20 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletWetBulbTemp, RatedInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_air_flow_fraction_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); + fieldValue = + EnergyPlus::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::string const coolCapFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolCapFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -453,16 +464,20 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_water_flow_fraction_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Water Flow Fraction Curve Name"); + fieldValue = + EnergyPlus::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::string const coolCapWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolCapWFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -483,16 +498,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " 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_curve = EnergyPlus::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."); @@ -513,16 +530,19 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletWetBulbTemp, RatedInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " 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_curve = + EnergyPlus::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."); @@ -543,16 +563,20 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_water_flow_fraction_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Water Flow Fraction Curve Name"); + 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"); std::string const coolEIRWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolEIRWFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -573,17 +597,19 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } // Read waste heat modifier curve name - fieldValue = format("speed_{}{}", std::to_string(I), "_waste_heat_function_of_temperature_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Waste Heat Function of Temperature 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"); std::string const wasteHFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (wasteHFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -604,10 +630,12 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSWasteHeat(I), RatedInletWaterTemp, RatedInletAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } @@ -746,8 +774,9 @@ namespace VariableSpeedCoils { cFieldName = "Number of Speeds"; if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } if (varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) { @@ -755,9 +784,10 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + 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)); ErrorsFound = true; } @@ -773,9 +803,10 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } @@ -796,11 +827,12 @@ namespace VariableSpeedCoils { DataLoopNode::ObjectIsNotParent); // std::string cAlphaField10 = "Basin Heater Operating Schedule Name"; if (!OutAirNodeManager::CheckOutAirNodeNumber(state, varSpeedCoil.CondenserInletNodeNum)) { - ShowWarningError(state, format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + EnergyPlus::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError(state, - format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", - cFieldName, - condenserAirInletNodeName)); + EnergyPlus::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"); @@ -815,8 +847,8 @@ namespace VariableSpeedCoils { varSpeedCoil.CondenserType = DataHeatBalance::RefrigCondenserType::Evap; varSpeedCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{}=\"{}\":", cFieldName, condenserType)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{}=\"{}\":", cFieldName, condenserType)); ShowContinueError(state, "...must be AirCooled or EvaporativelyCooled."); ErrorsFound = true; } @@ -831,9 +863,9 @@ namespace VariableSpeedCoils { } if (varSpeedCoil.EvapCondPumpElecNomPower != DataSizing::AutoSize) { if (varSpeedCoil.EvapCondPumpElecNomPower < 0.0) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cFieldName)); - ShowContinueError(state, format("...entered value=[{:.2T}].", varSpeedCoil.EvapCondPumpElecNomPower)); + 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)); ErrorsFound = true; } } @@ -842,9 +874,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cFieldName)); - ShowContinueError(state, format("...entered value=[{:.2T}].", varSpeedCoil.CrankcaseHeaterCapacity)); + 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)); ErrorsFound = true; } @@ -863,7 +895,8 @@ namespace VariableSpeedCoils { if (varSpeedCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve ShowSevereError( state, - format("{} = {}: {} not found = {}", CurrentModuleObject, varSpeedCoil.Name, cFieldName, crankcaseHeaterCapCurveName)); + EnergyPlus::format( + "{} = {}: {} not found = {}", CurrentModuleObject, varSpeedCoil.Name, cFieldName, crankcaseHeaterCapCurveName)); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -913,9 +946,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} must be >= 0.0.", cFieldName)); - ShowContinueError(state, format("...entered value=[{:.2T}].", varSpeedCoil.BasinHeaterPowerFTempDiff)); + 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)); ErrorsFound = true; } @@ -924,9 +957,10 @@ 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, format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} is < 2 {{C}}. Freezing could occur.", cFieldName)); - ShowContinueError(state, format("...entered value=[{:.2T}].", varSpeedCoil.BasinHeaterSetPointTemp)); + 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)); } } @@ -941,35 +975,36 @@ namespace VariableSpeedCoils { for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string fieldName; - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_total_cooling_capacity"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_total_cooling_capacity"); varSpeedCoil.MSRatedTotCap(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_sensible_heat_ratio"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_sensible_heat_ratio"); varSpeedCoil.MSRatedSHR(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_cooling_cop"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_cooling_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("2017_speed_{}{}", std::to_string(I), "_rated_evaporator_fan_power_per_volume_flow_rate"); + fieldName = EnergyPlus::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 = format("2023_speed_{}{}", std::to_string(I), "_rated_evaporator_fan_power_per_volume_flow_rate"); + fieldName = EnergyPlus::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 = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_condenser_air_flow_rate"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_condenser_air_flow_rate"); varSpeedCoil.EvapCondAirFlow(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_pad_effectiveness_of_evap_precooling"); + fieldName = EnergyPlus::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 = - format("Speed_{}{}", std::to_string(I), " Reference Unit Rated Pad Effectiveness of Evap Precooling"); - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0 or > 1.0.", FieldName)); - ShowContinueError(state, format("...entered value=[{:.2T}].", varSpeedCoil.EvapCondEffect(I))); + 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))); ErrorsFound = true; } - std::string fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_temperature_curve_name"); + std::string fieldValue = + EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_temperature_curve_name"); std::string cFieldName_curve = - format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); + EnergyPlus::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."); @@ -990,16 +1025,20 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletWetBulbTemp, RatedAmbAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_air_flow_fraction_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); + fieldValue = + EnergyPlus::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::string const cCapFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cCapFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -1020,16 +1059,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " 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_curve = EnergyPlus::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."); @@ -1050,16 +1091,19 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletWetBulbTemp, RatedAmbAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName_curve = format("Speed_{}{}", std::to_string(I), " 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_curve = + EnergyPlus::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."); @@ -1080,10 +1124,12 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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_curve)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } @@ -1239,8 +1285,9 @@ namespace VariableSpeedCoils { cFieldName = "Number of Speeds"; // If (VarSpeedCoil(DXCoilNum)%NumOfSpeeds .LT. 2) Then if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } @@ -1249,9 +1296,10 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + 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)); ErrorsFound = true; } // part load curve @@ -1266,28 +1314,30 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string fieldName; std::string fieldValue; - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); varSpeedCoil.MSRatedTotCap(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_cop"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); varSpeedCoil.MSRatedWaterVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_waste_heat_fraction_of_input_power_at_rated_conditions"); + fieldName = + EnergyPlus::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 = format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_temperature_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Temperature Curve Name"); + 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"); std::string const heatCapFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatCapFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1308,15 +1358,19 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletAirTempHeat, RatedInletWaterTempHeat); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_total_heating_capacity_function_of_air_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " 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"); std::string const heatCapFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatCapFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1337,15 +1391,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_water_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Water Flow Fraction Curve Name"); + 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"); std::string const heatCapWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatCapWFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1366,15 +1422,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " 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"); std::string const heatEIRFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatEIRFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1395,15 +1453,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletAirTempHeat, RatedInletWaterTempHeat); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " 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"); std::string const heatEIRFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatEIRFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1424,15 +1484,19 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_water_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Water Flow Fraction Curve Name"); + 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"); std::string const heatEIRWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatEIRWFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1453,16 +1517,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } // Read waste heat modifier curve name - fieldValue = format("speed_{}{}", std::to_string(I), "_waste_heat_function_of_temperature_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Waste Heat Function of Temperature 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"); std::string const heatWHFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatWHFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1483,9 +1549,11 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSWasteHeat(I), RatedInletWaterTemp, RatedInletAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } @@ -1610,8 +1678,9 @@ namespace VariableSpeedCoils { BranchNodeConnections::TestCompSet(state, CurrentModuleObject, varSpeedCoil.Name, airInletNodeName, airOutletNodeName, "Air Nodes"); cFieldName = "Number of Speeds"; if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } @@ -1620,9 +1689,10 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + 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)); ErrorsFound = true; } @@ -1638,9 +1708,10 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } @@ -1658,7 +1729,8 @@ namespace VariableSpeedCoils { if (varSpeedCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve ShowSevereError( state, - format("{} = {}: {} not found = {}", CurrentModuleObject, varSpeedCoil.Name, cFieldName, crankcaseHeaterCapCurveName)); + EnergyPlus::format( + "{} = {}: {} not found = {}", CurrentModuleObject, varSpeedCoil.Name, cFieldName, crankcaseHeaterCapCurveName)); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -1678,9 +1750,9 @@ namespace VariableSpeedCoils { if (varSpeedCoil.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle) { if (varSpeedCoil.DefrostEIRFT == 0) { if (defrostEIRFTCurveName.empty()) { - ShowSevereError(state, format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...required {} is blank.", defrostEIRFTFieldName)); - ShowContinueError(state, format("...field is required because {} is \"ReverseCycle\".", cFieldName)); + 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)); } else { ShowSevereInvalidBool(state, eoh, cFieldName, defrostEIRFTCurveName); } @@ -1724,9 +1796,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} cannot be < 0.0.", cFieldName)); - ShowContinueError(state, format("...entered value=[{:.2T}].", varSpeedCoil.CrankcaseHeaterCapacity)); + 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)); ErrorsFound = true; } // Set crankcase heater cutout temperature @@ -1737,8 +1809,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, format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} = 0.0 for defrost control = TIMED.", cFieldName)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost control = TIMED.", cFieldName)); } // Set defrost capacity (for resistive defrost), @@ -1751,33 +1823,33 @@ namespace VariableSpeedCoils { : dCap.get(); } if (varSpeedCoil.DefrostCapacity == 0.0 && varSpeedCoil.DefrostStrategy == StandardRatings::DefrostStrat::Resistive) { - ShowWarningError(state, format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} = 0.0 for defrost strategy = RESISTIVE.", cFieldName)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cFieldName)); } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string fieldValue; std::string fieldName; - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); + fieldName = EnergyPlus::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 = format("Speed_{}{}", std::to_string(I), " Reference Unit Gross Rated Heating Capacity"); - ShowSevereError(state, format("{}{}=\"{}\", invalid value", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...too small {}=[{:.2R}].", cFieldName, varSpeedCoil.MSRatedTotCap(I))); + cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Reference Unit Gross Rated Heating Capacity"); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid value", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...too small {}=[{:.2R}].", cFieldName, varSpeedCoil.MSRatedTotCap(I))); ErrorsFound = true; } - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_cop"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = format("2017_speed_{}{}", std::to_string(I), "_rated_supply_air_fan_power_per_volume_flow_rate"); + fieldName = EnergyPlus::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 = format("2023_speed_{}{}", std::to_string(I), "_rated_supply_air_fan_power_per_volume_flow_rate"); + fieldName = EnergyPlus::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 = format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_temperature_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Temperature Curve Name"); + 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"); std::string const hCapFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (hCapFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1798,16 +1870,20 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletAirTempHeat, RatedAmbAirTempHeat); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } // Speed 1 Total Heating Capacity Function of Air Flow Fraction Curve Name - fieldValue = format("speed_{}{}", std::to_string(I), "_total_heating_capacity_function_of_air_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " 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"); std::string const hCapFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (hCapFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1828,16 +1904,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } // Speed 1 Energy Input Ratio Function of Temperature Curve Name - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " 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"); std::string const hEIRFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (hEIRFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1858,16 +1936,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletAirTempHeat, RatedAmbAirTempHeat); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } // Speed 1 Energy Input Ratio Function of Air Flow Fraction Curve Name - fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " 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"); std::string const hEIRFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (hEIRFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1888,9 +1968,11 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } @@ -1980,8 +2062,9 @@ namespace VariableSpeedCoils { varSpeedCoil.NormSpedLevel = s_ip->getIntFieldValue(fields, schemaProps, "nominal_speed_level"); cFieldName = "Number of Speeds"; if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } if (varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) { @@ -1989,16 +2072,17 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + 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)); 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, varSpeedCoil.RatedCapWH)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, varSpeedCoil.RatedCapWH)); ErrorsFound = true; } varSpeedCoil.WHRatedInletDBTemp = @@ -2012,9 +2096,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, varSpeedCoil.RatedAirVolFlowRate)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, varSpeedCoil.RatedAirVolFlowRate)); ErrorsFound = true; } } @@ -2023,9 +2107,10 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be > 0.0 entered value=[{:.3T}].", cFieldName, varSpeedCoil.RatedWaterVolFlowRate)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError( + state, + EnergyPlus::format("...{} must be > 0.0 entered value=[{:.3T}].", cFieldName, varSpeedCoil.RatedWaterVolFlowRate)); ErrorsFound = true; } } @@ -2062,9 +2147,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, format("...{} must be >= 0 and <= 1. entered value=[{:.3T}].", cFieldName, varSpeedCoil.HPWHCondPumpFracToWater)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + EnergyPlus::format( + "...{} must be >= 0 and <= 1. entered value=[{:.3T}].", cFieldName, varSpeedCoil.HPWHCondPumpFracToWater)); ErrorsFound = true; } if (!varSpeedCoil.CondPumpHeatInCapacity) { @@ -2132,9 +2218,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, varSpeedCoil.CrankcaseHeaterCapacity)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, varSpeedCoil.CrankcaseHeaterCapacity)); ErrorsFound = true; } @@ -2142,9 +2228,10 @@ 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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, varSpeedCoil.MaxOATCrankcaseHeater)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError( + state, + EnergyPlus::format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, varSpeedCoil.MaxOATCrankcaseHeater)); ErrorsFound = true; } @@ -2171,9 +2258,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, format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); - ShowContinueError(state, format("...entered value=\"{}\".", fieldValue)); + 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)); ErrorsFound = true; } @@ -2198,29 +2285,30 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string jfieldName; - jfieldName = format("speed_{}{}", std::to_string(I), "_rated_water_heating_capacity"); + jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_rated_water_heating_capacity"); varSpeedCoil.MSRatedTotCap(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = format("speed_{}{}", std::to_string(I), "_rated_water_heating_cop"); + jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_rated_water_heating_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = format("speed_{}{}", std::to_string(I), "_rated_sensible_heat_ratio"); + jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_rated_sensible_heat_ratio"); varSpeedCoil.MSRatedSHR(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); + jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); varSpeedCoil.MSRatedWaterVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_water_pump_input_power_at_rated_conditions"); + jfieldName = EnergyPlus::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 = format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Temperature Curve Name"); - jfieldName = format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_temperature_curve_name"); + 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"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2241,15 +2329,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), WHInletAirTemp, WHInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - cFieldName = format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Air Flow Fraction Curve Name"); - jfieldName = format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_air_flow_fraction_curve_name"); + 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"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2270,15 +2360,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - cFieldName = format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Water Flow Fraction Curve Name"); - jfieldName = format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_water_flow_fraction_curve_name"); + 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"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2299,15 +2391,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - cFieldName = format("Speed_{}{}", std::to_string(I), " COP Function of Temperature Curve Name"); - jfieldName = format("speed_{}{}", std::to_string(I), "_cop_function_of_temperature_curve_name"); + 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"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2328,15 +2422,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), WHInletAirTemp, WHInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - cFieldName = format("Speed_{}{}", std::to_string(I), " COP Function of Air Flow Fraction Curve Name"); - jfieldName = format("speed_{}{}", std::to_string(I), "_cop_function_of_air_flow_fraction_curve_name"); + 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"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2357,15 +2453,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } - cFieldName = format("Speed_{}{}", std::to_string(I), " COP Function of Water Flow Fraction Curve Name"); - jfieldName = format("speed_{}{}", std::to_string(I), "_cop_function_of_water_flow_fraction_curve_name"); + 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"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2386,9 +2484,11 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); + 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)); } } } @@ -2464,7 +2564,7 @@ namespace VariableSpeedCoils { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found getting input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found getting input. Program terminates.", RoutineName)); } for (DXCoilNum = 1; DXCoilNum <= state.dataVariableSpeedCoils->NumVarSpeedCoils; ++DXCoilNum) { @@ -3248,8 +3348,9 @@ namespace VariableSpeedCoils { } if (ErrorsFound) { - ShowFatalError( - state, format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, + EnergyPlus::format( + "{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } } @@ -3318,7 +3419,7 @@ namespace VariableSpeedCoils { ErrorsFound = false; SizeVarSpeedCoil(state, DXCoilNum, ErrorsFound); if (ErrorsFound) { - ShowFatalError(state, format("{}: Failed to size variable speed coil.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}: Failed to size variable speed coil.", RoutineName)); } // get rated coil bypass factor excluding fan heat @@ -3355,7 +3456,7 @@ namespace VariableSpeedCoils { ErrorsFound = false; SizeVarSpeedCoil(state, DXCoilNum, ErrorsFound); if (ErrorsFound) { - ShowFatalError(state, format("{}: Failed to size variable speed coil.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}: Failed to size variable speed coil.", RoutineName)); } state.dataVariableSpeedCoils->MySizeFlag(DXCoilNum) = false; @@ -3371,14 +3472,15 @@ namespace VariableSpeedCoils { if (varSpeedCoil.MSRatedTotCap(Mode) <= 0.0) { ShowSevereError( state, - format( + EnergyPlus::format( "Sizing: {} {} has zero rated total capacity at speed {}", varSpeedCoil.VarSpeedCoilType, varSpeedCoil.Name, Mode)); ErrorsFound = true; } if (varSpeedCoil.MSRatedAirVolFlowRate(Mode) <= 0.0) { ShowSevereError( state, - format("Sizing: {} {} has zero rated air flow rate at speed {}", varSpeedCoil.VarSpeedCoilType, varSpeedCoil.Name, Mode)); + EnergyPlus::format( + "Sizing: {} {} has zero rated air flow rate at speed {}", varSpeedCoil.VarSpeedCoilType, varSpeedCoil.Name, Mode)); ErrorsFound = true; } if (ErrorsFound) { @@ -3907,13 +4009,13 @@ namespace VariableSpeedCoils { HardSizeNoDesRunAirFlow = true; if (varSpeedCoil.RatedAirVolFlowRate > 0.0) { BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "User-Specified Rated Air Flow Rate [m3/s]", varSpeedCoil.RatedAirVolFlowRate); } } else { - CheckSysSizing(state, format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); + CheckSysSizing(state, EnergyPlus::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]; @@ -3933,13 +4035,13 @@ namespace VariableSpeedCoils { HardSizeNoDesRunAirFlow = true; if (varSpeedCoil.RatedAirVolFlowRate > 0.0) { BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "User-Specified Rated Air Flow Rate [m3/s]", varSpeedCoil.RatedAirVolFlowRate); } } else { - CheckZoneSizing(state, format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); + CheckZoneSizing(state, EnergyPlus::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) { @@ -3969,13 +4071,13 @@ namespace VariableSpeedCoils { HardSizeNoDesRun = true; if (varSpeedCoil.RatedCapCoolTotal > 0.0) { BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "User-Specified Rated Total Cooling Capacity [W]", varSpeedCoil.RatedCapCoolTotal); } } else { - CheckSysSizing(state, format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); + CheckSysSizing(state, EnergyPlus::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]; @@ -4050,16 +4152,16 @@ namespace VariableSpeedCoils { if (CoolCapAtPeak < 0) { // This conditional will also catch the initialization value, -999.0 ShowWarningError( state, - format( + EnergyPlus::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)); - ShowContinueError(state, format("The air properties are: T_mix = {:.4R}", MixTemp)); - ShowContinueError(state, format(" T_supply = {:.4R}", SupTemp)); - ShowContinueError(state, format(" H_mix = {:.4R}", MixEnth)); - ShowContinueError(state, format(" H_supply = {:.4R}", SupEnth)); - ShowContinueError(state, format(" W_mix = {:.4R}", MixHumRat)); - ShowContinueError(state, format(" W_supply = {:.4R}", SupHumRat)); + ShowContinueError(state, EnergyPlus::format("The air properties are: T_mix = {:.4R}", MixTemp)); + ShowContinueError(state, EnergyPlus::format(" T_supply = {:.4R}", SupTemp)); + ShowContinueError(state, EnergyPlus::format(" H_mix = {:.4R}", MixEnth)); + ShowContinueError(state, EnergyPlus::format(" H_supply = {:.4R}", SupEnth)); + ShowContinueError(state, EnergyPlus::format(" W_mix = {:.4R}", MixHumRat)); + ShowContinueError(state, EnergyPlus::format(" W_supply = {:.4R}", SupHumRat)); ShowContinueError(state, "Cooling capacity is set to zero during sizing; simulation continues."); } if (state.dataSize->UnitarySysEqSizing(state.dataSize->CurSysNum).CoolingCapacity && @@ -4083,13 +4185,13 @@ namespace VariableSpeedCoils { HardSizeNoDesRun = true; if (varSpeedCoil.RatedCapCoolTotal > 0.0) { BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "User-Specified Rated Total Cooling Capacity [W]", varSpeedCoil.RatedCapCoolTotal); } } else { - CheckZoneSizing(state, format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); + CheckZoneSizing(state, EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); auto const &finalZoneSizing = state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum); VolFlowRate = varSpeedCoil.RatedAirVolFlowRate; if (VolFlowRate >= HVAC::SmallAirVolFlow) { @@ -4166,7 +4268,7 @@ namespace VariableSpeedCoils { if (RatedCapCoolTotalAutoSized) { varSpeedCoil.RatedCapCoolTotal = RatedCapCoolTotalDes; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Total Cooling Capacity [W]", varSpeedCoil.RatedCapCoolTotal); @@ -4195,7 +4297,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.RatedCapCoolTotal > 0.0 && RatedCapCoolTotalDes > 0.0) { RatedCapCoolTotalUser = varSpeedCoil.RatedCapCoolTotal; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Total Cooling Capacity [W]", RatedCapCoolTotalDes, @@ -4205,13 +4307,15 @@ namespace VariableSpeedCoils { if ((std::abs(RatedCapCoolTotalDes - RatedCapCoolTotalUser) / RatedCapCoolTotalUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, format("Coil Name = {}", varSpeedCoil.Name)); - ShowContinueError(state, format("User-Specified Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalUser)); + EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); ShowContinueError(state, - format("differs from Design Size Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalDes)); + EnergyPlus::format("User-Specified Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -4277,10 +4381,12 @@ namespace VariableSpeedCoils { // END IF if (RatedCapHeatAutoSized) { if (RatedCapHeatDes == DataSizing::AutoSize) { - ShowWarningError( - state, format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); - ShowContinueError(state, - format("{}: Heating coil could not be autosized since cooling coil was not previously sized.", RoutineName)); + ShowWarningError(state, + EnergyPlus::format( + "COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); + ShowContinueError( + state, + EnergyPlus::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."); } @@ -4304,7 +4410,7 @@ namespace VariableSpeedCoils { if (RatedCapHeatAutoSized) { varSpeedCoil.RatedCapHeat = RatedCapHeatDes; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Nominal Heating Capacity [W]", RatedCapHeatDes); @@ -4324,7 +4430,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.RatedCapHeat > 0.0 && RatedCapHeatDes > 0.0) { RatedCapHeatUser = varSpeedCoil.RatedCapHeat; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Nominal Heating Capacity [W]", RatedCapHeatDes, @@ -4332,12 +4438,14 @@ namespace VariableSpeedCoils { RatedCapHeatUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedCapHeatDes - RatedCapHeatUser) / RatedCapHeatUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", varSpeedCoil.CoolHeatType, CurrentObjSubfix)); - ShowContinueError(state, format("Coil Name = {}", varSpeedCoil.Name)); - ShowContinueError(state, format("User-Specified Rated Total Heating Capacity of {:.2R} [W]", RatedCapHeatUser)); - ShowContinueError(state, format("differs from Design Size Rated Total Heating Capacity of {:.2R} [W]", RatedCapHeatDes)); + ShowMessage(state, + EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, EnergyPlus::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)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -4357,7 +4465,7 @@ namespace VariableSpeedCoils { if (RatedAirFlowAutoSized) { varSpeedCoil.RatedAirVolFlowRate = RatedAirVolFlowRateDes; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Air Flow Rate [m3/s]", RatedAirVolFlowRateDes); @@ -4365,7 +4473,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.RatedAirVolFlowRate > 0.0 && RatedAirVolFlowRateDes > 0.0) { RatedAirVolFlowRateUser = varSpeedCoil.RatedAirVolFlowRate; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Air Flow Rate [m3/s]", RatedAirVolFlowRateDes, @@ -4375,12 +4483,14 @@ namespace VariableSpeedCoils { if ((std::abs(RatedAirVolFlowRateDes - RatedAirVolFlowRateUser) / RatedAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, format("Coil Name = {}", varSpeedCoil.Name)); - ShowContinueError(state, format("User-Specified Rated Air Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateUser)); - ShowContinueError(state, format("differs from Design Size Rated Air Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateDes)); + EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Rated Air Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Rated Air Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -4403,17 +4513,20 @@ namespace VariableSpeedCoils { state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).RatedCapCoolTotal > 0.2) { - ShowWarningError( - state, format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); - ShowContinueError(state, - format("...used with COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", - state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).CoolHeatType, - state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).Name)); + ShowWarningError(state, + EnergyPlus::format( + "COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); + ShowContinueError( + state, + EnergyPlus::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, format("...heating capacity = {:.3T} W", varSpeedCoil.RatedCapHeat)); - ShowContinueError(state, - format("...cooling capacity = {:.3T} W", - state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).RatedCapCoolTotal)); + ShowContinueError(state, EnergyPlus::format("...heating capacity = {:.3T} W", varSpeedCoil.RatedCapHeat)); + ShowContinueError( + state, + EnergyPlus::format("...cooling capacity = {:.3T} W", + state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).RatedCapCoolTotal)); } } } @@ -4452,11 +4565,11 @@ namespace VariableSpeedCoils { varSpeedCoil.VSCoilType == HVAC::Coil_CoolingAirToAirVariableSpeed) { if (state.dataUnitarySystems->designSpecMSHP[varSpeedCoil.MSHPDesignSpecIndex].numOfSpeedCooling != varSpeedCoil.NumOfSpeeds) { ShowFatalError(state, - format("COIL:{} = {}{} number of speeds not equal to number of speed specified in " - "UnitarySystemPerformance:Multispeed object.", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix, - varSpeedCoil.Name)); + EnergyPlus::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) = @@ -4474,11 +4587,11 @@ namespace VariableSpeedCoils { varSpeedCoil.VSCoilType == HVAC::Coil_HeatingAirToAirVariableSpeed) { if (state.dataUnitarySystems->designSpecMSHP[varSpeedCoil.MSHPDesignSpecIndex].numOfSpeedHeating != varSpeedCoil.NumOfSpeeds) { ShowFatalError(state, - format("COIL:{}{} = \"{}\" number of speeds not equal to number of speed specified in " - "UnitarySystemPerformance:Multispeed object.", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix, - varSpeedCoil.Name)); + EnergyPlus::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) = @@ -4536,7 +4649,7 @@ namespace VariableSpeedCoils { if (RatedWaterFlowAutoSized) { if (varSpeedCoil.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { PltSizNum = PlantUtilities::MyPlantSizingIndex(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, varSpeedCoil.WaterInletNodeNum, varSpeedCoil.WaterOutletNodeNum, @@ -4596,7 +4709,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, format("Occurs in COIL:{}{} Object = {}", varSpeedCoil.CoolHeatType, CurrentObjSubfix, varSpeedCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("Occurs in COIL:{}{} Object = {}", varSpeedCoil.CoolHeatType, CurrentObjSubfix, varSpeedCoil.Name)); ErrorsFound = true; } @@ -4617,7 +4731,7 @@ namespace VariableSpeedCoils { varSpeedCoil.plantLoc.loopNum); varSpeedCoil.RatedWaterVolFlowRate = RatedWaterVolFlowRateDes; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Water Flow Rate [m3/s]", RatedWaterVolFlowRateDes); @@ -4627,14 +4741,16 @@ namespace VariableSpeedCoils { if (varSpeedCoil.MSRatedWaterVolFlowRate(Mode) > varSpeedCoil.MSRatedWaterVolFlowRate(Mode + 1) * 1.05) { ShowWarningError( state, - 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, - format("Instead, {:.2R} > {:.2R}", varSpeedCoil.MSRatedAirVolFlowRate(Mode), varSpeedCoil.MSRatedAirVolFlowRate(Mode + 1))); + 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)); + ShowContinueError(state, + EnergyPlus::format("Instead, {:.2R} > {:.2R}", + varSpeedCoil.MSRatedAirVolFlowRate(Mode), + varSpeedCoil.MSRatedAirVolFlowRate(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -4642,7 +4758,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.RatedWaterVolFlowRate > 0.0 && RatedWaterVolFlowRateDes > 0.0) { RatedWaterVolFlowRateUser = varSpeedCoil.RatedWaterVolFlowRate; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Water Flow Rate [m3/s]", RatedWaterVolFlowRateDes, @@ -4651,12 +4767,15 @@ namespace VariableSpeedCoils { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedWaterVolFlowRateDes - RatedWaterVolFlowRateUser) / RatedWaterVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", varSpeedCoil.CoolHeatType, CurrentObjSubfix)); - ShowContinueError(state, format("Coil Name = {}", varSpeedCoil.Name)); - ShowContinueError(state, format("User-Specified Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateUser)); - ShowContinueError(state, format("differs from Design Size Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateDes)); + ShowMessage(state, + EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -4702,15 +4821,17 @@ namespace VariableSpeedCoils { // equal to the flow rate at higher speed. Otherwise, a severe error is issued. for (Mode = 1; Mode <= varSpeedCoil.NumOfSpeeds - 1; ++Mode) { if (varSpeedCoil.MSRatedAirVolFlowRate(Mode) > varSpeedCoil.MSRatedAirVolFlowRate(Mode + 1)) { - ShowWarningError(state, - 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( + ShowWarningError( state, - format("Instead, {:.2R} > {:.2R}", varSpeedCoil.MSRatedAirVolFlowRate(Mode), varSpeedCoil.MSRatedAirVolFlowRate(Mode + 1))); + 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)); + ShowContinueError(state, + EnergyPlus::format("Instead, {:.2R} > {:.2R}", + varSpeedCoil.MSRatedAirVolFlowRate(Mode), + varSpeedCoil.MSRatedAirVolFlowRate(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -4718,14 +4839,16 @@ namespace VariableSpeedCoils { // Ensure capacity at lower speed must be lower or equal to the capacity at higher speed. for (Mode = 1; Mode <= varSpeedCoil.NumOfSpeeds - 1; ++Mode) { if (varSpeedCoil.MSRatedTotCap(Mode) > varSpeedCoil.MSRatedTotCap(Mode + 1)) { - ShowWarningError(state, - 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, format("Instead, {:.2R} > {:.2R}", 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)); + ShowContinueError( + state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", varSpeedCoil.MSRatedTotCap(Mode), varSpeedCoil.MSRatedTotCap(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -4866,7 +4989,7 @@ namespace VariableSpeedCoils { if (RatedCapCoolTotalAutoSized) { varSpeedCoil.RatedCapCoolSens = RatedCapCoolSensDes; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Sensible Cooling Capacity [W]", varSpeedCoil.RatedCapCoolSens); @@ -4876,7 +4999,7 @@ namespace VariableSpeedCoils { if (RatedCapCoolSensDes > 0.0) { varSpeedCoil.RatedCapCoolSens = RatedCapCoolSensDes; BaseSizer::reportSizerOutput(state, - format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Sensible Cooling Capacity [W]", RatedCapCoolSensDes); //, & @@ -4935,16 +5058,17 @@ namespace VariableSpeedCoils { if ((std::abs(EvapCondPumpElecNomPowerDes - EvapCondPumpElecNomPowerUser) / EvapCondPumpElecNomPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, format("Coil Name = {}", varSpeedCoil.Name)); + EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); ShowContinueError(state, - format("User-Specified Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", - EvapCondPumpElecNomPowerUser)); - ShowContinueError(state, - format("differs from Design Size Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", - EvapCondPumpElecNomPowerDes)); + EnergyPlus::format("User-Specified Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", + EvapCondPumpElecNomPowerUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", + EvapCondPumpElecNomPowerDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -4984,13 +5108,15 @@ namespace VariableSpeedCoils { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DefrostCapacityDes - DefrostCapacityUser) / DefrostCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, format("Coil Name = {}", varSpeedCoil.Name)); - ShowContinueError(state, format("User-Specified Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityUser)); - ShowContinueError(state, - format("differs from Design Size Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityDes)); + EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + ShowContinueError( + state, EnergyPlus::format("User-Specified Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -5003,46 +5129,48 @@ namespace VariableSpeedCoils { // test autosized sensible and total cooling capacity for total > sensible if (RatedCapCoolSensAutoSized && RatedCapCoolTotalAutoSized) { if (varSpeedCoil.RatedCapCoolSens > varSpeedCoil.RatedCapCoolTotal) { - ShowWarningError(state, - format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); - ShowContinueError(state, format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); + ShowWarningError( + state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); + ShowContinueError(state, EnergyPlus::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); ShowContinueError(state, "Each of these capacity inputs have been autosized."); - ShowContinueError(state, format("Rated Sensible Cooling Capacity = {:.2T} W", varSpeedCoil.RatedCapCoolSens)); - ShowContinueError(state, format("Rated Total Cooling Capacity = {:.2T} W", varSpeedCoil.RatedCapCoolTotal)); + 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, "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, format("Entering Air Dry-Bulb Temperature = {:.3T} C", MixTemp)); - ShowContinueError(state, format("Entering Air Wet-Bulb Temperature = {:.3T} C", MixWetBulb)); + 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, "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, format("ratioTDB = {:.3T}", ((MixTemp + 283.15) / 273.15))); - ShowContinueError(state, format("ratioTWB = {:.3T}", ((MixWetBulb + 283.15) / 273.15))); - ShowContinueError(state, format("ratioTS = {:.3T}", ((85.0 + 283.15) / 273.15))); + 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, "Rated Sensible Cooling Capacity = Rated Total Cooling Capacity * Sensible Heat Ratio"); - ShowContinueError(state, format("Total Cooling Capacity Modifier = {:.5T}", TotCapTempModFac)); + ShowContinueError(state, EnergyPlus::format("Total Cooling Capacity Modifier = {:.5T}", 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."); } } else if (RatedCapCoolTotalAutoSized) { if (varSpeedCoil.RatedCapCoolSens > varSpeedCoil.RatedCapCoolTotal) { - ShowWarningError(state, - format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); - ShowContinueError(state, format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); + ShowWarningError( + state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); + ShowContinueError(state, EnergyPlus::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, format("Rated Sensible Cooling Capacity = {:.2T} W", varSpeedCoil.RatedCapCoolSens)); - ShowContinueError(state, format("Rated Total Cooling Capacity = {:.2T} W", varSpeedCoil.RatedCapCoolTotal)); + 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, "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, format("Entering Air Wet-Bulb Temperature = {:.3T} C", MixWetBulb)); + ShowContinueError(state, EnergyPlus::format("Entering Air Wet-Bulb Temperature = {:.3T} 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, format("ratioTWB = {:.3T}", ((MixWetBulb + 283.15) / 273.15))); - ShowContinueError(state, format("ratioTS = {:.3T}", ((85.0 + 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, "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."); @@ -6671,9 +6799,9 @@ namespace VariableSpeedCoils { varSpeedCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - 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)); + 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)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -6687,10 +6815,11 @@ namespace VariableSpeedCoils { state.dataVariableSpeedCoils->HeatingCapacityMultiplier = 0.875 * (1.0 - state.dataVariableSpeedCoils->FractionalDefrostTime); state.dataVariableSpeedCoils->InputPowerMultiplier = 0.954 * (1.0 - state.dataVariableSpeedCoils->FractionalDefrostTime); if (varSpeedCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || varSpeedCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { - ShowWarningMessage(state, - 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)); + 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)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -6867,7 +6996,8 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilCapacityVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilCapacityVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CoilCapacity = -1000.0; } @@ -6902,7 +7032,8 @@ namespace VariableSpeedCoils { IndexNum = Util::FindItemInList(CoilName, state.dataVariableSpeedCoils->VarSpeedCoil); if (IndexNum == 0) { - ShowSevereError(state, format("GetCoilIndexVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilIndexVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -6957,7 +7088,8 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilAirFlowRateVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError( + state, EnergyPlus::format("GetCoilAirFlowRateVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CoilAirFlowRate = -1000.0; } @@ -6998,7 +7130,7 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetVSCoilPLFFPLR: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetVSCoilPLFFPLR: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; PLRNumber = 0; } @@ -7074,7 +7206,8 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilInletNodeVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilInletNodeVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -7115,7 +7248,8 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilOutletNodeVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError( + state, EnergyPlus::format("GetCoilOutletNodeVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -7153,7 +7287,7 @@ namespace VariableSpeedCoils { if (WhichCoil != 0) { CondNode = state.dataVariableSpeedCoils->VarSpeedCoil(WhichCoil).CondenserInletNodeNum; } else { - ShowSevereError(state, format("GetCoilCondenserInletNode: Invalid VS DX Coil, Type= VS DX Cooling Name=\"{}\"", CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilCondenserInletNode: Invalid VS DX Coil, Type= VS DX Cooling Name=\"{}\"", CoilName)); ErrorsFound = true; CondNode = 0; } @@ -7208,7 +7342,7 @@ namespace VariableSpeedCoils { if (WhichCoil != 0) { Speeds = state.dataVariableSpeedCoils->VarSpeedCoil(WhichCoil).NumOfSpeeds; } else { - ShowSevereError(state, format("GetVSCoilNumOfSpeeds: Invalid VS DX Coil, Type= VS DX Coil Name=\"{}\"", CoilName)); + ShowSevereError(state, EnergyPlus::format("GetVSCoilNumOfSpeeds: Invalid VS DX Coil, Type= VS DX Coil Name=\"{}\"", CoilName)); ErrorsFound = true; Speeds = 0; } @@ -7266,9 +7400,9 @@ namespace VariableSpeedCoils { if (WSHPNum <= 0 || WSHPNum > state.dataVariableSpeedCoils->NumVarSpeedCoils) { ShowSevereError(state, - format("SetVarSpeedCoilData: called with VS WSHP Coil Number out of range={} should be >0 and <{}", - WSHPNum, - state.dataVariableSpeedCoils->NumVarSpeedCoils)); + EnergyPlus::format("SetVarSpeedCoilData: called with VS WSHP Coil Number out of range={} should be >0 and <{}", + WSHPNum, + state.dataVariableSpeedCoils->NumVarSpeedCoils)); ErrorsFound = true; return; } @@ -7714,7 +7848,7 @@ namespace VariableSpeedCoils { if (WhichCoil != 0) { state.dataVariableSpeedCoils->VarSpeedCoil(WhichCoil).AirLoopNum = AirLoopNum; } else { - ShowSevereError(state, format("SetVarSpeedDXCoilAirLoopNumber: Could not find Coil \"Name=\"{}\"", CoilName)); + ShowSevereError(state, EnergyPlus::format("SetVarSpeedDXCoilAirLoopNumber: Could not find Coil \"Name=\"{}\"", CoilName)); } } diff --git a/src/EnergyPlus/VentilatedSlab.cc b/src/EnergyPlus/VentilatedSlab.cc index febfde9c299..aff369d38e7 100644 --- a/src/EnergyPlus/VentilatedSlab.cc +++ b/src/EnergyPlus/VentilatedSlab.cc @@ -152,25 +152,26 @@ namespace VentilatedSlab { if (CompIndex == 0) { Item = Util::FindItemInList(CompName, state.dataVentilatedSlab->VentSlab); if (Item == 0) { - ShowFatalError(state, format("SimVentilatedSlab: system not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimVentilatedSlab: system not found={}", CompName)); } CompIndex = Item; } else { Item = CompIndex; if (Item > state.dataVentilatedSlab->NumOfVentSlabs || Item < 1) { ShowFatalError(state, - format("SimVentilatedSlab: Invalid CompIndex passed={}, Number of Systems={}, Entered System name={}", - Item, - state.dataVentilatedSlab->NumOfVentSlabs, - CompName)); + EnergyPlus::format("SimVentilatedSlab: Invalid CompIndex passed={}, Number of Systems={}, Entered System name={}", + Item, + state.dataVentilatedSlab->NumOfVentSlabs, + CompName)); } if (state.dataVentilatedSlab->CheckEquipName(Item)) { if (CompName != state.dataVentilatedSlab->VentSlab(Item).Name) { - ShowFatalError(state, - format("SimVentilatedSlab: Invalid CompIndex passed={}, System name={}, stored System Name for that index={}", - Item, - CompName, - state.dataVentilatedSlab->VentSlab(Item).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimVentilatedSlab: Invalid CompIndex passed={}, System name={}, stored System Name for that index={}", + Item, + CompName, + state.dataVentilatedSlab->VentSlab(Item).Name)); } state.dataVentilatedSlab->CheckEquipName(Item) = false; } @@ -316,14 +317,16 @@ namespace VentilatedSlab { if (ventSlab.ZonePtr == 0) { if (lAlphaBlanks(3)) { ShowSevereError( - state, format(R"({}="{}" invalid {} is required but input is blank.)", CurrentModuleObject, ventSlab.Name, cAlphaFields(3))); + state, + EnergyPlus::format( + R"({}="{}" invalid {} is required but input is blank.)", CurrentModuleObject, ventSlab.Name, cAlphaFields(3))); } else { ShowSevereError(state, - format(R"({}="{}" invalid {}="{}" not found.)", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(3), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::format(R"({}="{}" invalid {}="{}" not found.)", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(3), + state.dataIPShortCut->cAlphaArgs(3))); } ErrorsFound = true; } @@ -374,18 +377,18 @@ namespace VentilatedSlab { // Error checking for single surfaces if (ventSlab.SurfacePtr(1) == 0) { ShowSevereError(state, - format(R"({}="{}" invalid {}="{}" not found.)", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(4), - state.dataIPShortCut->cAlphaArgs(4))); + EnergyPlus::format(R"({}="{}" invalid {}="{}" not found.)", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(4), + state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } else if (state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(ventSlab.SurfacePtr(1))) { - ShowSevereError(state, format("{}=\"{}\", invalid Surface", CurrentModuleObject, ventSlab.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid Surface", CurrentModuleObject, ventSlab.Name)); ShowContinueError(state, - format("{}=\"{}\" has been used in another radiant system or ventilated slab.", - cAlphaFields(4), - state.dataIPShortCut->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" has been used in another radiant system or ventilated slab.", + cAlphaFields(4), + state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } if (ventSlab.SurfacePtr(1) != 0) { @@ -413,12 +416,13 @@ namespace VentilatedSlab { } if (!thisConstruct.SourceSinkPresent) { ShowSevereError(state, - format("{}=\"{}\" invalid surface=\"{}\".", - CurrentModuleObject, - ventSlab.Name, - state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Name)); - ShowContinueError(state, - format("Surface Construction does not have a source/sink, Construction name= \"{}\".", thisConstruct.Name)); + EnergyPlus::format("{}=\"{}\" invalid surface=\"{}\".", + CurrentModuleObject, + ventSlab.Name, + state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Name)); + ShowContinueError( + state, + EnergyPlus::format("Surface Construction does not have a source/sink, Construction name= \"{}\".", thisConstruct.Name)); ErrorsFound = true; } } @@ -434,15 +438,16 @@ namespace VentilatedSlab { } if (state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Zone != ventSlab.ZonePtr) { ShowSevereError(state, - format("{}=\"{}\" invalid surface=\"{}\".", + EnergyPlus::format("{}=\"{}\" invalid surface=\"{}\".", + CurrentModuleObject, + ventSlab.Name, + state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Name)); + ShowContinueError( + state, + EnergyPlus::format("Surface in Zone={} {} in Zone={}", + state.dataHeatBal->Zone(state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Zone).Name, CurrentModuleObject, - ventSlab.Name, - state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Name)); - ShowContinueError(state, - format("Surface in Zone={} {} in Zone={}", - state.dataHeatBal->Zone(state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Zone).Name, - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(3))); + state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; } if (state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Construction == 0) { @@ -450,12 +455,13 @@ namespace VentilatedSlab { } if (!thisConstruct.SourceSinkPresent) { ShowSevereError(state, - format("{}=\"{}\" invalid surface=\"{}\".", - CurrentModuleObject, - ventSlab.Name, - state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Name)); - ShowContinueError(state, - format("Surface Construction does not have a source/sink, Construction name= \"{}\".", thisConstruct.Name)); + EnergyPlus::format("{}=\"{}\" invalid surface=\"{}\".", + CurrentModuleObject, + ventSlab.Name, + state.dataSurface->Surface(ventSlab.SurfacePtr(SurfNum)).Name)); + ShowContinueError( + state, + EnergyPlus::format("Surface Construction does not have a source/sink, Construction name= \"{}\".", thisConstruct.Name)); ErrorsFound = true; } } @@ -511,7 +517,8 @@ namespace VentilatedSlab { default: { ShowSevereError( state, - format(R"({}="{}" invalid {}="{}".)", CurrentModuleObject, ventSlab.Name, cAlphaFields(5), state.dataIPShortCut->cAlphaArgs(5))); + EnergyPlus::format( + R"({}="{}" invalid {}="{}".)", CurrentModuleObject, ventSlab.Name, cAlphaFields(5), state.dataIPShortCut->cAlphaArgs(5))); } break; } // switch (outsideAirControlType) @@ -536,9 +543,9 @@ namespace VentilatedSlab { if (Util::SameString(state.dataIPShortCut->cAlphaArgs(8), "SurfaceListNames")) { if (!lNumericBlanks(4)) { ShowWarningError(state, - format("{}=\"{}\" Core Diameter is not needed for the series slabs configuration- ignored.", - CurrentModuleObject, - ventSlab.Name)); + EnergyPlus::format("{}=\"{}\" Core Diameter is not needed for the series slabs configuration- ignored.", + CurrentModuleObject, + ventSlab.Name)); ShowContinueError(state, "...It has been assigned on SlabGroup."); } } @@ -546,9 +553,9 @@ namespace VentilatedSlab { if (Util::SameString(state.dataIPShortCut->cAlphaArgs(8), "SurfaceListNames")) { if (!lNumericBlanks(5)) { ShowWarningError(state, - format("{}=\"{}\" Core Length is not needed for the series slabs configuration- ignored.", - CurrentModuleObject, - ventSlab.Name)); + EnergyPlus::format("{}=\"{}\" Core Length is not needed for the series slabs configuration- ignored.", + CurrentModuleObject, + ventSlab.Name)); ShowContinueError(state, "...It has been assigned on SlabGroup."); } } @@ -556,9 +563,9 @@ namespace VentilatedSlab { if (Util::SameString(state.dataIPShortCut->cAlphaArgs(8), "SurfaceListNames")) { if (!lNumericBlanks(6)) { ShowWarningError(state, - format("{}=\"{}\" Core Numbers is not needed for the series slabs configuration- ignored.", - CurrentModuleObject, - ventSlab.Name)); + EnergyPlus::format("{}=\"{}\" Core Numbers is not needed for the series slabs configuration- ignored.", + CurrentModuleObject, + ventSlab.Name)); ShowContinueError(state, "...It has been assigned on SlabGroup."); } } @@ -569,7 +576,8 @@ namespace VentilatedSlab { if (ventSlab.controlType == ControlType::Invalid) { ShowSevereError( state, - format(R"({}="{}" invalid {}="{}".)", CurrentModuleObject, ventSlab.Name, cAlphaFields(9), state.dataIPShortCut->cAlphaArgs(9))); + EnergyPlus::format( + R"({}="{}" invalid {}="{}".)", CurrentModuleObject, ventSlab.Name, cAlphaFields(9), state.dataIPShortCut->cAlphaArgs(9))); ShowContinueError(state, "Control reset to ODB control."); ventSlab.controlType = ControlType::OutdoorDryBulbTemp; } @@ -823,18 +831,19 @@ namespace VentilatedSlab { if (ventSlab.SysConfg == VentilatedSlabConfig::SlabOnly) { if (!lAlphaBlanks(20)) { ShowWarningError(state, - format("{}=\"{}\" {}=\"{}\" not needed - ignored.", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(20), - state.dataIPShortCut->cAlphaArgs(20))); + EnergyPlus::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, format("{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(20))); + ShowSevereError(state, + EnergyPlus::format( + "{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(20))); ErrorsFound = true; } @@ -875,7 +884,8 @@ namespace VentilatedSlab { if (!IsValid) { ShowWarningError( state, - format("{}=\"{}\", Adding OutdoorAir:Node={}", CurrentModuleObject, ventSlab.Name, state.dataIPShortCut->cAlphaArgs(21))); + EnergyPlus::format( + "{}=\"{}\", Adding OutdoorAir:Node={}", CurrentModuleObject, ventSlab.Name, state.dataIPShortCut->cAlphaArgs(21))); } } @@ -900,9 +910,9 @@ namespace VentilatedSlab { if (ventSlab.fanType != HVAC::FanType::Constant && ventSlab.fanType != HVAC::FanType::SystemModel) { ShowSevereCustom(state, eoh, - format("Only fans of type Fan:ConstantVolume and Fan:SystemModel are supported. {} is of type {}", - ventSlab.FanName, - HVAC::fanTypeNames[(int)ventSlab.fanType])); + EnergyPlus::format("Only fans of type Fan:ConstantVolume and Fan:SystemModel are supported. {} is of type {}", + ventSlab.FanName, + HVAC::fanTypeNames[(int)ventSlab.fanType])); ErrorsFound = true; } } @@ -927,7 +937,7 @@ namespace VentilatedSlab { if (ventSlab.coilOption == CoilType::Invalid) { ShowSevereError( state, - format( + EnergyPlus::format( R"({}="{}" invalid {}="{}".)", CurrentModuleObject, ventSlab.Name, cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); ErrorsFound = true; } @@ -963,7 +973,7 @@ namespace VentilatedSlab { ventSlab.heatingCoilType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; ventSlab.heatingCoil_fluid = Fluid::GetSteam(state); if (ventSlab.heatingCoil_fluid == nullptr) { - ShowSevereError(state, format("{}=\"{}Steam Properties not found.", CurrentModuleObject, ventSlab.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}Steam Properties not found.", CurrentModuleObject, ventSlab.Name)); if (SteamMessageNeeded) { ShowContinueError(state, "Steam Fluid Properties should have been included in the input file."); } @@ -977,11 +987,11 @@ namespace VentilatedSlab { break; default: { ShowSevereError(state, - format(R"({}="{}" invalid {}="{}".)", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(27), - state.dataIPShortCut->cAlphaArgs(27))); + EnergyPlus::format(R"({}="{}" invalid {}="{}".)", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(27), + state.dataIPShortCut->cAlphaArgs(27))); ErrorsFound = true; errFlag = true; break; @@ -992,12 +1002,13 @@ namespace VentilatedSlab { ValidateComponent(state, state.dataIPShortCut->cAlphaArgs(27), ventSlab.heatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { ShowContinueError(state, - format("{}=\"{}\" invalid {}=\"{}\".", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(28), - state.dataIPShortCut->cAlphaArgs(28))); - ShowContinueError(state, format("... not valid for {}=\"{}\".", cAlphaFields(27), state.dataIPShortCut->cAlphaArgs(27))); + 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))); ErrorsFound = true; } } @@ -1010,18 +1021,19 @@ namespace VentilatedSlab { if (ventSlab.hCoilType == HeatingCoilType::Gas || ventSlab.hCoilType == HeatingCoilType::Electric) { if (!lAlphaBlanks(29)) { ShowWarningError(state, - format("{}=\"{}\" {}=\"{}\" not needed - ignored.", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(29), - state.dataIPShortCut->cAlphaArgs(29))); + EnergyPlus::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, - format("{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(29))); + EnergyPlus::format( + "{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(29))); ErrorsFound = true; } ventSlab.HotControlNode = NodeInputManager::GetOnlySingleNode(state, @@ -1045,9 +1057,10 @@ namespace VentilatedSlab { } } else { // no heating coil - ShowSevereError(state, format("{}=\"{}\" missing heating coil.", CurrentModuleObject, ventSlab.Name)); - ShowContinueError(state, - format("a heating coil is required for {}=\"{}\".", cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" missing heating coil.", CurrentModuleObject, ventSlab.Name)); + ShowContinueError( + state, + EnergyPlus::format("a heating coil is required for {}=\"{}\".", cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); ErrorsFound = true; } } @@ -1093,10 +1106,12 @@ namespace VentilatedSlab { } else if (Util::SameString(ventSlab.coolingCoilPlantType, "Coil:Cooling:Water:DetailedGeometry")) { ventSlab.coolingCoilType = DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling; } else { - ShowSevereError(state, format("GetVentilatedSlabInput: {}=\"{}\", invalid", CurrentModuleObject, ventSlab.Name)); - ShowContinueError(state, format("For: {}=\"{}\".", cAlphaFields(30), state.dataIPShortCut->cAlphaArgs(30))); - ShowContinueError(state, - format("Invalid Coil Type={}, Name={}", ventSlab.coolingCoilPlantType, ventSlab.coolingCoilPlantName)); + ShowSevereError(state, + EnergyPlus::format("GetVentilatedSlabInput: {}=\"{}\", invalid", CurrentModuleObject, ventSlab.Name)); + ShowContinueError(state, EnergyPlus::format("For: {}=\"{}\".", cAlphaFields(30), state.dataIPShortCut->cAlphaArgs(30))); + ShowContinueError( + state, + EnergyPlus::format("Invalid Coil Type={}, Name={}", ventSlab.coolingCoilPlantType, ventSlab.coolingCoilPlantName)); ShowContinueError(state, R"(must be "Coil:Cooling:Water" or "Coil:Cooling:Water:DetailedGeometry")"); ErrorsFound = true; } @@ -1104,11 +1119,11 @@ namespace VentilatedSlab { } default: { ShowSevereError(state, - format(R"({}="{}" invalid {}="{}".)", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(29), - state.dataIPShortCut->cAlphaArgs(29))); + EnergyPlus::format(R"({}="{}" invalid {}="{}".)", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(29), + state.dataIPShortCut->cAlphaArgs(29))); ErrorsFound = true; errFlag = true; break; @@ -1120,12 +1135,13 @@ namespace VentilatedSlab { ValidateComponent(state, state.dataIPShortCut->cAlphaArgs(30), ventSlab.coolingCoilName, IsNotOK, "ZoneHVAC:VentilatedSlab "); if (IsNotOK) { ShowContinueError(state, - format("{}=\"{}\" invalid {}=\"{}\".", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(31), - state.dataIPShortCut->cAlphaArgs(31))); - ShowContinueError(state, format("... not valid for {}=\"{}\".", cAlphaFields(30), state.dataIPShortCut->cAlphaArgs(30))); + 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))); ErrorsFound = true; } } @@ -1145,7 +1161,8 @@ namespace VentilatedSlab { if (lAlphaBlanks(32)) { ShowSevereError( state, - format("{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(32))); + EnergyPlus::format( + "{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(32))); ErrorsFound = true; } @@ -1162,9 +1179,10 @@ namespace VentilatedSlab { } } else { // No Cooling Coil - ShowSevereError(state, format("{}=\"{}\" missing cooling coil.", CurrentModuleObject, ventSlab.Name)); - ShowContinueError(state, - format("a cooling coil is required for {}=\"{}\".", cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\" missing cooling coil.", CurrentModuleObject, ventSlab.Name)); + ShowContinueError( + state, + EnergyPlus::format("a cooling coil is required for {}=\"{}\".", cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); ErrorsFound = true; } } @@ -1173,8 +1191,8 @@ namespace VentilatedSlab { if (!lAlphaBlanks(34)) { ventSlab.HVACSizingIndex = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(34), state.dataSize->ZoneHVACSizing); if (ventSlab.HVACSizingIndex == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(34), state.dataIPShortCut->cAlphaArgs(34))); - ShowContinueError(state, format("Occurs in {} = {}", cMO_VentilatedSlab, ventSlab.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(34), state.dataIPShortCut->cAlphaArgs(34))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cMO_VentilatedSlab, ventSlab.Name)); ErrorsFound = true; } } @@ -1237,7 +1255,7 @@ namespace VentilatedSlab { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); } // Setup Report variables for the VENTILATED SLAB @@ -1470,7 +1488,7 @@ namespace VentilatedSlab { PlantUtilities::ScanPlantLoopsForObject( state, ventSlab.heatingCoilName, ventSlab.heatingCoilType, ventSlab.HWPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, format("Reference Unit=\"{}\", type=ZoneHVAC:VentilatedSlab", ventSlab.Name)); + ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type=ZoneHVAC:VentilatedSlab", ventSlab.Name)); ShowFatalError(state, "InitVentilatedSlab: Program terminated due to previous condition(s)."); } @@ -1481,13 +1499,14 @@ namespace VentilatedSlab { bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(state, ventSlab.coolingCoilPlantName, ventSlab.coolingCoilType, ventSlab.CWPlantLoc, errFlag); if (errFlag) { - ShowContinueError(state, format("Reference Unit=\"{}\", type=ZoneHVAC:VentilatedSlab", ventSlab.Name)); + ShowContinueError(state, EnergyPlus::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, format("InitVentilatedSlab: Unit={}, invalid cooling coil type. Program terminated.", ventSlab.Name)); + ShowFatalError(state, + EnergyPlus::format("InitVentilatedSlab: Unit={}, invalid cooling coil type. Program terminated.", ventSlab.Name)); } } state.dataVentilatedSlab->MyPlantScanFlag(Item) = false; @@ -1504,9 +1523,10 @@ namespace VentilatedSlab { } ShowSevereError( state, - format("InitVentilatedSlab: Ventilated Slab Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - cMO_VentilatedSlab, - state.dataVentilatedSlab->VentSlab(RadNum).Name)); + EnergyPlus::format( + "InitVentilatedSlab: Ventilated Slab Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + cMO_VentilatedSlab, + state.dataVentilatedSlab->VentSlab(RadNum).Name)); } } @@ -1550,8 +1570,9 @@ namespace VentilatedSlab { if (ventSlab.OutAirMassFlow > ventSlab.MaxAirMassFlow) { ventSlab.OutAirMassFlow = ventSlab.MaxAirMassFlow; ventSlab.MinOutAirMassFlow = ventSlab.OutAirMassFlow * (ventSlab.MinOutAirVolFlow / ventSlab.OutAirVolFlow); - ShowWarningError(state, - format("Outdoor air mass flow rate higher than unit flow rate, reset to unit flow rate for {}", ventSlab.Name)); + ShowWarningError( + state, + EnergyPlus::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 @@ -1906,11 +1927,14 @@ namespace VentilatedSlab { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(OutAirVolFlowDes - OutAirVolFlowUser) / OutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", - ventSlab.Name)); - ShowContinueError(state, format("User-Specified Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); + EnergyPlus::format( + "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ventSlab.Name)); ShowContinueError( - state, format("differs from Design Size Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowDes)); + state, EnergyPlus::format("User-Specified Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1954,12 +1978,14 @@ namespace VentilatedSlab { if ((std::abs(MinOutAirVolFlowDes - MinOutAirVolFlowUser) / MinOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", - ventSlab.Name)); - ShowContinueError(state, - format("User-Specified Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", MinOutAirVolFlowUser)); + EnergyPlus::format( + "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ventSlab.Name)); ShowContinueError( - state, format("differs from Design Size Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", MinOutAirVolFlowDes)); + state, EnergyPlus::format("User-Specified Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", MinOutAirVolFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", + MinOutAirVolFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2001,7 +2027,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, format("Occurs in {} Object={}", cMO_VentilatedSlab, ventSlab.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", cMO_VentilatedSlab, ventSlab.Name)); ErrorsFound = true; } } @@ -2077,14 +2103,15 @@ namespace VentilatedSlab { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", - ventSlab.Name)); - ShowContinueError(state, - format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + ShowMessage(state, + EnergyPlus::format( + "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ventSlab.Name)); ShowContinueError( - state, format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowDes)); + state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Maximum Hot Water Flow of {:.5R} [m3/s]", + MaxVolHotWaterFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2181,7 +2208,7 @@ namespace VentilatedSlab { } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, format("Occurs in ZoneHVAC:VentilatedSlab Object={}", ventSlab.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in ZoneHVAC:VentilatedSlab Object={}", ventSlab.Name)); ErrorsFound = true; } ventSlab.MaxVolHotSteamFlow = MaxVolHotSteamFlowDes; @@ -2200,13 +2227,15 @@ namespace VentilatedSlab { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser) / MaxVolHotSteamFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( + ShowMessage(state, + EnergyPlus::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)); + ShowContinueError( state, - format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", - ventSlab.Name)); - ShowContinueError(state, format("User-Specified Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowUser)); - ShowContinueError(state, - format("differs from Design Size Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowDes)); + EnergyPlus::format("differs from Design Size Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2257,7 +2286,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, format("Occurs in {} Object={}", cMO_VentilatedSlab, ventSlab.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", cMO_VentilatedSlab, ventSlab.Name)); ErrorsFound = true; } } @@ -2333,11 +2362,14 @@ namespace VentilatedSlab { if ((std::abs(MaxVolColdWaterFlowDes - MaxVolColdWaterFlowUser) / MaxVolColdWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", - ventSlab.Name)); - ShowContinueError(state, format("User-Specified Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); + EnergyPlus::format( + "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ventSlab.Name)); ShowContinueError( - state, format("differs from Design Size Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowDes)); + state, EnergyPlus::format("User-Specified Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2616,7 +2648,7 @@ namespace VentilatedSlab { } default: { // Should never get here SetPointTemp = 0.0; // Suppress uninitialized warning - ShowSevereError(state, format("Illegal control type in low temperature radiant system: {}", ventSlab.Name)); + ShowSevereError(state, EnergyPlus::format("Illegal control type in low temperature radiant system: {}", ventSlab.Name)); ShowFatalError(state, "Preceding condition causes termination."); } break; } // switch (ctrlType) @@ -2703,7 +2735,7 @@ namespace VentilatedSlab { SetPointTempHi = ventSlab.hotCtrlHiTempSched->getCurrentVal(); SetPointTempLo = ventSlab.hotCtrlLoTempSched->getCurrentVal(); if (SetPointTempHi < SetPointTempLo) { - ShowSevereError(state, format("Heating setpoint temperature mismatch in{}", ventSlab.Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -2712,7 +2744,7 @@ namespace VentilatedSlab { AirTempLo = ventSlab.hotAirLoTempSched->getCurrentVal(); if (AirTempHi < AirTempLo) { - ShowSevereError(state, format("Heating Air temperature mismatch in{}", ventSlab.Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -2837,7 +2869,8 @@ namespace VentilatedSlab { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, format("Ventilated Slab simulation control: illogical condition for {}", ventSlab.Name)); + ShowFatalError(state, + EnergyPlus::format("Ventilated Slab simulation control: illogical condition for {}", ventSlab.Name)); } break; } @@ -2906,7 +2939,8 @@ namespace VentilatedSlab { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, format("Ventilated Slab simulation control: illogical condition for {}", ventSlab.Name)); + ShowFatalError(state, + EnergyPlus::format("Ventilated Slab simulation control: illogical condition for {}", ventSlab.Name)); } break; } @@ -2967,7 +3001,7 @@ namespace VentilatedSlab { SetPointTempHi = ventSlab.coldCtrlHiTempSched->getCurrentVal(); SetPointTempLo = ventSlab.coldCtrlLoTempSched->getCurrentVal(); if (SetPointTempHi < SetPointTempLo) { - ShowSevereError(state, format("Cooling setpoint temperature mismatch in{}", ventSlab.Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -2975,7 +3009,7 @@ namespace VentilatedSlab { AirTempHi = ventSlab.coldAirHiTempSched->getCurrentVal(); AirTempLo = ventSlab.coldAirLoTempSched->getCurrentVal(); if (AirTempHi < AirTempLo) { - ShowSevereError(state, format("Cooling Air temperature mismatch in{}", ventSlab.Name)); + ShowSevereError(state, EnergyPlus::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."); } @@ -3093,7 +3127,8 @@ namespace VentilatedSlab { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, format("{} simulation control: illogical condition for {}", cMO_VentilatedSlab, ventSlab.Name)); + ShowFatalError( + state, EnergyPlus::format("{} simulation control: illogical condition for {}", cMO_VentilatedSlab, ventSlab.Name)); } break; } @@ -3166,7 +3201,8 @@ namespace VentilatedSlab { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, format("{} simulation control: illogical condition for {}", cMO_VentilatedSlab, ventSlab.Name)); + ShowFatalError( + state, EnergyPlus::format("{} simulation control: illogical condition for {}", cMO_VentilatedSlab, ventSlab.Name)); } break; } @@ -3670,22 +3706,26 @@ namespace VentilatedSlab { ++state.dataVentilatedSlab->CondensationErrorCount; if (ventSlab.CondErrIndex == 0) { - ShowWarningMessage(state, format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); ShowContinueError( state, - format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - state.dataSurface->Surface(ventSlab.SurfacePtr(RadSurfNum2)).Name)); + EnergyPlus::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, - format("Predicted radiant system surface temperature = {:.2R}", - state.dataHeatBalSurf->SurfInsideTempHist(1)(ventSlab.SurfacePtr(RadSurfNum2)))); ShowContinueError( - state, format("Zone dew-point temperature + safety factor delta= {:.2R}", DewPointTemp + CondDeltaTemp)); + state, + EnergyPlus::format("Predicted radiant system surface temperature = {:.2R}", + state.dataHeatBalSurf->SurfInsideTempHist(1)(ventSlab.SurfacePtr(RadSurfNum2)))); + ShowContinueError(state, + EnergyPlus::format("Zone dew-point temperature + safety factor delta= {:.2R}", + DewPointTemp + CondDeltaTemp)); ShowContinueErrorTimeStamp(state, ""); } if (state.dataVentilatedSlab->CondensationErrorCount == 1) { - ShowContinueError( - state, format("Note that there is a {:.4R} C safety built-in to the shut-off criteria", CondDeltaTemp)); + ShowContinueError(state, + EnergyPlus::format("Note that there is a {:.4R} C safety built-in to the shut-off criteria", + CondDeltaTemp)); ShowContinueError(state, "Note also that this affects all surfaces that are part of this system"); } ShowRecurringWarningErrorAtEnd(state, @@ -3726,21 +3766,23 @@ namespace VentilatedSlab { if (!state.dataGlobal->WarmupFlag) { ++state.dataVentilatedSlab->EnergyImbalanceErrorCount; if (ventSlab.EnrgyImbalErrIndex == 0) { - ShowWarningMessage(state, format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, EnergyPlus::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"); ShowContinueError(state, "illogical control temperatures. Check your input for this ventilated slab and"); ShowContinueError(state, "also look at the internal data shown below."); - ShowContinueError(state, - format("Predicted return air temperature [C] from the overall energy balance = {:.4R}", - state.dataLoopNodes->Node(ReturnAirNode).Temp)); - ShowContinueError(state, - format("Predicted return air temperature [C] from the slab section energy balances = {:.4R}", - AirOutletTempCheck)); - ShowContinueError(state, - format("Total energy rate (power) [W] added to the slab = {:.4R}", TotalVentSlabRadPower)); + ShowContinueError( + state, + EnergyPlus::format("Predicted return air temperature [C] from the overall energy balance = {:.4R}", + state.dataLoopNodes->Node(ReturnAirNode).Temp)); + ShowContinueError( + state, + EnergyPlus::format("Predicted return air temperature [C] from the slab section energy balances = {:.4R}", + AirOutletTempCheck)); + ShowContinueError( + state, EnergyPlus::format("Total energy rate (power) [W] added to the slab = {:.4R}", TotalVentSlabRadPower)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -3764,21 +3806,23 @@ namespace VentilatedSlab { if (!state.dataGlobal->WarmupFlag) { ++state.dataVentilatedSlab->EnergyImbalanceErrorCount; if (ventSlab.EnrgyImbalErrIndex == 0) { - ShowWarningMessage(state, format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, EnergyPlus::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"); ShowContinueError(state, "illogical control temperatures. Check your input for this ventilated slab and"); ShowContinueError(state, "also look at the internal data shown below."); - ShowContinueError(state, - format("Predicted return air temperature [C] from the overall energy balance = {:.4R}", - state.dataLoopNodes->Node(ReturnAirNode).Temp)); - ShowContinueError(state, - format("Predicted return air temperature [C] from the slab section energy balances = {:.4R}", - AirOutletTempCheck)); - ShowContinueError(state, - format("Total energy rate (power) [W] added to the slab = {:.4R}", TotalVentSlabRadPower)); + ShowContinueError( + state, + EnergyPlus::format("Predicted return air temperature [C] from the overall energy balance = {:.4R}", + state.dataLoopNodes->Node(ReturnAirNode).Temp)); + ShowContinueError( + state, + EnergyPlus::format("Predicted return air temperature [C] from the slab section energy balances = {:.4R}", + AirOutletTempCheck)); + ShowContinueError( + state, EnergyPlus::format("Total energy rate (power) [W] added to the slab = {:.4R}", TotalVentSlabRadPower)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -3927,22 +3971,26 @@ namespace VentilatedSlab { if (!state.dataGlobal->WarmupFlag) { ++state.dataVentilatedSlab->CondensationErrorCount; if (ventSlab.CondErrIndex == 0) { - ShowWarningMessage(state, format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); ShowContinueError( state, - format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - state.dataSurface->Surface(ventSlab.SurfacePtr(RadSurfNum2)).Name)); + EnergyPlus::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, - format("Predicted radiant system surface temperature = {:.2R}", - state.dataHeatBalSurf->SurfInsideTempHist(1)(ventSlab.SurfacePtr(RadSurfNum2)))); ShowContinueError( - state, format("Zone dew-point temperature + safety factor delta= {:.2R}", DewPointTemp + CondDeltaTemp)); + state, + EnergyPlus::format("Predicted radiant system surface temperature = {:.2R}", + state.dataHeatBalSurf->SurfInsideTempHist(1)(ventSlab.SurfacePtr(RadSurfNum2)))); + ShowContinueError(state, + EnergyPlus::format("Zone dew-point temperature + safety factor delta= {:.2R}", + DewPointTemp + CondDeltaTemp)); ShowContinueErrorTimeStamp(state, ""); } if (state.dataVentilatedSlab->CondensationErrorCount == 1) { - ShowContinueError( - state, format("Note that there is a {:.4R} C safety built-in to the shut-off criteria", CondDeltaTemp)); + ShowContinueError(state, + EnergyPlus::format("Note that there is a {:.4R} C safety built-in to the shut-off criteria", + CondDeltaTemp)); ShowContinueError(state, "Note also that this affects all surfaces that are part of this system"); } ShowRecurringWarningErrorAtEnd(state, @@ -4029,19 +4077,21 @@ namespace VentilatedSlab { if (!state.dataGlobal->WarmupFlag) { ++state.dataVentilatedSlab->EnergyImbalanceErrorCount; if (ventSlab.EnrgyImbalErrIndex == 0) { - ShowWarningMessage(state, format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, EnergyPlus::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"); ShowContinueError(state, "illogical control temperatures. Check your input for this ventilated slab and"); ShowContinueError(state, "also look at the internal data shown below."); ShowContinueError(state, - format("Predicted return air temperature [C] from the overall energy balance = {:.4R}", - state.dataLoopNodes->Node(ReturnAirNode).Temp)); - ShowContinueError(state, - format("Predicted return air temperature [C] from the slab section energy balances = {:.4R}", - AirOutletTempCheck)); - ShowContinueError(state, format("Total energy rate (power) [W] added to the slab = {:.4R}", TotalVentSlabRadPower)); + EnergyPlus::format("Predicted return air temperature [C] from the overall energy balance = {:.4R}", + state.dataLoopNodes->Node(ReturnAirNode).Temp)); + ShowContinueError( + state, + EnergyPlus::format("Predicted return air temperature [C] from the slab section energy balances = {:.4R}", + AirOutletTempCheck)); + ShowContinueError( + state, EnergyPlus::format("Total energy rate (power) [W] added to the slab = {:.4R}", TotalVentSlabRadPower)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, diff --git a/src/EnergyPlus/WaterCoils.cc b/src/EnergyPlus/WaterCoils.cc index 10f6e4598c9..285282bfca9 100644 --- a/src/EnergyPlus/WaterCoils.cc +++ b/src/EnergyPlus/WaterCoils.cc @@ -163,26 +163,27 @@ void SimulateWaterCoilComponents(EnergyPlusData &state, if (CompIndex == 0) { CoilNum = Util::FindItemInList(CompName, state.dataWaterCoils->WaterCoil); if (CoilNum == 0) { - ShowFatalError(state, format("SimulateWaterCoilComponents: Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimulateWaterCoilComponents: Coil not found={}", CompName)); } CompIndex = CoilNum; } else { CoilNum = CompIndex; if (CoilNum > state.dataWaterCoils->NumWaterCoils || CoilNum < 1) { ShowFatalError(state, - format("SimulateWaterCoilComponents: Invalid CompIndex passed={}, Number of Water Coils={}, Coil name={}", - CoilNum, - state.dataWaterCoils->NumWaterCoils, - CompName)); + EnergyPlus::format("SimulateWaterCoilComponents: Invalid CompIndex passed={}, Number of Water Coils={}, Coil name={}", + CoilNum, + state.dataWaterCoils->NumWaterCoils, + CompName)); } if (state.dataWaterCoils->CheckEquipName(CoilNum)) { auto const &waterCoil = state.dataWaterCoils->WaterCoil(CoilNum); if (CompName != waterCoil.Name) { - ShowFatalError(state, - format("SimulateWaterCoilComponents: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CompName, - waterCoil.Name)); + ShowFatalError( + state, + EnergyPlus::format("SimulateWaterCoilComponents: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CompName, + waterCoil.Name)); } state.dataWaterCoils->CheckEquipName(CoilNum) = false; } @@ -421,18 +422,18 @@ void GetWaterCoilInput(EnergyPlusData &state) waterCoil.UseDesignWaterDeltaTemp = false; } if (waterCoil.DesInletWaterTemp <= waterCoil.DesOutletWaterTemp) { - ShowSevereError(state, format("For {}, {}", CurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format(" the {} must be greater than the {}.", cNumericFields(4), cNumericFields(6))); + ShowSevereError(state, EnergyPlus::format("For {}, {}", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format(" the {} must be greater than the {}.", cNumericFields(4), cNumericFields(6))); ErrorsFound = true; } if (waterCoil.DesInletAirTemp >= waterCoil.DesOutletAirTemp) { - ShowSevereError(state, format("For {}, {}", CurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format(" the {} must be less than the {}.", cNumericFields(5), cNumericFields(7))); + ShowSevereError(state, EnergyPlus::format("For {}, {}", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format(" the {} must be less than the {}.", cNumericFields(5), cNumericFields(7))); ErrorsFound = true; } if (waterCoil.DesInletAirTemp >= waterCoil.DesInletWaterTemp) { - ShowSevereError(state, format("For {}, {}", CurrentModuleObject, AlphArray(1))); - ShowContinueError(state, format(" the {} must be less than the {}.", cNumericFields(5), cNumericFields(4))); + ShowSevereError(state, EnergyPlus::format("For {}, {}", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format(" the {} must be less than the {}.", cNumericFields(5), cNumericFields(4))); ErrorsFound = true; } @@ -550,22 +551,25 @@ void GetWaterCoilInput(EnergyPlusData &state) } waterCoil.FinThickness = NumArray(8); if (waterCoil.FinThickness <= 0.0) { - ShowSevereError(state, - format("{}: {} must be > 0.0, for {} = {}", CurrentModuleObject, cNumericFields(8), cAlphaFields(1), waterCoil.Name)); + ShowSevereError( + state, + EnergyPlus::format("{}: {} must be > 0.0, for {} = {}", CurrentModuleObject, cNumericFields(8), cAlphaFields(1), waterCoil.Name)); ErrorsFound = true; } waterCoil.TubeInsideDiam = NumArray(9); waterCoil.TubeOutsideDiam = NumArray(10); waterCoil.TubeThermConductivity = NumArray(11); if (waterCoil.TubeThermConductivity <= 0.0) { - ShowSevereError(state, - format("{}: {} must be > 0.0, for {} = {}", CurrentModuleObject, cNumericFields(11), cAlphaFields(1), waterCoil.Name)); + ShowSevereError( + state, + EnergyPlus::format("{}: {} must be > 0.0, for {} = {}", CurrentModuleObject, cNumericFields(11), cAlphaFields(1), waterCoil.Name)); ErrorsFound = true; } waterCoil.FinThermConductivity = NumArray(12); if (waterCoil.FinThermConductivity <= 0.0) { - ShowSevereError(state, - format("{}: {} must be > 0.0, for {} = {}", CurrentModuleObject, cNumericFields(12), cAlphaFields(1), waterCoil.Name)); + ShowSevereError( + state, + EnergyPlus::format("{}: {} must be > 0.0, for {} = {}", CurrentModuleObject, cNumericFields(12), cAlphaFields(1), waterCoil.Name)); ErrorsFound = true; } waterCoil.FinSpacing = NumArray(13); @@ -924,7 +928,7 @@ void GetWaterCoilInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting input.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input.", RoutineName)); } AlphArray.deallocate(); @@ -1056,8 +1060,8 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA SimAirServingZones::CheckWaterCoilIsOnAirLoop(state, CoilTypeNum, CompType, CompName, WaterCoilOnAirLoop); if (!WaterCoilOnAirLoop) { ShowContinueError(state, - format("Controller:WaterCoil = {}. Invalid water controller entry.", - state.dataWaterCoils->WaterCoil(tempCoilNum).ControllerName)); + EnergyPlus::format("Controller:WaterCoil = {}. Invalid water controller entry.", + state.dataWaterCoils->WaterCoil(tempCoilNum).ControllerName)); ErrorsFound = true; } } @@ -1156,7 +1160,8 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA // be less than 1 TubeToFinDiamRatio = waterCoil.TubeOutsideDiam / waterCoil.EffectiveFinDiam; if (TubeToFinDiamRatio > 1.0) { - ShowWarningError(state, format("InitWaterCoil: Detailed Flat Fin Coil, TubetoFinDiamRatio > 1.0, [{:.4R}]", TubeToFinDiamRatio)); + ShowWarningError(state, + EnergyPlus::format("InitWaterCoil: Detailed Flat Fin Coil, TubetoFinDiamRatio > 1.0, [{:.4R}]", TubeToFinDiamRatio)); // reset tube depth spacing and recalc dependent parameters waterCoil.TubeDepthSpacing *= (pow_2(TubeToFinDiamRatio) + 0.1); waterCoil.CoilDepth = waterCoil.TubeDepthSpacing * waterCoil.NumOfTubeRows; @@ -1164,8 +1169,8 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA std::sqrt(4.0 * waterCoil.FinDiam * waterCoil.CoilDepth / (Constant::Pi * waterCoil.NumOfTubeRows * waterCoil.NumOfTubesPerRow)); waterCoil.CoilEffectiveInsideDiam = 4.0 * waterCoil.MinAirFlowArea * waterCoil.CoilDepth / waterCoil.TotCoilOutsideSurfArea; TubeToFinDiamRatio = waterCoil.TubeOutsideDiam / waterCoil.EffectiveFinDiam; - ShowContinueError(state, format(" Resetting tube depth spacing to {:.4R} meters", waterCoil.TubeDepthSpacing)); - ShowContinueError(state, format(" Resetting coil depth to {:.4R} meters", waterCoil.CoilDepth)); + ShowContinueError(state, EnergyPlus::format(" Resetting tube depth spacing to {:.4R} meters", waterCoil.TubeDepthSpacing)); + ShowContinueError(state, EnergyPlus::format(" Resetting coil depth to {:.4R} meters", waterCoil.CoilDepth)); } CalcDryFinEffCoef(state, TubeToFinDiamRatio, state.dataWaterCoils->CoefSeries); @@ -1220,18 +1225,22 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA DesSatEnthAtWaterInTemp = PsyHFnTdbW(waterCoil.DesInletWaterTemp, waterCoil.DesOutletAirHumRat) - 0.0001; } if (DesOutletAirEnth >= DesInletAirEnth || waterCoil.DesInletWaterTemp >= waterCoil.DesInletAirTemp) { - ShowWarningError(state, format("The design cooling capacity is zero for Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::format("The design cooling capacity is zero for Coil:Cooling:Water {}", waterCoil.Name)); ShowContinueError(state, " The maximum water flow rate for this coil will be set to zero and the coil will do no cooling."); - ShowContinueError(state, - format(" Check the following coil design inputs for problems: Tair,in = {:.4R}", waterCoil.DesInletAirTemp)); - ShowContinueError(state, - format(" Wair,in = {:.6R}", waterCoil.DesInletAirHumRat)); - ShowContinueError(state, - format(" Twater,in = {:.4R}", waterCoil.DesInletWaterTemp)); - ShowContinueError(state, - format(" Tair,out = {:.4R}", waterCoil.DesOutletAirTemp)); - ShowContinueError(state, - format(" Wair,out = {:.6R}", waterCoil.DesOutletAirHumRat)); + ShowContinueError( + state, EnergyPlus::format(" Check the following coil design inputs for problems: Tair,in = {:.4R}", waterCoil.DesInletAirTemp)); + ShowContinueError( + state, + EnergyPlus::format(" Wair,in = {:.6R}", waterCoil.DesInletAirHumRat)); + ShowContinueError( + state, + EnergyPlus::format(" Twater,in = {:.4R}", waterCoil.DesInletWaterTemp)); + ShowContinueError( + state, + EnergyPlus::format(" Tair,out = {:.4R}", waterCoil.DesOutletAirTemp)); + ShowContinueError( + state, + EnergyPlus::format(" Wair,out = {:.6R}", waterCoil.DesOutletAirHumRat)); waterCoil.MaxWaterVolFlowRate = 0.0; waterCoil.MaxWaterMassFlowRate = 0.0; } @@ -1251,7 +1260,7 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA !state.dataWaterCoils->CBFTooLarge) { goto Inlet_Conditions_Loop_exit; // coil UA calcs OK } else { - ShowWarningError(state, format("In calculating the design coil UA for Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::format("In calculating the design coil UA for Coil:Cooling:Water {}", waterCoil.Name)); if (state.dataWaterCoils->NoSatCurveIntersect) { ShowContinueError(state, "no apparatus dew-point can be found for the initial entering and leaving conditions;"); } @@ -1264,14 +1273,21 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA if (!state.dataWaterCoils->NoExitCondReset) { ShowContinueError(state, "the coil outlet design conditions will be changed to correct the problem."); } - ShowContinueError(state, format("The initial design conditions are: Tair,in = {:.4R}", waterCoil.DesInletAirTemp)); - ShowContinueError(state, format(" Wair,in = {:.6R}", waterCoil.DesInletAirHumRat)); - ShowContinueError(state, format(" Twater,in = {:.4R}", waterCoil.DesInletWaterTemp)); - ShowContinueError(state, format(" Tair,out = {:.4R}", waterCoil.DesOutletAirTemp)); - ShowContinueError(state, format(" Wair,out = {:.6R}", waterCoil.DesOutletAirHumRat)); + ShowContinueError(state, + EnergyPlus::format("The initial design conditions are: Tair,in = {:.4R}", waterCoil.DesInletAirTemp)); + ShowContinueError(state, + EnergyPlus::format(" Wair,in = {:.6R}", waterCoil.DesInletAirHumRat)); + ShowContinueError(state, + EnergyPlus::format(" Twater,in = {:.4R}", waterCoil.DesInletWaterTemp)); + ShowContinueError(state, + EnergyPlus::format(" Tair,out = {:.4R}", waterCoil.DesOutletAirTemp)); + ShowContinueError(state, + EnergyPlus::format(" Wair,out = {:.6R}", waterCoil.DesOutletAirHumRat)); if (!state.dataWaterCoils->NoExitCondReset) { - ShowContinueError(state, format("The revised design conditions are: Tair,out = {:.4R}", state.dataWaterCoils->TOutNew)); - ShowContinueError(state, format(" Wair,out = {:.6R}", state.dataWaterCoils->WOutNew)); + ShowContinueError( + state, EnergyPlus::format("The revised design conditions are: Tair,out = {:.4R}", state.dataWaterCoils->TOutNew)); + ShowContinueError( + state, EnergyPlus::format(" Wair,out = {:.6R}", state.dataWaterCoils->WOutNew)); waterCoil.DesOutletAirHumRat = state.dataWaterCoils->WOutNew; waterCoil.DesOutletAirTemp = state.dataWaterCoils->TOutNew; // update outlet air conditions used for sizing @@ -1374,14 +1390,15 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA } if (DesEnthWaterOut > DesInletAirEnth) { - ShowWarningError(state, format("In calculating the design coil UA for Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::format("In calculating the design coil UA for Coil:Cooling:Water {}", waterCoil.Name)); ShowContinueError(state, "the outlet chilled water design enthalpy is greater than the inlet air design enthalpy."); - ShowContinueError(state, - format("To correct this condition the design chilled water flow rate will be increased from {:.5R}", - waterCoil.MaxWaterVolFlowRate)); + ShowContinueError( + state, + EnergyPlus::format("To correct this condition the design chilled water flow rate will be increased from {:.5R}", + waterCoil.MaxWaterVolFlowRate)); EnthCorrFrac = (DesEnthWaterOut - DesInletAirEnth) / (DesEnthWaterOut - DesSatEnthAtWaterInTemp); waterCoil.MaxWaterVolFlowRate *= (1.0 + 2.0 * EnthCorrFrac); - ShowContinueError(state, format("to {:.5R} m3/s", waterCoil.MaxWaterVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("to {:.5R} m3/s", waterCoil.MaxWaterVolFlowRate)); waterCoil.MaxWaterMassFlowRate = rho * waterCoil.MaxWaterVolFlowRate; DesOutletWaterTemp = waterCoil.DesInletWaterTemp + waterCoil.DesTotWaterCoilLoad / (waterCoil.MaxWaterMassFlowRate * Cp); DesSatEnthAtWaterOutTemp = @@ -1423,14 +1440,15 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA } else { // dry coil if (DesOutletWaterTemp > waterCoil.DesInletAirTemp) { - ShowWarningError(state, format("In calculating the design coil UA for Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::format("In calculating the design coil UA for Coil:Cooling:Water {}", waterCoil.Name)); ShowContinueError(state, "the outlet chilled water design temperature is greater than the inlet air design temperature."); - ShowContinueError(state, - format("To correct this condition the design chilled water flow rate will be increased from {:.5R}", - waterCoil.MaxWaterVolFlowRate)); + ShowContinueError( + state, + EnergyPlus::format("To correct this condition the design chilled water flow rate will be increased from {:.5R}", + waterCoil.MaxWaterVolFlowRate)); TempCorrFrac = (DesOutletWaterTemp - waterCoil.DesInletAirTemp) / (DesOutletWaterTemp - waterCoil.DesInletWaterTemp); waterCoil.MaxWaterVolFlowRate *= (1.0 + 2.0 * TempCorrFrac); - ShowContinueError(state, format("to {:.5R} m3/s", waterCoil.MaxWaterVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("to {:.5R} m3/s", waterCoil.MaxWaterVolFlowRate)); waterCoil.MaxWaterMassFlowRate = rho * waterCoil.MaxWaterVolFlowRate; DesOutletWaterTemp = waterCoil.DesInletWaterTemp + waterCoil.DesTotWaterCoilLoad / (waterCoil.MaxWaterMassFlowRate * Cp); } @@ -1493,7 +1511,7 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA General::SolveRoot(state, 0.001, MaxIte, SolFla, UA, f, UA0, UA1); // if the numerical inversion failed, issue error messages. if (SolFla == -1) { - ShowSevereError(state, format("Calculation of cooling coil design UA failed for coil {}", waterCoil.Name)); + ShowSevereError(state, EnergyPlus::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; @@ -1502,9 +1520,9 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA waterCoil.UACoilInternalPerUnitArea = waterCoil.UACoilInternal / waterCoil.TotCoilOutsideSurfArea; waterCoil.UAWetExtPerUnitArea = waterCoil.UACoilExternal / waterCoil.TotCoilOutsideSurfArea; waterCoil.UADryExtPerUnitArea = waterCoil.UAWetExtPerUnitArea; - ShowContinueError(state, format(" Coil design UA set to {:.6R} [W/C]", waterCoil.UACoilTotal)); + ShowContinueError(state, EnergyPlus::format(" Coil design UA set to {:.6R} [W/C]", waterCoil.UACoilTotal)); } else if (SolFla == -2) { - ShowSevereError(state, format("Calculation of cooling coil design UA failed for coil {}", waterCoil.Name)); + ShowSevereError(state, EnergyPlus::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; @@ -1513,7 +1531,7 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA waterCoil.UACoilInternalPerUnitArea = waterCoil.UACoilInternal / waterCoil.TotCoilOutsideSurfArea; waterCoil.UAWetExtPerUnitArea = waterCoil.UACoilExternal / waterCoil.TotCoilOutsideSurfArea; waterCoil.UADryExtPerUnitArea = waterCoil.UAWetExtPerUnitArea; - ShowContinueError(state, format(" Coil design UA set to {:.6R} [W/C]", waterCoil.UACoilTotal)); + ShowContinueError(state, EnergyPlus::format(" Coil design UA set to {:.6R} [W/C]", waterCoil.UACoilTotal)); } // cooling coil surface area @@ -2195,9 +2213,9 @@ 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, format("Invalid design inlet water temperature for {} = {}", CompType, CompName)); - ShowContinueError(state, format("...design inlet water temperature = {:.3R} C", waterCoil.DesInletWaterTemp)); - ShowContinueError(state, format("...design outlet air temperature = {:.3R} C", state.dataSize->DataDesOutletAirTemp)); + ShowWarningError(state, EnergyPlus::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"); ShowContinueError(state, "...design inlet water temperature is set to the design outlet air temperature minus 5.0C"); waterCoil.DesInletWaterTemp = state.dataSize->DataDesOutletAirTemp - 5.0; @@ -2303,7 +2321,7 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) if (waterCoil.DesAirVolFlowRate <= 0.0) { waterCoil.DesAirVolFlowRate = 0.0; - ShowWarningError(state, format("The design air flow rate is zero for {} = {}", CompType, CompName)); + ShowWarningError(state, EnergyPlus::format("The design air flow rate is zero for {} = {}", CompType, CompName)); ShowContinueError(state, "The autosize value for max air volume flow rate is zero"); } @@ -2348,9 +2366,9 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) waterCoil.MinAirFlowArea = sizerMinAirFlowArea.size(state, TempSize, ErrorsFound); if (waterCoil.MinAirFlowArea <= 0.0) { - ShowSevereError(state, format("Coil:Cooling:Water:DetailedGeometry: \"{}\"", waterCoil.Name)); - ShowContinueError(state, - format("Coil Minimum Airflow Area must be greater than 0. Coil area = {:.6T}", waterCoil.MinAirFlowArea)); + 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)); ErrorsFound = true; } @@ -2400,11 +2418,12 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) waterCoil.TubeOutsideSurfArea = sizerTubeOutsideArea.size(state, TempSize, ErrorsFound); if ((waterCoil.FinSurfArea + waterCoil.TubeOutsideSurfArea) <= 0.0) { - ShowSevereError(state, format("Coil:Cooling:Water:DetailedGeometry: \"{}\"", waterCoil.Name)); + ShowSevereError(state, EnergyPlus::format("Coil:Cooling:Water:DetailedGeometry: \"{}\"", waterCoil.Name)); ShowContinueError( state, - format("Coil Fin Surface Area plus Coil Tube Outside Surface Area must be greater than 0. Total surface area = {:.6T}", - (waterCoil.FinSurfArea + waterCoil.TubeOutsideSurfArea))); + 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))); ErrorsFound = true; } @@ -2441,7 +2460,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, format("Occurs in water coil object= {}", waterCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in water coil object= {}", waterCoil.Name)); ErrorsFound = true; } } @@ -2598,7 +2617,7 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) state.dataSize->DataFractionUsedForSizing = 0.0; if (waterCoil.MaxWaterVolFlowRate <= 0.0) { // MaxWaterVolFlowRateDes = 0.0; - ShowWarningError(state, format("The design coil load is zero for Coil:Heating:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::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"); @@ -2698,13 +2717,14 @@ 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, format("Autosizing of heating coil UA for Coil:Heating:Water \"{}\"", CompName)); + ShowWarningError(state, EnergyPlus::format("Autosizing of heating coil UA for Coil:Heating:Water \"{}\"", CompName)); ShowContinueError(state, - format(" Plant design loop exit temperature = {:.2T} C", - state.dataSize->PlantSizData(state.dataSize->DataPltSizHeatNum).ExitTemp)); + EnergyPlus::format(" Plant design loop exit temperature = {:.2T} 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, - format(" Heating coil UA-value is sized using coil water inlet temperature = {:.2T} C", DesCoilInletWaterTempUsed)); + ShowContinueError( + state, + EnergyPlus::format(" Heating coil UA-value is sized using coil water inlet temperature = {:.2T} C", DesCoilInletWaterTempUsed)); state.dataWaterCoils->WaterCoil(state.dataSize->DataCoilNum).InletWaterTemp = DesCoilWaterInTempSaved; // reset the Design Coil Inlet Water Temperature } @@ -2741,7 +2761,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, format("Occurs in water coil object= {}", waterCoil.Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in water coil object= {}", waterCoil.Name)); ErrorsFound = true; } } @@ -2868,7 +2888,7 @@ void CalcSimpleHeatingCoil(EnergyPlusData &state, state.dataWaterCoils->MyUAAndFlowCalcFlag(CoilNum) || waterCoil.availSched->getCurrentVal() > 0.0)) { if (UA <= 0.0) { - ShowFatalError(state, format("UA is zero for COIL:Heating:Water {}", waterCoil.Name)); + ShowFatalError(state, EnergyPlus::format("UA is zero for COIL:Heating:Water {}", waterCoil.Name)); } NTU = UA / CapacitanceMin; ETA = std::pow(NTU, 0.22); @@ -3095,22 +3115,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, format("Coil:Cooling:Water:DetailedGeometry in Coil ={}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::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, format("Air Mass Flow Rate[kg/s]={:.6T}", AirMassFlow)); + ShowContinueError(state, EnergyPlus::format("Air Mass Flow Rate[kg/s]={:.6T}", AirMassFlow)); // [m/s] = [kg/s] / ([m2] * [kg/m3]) AirVelocity = AirMassFlow / (waterCoil.MinAirFlowArea * AirDensity); - ShowContinueError(state, format("Air Face Velocity[m/s]={:.6T}", AirVelocity)); - ShowContinueError(state, format("Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", 2.5 * 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, "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, format("Coil:Cooling:Water:DetailedGeometry in Coil ={}", waterCoil.Name)); + ShowSevereError(state, EnergyPlus::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, format("Air Mass Flow Rate[kg/s]={:.6T}", AirMassFlow)); + ShowContinueError(state, EnergyPlus::format("Air Mass Flow Rate[kg/s]={:.6T}", AirMassFlow)); AirVelocity = AirMassFlow / (waterCoil.MinAirFlowArea * AirDensity); - ShowContinueError(state, format("Air Face Velocity[m/s]={:.6T}", AirVelocity)); - ShowContinueError(state, format("Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", 44.7 * 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)); ShowFatalError(state, "Coil:Cooling:Water:DetailedGeometry needs to be resized/autosized to handle capacity"); } @@ -4182,7 +4204,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, format("For Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::format("For Coil:Cooling:Water {}", waterCoil.Name)); ShowContinueError(state, "CoilPartWetPartDry: Maximum iterations exceeded for Liq Temp, at Interface"); } @@ -4296,7 +4318,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, format("For Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::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, @@ -4343,7 +4365,7 @@ Real64 CalcCoilUAbyEffectNTU(EnergyPlusData &state, // If not converged after itmax iterations, return error code if ((iter > itmax) && (!state.dataGlobal->WarmupFlag)) { - ShowWarningError(state, format("For Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::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 @@ -5379,7 +5401,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, format("CheckWaterCoilSchedule: Coil not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("CheckWaterCoilSchedule: Coil not found={}", CompName)); } CompIndex = CoilNum; Value = state.dataWaterCoils->WaterCoil(CoilNum).availSched->getCurrentVal(); // not scheduled? @@ -5387,18 +5409,18 @@ void CheckWaterCoilSchedule(EnergyPlusData &state, std::string_view CompName, Re CoilNum = CompIndex; if (CoilNum > state.dataWaterCoils->NumWaterCoils || CoilNum < 1) { ShowFatalError(state, - format("CheckWaterCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", - CoilNum, - state.dataWaterCoils->NumWaterCoils, - CompName)); + EnergyPlus::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, - format("CheckWaterCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CompName, - waterCoil.Name)); + EnergyPlus::format("CheckWaterCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CompName, + waterCoil.Name)); } Value = waterCoil.availSched->getCurrentVal(); // not scheduled? } @@ -5444,7 +5466,7 @@ Real64 GetCoilMaxWaterFlowRate(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ShowContinueError(state, "... Max Water Flow rate returned as -1000."); ErrorsFound = true; MaxWaterFlowRate = -1000.0; @@ -5488,7 +5510,7 @@ int GetCoilInletNode(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -5531,9 +5553,10 @@ int GetCoilOutletNode(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError( - state, - format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil outlet node number.", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil outlet node number.", + CoilType, + CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -5576,7 +5599,7 @@ int GetCoilWaterInletNode(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilWaterInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilWaterInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -5619,7 +5642,7 @@ int GetCoilWaterOutletNode(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilWaterOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilWaterOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -5659,7 +5682,7 @@ void SetCoilDesFlow(EnergyPlusData &state, // WaterCoil(WhichCoil).DesAirVolFlowRate = CoilDesFlow; } } else { - ShowSevereError(state, format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } } @@ -5693,11 +5716,13 @@ Real64 GetWaterCoilDesAirFlow(EnergyPlusData &state, if (WhichCoil != 0) { CoilDesAirFlow = state.dataWaterCoils->WaterCoil(WhichCoil).DesAirVolFlowRate; } else { - ShowSevereError(state, format("GetWaterCoilDesAirFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetWaterCoilDesAirFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } } else { - ShowSevereError(state, format("GetWaterCoilDesAirFlowRate: Function not valid for Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + EnergyPlus::format("GetWaterCoilDesAirFlowRate: Function not valid for Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -5786,7 +5811,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, format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); + ShowWarningError( + state, EnergyPlus::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."); @@ -5802,7 +5828,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, format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); + ShowWarningError( + state, EnergyPlus::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."); @@ -5818,7 +5845,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, format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); + ShowWarningError( + state, EnergyPlus::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."); @@ -5832,7 +5860,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, format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); + ShowWarningError( + state, EnergyPlus::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."); @@ -5895,11 +5924,11 @@ Real64 TdbFnHRhPb(EnergyPlusData &state, if (SolFla == -1) { ShowSevereError(state, "Calculation of drybulb temperature failed in TdbFnHRhPb(H,RH,PB)"); ShowContinueError(state, " Iteration limit exceeded"); - ShowContinueError(state, format(" H=[{:.6R}], RH=[{:.4R}], PB=[{:.5R}].", H, RH, PB)); + ShowContinueError(state, EnergyPlus::format(" H=[{:.6R}], RH=[{:.4R}], PB=[{:.5R}].", H, RH, PB)); } else if (SolFla == -2) { ShowSevereError(state, "Calculation of drybulb temperature failed in TdbFnHRhPb(H,RH,PB)"); ShowContinueError(state, " Bad starting values for Tdb"); - ShowContinueError(state, format(" H=[{:.6R}], RH=[{:.4R}], PB=[{:.5R}].", H, RH, PB)); + ShowContinueError(state, EnergyPlus::format(" H=[{:.6R}], RH=[{:.4R}], PB=[{:.5R}].", H, RH, PB)); } if (SolFla < 0) { T = 0.0; @@ -6001,7 +6030,7 @@ int GetWaterCoilIndex(EnergyPlusData &state, } if (IndexNum == 0) { - ShowSevereError(state, format("GetWaterCoilIndex: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetWaterCoilIndex: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -6020,8 +6049,9 @@ int GetCompIndex(EnergyPlusData &state, CoilModel compType, std::string_view con int index = Util::FindItemInList(coilName, state.dataWaterCoils->WaterCoil); if (index == 0) { // may not find coil name - ShowSevereError(state, - format("GetWaterCoilIndex: Could not find CoilType = \"{}\" with Name = \"{}\"", CoilModelNamesUC[(int)compType], coilName)); + ShowSevereError( + state, + EnergyPlus::format("GetWaterCoilIndex: Could not find CoilType = \"{}\" with Name = \"{}\"", CoilModelNamesUC[(int)compType], coilName)); } return index; } @@ -6065,7 +6095,7 @@ Real64 GetWaterCoilCapacity(EnergyPlusData &state, } if (IndexNum == 0) { - ShowSevereError(state, format("GetWaterCoilCapacity: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetWaterCoilCapacity: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -6102,35 +6132,39 @@ void UpdateWaterToAirCoilPlantConnection(EnergyPlusData &state, if (CompIndex == 0) { CoilNum = Util::FindItemInList(CoilName, state.dataWaterCoils->WaterCoil); if (CoilNum == 0) { - ShowFatalError(state, format("UpdateWaterToAirCoilPlantConnection: Specified Coil not one of Valid water coils={}", CoilName)); + ShowFatalError(state, + EnergyPlus::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, - format("UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Number of Coils={}, Entered Coil name={}", - CoilNum, - state.dataWaterCoils->NumWaterCoils, - CoilName)); + ShowFatalError( + state, + EnergyPlus::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, - format("UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CoilName, - waterCoil.Name)); + EnergyPlus::format( + "UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CoilName, + waterCoil.Name)); } if (CoilType != waterCoil.WaterCoilType) { ShowFatalError( state, - format("UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CoilName, - DataPlant::PlantEquipTypeNames[static_cast(CoilType)])); + EnergyPlus::format( + "UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CoilName, + DataPlant::PlantEquipTypeNames[static_cast(CoilType)])); } } } @@ -6211,7 +6245,7 @@ Sched::Schedule *GetWaterCoilAvailSched(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return nullptr; } @@ -6241,9 +6275,9 @@ void SetWaterCoilData(EnergyPlusData &state, if (CoilNum <= 0 || CoilNum > state.dataWaterCoils->NumWaterCoils) { ShowSevereError(state, - format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", - CoilNum, - state.dataWaterCoils->NumWaterCoils)); + EnergyPlus::format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", + CoilNum, + state.dataWaterCoils->NumWaterCoils)); ErrorsFound = true; return; } @@ -6340,7 +6374,7 @@ void EstimateCoilInletWaterTemp(EnergyPlusData &state, if (((CapacitanceAir > 0.0) && (CapacitanceWater > 0.0))) { if (UA <= 0.0) { - ShowWarningError(state, format("UA is zero for COIL:Heating:Water {}", waterCoil.Name)); + ShowWarningError(state, EnergyPlus::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 520c629f291..910e32a25d1 100644 --- a/src/EnergyPlus/WaterManager.cc +++ b/src/EnergyPlus/WaterManager.cc @@ -307,17 +307,17 @@ namespace WaterManager { state.dataWaterData->WaterStorage(Item).ValveOffCapacity = rNumericArgs(6); if (state.dataWaterData->WaterStorage(Item).ControlSupply != ControlSupplyType::NoControlLevel) { if (state.dataWaterData->WaterStorage(Item).ValveOffCapacity < state.dataWaterData->WaterStorage(Item).ValveOnCapacity) { - ShowSevereError(state, format("Invalid {} and/or {}", cNumericFieldNames(5), cNumericFieldNames(6))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, format("{} must be greater than {}", cNumericFieldNames(6), cNumericFieldNames(5))); + ShowSevereError(state, EnergyPlus::format("Invalid {} and/or {}", cNumericFieldNames(5), cNumericFieldNames(6))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} must be greater than {}", cNumericFieldNames(6), cNumericFieldNames(5))); ShowContinueError(state, - format("Check value for {} = {:.5R}", - cNumericFieldNames(5), - state.dataWaterData->WaterStorage(Item).ValveOnCapacity)); + EnergyPlus::format("Check value for {} = {:.5R}", + cNumericFieldNames(5), + state.dataWaterData->WaterStorage(Item).ValveOnCapacity)); ShowContinueError(state, - format("which must be lower than {} = {:.5R}", - cNumericFieldNames(6), - state.dataWaterData->WaterStorage(Item).ValveOffCapacity)); + EnergyPlus::format("which must be lower than {} = {:.5R}", + cNumericFieldNames(6), + state.dataWaterData->WaterStorage(Item).ValveOffCapacity)); ErrorsFound = true; } } @@ -380,8 +380,8 @@ namespace WaterManager { state.dataWaterData->WaterStorage(Item).ZoneID = Util::FindItemInList(cAlphaArgs(10), state.dataHeatBal->Zone); if ((state.dataWaterData->WaterStorage(Item).ZoneID == 0) && (state.dataWaterData->WaterStorage(Item).AmbientTempIndicator == AmbientTempType::Zone)) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(10), cAlphaArgs(10))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(10), cAlphaArgs(10))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ErrorsFound = true; } state.dataWaterData->WaterStorage(Item).SurfArea = rNumericArgs(8); @@ -428,8 +428,8 @@ namespace WaterManager { state.dataWaterData->RainCollector(Item).StorageTankName = cAlphaArgs(2); state.dataWaterData->RainCollector(Item).StorageTankID = Util::FindItemInList(cAlphaArgs(2), state.dataWaterData->WaterStorage); if (state.dataWaterData->RainCollector(Item).StorageTankID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ErrorsFound = true; } @@ -443,13 +443,13 @@ namespace WaterManager { } state.dataWaterData->RainCollector(Item).LossFactor = rNumericArgs(1); if (state.dataWaterData->RainCollector(Item).LossFactor > 1.0) { - ShowWarningError(state, format("Invalid {}={:.2R}", cNumericFieldNames(1), rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowWarningError(state, EnergyPlus::format("Invalid {}={:.2R}", cNumericFieldNames(1), rNumericArgs(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "found rain water collection loss factor greater than 1.0, simulation continues"); } if (state.dataWaterData->RainCollector(Item).LossFactor < 0.0) { - ShowSevereError(state, format("Invalid {}={:.2R}", cNumericFieldNames(1), rNumericArgs(1))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", cNumericFieldNames(1), rNumericArgs(1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, "found rain water collection loss factor less than 0.0"); ErrorsFound = true; } @@ -483,9 +483,10 @@ namespace WaterManager { state.dataWaterData->RainCollector(Item).SurfID(SurfNum) = Util::FindItemInList(cAlphaArgs(SurfNum + alphaOffset), state.dataSurface->Surface); if (state.dataWaterData->RainCollector(Item).SurfID(SurfNum) == 0) { - ShowSevereError(state, - format("Invalid {}={}", cAlphaFieldNames(SurfNum + alphaOffset), cAlphaArgs(SurfNum + alphaOffset))); - ShowContinueError(state, format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError( + state, + EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(SurfNum + alphaOffset), cAlphaArgs(SurfNum + alphaOffset))); + ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ErrorsFound = true; } } @@ -594,9 +595,9 @@ namespace WaterManager { (state.dataWaterData->WaterStorage(Item).ControlSupply == ControlSupplyType::WellFloatMainsBackup)) { if (state.dataWaterData->WaterStorage(Item).GroundWellID == 0) { ShowSevereError(state, - format("{}= \"{}\" does not have a WaterUse:Well (groundwater well) that names it.", - cCurrentModuleObject, - state.dataWaterData->WaterStorage(Item).Name)); + EnergyPlus::format("{}= \"{}\" does not have a WaterUse:Well (groundwater well) that names it.", + cCurrentModuleObject, + state.dataWaterData->WaterStorage(Item).Name)); ErrorsFound = true; } } @@ -609,10 +610,10 @@ namespace WaterManager { Util::FindItemInList(state.dataWaterData->WaterStorage(Item).SupplyTankName, state.dataWaterData->WaterStorage); if (state.dataWaterData->WaterStorage(Item).SupplyTankID == 0) { ShowSevereError(state, - format("Other tank called {} not found for {} Named {}", - state.dataWaterData->WaterStorage(Item).SupplyTankName, - cCurrentModuleObject, - state.dataWaterData->WaterStorage(Item).Name)); // TODO rename point + EnergyPlus::format("Other tank called {} not found for {} Named {}", + state.dataWaterData->WaterStorage(Item).SupplyTankName, + cCurrentModuleObject, + state.dataWaterData->WaterStorage(Item).Name)); // TODO rename point ErrorsFound = true; } InternalSetupTankDemandComponent(state, @@ -640,10 +641,10 @@ namespace WaterManager { state.dataWaterData->WaterStorage(Item).OverflowMode = Overflow::Discarded; } else { ShowSevereError(state, - format("Overflow tank name of {} not found for {} Named {}", - state.dataWaterData->WaterStorage(Item).OverflowTankName, - cCurrentModuleObject, - state.dataWaterData->WaterStorage(Item).Name)); + EnergyPlus::format("Overflow tank name of {} not found for {} Named {}", + state.dataWaterData->WaterStorage(Item).OverflowTankName, + cCurrentModuleObject, + state.dataWaterData->WaterStorage(Item).Name)); ErrorsFound = true; } } else { @@ -664,7 +665,7 @@ namespace WaterManager { cCurrentModuleObject = "Site:Precipitation"; state.dataWaterData->NumSiteRainFall = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (state.dataWaterData->NumSiteRainFall > 1) { // throw error - ShowSevereError(state, format("Only one {} object is allowed", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Only one {} object is allowed", cCurrentModuleObject)); ErrorsFound = true; } @@ -678,7 +679,7 @@ namespace WaterManager { if (Util::SameString(cAlphaArgs(1), "ScheduleAndDesignLevel")) { state.dataWaterData->RainFall.ModeID = RainfallMode::RainSchedDesign; } else { - ShowSevereError(state, format("Precipitation Model Type of {} is incorrect.", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Precipitation Model Type of {} is incorrect.", cCurrentModuleObject)); ShowContinueError(state, "Only available option is ScheduleAndDesignLevel."); ErrorsFound = true; } @@ -703,7 +704,7 @@ namespace WaterManager { cCurrentModuleObject = "RoofIrrigation"; NumIrrigation = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (NumIrrigation > 1) { - ShowSevereError(state, format("Only one {} object is allowed", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Only one {} object is allowed", cCurrentModuleObject)); ErrorsFound = true; } @@ -746,7 +747,8 @@ namespace WaterManager { state.dataWaterData->Irrigation.IrrigationThreshold = 0.4; if (state.dataWaterData->Irrigation.ModeID == IrrigationMode::SmartSched && NumNumbers > 0) { if (rNumericArgs(1) > 100.0 || rNumericArgs(1) < 0.0) { - ShowSevereError(state, format("Irrigation threshold for {} object has values > 100 or < 0.", cCurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("Irrigation threshold for {} object has values > 100 or < 0.", cCurrentModuleObject)); ErrorsFound = true; } else { state.dataWaterData->Irrigation.IrrigationThreshold = rNumericArgs(1) / 100.0; @@ -1273,7 +1275,8 @@ namespace WaterManager { TankIndex = Util::FindItemInList(TankName, state.dataWaterData->WaterStorage); if (TankIndex == 0) { - ShowSevereError(state, format("WaterUse:Storage (Water Storage Tank) =\"{}\" not found in {} called {}", TankName, CompType, CompName)); + ShowSevereError( + state, EnergyPlus::format("WaterUse:Storage (Water Storage Tank) =\"{}\" not found in {} called {}", TankName, CompType, CompName)); ErrorsFound = true; return; // So we don't pass TankIndex=0 } @@ -1386,7 +1389,8 @@ namespace WaterManager { TankIndex = Util::FindItemInList(TankName, state.dataWaterData->WaterStorage); if (TankIndex == 0) { - ShowSevereError(state, format("WaterUse:Storage (Water Storage Tank) =\"{}\" not found in {} called {}", TankName, CompType, CompName)); + ShowSevereError( + state, EnergyPlus::format("WaterUse:Storage (Water Storage Tank) =\"{}\" not found in {} called {}", TankName, CompType, CompName)); ErrorsFound = true; return; } @@ -1605,7 +1609,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, format("Occurs for WaterUse:Storage = {}", state.dataWaterData->WaterStorage(TankNum).Name)); + ShowContinueError( + state, EnergyPlus::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 9565b4547a2..e88f8344823 100644 --- a/src/EnergyPlus/WaterThermalTanks.cc +++ b/src/EnergyPlus/WaterThermalTanks.cc @@ -146,7 +146,7 @@ PlantComponent *WaterThermalTankData::factory(EnergyPlusData &state, std::string } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalWaterTankFactory: Error getting inputs for tank named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalWaterTankFactory: Error getting inputs for tank named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -203,25 +203,26 @@ int getTankIDX(EnergyPlusData &state, std::string_view CompName, int &CompIndex) if (CompIndex == 0) { CompNum = Util::FindItem(CompName, state.dataWaterThermalTanks->WaterThermalTank); if (CompNum == 0) { - ShowFatalError(state, format("SimWaterThermalTank_WaterTank: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimWaterThermalTank_WaterTank: Unit not found={}", CompName)); } CompIndex = CompNum; } else { CompNum = CompIndex; if (CompNum > state.dataWaterThermalTanks->numWaterThermalTank || CompNum < 1) { ShowFatalError(state, - format("SimWaterThermalTank_WaterTank: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - CompNum, - state.dataWaterThermalTanks->numWaterThermalTank, - CompName)); + EnergyPlus::format("SimWaterThermalTank_WaterTank: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + CompNum, + state.dataWaterThermalTanks->numWaterThermalTank, + CompName)); } if (state.dataWaterThermalTanks->WaterThermalTank(CompNum).CheckWTTEquipName) { if (CompName != state.dataWaterThermalTanks->WaterThermalTank(CompNum).Name) { - ShowFatalError(state, - format("SimWaterThermalTank_WaterTank: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - CompNum, - CompName, - state.dataWaterThermalTanks->WaterThermalTank(CompNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimWaterThermalTank_WaterTank: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + CompNum, + CompName, + state.dataWaterThermalTanks->WaterThermalTank(CompNum).Name)); } state.dataWaterThermalTanks->WaterThermalTank(CompNum).CheckWTTEquipName = false; } @@ -242,25 +243,26 @@ int getHPTankIDX(EnergyPlusData &state, std::string_view CompName, int &CompInde if (CompIndex == 0) { CompNum = Util::FindItem(CompName, state.dataWaterThermalTanks->HPWaterHeater); if (CompNum == 0) { - ShowFatalError(state, format("SimWaterThermalTank_HeatPump: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimWaterThermalTank_HeatPump: Unit not found={}", CompName)); } CompIndex = CompNum; } else { CompNum = CompIndex; if (CompNum > state.dataWaterThermalTanks->numWaterThermalTank || CompNum < 1) { ShowFatalError(state, - format("SimWaterThermalTank_HeatPump: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - CompNum, - state.dataWaterThermalTanks->numHeatPumpWaterHeater, - CompName)); + EnergyPlus::format("SimWaterThermalTank_HeatPump: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + CompNum, + state.dataWaterThermalTanks->numHeatPumpWaterHeater, + CompName)); } if (state.dataWaterThermalTanks->HPWaterHeater(CompNum).CheckHPWHEquipName) { if (CompName != state.dataWaterThermalTanks->HPWaterHeater(CompNum).Name) { - ShowFatalError(state, - format("SimWaterThermalTank_HeatPump: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - CompNum, - CompName, - state.dataWaterThermalTanks->HPWaterHeater(CompNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimWaterThermalTank_HeatPump: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + CompNum, + CompName, + state.dataWaterThermalTanks->HPWaterHeater(CompNum).Name)); } state.dataWaterThermalTanks->HPWaterHeater(CompNum).CheckHPWHEquipName = false; } @@ -333,7 +335,8 @@ PlantComponent *HeatPumpWaterHeaterData::factory(EnergyPlusData &state, std::str } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalHeatPumpWaterHeaterFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalHeatPumpWaterHeaterFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -540,17 +543,17 @@ void SimHeatPumpWaterHeater(EnergyPlusData &state, if (CompIndex == 0) { HeatPumpNum = Util::FindItemInList(CompName, state.dataWaterThermalTanks->HPWaterHeater); if (HeatPumpNum == 0) { - ShowFatalError(state, format("SimHeatPumpWaterHeater: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimHeatPumpWaterHeater: Unit not found={}", CompName)); } CompIndex = HeatPumpNum; } else { HeatPumpNum = CompIndex; if (HeatPumpNum > state.dataWaterThermalTanks->numHeatPumpWaterHeater || HeatPumpNum < 1) { ShowFatalError(state, - format("SimHeatPumpWaterHeater: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - HeatPumpNum, - state.dataWaterThermalTanks->numHeatPumpWaterHeater, - CompName)); + EnergyPlus::format("SimHeatPumpWaterHeater: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + HeatPumpNum, + state.dataWaterThermalTanks->numHeatPumpWaterHeater, + CompName)); } } @@ -734,12 +737,12 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.DeadBandTempDiff = rNumericArgs(1); if (DesupHtr.DeadBandTempDiff <= 0.0 || DesupHtr.DeadBandTempDiff > 20.0) { ShowSevereError(state, - format("{} = {}: {} must be > 0 and <= 20. {} = {:.1T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(1), - cNumericFieldNames(1), - rNumericArgs(1))); + EnergyPlus::format("{} = {}: {} must be > 0 and <= 20. {} = {:.1T}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(1), + cNumericFieldNames(1), + rNumericArgs(1))); ErrorsFound = true; } @@ -752,8 +755,9 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (!lAlphaFieldBlanks(4)) { DesupHtr.HEffFTemp = Curve::GetCurveIndex(state, cAlphaArgs(4)); if (DesupHtr.HEffFTemp == 0) { - ShowSevereError(state, - format("{} = {}: {} not found = {}", cCurrentModuleObject, DesupHtr.Name, cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError( + state, + EnergyPlus::format("{} = {}: {} not found = {}", cCurrentModuleObject, DesupHtr.Name, cAlphaFieldNames(4), cAlphaArgs(4))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -768,9 +772,10 @@ bool getDesuperHtrInput(EnergyPlusData &state) Real64 HEffFTemp = min( 1.0, max(0.0, Curve::CurveValue(state, DesupHtr.HEffFTemp, DesupHtr.RatedInletWaterTemp, DesupHtr.RatedOutdoorAirTemp))); if (std::abs(HEffFTemp - 1.0) > 0.05) { - ShowWarningError(state, format("{}, \"{}\":", cCurrentModuleObject, DesupHtr.Name)); - ShowContinueError(state, format("The {} should be normalized ", cAlphaFieldNames(4))); - ShowContinueError(state, format(" to 1.0 at the rating point. Curve output at the rating point = {:.3T}", HEffFTemp)); + 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)); ShowContinueError(state, " The simulation continues using the user-specified curve."); } } @@ -805,8 +810,9 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (!Util::SameString(DesupHtr.TankType, cMixedWHModuleObj) && !Util::SameString(DesupHtr.TankType, cStratifiedWHModuleObj)) { - ShowSevereError(state, format("{} = {}:", cCurrentModuleObject, state.dataWaterThermalTanks->HPWaterHeater(DesuperheaterNum).Name)); - ShowContinueError(state, format("Desuperheater can only be used with {} or {}.", cMixedWHModuleObj, cStratifiedWHModuleObj)); + ShowSevereError(state, + EnergyPlus::format("{} = {}:", cCurrentModuleObject, state.dataWaterThermalTanks->HPWaterHeater(DesuperheaterNum).Name)); + ShowContinueError(state, EnergyPlus::format("Desuperheater can only be used with {} or {}.", cMixedWHModuleObj, cStratifiedWHModuleObj)); ErrorsFound = true; } @@ -826,11 +832,11 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.HeatReclaimRecoveryEff = rNumericArgs(2); if (DesupHtr.HeatReclaimRecoveryEff <= 0.0 || DesupHtr.HeatReclaimRecoveryEff > 0.9) { ShowSevereError(state, - format("{} = {}: {} must be > 0.0 and <= 0.9, Efficiency = {:.3T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(2), - DesupHtr.HeatReclaimRecoveryEff)); + EnergyPlus::format("{} = {}: {} must be > 0.0 and <= 0.9, Efficiency = {:.3T}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(2), + DesupHtr.HeatReclaimRecoveryEff)); ErrorsFound = true; } } // Blank Num(2) @@ -841,12 +847,12 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.HeatReclaimRecoveryEff = rNumericArgs(2); if (DesupHtr.HeatReclaimRecoveryEff <= 0.0 || DesupHtr.HeatReclaimRecoveryEff > 0.3) { ShowSevereError(state, - format("{} = {}: {} must be > 0.0 and <= 0.3, {} = {:.3T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(2), - cNumericFieldNames(2), - DesupHtr.HeatReclaimRecoveryEff)); + EnergyPlus::format("{} = {}: {} must be > 0.0 and <= 0.3, {} = {:.3T}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(2), + cNumericFieldNames(2), + DesupHtr.HeatReclaimRecoveryEff)); ErrorsFound = true; } } // Blank Num(2) @@ -877,10 +883,11 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + EnergyPlus::format( + "{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + cCurrentModuleObject, + DesupHtr.Name, + DesupHtr.HeatingSourceName)); ErrorsFound = true; } } @@ -909,10 +916,11 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (HeatReclaim.ReclaimEfficiencyTotal > 0.9) { ShowSevereError( state, - format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.9", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + EnergyPlus::format( + "{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.9", + cCurrentModuleObject, + DesupHtr.Name, + DesupHtr.HeatingSourceName)); ErrorsFound = true; } } @@ -942,8 +950,9 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.ValidSourceType = true; HeatReclaim.ReclaimEfficiencyTotal += DesupHtr.HeatReclaimRecoveryEff; if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { - ShowSevereError(state, - format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 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)); @@ -970,8 +979,9 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.ValidSourceType = true; HeatReclaim.ReclaimEfficiencyTotal += DesupHtr.HeatReclaimRecoveryEff; if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { - ShowSevereError(state, - format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 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)); @@ -993,8 +1003,9 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.ValidSourceType = true; HeatReclaim.ReclaimEfficiencyTotal += DesupHtr.HeatReclaimRecoveryEff; if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { - ShowSevereError(state, - format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 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)); @@ -1007,7 +1018,8 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (DesupHtr.ReclaimHeatingSourceIndexNum < 0) { ShowSevereError( state, - format("{}={}, could not find desuperheater coil {}={}", cCurrentModuleObject, DesupHtr.Name, cAlphaArgs(9), cAlphaArgs(10))); + EnergyPlus::format( + "{}={}, could not find desuperheater coil {}={}", cCurrentModuleObject, DesupHtr.Name, cAlphaArgs(9), cAlphaArgs(10))); ErrorsFound = true; } else { DataHeatBalance::HeatReclaimDataBase &HeatReclaim = @@ -1021,17 +1033,17 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.ValidSourceType = true; HeatReclaim.ReclaimEfficiencyTotal += DesupHtr.HeatReclaimRecoveryEff; if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { - ShowSevereError( - state, - format("{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + 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)); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{} = {}:", cCurrentModuleObject, DesupHtr.Name)); + ShowSevereError(state, EnergyPlus::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, " @@ -1039,101 +1051,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, format(" Invalid desuperheater heat source object: {} \"{}\"", heatSourceObjType, cAlphaArgs(10))); + ShowContinueError(state, EnergyPlus::format(" Invalid desuperheater heat source object: {} \"{}\"", heatSourceObjType, cAlphaArgs(10))); ErrorsFound = true; } if (errFlag) { - ShowContinueError(state, format("...occurs in {}={}", cCurrentModuleObject, DesupHtr.Name)); + ShowContinueError(state, EnergyPlus::format("...occurs in {}={}", cCurrentModuleObject, DesupHtr.Name)); ErrorsFound = true; } if (DesupHtr.ReclaimHeatingSourceIndexNum == 0 && DesupHtr.ReclaimHeatingSource != ReclaimHeatObjectType::CoilCoolingDX) { ShowSevereError(state, - format("{}, \"{}\" desuperheater heat source object not found: {} \"{}\"", - cCurrentModuleObject, - DesupHtr.Name, - heatSourceObjType, - cAlphaArgs(10))); + EnergyPlus::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, - format("{} = {}: {} must be greater than 0. {} = {:.6T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(6), - cNumericFieldNames(6), - rNumericArgs(6))); + EnergyPlus::format("{} = {}: {} must be greater than 0. {} = {:.6T}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(6), + cNumericFieldNames(6), + rNumericArgs(6))); ErrorsFound = true; } DesupHtr.PumpElecPower = rNumericArgs(7); if (DesupHtr.PumpElecPower < 0.0) { ShowSevereError(state, - format("{} = {}: {} must be >= 0. {} = {:.2T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(7), - cNumericFieldNames(7), - rNumericArgs(7))); + EnergyPlus::format("{} = {}: {} must be >= 0. {} = {:.2T}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(7), + cNumericFieldNames(7), + rNumericArgs(7))); ErrorsFound = true; } if ((DesupHtr.PumpElecPower / DesupHtr.OperatingWaterFlowRate) > 7.9264e6) { ShowWarningError(state, - format("{} = {}: {} to {} ratio > 7.9264E6. {} to {} = {:.3T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(7), - cNumericFieldNames(6), - cNumericFieldNames(7), - cNumericFieldNames(6), - (DesupHtr.PumpElecPower / DesupHtr.OperatingWaterFlowRate))); - ShowContinueError(state, format(" Suggest reducing {} or increasing {}.", cNumericFieldNames(7), cNumericFieldNames(6))); + 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))); 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, - format("{} = {}: {} must be >= 0 or <= 1. {} = {:.3T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(8), - cNumericFieldNames(8), - rNumericArgs(8))); + EnergyPlus::format("{} = {}: {} must be >= 0 or <= 1. {} = {:.3T}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(8), + cNumericFieldNames(8), + rNumericArgs(8))); ErrorsFound = true; } DesupHtr.OnCycParaLoad = rNumericArgs(9); if (DesupHtr.OnCycParaLoad < 0.0) { ShowSevereError(state, - format("{} = {}: {} must be >= 0. {} = {:.2T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(9), - cNumericFieldNames(9), - rNumericArgs(9))); + EnergyPlus::format("{} = {}: {} must be >= 0. {} = {:.2T}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(9), + cNumericFieldNames(9), + rNumericArgs(9))); ErrorsFound = true; } DesupHtr.OffCycParaLoad = rNumericArgs(10); if (DesupHtr.OffCycParaLoad < 0.0) { ShowSevereError(state, - format("{} = {}: {} must be >= 0. {} = {:.2T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(10), - cNumericFieldNames(10), - rNumericArgs(10))); + EnergyPlus::format("{} = {}: {} must be >= 0. {} = {:.2T}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(10), + cNumericFieldNames(10), + rNumericArgs(10))); ErrorsFound = true; } } if (ErrorsFound) { - ShowFatalError(state, format("Errors found in getting {} input. Preceding condition causes termination.", cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in getting {} input. Preceding condition causes termination.", cCurrentModuleObject)); } return ErrorsFound; @@ -1254,11 +1266,12 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // Dead Band Temperature Difference HPWH.DeadBandTempDiff = hpwhNumeric[1 + nNumericOffset]; if (HPWH.DeadBandTempDiff <= 0.0 || HPWH.DeadBandTempDiff > 20.0) { - ShowSevereError(state, format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, - format("{}{}", - hpwhNumericFieldNames[1 + nNumericOffset], - format(" difference must be > 0 and <= 20. Dead band = {:.1T}", hpwhNumeric[1 + nNumericOffset]))); + 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]))); ErrorsFound = true; } @@ -1289,9 +1302,10 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // Condenser Water Flow Rate HPWH.OperatingWaterFlowRate = hpwhNumeric[2]; if (HPWH.OperatingWaterFlowRate <= 0.0 && hpwhNumeric[2] != Constant::AutoCalculate) { - ShowSevereError(state, format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, - format("{} must be greater than 0. Condenser water flow rate = {:.6T}", hpwhNumericFieldNames[2], hpwhNumeric[2])); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError( + state, + EnergyPlus::format("{} must be greater than 0. Condenser water flow rate = {:.6T}", hpwhNumericFieldNames[2], hpwhNumeric[2])); ErrorsFound = true; } @@ -1302,22 +1316,22 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) HPWH.WrappedCondenserTopLocation = hpwhNumeric[3 + nNumericOffset]; if (HPWH.WrappedCondenserBottomLocation < 0.0) { - ShowSevereError(state, format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - format("{} must be greater than 0. Condenser bottom location = {:.6T}", - hpwhNumericFieldNames[2], - HPWH.WrappedCondenserBottomLocation)); + EnergyPlus::format("{} must be greater than 0. Condenser bottom location = {:.6T}", + hpwhNumericFieldNames[2], + HPWH.WrappedCondenserBottomLocation)); ErrorsFound = true; } if (HPWH.WrappedCondenserBottomLocation >= HPWH.WrappedCondenserTopLocation) { - ShowSevereError(state, format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - format("{} ({:.6T}) must be greater than {} ({:.6T}).", - HPWH.WrappedCondenserTopLocation, - hpwhNumericFieldNames[2], - hpwhNumericFieldNames[3], - HPWH.WrappedCondenserBottomLocation)); + EnergyPlus::format("{} ({:.6T}) must be greater than {} ({:.6T}).", + HPWH.WrappedCondenserTopLocation, + hpwhNumericFieldNames[2], + hpwhNumericFieldNames[3], + HPWH.WrappedCondenserBottomLocation)); ErrorsFound = true; } @@ -1332,11 +1346,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, format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - format("{}{}", - hpwhNumericFieldNames[3 + nNumericOffset], - format(" must be greater than 0. Evaporator air flow rate = {:.6T}", hpwhNumeric[3 + nNumericOffset]))); + EnergyPlus::format( + "{}{}", + hpwhNumericFieldNames[3 + nNumericOffset], + EnergyPlus::format(" must be greater than 0. Evaporator air flow rate = {:.6T}", hpwhNumeric[3 + nNumericOffset]))); ErrorsFound = true; } @@ -1375,13 +1390,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, format("{}=\"{}\", not found", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("{}=\"{}\".", hpwhAlphaFieldNames[13 + nAlphaOffset], hpwhAlpha[13 + nAlphaOffset])); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", not found", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", hpwhAlphaFieldNames[13 + nAlphaOffset], hpwhAlpha[13 + nAlphaOffset])); ErrorsFound = true; } } else { - ShowSevereError(state, format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("required {} is blank.", hpwhAlphaFieldNames[13 + nAlphaOffset])); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, EnergyPlus::format("required {} is blank.", hpwhAlphaFieldNames[13 + nAlphaOffset])); ErrorsFound = true; } break; @@ -1455,8 +1470,9 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) state, "Coil:WaterHeating:AirToWaterHeatPump:VariableSpeed", HPWH.DXCoilName, bVSCoilErrFlag); if (bVSCoilErrFlag) { - ShowContinueError(state, format("...occurs in {} ={}", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("...could not find either DXCoils::DXCoil or Variable Speed Coil {}", HPWH.DXCoilName)); + 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)); ErrorsFound = true; } } @@ -1475,9 +1491,9 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // this is a single speed coil DXCoils::DXCoilData &Coil = state.dataDXCoils->DXCoil(HPWH.DXCoilNum); if (!Util::SameString(HPWH.DXCoilType, Coil.DXCoilType)) { - ShowSevereError(state, format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("specifies the coil {}=\"{}\".", HPWH.DXCoilType, HPWH.DXCoilName)); - ShowContinueError(state, format("However, {} is a coil of type {}.", HPWH.DXCoilName, Coil.DXCoilType)); + 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, Coil.DXCoilType)); ErrorsFound = true; } HPWH.DXCoilTypeNum = Coil.DXCoilType_Num; @@ -1487,7 +1503,7 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // Make sure that the coil and tank are compatible. if (bIsVScoil) { if (HPWH.HPWHType != DataPlant::PlantEquipmentType::HeatPumpWtrHeaterPumped) { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Coil:WaterHeating:AirToWaterHeatPump:VariableSpeed can only be used with a pumped condenser heat pump " "water heater."); @@ -1498,7 +1514,7 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterPumped) || (HPWH.DXCoilTypeNum == HVAC::CoilDX_HeatPumpWaterHeaterWrapped && HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterWrapped))) { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); std::string ExpectedCoilType; if (HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterPumped) { ExpectedCoilType = HVAC::cAllCoilTypes(HVAC::CoilDX_HeatPumpWaterHeaterPumped); @@ -1507,7 +1523,7 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } else { assert(0); } - ShowContinueError(state, format("can only be used with {}", ExpectedCoilType)); + ShowContinueError(state, EnergyPlus::format("can only be used with {}", ExpectedCoilType)); ErrorsFound = true; } } @@ -1545,12 +1561,12 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) HPWH.MaxAirTempForHPOperation = hpwhNumeric[5 + nNumericOffset]; if (HPWH.MaxAirTempForHPOperation <= HPWH.MinAirTempForHPOperation) { ShowWarningError(state, - format("{}=\"{}\": maximum inlet air temperature for heat pump compressor operation", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name)); + EnergyPlus::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, format("...Minimum inlet air temperature = {:.1T}", HPWH.MinAirTempForHPOperation)); - ShowContinueError(state, format("...Maximum inlet air temperature = {:.1T}", HPWH.MaxAirTempForHPOperation)); + ShowContinueError(state, EnergyPlus::format("...Minimum inlet air temperature = {:.1T}", HPWH.MinAirTempForHPOperation)); + ShowContinueError(state, EnergyPlus::format("...Maximum inlet air temperature = {:.1T}", HPWH.MaxAirTempForHPOperation)); } // Compressor Location @@ -1571,32 +1587,32 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) case CrankcaseHeaterControlTemp::Zone: { if (HPWH.InletAirConfiguration == WTTAmbientTemp::OutsideAir || HPWH.InletAirConfiguration == WTTAmbientTemp::Schedule) { ShowSevereError(state, - format("{}=\"{}\": Inlet Air Configuration must be Zone Air Only or Zone And", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name)); + EnergyPlus::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, - format("{}=\"{}\" {} was provided but will not be used based on compressor location input=\"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - hpwhAlphaFieldNames[21 + nAlphaOffset], - hpwhAlpha[20 + nAlphaOffset])); + 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])); } break; } case CrankcaseHeaterControlTemp::Outdoors: { if (!hpwhAlphaBlank[21 + nAlphaOffset]) { ShowWarningError(state, - format("{}=\"{}\" {} was provided but will not be used based on {}=\"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - hpwhAlphaFieldNames[21 + nAlphaOffset], - hpwhAlphaFieldNames[21 + nAlphaOffset], - hpwhAlpha[20 + nAlphaOffset])); + 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])); } break; } @@ -1634,14 +1650,17 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) if (errFlag) { ErrorsFound = true; } else if (HPWH.fanType != HVAC::FanType::OnOff && HPWH.fanType != HVAC::FanType::SystemModel) { - ShowSevereError(state, format("{}=\"{}\": illegal fan type specified.", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, + EnergyPlus::format("{}=\"{}\": illegal fan type specified.", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError( state, - format(" The fan object ({}) type must be Fan:SystemModel or Fan:OnOff when used with a heat pump water heater.", HPWH.FanName)); + EnergyPlus::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, format("{}=\"{}\": illegal fan type specified.", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format(" The {} must specify that the fan object", state.dataIPShortCut->cCurrentModuleObject)); + 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)); ShowContinueError(state, " is of type FanSystemModel or Fan:OnOff in addition to the fan actually being of that type and defined elsewhere."); } @@ -1649,12 +1668,12 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) if (FanVolFlow != DataSizing::AutoSize && !errFlag) { if (FanVolFlow < HPWH.OperatingAirFlowRate) { ShowSevereError(state, - format("{} - air flow rate = {:.7T} in fan object {} is less than the HPWHs evaporator air flow rate.", - state.dataIPShortCut->cCurrentModuleObject, - FanVolFlow, - HPWH.FanName)); + EnergyPlus::format("{} - air flow rate = {:.7T} 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, format(" Occurs in unit = {}", HPWH.Name)); + ShowContinueError(state, EnergyPlus::format(" Occurs in unit = {}", HPWH.Name)); ErrorsFound = true; } } @@ -1676,13 +1695,15 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) 0.1422) { ShowWarningError( state, - format("{}= {}{}", - state.dataDXCoils->DXCoil(HPWH.DXCoilNum).DXCoilType, - state.dataDXCoils->DXCoil(HPWH.DXCoilNum).Name, - 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)))); + EnergyPlus::format( + "{}= {}{}", + state.dataDXCoils->DXCoil(HPWH.DXCoilNum).DXCoilType, + 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)))); } } else if ((HPWH.DXCoilNum > 0) && (bIsVScoil)) { @@ -1713,24 +1734,24 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // On Cycle Parasitic Electric Load HPWH.OnCycParaLoad = hpwhNumeric[6 + nNumericOffset]; if (HPWH.OnCycParaLoad < 0.0) { - ShowSevereError(state, format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - format("{} must be >= 0. {}{}", - hpwhNumericFieldNames[6 + nNumericOffset], - hpwhNumericFieldNames[6 + nNumericOffset], - format(" = {:.2T}", hpwhNumeric[6 + nNumericOffset]))); + EnergyPlus::format("{} must be >= 0. {}{}", + hpwhNumericFieldNames[6 + nNumericOffset], + hpwhNumericFieldNames[6 + nNumericOffset], + EnergyPlus::format(" = {:.2T}", hpwhNumeric[6 + nNumericOffset]))); ErrorsFound = true; } // Off Cycle Parasitic Electric Load HPWH.OffCycParaLoad = hpwhNumeric[7 + nNumericOffset]; if (HPWH.OffCycParaLoad < 0.0) { - ShowSevereError(state, format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - format("{} must be >= 0. {}{}", - hpwhNumericFieldNames[7 + nNumericOffset], - hpwhNumericFieldNames[2 + nNumericOffset], - format(" = {:.2T}", hpwhNumeric[7 + nNumericOffset]))); + EnergyPlus::format("{} must be >= 0. {}{}", + hpwhNumericFieldNames[7 + nNumericOffset], + hpwhNumericFieldNames[2 + nNumericOffset], + EnergyPlus::format(" = {:.2T}", hpwhNumeric[7 + nNumericOffset]))); ErrorsFound = true; } @@ -1738,15 +1759,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, format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("{} must be ZoneAirOnly or ZoneAndOutdoorAir", hpwhAlphaFieldNames[25 + nAlphaOffset])); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, EnergyPlus::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, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, " parasitic heat rejection location must be either Zone or Outdoors."); ErrorsFound = true; } @@ -1766,13 +1787,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); } else { - ShowWarningError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowWarningError(state, EnergyPlus::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, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Inlet air mixer node name required when Inlet Air Configuration is selected as ZoneAndOutdoorAir."); ErrorsFound = true; } @@ -1791,13 +1812,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); } else { - ShowWarningError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowWarningError(state, EnergyPlus::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, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Outlet air splitter node name required when Inlet Air Configuration is selected as ZoneAndOutdoorAir."); ErrorsFound = true; } @@ -1840,10 +1861,10 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) OutAirNodeManager::CheckAndAddAirNodeNumber(state, HPWH.OutsideAirNode, Okay); if (!Okay) { ShowWarningError(state, - format("{}=\"{}\": Adding outdoor air node={}", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - hpwhAlpha[9 + nAlphaOffset])); + EnergyPlus::format("{}=\"{}\": Adding outdoor air node={}", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name, + hpwhAlpha[9 + nAlphaOffset])); } } @@ -1918,10 +1939,10 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) OutAirNodeManager::CheckAndAddAirNodeNumber(state, HPWH.OutsideAirNode, Okay); if (!Okay) { ShowWarningError(state, - format("{}=\"{}\": Adding outdoor air node ={}", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - hpwhAlpha[9 + nAlphaOffset])); + EnergyPlus::format("{}=\"{}\": Adding outdoor air node ={}", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name, + hpwhAlpha[9 + nAlphaOffset])); } } @@ -1940,31 +1961,37 @@ 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, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, EnergyPlus::format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); ShowContinueError( - state, format("{} and {} must be specified.", hpwhAlphaFieldNames[7 + nAlphaOffset], hpwhAlphaFieldNames[8 + nAlphaOffset])); + state, + EnergyPlus::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, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); - ShowContinueError( - state, format("{} and {} must be specified.", hpwhAlphaFieldNames[9 + nAlphaOffset], hpwhAlphaFieldNames[10 + nAlphaOffset])); + 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])); 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, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, EnergyPlus::format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); if (HPWH.HeatPumpAirInletNode == 0 || HPWH.HeatPumpAirOutletNode == 0) { - ShowContinueError( - state, format("{} and {} must be specified.", hpwhAlphaFieldNames[7 + nAlphaOffset], hpwhAlphaFieldNames[8 + nAlphaOffset])); + ShowContinueError(state, + EnergyPlus::format("{} and {} must be specified.", + hpwhAlphaFieldNames[7 + nAlphaOffset], + hpwhAlphaFieldNames[8 + nAlphaOffset])); } if (HPWH.OutsideAirNode == 0 || HPWH.ExhaustAirNode == 0) { - ShowContinueError( - state, format("{} and {} must be specified.", hpwhAlphaFieldNames[9 + nAlphaOffset], hpwhAlphaFieldNames[10 + nAlphaOffset])); + ShowContinueError(state, + EnergyPlus::format("{} and {} must be specified.", + hpwhAlphaFieldNames[9 + nAlphaOffset], + hpwhAlphaFieldNames[10 + nAlphaOffset])); } ErrorsFound = true; } @@ -1992,26 +2019,28 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) FoundInletNode = true; } if (!FoundInletNode) { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, - format("The HPWH's air inlet node name = {} was not properly specified ", hpwhAlpha[7 + nAlphaOffset])); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError( state, - format("as an exhaust air node for zone = {} in a ZoneHVAC:EquipmentConnections object.", hpwhAlpha[13 + nAlphaOffset])); + EnergyPlus::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])); ErrorsFound = true; } if (!FoundOutletNode) { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, - format("The HPWH's air outlet node name = {} was not properly specified ", hpwhAlpha[8 + nAlphaOffset])); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError( state, - format("as an inlet air node for zone = {} in a ZoneHVAC:EquipmentConnections object.", hpwhAlpha[13 + nAlphaOffset])); + EnergyPlus::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])); ErrorsFound = true; } } } else { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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 " @@ -2063,13 +2092,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) int FanOutletNodeNum = state.dataFans->fans(HPWH.FanNum)->outletNodeNum; if (FanOutletNodeNum != HPWH.FanOutletNode) { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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, format("Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNodeNum))); + ShowContinueError(state, EnergyPlus::format("Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNodeNum))); } if (HPWH.FanOutletNode != 0) { - ShowContinueError(state, format("Expected fan outlet node name = {}", state.dataLoopNodes->NodeID(HPWH.FanOutletNode))); + ShowContinueError(state, EnergyPlus::format("Expected fan outlet node name = {}", state.dataLoopNodes->NodeID(HPWH.FanOutletNode))); } ErrorsFound = true; } @@ -2087,13 +2116,14 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } if (HPWH.fanPlace == HVAC::FanPlace::BlowThru) { if (FanInletNodeNum != HPWHFanInletNodeNum) { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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, format("Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNodeNum))); } if (HPWH.FanOutletNode != 0) { - ShowContinueError(state, format("Expected fan inlet node name = {}", state.dataLoopNodes->NodeID(HPWHFanInletNodeNum))); + ShowContinueError(state, + EnergyPlus::format("Expected fan inlet node name = {}", state.dataLoopNodes->NodeID(HPWHFanInletNodeNum))); } ErrorsFound = true; } @@ -2112,13 +2142,14 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } if (HPWH.fanPlace == HVAC::FanPlace::DrawThru) { if (FanInletNodeNum != DXCoilAirOutletNodeNum) { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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, format("Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNodeNum))); + ShowContinueError(state, EnergyPlus::format("Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNodeNum))); } if (DXCoilAirOutletNodeNum != 0) { - ShowContinueError(state, format("Expected fan inlet node name = {}", state.dataLoopNodes->NodeID(DXCoilAirOutletNodeNum))); + ShowContinueError(state, + EnergyPlus::format("Expected fan inlet node name = {}", state.dataLoopNodes->NodeID(DXCoilAirOutletNodeNum))); } ErrorsFound = true; } @@ -2134,13 +2165,14 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } } if (DXCoilAirOutletNodeNum != HPWHCoilOutletNodeNum) { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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, format("Coil outlet node name = {}", state.dataLoopNodes->NodeID(DXCoilAirOutletNodeNum))); + ShowContinueError(state, EnergyPlus::format("Coil outlet node name = {}", state.dataLoopNodes->NodeID(DXCoilAirOutletNodeNum))); } if (HPWHCoilOutletNodeNum != 0) { - ShowContinueError(state, format("Expected coil outlet node name = {}", state.dataLoopNodes->NodeID(HPWHCoilOutletNodeNum))); + ShowContinueError(state, + EnergyPlus::format("Expected coil outlet node name = {}", state.dataLoopNodes->NodeID(HPWHCoilOutletNodeNum))); } ErrorsFound = true; } @@ -2223,8 +2255,8 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } else if (Util::SameString(CtrlLogicFlag, "MUTUALLYEXCLUSIVE")) { HPWH.AllowHeatingElementAndHeatPumpToRunAtSameTime = false; } else { - ShowSevereError(state, format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("{} is not a valid value for field Tank Element Control Logic.", CtrlLogicFlag)); + 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)); ErrorsFound = true; } @@ -2341,9 +2373,9 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if ((state.dataIPShortCut->rNumericArgs(5) > Tank.MaxCapacity) && (!Tank.MaxCapacityWasAutoSized)) { ShowSevereError(state, - format("{} = {}: Heater Minimum Capacity cannot be greater than Heater Maximum Capacity", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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); @@ -2367,10 +2399,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) } default: { ShowSevereError(state, - format("{} = {}: Invalid Control Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::format("{} = {}: Invalid Control Type entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; break; } @@ -2385,10 +2417,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) switch (Tank.FuelType) { case Constant::eFuel::Invalid: { ShowSevereError(state, - format("{} = {}: Invalid Heater Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + EnergyPlus::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; @@ -2410,9 +2442,9 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) } } else { ShowSevereError(state, - format("{} = {}: Heater Thermal Efficiency must be greater than zero", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{} = {}: Heater Thermal Efficiency must be greater than zero", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2420,10 +2452,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.PLFCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(5)); if (Tank.PLFCurve == 0) { ShowSevereError(state, - format("{} = {}: Part Load Factor curve not found = {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(5))); + EnergyPlus::format("{} = {}: Part Load Factor curve not found = {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(5))); ErrorsFound = true; } else { bool IsValid; @@ -2432,9 +2464,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (!IsValid) { ShowSevereError( state, - 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))); + EnergyPlus::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))); ErrorsFound = true; } @@ -2458,10 +2491,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.OffCycParaFuelType = Tank.FuelType; } else { // could have been an unsupported value ShowSevereError(state, - format("{} = {}: Invalid Off-Cycle Parasitic Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(6))); + EnergyPlus::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; @@ -2483,10 +2516,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.OnCycParaFuelType = Tank.FuelType; } else { // could have been an unsupported value ShowSevereError(state, - format("{} = {}: Invalid On-Cycle Parasitic Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(7))); + EnergyPlus::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; @@ -2516,10 +2549,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.AmbientTempZone = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(10), state.dataHeatBal->Zone); if (Tank.AmbientTempZone == 0) { ShowSevereError(state, - format("{} = {}: Ambient Temperature Zone not found = {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(10))); + EnergyPlus::format("{} = {}: Ambient Temperature Zone not found = {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(10))); ErrorsFound = true; } } break; @@ -2537,14 +2570,15 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (!state.dataIPShortCut->cAlphaArgs(11).empty()) { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Tank.AmbientTempOutsideAirNode)) { ShowSevereError(state, - format("{} = {}: Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("...Referenced Node Name={}", state.dataIPShortCut->cAlphaArgs(11))); + 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))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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; } @@ -2553,10 +2587,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) } default: { ShowSevereError(state, - format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(8))); + EnergyPlus::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; @@ -2590,9 +2624,9 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (NumNums > 17) { if ((state.dataIPShortCut->rNumericArgs(18) > 1) || (state.dataIPShortCut->rNumericArgs(18) < 0)) { ShowSevereError(state, - format("{} = {}: Use Side Effectiveness is out of bounds (0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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); @@ -2603,9 +2637,9 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (NumNums > 18) { if ((state.dataIPShortCut->rNumericArgs(19) > 1) || (state.dataIPShortCut->rNumericArgs(19) <= 0)) { ShowSevereError(state, - format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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); @@ -2669,23 +2703,23 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (state.dataIPShortCut->rNumericArgs(17) > 0) { ShowWarningError(state, - format("{} = {}: Use side nodes are specified; Peak Volumetric Use Flow Rate will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{} = {}: Use side nodes are specified; Use Flow Rate Fraction Schedule will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{} = {}: Use side nodes are specified; Cold Water Supply Temperature Schedule will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{} = {}: Use side nodes are specified; Cold Water Supply Temperature Schedule will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } } @@ -2717,10 +2751,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) static_cast(getEnumValue(SourceSideControlNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(18)))); if (Tank.SourceSideControlMode == SourceSideControl::Invalid) { ShowSevereError(state, - format("{} = {}: Invalid Control Mode entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(18))); + EnergyPlus::format("{} = {}: Invalid Control Mode entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(18))); ErrorsFound = true; } } else { @@ -2816,9 +2850,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.Perimeter = state.dataIPShortCut->rNumericArgs(3); } else { ShowSevereError(state, - format("{} = {}: Tank Perimeter must be greater than zero for Tank Shape=OTHER", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{} = {}: Tank Perimeter must be greater than zero for Tank Shape=OTHER", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2826,10 +2860,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } default: { ShowSevereError(state, - format("{} = {}: Invalid Tank Shape entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::format("{} = {}: Invalid Tank Shape entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); Tank.Shape = TankShape::VertCylinder; ErrorsFound = true; break; @@ -2848,10 +2882,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) static_cast(getEnumValue(PriorityControlModeNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(4)))); if (Tank.StratifiedControlMode == PriorityControlMode::Invalid) { ShowSevereError(state, - format("{} = {}: Invalid Heater Priority Control entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + EnergyPlus::format("{} = {}: Invalid Heater Priority Control entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } @@ -2888,11 +2922,13 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) // Test if Heater height is within range if ((!Tank.HeightWasAutoSized) && (Tank.HeaterHeight1 > tankHeightForTesting)) { ShowSevereError(state, - format("{} = {}: Heater 1 is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(7), state.dataIPShortCut->rNumericArgs(7))); + EnergyPlus::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, + EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(7), state.dataIPShortCut->rNumericArgs(7))); ErrorsFound = true; } @@ -2917,11 +2953,13 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) // Test if Heater height is within range if ((!Tank.HeightWasAutoSized) && (Tank.HeaterHeight2 > tankHeightForTesting)) { ShowSevereError(state, - format("{} = {}: Heater 2 is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->rNumericArgs(10))); + EnergyPlus::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( + state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->rNumericArgs(10))); ErrorsFound = true; } @@ -2932,10 +2970,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, - format("{} = {}: Invalid Heater Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(7))); + EnergyPlus::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; @@ -2953,9 +2991,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } } else { ShowSevereError(state, - format("{} = {}: Heater Thermal Efficiency must be greater than zero", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{} = {}: Heater Thermal Efficiency must be greater than zero", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2971,10 +3009,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.OffCycParaFuelType = Tank.FuelType; } else { ShowSevereError(state, - format("{} = {}: Invalid Off-Cycle Parasitic Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(8))); + EnergyPlus::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; @@ -2996,10 +3034,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.OnCycParaFuelType = Tank.FuelType; } else { ShowSevereError(state, - format("{} = {}: Invalid On-Cycle Parasitic Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(9))); + EnergyPlus::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; @@ -3027,10 +3065,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.AmbientTempZone = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(12), state.dataHeatBal->Zone); if (Tank.AmbientTempZone == 0) { ShowSevereError(state, - format("{} = {}: Ambient Temperature Zone not found = {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(12))); + EnergyPlus::format("{} = {}: Ambient Temperature Zone not found = {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(12))); ErrorsFound = true; } @@ -3049,14 +3087,15 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) if (!state.dataIPShortCut->cAlphaArgs(13).empty()) { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Tank.AmbientTempOutsideAirNode)) { ShowSevereError(state, - format("{} = {}: Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("...Referenced Node Name={}", state.dataIPShortCut->cAlphaArgs(13))); + 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))); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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; } @@ -3065,10 +3104,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } default: { ShowSevereError(state, - format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(10))); + EnergyPlus::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; @@ -3113,11 +3152,13 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } if ((!Tank.HeightWasAutoSized) && (Tank.UseInletHeight > Tank.Height)) { ShowSevereError(state, - format("{} = {}: Use inlet is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(24), state.dataIPShortCut->rNumericArgs(24))); + EnergyPlus::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( + state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(24), state.dataIPShortCut->rNumericArgs(24))); ErrorsFound = true; } @@ -3132,20 +3173,22 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } if ((!Tank.HeightWasAutoSized) && (Tank.UseOutletHeight > Tank.Height)) { ShowSevereError(state, - format("{} = {}: Use outlet is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(25), state.dataIPShortCut->rNumericArgs(25))); + EnergyPlus::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( + state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(25), state.dataIPShortCut->rNumericArgs(25))); ErrorsFound = true; } if (NumNums > 25) { if ((state.dataIPShortCut->rNumericArgs(26) > 1) || (state.dataIPShortCut->rNumericArgs(26) <= 0)) { ShowSevereError(state, - format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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); @@ -3164,11 +3207,13 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } if ((!Tank.HeightWasAutoSized) && (Tank.SourceInletHeight > Tank.Height)) { ShowSevereError(state, - format("{} = {}: Source inlet is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(27), state.dataIPShortCut->rNumericArgs(27))); + EnergyPlus::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( + state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(27), state.dataIPShortCut->rNumericArgs(27))); ErrorsFound = true; } @@ -3180,11 +3225,13 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } if ((!Tank.HeightWasAutoSized) && (Tank.SourceOutletHeight > Tank.Height)) { ShowSevereError(state, - format("{} = {}: Source outlet is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError(state, format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(28), state.dataIPShortCut->rNumericArgs(28))); + EnergyPlus::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( + state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(28), state.dataIPShortCut->rNumericArgs(28))); ErrorsFound = true; } @@ -3246,23 +3293,23 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) if (state.dataIPShortCut->rNumericArgs(22) > 0) { ShowWarningError(state, - format("{} = {}: Use side nodes are specified; Peak Volumetric Use Flow Rate will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{} = {}: Use side nodes are specified; Use Flow Rate Fraction Schedule will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{} = {}: Use side nodes are specified; Cold Water Supply Temperature Schedule will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{} = {}: Use side nodes are specified; Cold Water Supply Temperature Schedule will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } } @@ -3317,9 +3364,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) if (specifiedNodes > Tank.Nodes) { ShowWarningError( state, - 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))); + 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))); } Tank.SetupStratifiedNodes(state); @@ -3329,10 +3377,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) static_cast(getEnumValue(SourceSideControlNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(21)))); if (Tank.SourceSideControlMode == SourceSideControl::Invalid) { ShowSevereError(state, - format("{} = {}: Invalid Control Mode entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(21))); + EnergyPlus::format("{} = {}: Invalid Control Mode entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(21))); ErrorsFound = true; } } else { @@ -3467,9 +3515,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, format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError(state, "Zone was not found."); ErrorsFound = true; } @@ -3488,15 +3537,18 @@ bool getWaterTankMixedInput(EnergyPlusData &state) DataLoopNode::ObjectIsNotParent); if (!state.dataIPShortCut->lAlphaFieldBlanks(6)) { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Tank.AmbientTempOutsideAirNode)) { - ShowSevereError(state, - format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); - ShowContinueError(state, - format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + 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))); ShowContinueError(state, "Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node"); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::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; } @@ -3505,10 +3557,10 @@ bool getWaterTankMixedInput(EnergyPlusData &state) } default: { ShowSevereError(state, - format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::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; @@ -3531,18 +3583,18 @@ bool getWaterTankMixedInput(EnergyPlusData &state) if ((state.dataIPShortCut->rNumericArgs(6) > 1) || (state.dataIPShortCut->rNumericArgs(6) < 0)) { ShowSevereError(state, - format("{} = {}: Use Side Effectiveness is out of bounds (0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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); @@ -3718,18 +3770,19 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) if (Perimeter > 0.0) { Tank.Perimeter = Perimeter; } else { - ShowSevereError( - state, format("{} = {}: Tank Perimeter must be greater than zero for Tank Shape=OTHER", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, + EnergyPlus::format( + "{} = {}: Tank Perimeter must be greater than zero for Tank Shape=OTHER", cCurrentModuleObject, thisObjectName)); ErrorsFound = true; } break; } default: { ShowSevereError(state, - format("{} = {}: Invalid Tank Shape entered={}", - cCurrentModuleObject, - thisObjectName, - Util::makeUPPER(fields.at("tank_shape").get()))); + EnergyPlus::format("{} = {}: Invalid Tank Shape entered={}", + cCurrentModuleObject, + thisObjectName, + Util::makeUPPER(fields.at("tank_shape").get()))); Tank.Shape = TankShape::VertCylinder; ErrorsFound = true; break; @@ -3821,8 +3874,8 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) Tank.DeadBandDeltaTemp = 0.0001; } - Tank.MaxCapacity = - state.dataInputProcessing->inputProcessor->getRealFieldValue(fields, schemaProps, format("nominal_{}_capacity", kwHeatingCooling)); + Tank.MaxCapacity = state.dataInputProcessing->inputProcessor->getRealFieldValue( + fields, schemaProps, EnergyPlus::format("nominal_{}_capacity", kwHeatingCooling)); if (Tank.MaxCapacity == DataSizing::AutoSize) { Tank.MaxCapacityWasAutoSized = true; } @@ -3863,8 +3916,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, format("Invalid, {} = {}", "ambient_temperature_zone_name", ambientTempZoneName)); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, Tank.Name)); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", "ambient_temperature_zone_name", ambientTempZoneName)); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, Tank.Name)); ShowContinueError(state, "Zone was not found."); ErrorsFound = true; } @@ -3888,13 +3941,13 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) NodeInputManager::CompFluidStream::Primary, DataLoopNode::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Tank.AmbientTempOutsideAirNode)) { - ShowSevereError(state, format("Invalid, {} = {}", fieldName, fieldValue)); - ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, fieldValue)); + ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", fieldName, fieldValue)); + ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, fieldValue)); ShowContinueError(state, "Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node"); ErrorsFound = true; } } else { - ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "An Ambient Outdoor Air Node name must be used when the Ambient Temperature Indicator is Outdoors."); ErrorsFound = true; } @@ -3903,10 +3956,10 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) } default: { ShowSevereError(state, - format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - cCurrentModuleObject, - thisObjectName, - Util::makeUPPER(fields.at("ambient_temperature_indicator").get()))); + EnergyPlus::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; @@ -3928,7 +3981,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, format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", cCurrentModuleObject, thisObjectName)); + ShowSevereError( + state, EnergyPlus::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", cCurrentModuleObject, thisObjectName)); ErrorsFound = true; } @@ -3943,30 +3997,33 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) if (Tank.UseInletHeight == Constant::AutoCalculate) { Tank.UseInletHeight = Tank.Height; } else if (Tank.UseInletHeight > Tank.Height) { - ShowSevereError(state, - format("{} = {}: Use inlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("{} = {:.4R}", "tank_height", Tank.Height)); - ShowContinueError(state, format("{} = {:.4R}", "use_side_inlet_height", Tank.UseInletHeight)); + ShowSevereError( + state, + EnergyPlus::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; } // Defaults to 0.0 Tank.UseOutletHeight = state.dataInputProcessing->inputProcessor->getRealFieldValue(fields, schemaProps, "use_side_outlet_height"); if (Tank.UseOutletHeight > Tank.Height) { - ShowSevereError(state, - format("{} = {}: Use outlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("{} = {:.4R}", "tank_height", Tank.Height)); - ShowContinueError(state, format("{} = {:.4R}", "use_side_outlet_height", Tank.UseOutletHeight)); + ShowSevereError( + state, + EnergyPlus::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; } // Defaults to 0.0 Tank.SourceInletHeight = state.dataInputProcessing->inputProcessor->getRealFieldValue(fields, schemaProps, "source_side_inlet_height"); if (Tank.SourceInletHeight > Tank.Height) { - ShowSevereError(state, - format("{} = {}: Source inlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("{} = {:.4R}", "tank_height", Tank.Height)); - ShowContinueError(state, format("{} = {:.4R}", "source_side_inlet_height", Tank.SourceInletHeight)); + ShowSevereError( + state, + EnergyPlus::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; } @@ -3975,10 +4032,11 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) if (Tank.SourceOutletHeight == Constant::AutoCalculate) { Tank.SourceOutletHeight = Tank.Height; } else if (Tank.SourceOutletHeight > Tank.Height) { - ShowSevereError(state, - format("{} = {}: Source outlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, format("{} = {:.4R}", "tank_height", Tank.Height)); - ShowContinueError(state, format("{} = {:.4R}", "source_side_outlet_height", Tank.SourceOutletHeight)); + ShowSevereError( + state, + EnergyPlus::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; } } @@ -4095,9 +4153,10 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) if (fields.find(format("node_{}_additional_loss_coefficient", Tank.Nodes + 1)) != fields.end()) { ShowWarningError( state, - format("{} = {}: More Additional Loss Coefficients were entered than the number of nodes; extra coefficients will not be used", - cCurrentModuleObject, - thisObjectName)); + EnergyPlus::format( + "{} = {}: More Additional Loss Coefficients were entered than the number of nodes; extra coefficients will not be used", + cCurrentModuleObject, + thisObjectName)); } Tank.SetupStratifiedNodes(state); @@ -4255,37 +4314,37 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // verify Desuperheater/tank source node connections if (DesuperHtr.WaterInletNode != Tank.SourceOutletNode) { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); ShowContinueError(state, "Desuperheater inlet node name does not match thermal tank source outlet node name."); ShowContinueError(state, - format("Desuperheater water inlet and outlet node names = {} and {}", - DesuperHtr.InletNodeName1, - DesuperHtr.OutletNodeName1)); + EnergyPlus::format("Desuperheater water inlet and outlet node names = {} and {}", + DesuperHtr.InletNodeName1, + DesuperHtr.OutletNodeName1)); ShowContinueError(state, - format("Thermal tank source side inlet and outlet node names = {} and {}", - Tank.InletNodeName2, - Tank.OutletNodeName2)); + EnergyPlus::format("Thermal tank source side inlet and outlet node names = {} and {}", + Tank.InletNodeName2, + Tank.OutletNodeName2)); ErrorsFound = true; } if (DesuperHtr.WaterOutletNode != Tank.SourceInletNode) { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); ShowContinueError(state, "Desuperheater water outlet node name does not match thermal tank source inlet node name."); ShowContinueError(state, - format("Desuperheater water inlet and outlet node names = {} and {}", - DesuperHtr.InletNodeName1, - DesuperHtr.OutletNodeName1)); + EnergyPlus::format("Desuperheater water inlet and outlet node names = {} and {}", + DesuperHtr.InletNodeName1, + DesuperHtr.OutletNodeName1)); ShowContinueError(state, - format("Thermal tank source side inlet and outlet node names = {} and {}", - Tank.InletNodeName2, - Tank.OutletNodeName2)); + EnergyPlus::format("Thermal tank source side inlet and outlet node names = {} and {}", + Tank.InletNodeName2, + Tank.OutletNodeName2)); ErrorsFound = true; } } if (DesuperHtr.WaterHeaterTankNum == 0) { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); - ShowContinueError(state, format(" Water heater tank = {} not found.", DesuperHtr.TankName)); + ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); + ShowContinueError(state, EnergyPlus::format(" Water heater tank = {} not found.", DesuperHtr.TankName)); ErrorsFound = true; } } @@ -4332,8 +4391,8 @@ void GetWaterThermalTankInput(EnergyPlusData &state) HPWH.TankType = Tank.Type; HPWH.HPWHTankType = Tank.WaterThermalTankType; } else { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("Invalid water heater tank type = {}", Tank.Type)); + ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid water heater tank type = {}", Tank.Type)); ErrorsFound = true; } @@ -4357,8 +4416,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, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("Heater Control Type for {} = {} must be CYCLE.", Tank.Type, Tank.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, EnergyPlus::format("Heater Control Type for {} = {} must be CYCLE.", Tank.Type, Tank.Name)); ErrorsFound = true; } @@ -4369,20 +4428,21 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if (Tank.DesuperheaterNum > 0) { ShowSevereError( state, - 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)); + 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)); } // check that water heater source side effectiveness is greater than 0 if (Tank.SourceEffectiveness <= 0.0) { ShowSevereError(state, - format("{} = {}: Invalid source side effectiveness for heat pump water heater = {:.3T}", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - Tank.SourceEffectiveness)); + EnergyPlus::format("{} = {}: Invalid source side effectiveness for heat pump water heater = {:.3T}", + 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; } @@ -4390,9 +4450,11 @@ 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, format("{} = {} has a source inlet or outlet node specified,", Tank.Type, Tank.Name)); - ShowContinueError( - state, format("but it is attached to {} = {}, which doesn't permit source side connections.", HPWH.Type, HPWH.Name)); + 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)); ShowContinueError(state, "Please leave the source side inlet and outlet fields blank."); ErrorsFound = true; } else { @@ -4432,20 +4494,21 @@ void GetWaterThermalTankInput(EnergyPlusData &state) } if (HPWH.WHUseInletNode != Tank.UseInletNode || HPWH.WHUseOutletNode != Tank.UseOutletNode) { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, - 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)); + ShowSevereError(state, EnergyPlus::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)); ShowContinueError(state, - format("Heat pump water heater use side inlet and outlet node names = {} and {}", - HPWH.InletNodeName2, - HPWH.OutletNodeName2)); + EnergyPlus::format("Heat pump water heater use side inlet and outlet node names = {} and {}", + HPWH.InletNodeName2, + HPWH.OutletNodeName2)); ShowContinueError(state, - format("Water heater tank use side inlet and outlet node names = {} and {}", - Tank.InletNodeName1, - Tank.OutletNodeName1)); + EnergyPlus::format("Water heater tank use side inlet and outlet node names = {} and {}", + Tank.InletNodeName1, + Tank.OutletNodeName1)); ErrorsFound = true; } else { if (!HPWH.StandAlone) { @@ -4455,30 +4518,32 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // verify HP/tank source node connections if (HPWH.CondWaterInletNode != Tank.SourceOutletNode) { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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, - format("Heat pump condenser water inlet and outlet node names = {} and {}", HPWH.InletNodeName1, HPWH.OutletNodeName1)); ShowContinueError(state, - format("Water heater tank source side inlet and outlet node names = {} and {}", - Tank.InletNodeName2, - Tank.OutletNodeName2)); + EnergyPlus::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)); ErrorsFound = true; } if (HPWH.CondWaterOutletNode != Tank.SourceInletNode) { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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, - format("Heat pump condenser water inlet and outlet node names = {} and {}", HPWH.InletNodeName1, HPWH.OutletNodeName1)); ShowContinueError(state, - format("Water heater tank source side inlet and outlet node names = {} and {}", - Tank.InletNodeName2, - Tank.OutletNodeName2)); + EnergyPlus::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)); ErrorsFound = true; } @@ -4486,7 +4551,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, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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; } @@ -4512,7 +4577,7 @@ void GetWaterThermalTankInput(EnergyPlusData &state) break; } // EquipmentTypeNum if (!FoundTankInList) { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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 " @@ -4531,7 +4596,7 @@ void GetWaterThermalTankInput(EnergyPlusData &state) } } // EquipmentTypeNum if (TankNotLowestPriority && FoundTankInList) { - ShowWarningError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowWarningError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat pump water heaters should be simulated first, before other space " "conditioning equipment."); @@ -4540,7 +4605,7 @@ void GetWaterThermalTankInput(EnergyPlusData &state) "not 1 in the ZoneHVAC:EquipmentList."); } } else { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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."); @@ -4553,7 +4618,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, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowWarningError(state, EnergyPlus::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."); @@ -4622,12 +4687,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, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::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, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Control Sensor 2 is located outside the tank."); ErrorsFound = true; } @@ -4660,8 +4725,8 @@ void GetWaterThermalTankInput(EnergyPlusData &state) } // DO CheckWaterHeaterNum = 1, NumWaterHeater if (!HPWH.FoundTank) { - ShowSevereError(state, format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, format("Water heater tank object not found = {}, {}", HPWH.TankType, HPWH.TankName)); + ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, EnergyPlus::format("Water heater tank object not found = {}, {}", HPWH.TankType, HPWH.TankName)); ErrorsFound = true; } @@ -4693,9 +4758,9 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if (WaterThermalTankNum == 0) { // did not match name throw warning. ShowSevereError(state, - format("{} object name: {} does not match any of the water heaters defined in the file", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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 @@ -4716,10 +4781,10 @@ void GetWaterThermalTankInput(EnergyPlusData &state) } else { // wrong design mode entered, throw error ShowSevereError(state, - format("{} object named: {} contains an incorrect Design Mode of: {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::format("{} object named: {} contains an incorrect Design Mode of: {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } @@ -4756,17 +4821,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, - format("{}, named {}, design mode set to Peak Draw but needs a positive value for tank draw time", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + 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))); ErrorsFound = true; } // constrain crazy sizes by limiting to 10 years or 8760*10 if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankDrawTime > 87600.0) { ShowWarningError(state, - format("{}, named {}, has input with an unreasonably large Tank Draw Time, more than 10 years", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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 @@ -4775,9 +4840,9 @@ void GetWaterThermalTankInput(EnergyPlusData &state) (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).UseDesignVolFlowRateWasAutoSized)) { if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.NominalVolForSizingDemandSideFlow <= 0.0) { ShowWarningError(state, - format("{}, named {} needs a value for Nominal Tank Volume for Autosizing Plant Connections", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}, named {} needs a value for Nominal Tank Volume for Autosizing Plant Connections", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -4786,9 +4851,9 @@ void GetWaterThermalTankInput(EnergyPlusData &state) (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).SourceDesignVolFlowRateWasAutoSized)) { if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.NominalVolForSizingDemandSideFlow <= 0.0) { ShowWarningError(state, - format("{}, named {} needs a value for Nominal Tank Volume for Autosizing Plant Connections", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}, named {} needs a value for Nominal Tank Volume for Autosizing Plant Connections", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -4799,16 +4864,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, - format("{}, named {}, mode needs at least one bedroom", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{}, named {}, probably has too many bedrooms for the selected design mode", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}, named {}, probably has too many bedrooms for the selected design mode", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } break; @@ -4818,18 +4883,18 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).VolumeWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankCapacityPerPerson <= 0.0)) { ShowSevereError(state, - format("{}, named {}, PerPerson mode needs positive value input for storage capacity per person", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{}, named {}, PerPerson mode needs positive value input for recovery capacity per person", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}, named {}, PerPerson mode needs positive value input for recovery capacity per person", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -4838,16 +4903,18 @@ void GetWaterThermalTankInput(EnergyPlusData &state) case SizingMode::PerFloorArea: { if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).VolumeWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankCapacityPerArea <= 0.0)) { - ShowSevereError(state, - format("{}, named {}, PerArea mode needs positive value input for storage capacity per floor area", + ShowSevereError( + state, + EnergyPlus::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, - format("{}, named {}, PerArea mode needs positive value input for recovery capacity per floor area", + ShowSevereError( + state, + EnergyPlus::format("{}, named {}, PerArea mode needs positive value input for recovery capacity per floor area", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; @@ -4859,33 +4926,33 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).VolumeWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankCapacityPerUnit <= 0.0)) { ShowSevereError(state, - format("{}, named {}, PerUnit mode needs positive value input for storage capacity per unit", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{}, named {}, PerUnit mode needs positive value input for number of units", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{}, named {}, PerUnit mode needs positive value input for recovery capacity per unit", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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, - format("{}, named {}, PerUnit mode needs positive value input for number of units", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format("{}, named {}, PerUnit mode needs positive value input for number of units", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4895,9 +4962,10 @@ void GetWaterThermalTankInput(EnergyPlusData &state) (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankCapacityPerCollectorArea <= 0.0)) { ShowSevereError( state, - format("{}, named {}, PerSolarCollectorArea mode needs positive value input for storage capacity per collector area", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::format( + "{}, named {}, PerSolarCollectorArea mode needs positive value input for storage capacity per collector area", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4919,22 +4987,25 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if (Tank.Sizing.DesignMode == SizingMode::Invalid) { if (Tank.VolumeWasAutoSized) { - ShowSevereError(state, - format("{}='{}' has tank volume set to Autosize but it is missing associated WaterHeater:Sizing object", + 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)); ErrorsFound = true; } if (Tank.MaxCapacityWasAutoSized) { - ShowSevereError(state, - format("{}='{}' has heater capacity set to Autosize but it is missing associated WaterHeater:Sizing object", + 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)); ErrorsFound = true; } if (Tank.HeightWasAutoSized) { - ShowSevereError(state, - format("{}='{}' has tank height set to Autosize but it is missing associated WaterHeater:Sizing object", + 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)); ErrorsFound = true; @@ -5108,7 +5179,7 @@ void WaterThermalTankData::setupHotWaterTankOutputVars(EnergyPlusData &state) // currently only stratified tank for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - format("Hot Water Thermal Storage Tank Temperature Node {}", NodeNum), + EnergyPlus::format("Hot Water Thermal Storage Tank Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).TempAvg, OutputProcessor::TimeStepType::System, @@ -5118,7 +5189,7 @@ void WaterThermalTankData::setupHotWaterTankOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - format("Hot Water Thermal Storage Tank Final Temperature Node {}", NodeNum), + EnergyPlus::format("Hot Water Thermal Storage Tank Final Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).Temp, OutputProcessor::TimeStepType::System, @@ -5307,7 +5378,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - format("Chilled Water Thermal Storage Tank Temperature Node {}", NodeNum), + EnergyPlus::format("Chilled Water Thermal Storage Tank Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).TempAvg, OutputProcessor::TimeStepType::System, @@ -5317,7 +5388,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - format("Chilled Water Thermal Storage Tank Final Temperature Node {}", NodeNum), + EnergyPlus::format("Chilled Water Thermal Storage Tank Final Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).Temp, OutputProcessor::TimeStepType::System, @@ -5632,14 +5703,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) this->Name); SetupOutputVariable(state, - format("Water Heater {} Rate", Constant::eFuelNames[static_cast(this->FuelType)]), + EnergyPlus::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, - format("Water Heater {} Energy", Constant::eFuelNames[static_cast(this->FuelType)]), + EnergyPlus::format("Water Heater {} Energy", Constant::eFuelNames[static_cast(this->FuelType)]), Constant::Units::J, this->FuelEnergy, OutputProcessor::TimeStepType::System, @@ -5650,43 +5721,47 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) OutputProcessor::EndUseCat::WaterSystem, // DHW this->EndUseSubcategoryName); - SetupOutputVariable(state, - 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, - 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, - 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, - 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, + 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, "Water Heater Water Volume Flow Rate", @@ -5936,7 +6011,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - format("Water Heater Temperature Node {}", NodeNum), + EnergyPlus::format("Water Heater Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).TempAvg, OutputProcessor::TimeStepType::System, @@ -5946,7 +6021,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - format("Water Heater Final Temperature Node {}", NodeNum), + EnergyPlus::format("Water Heater Final Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).Temp, OutputProcessor::TimeStepType::System, @@ -6291,8 +6366,9 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA this->Mass = this->Volume * rho; this->UseSidePlantSizNum = state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).PlantSizNum; if ((this->UseDesignVolFlowRateWasAutoSized) && (this->UseSidePlantSizNum == 0)) { - ShowSevereError(state, - format("InitWaterThermalTank: Did not find Sizing:Plant object for use side of plant thermal tank = {}", this->Name)); + ShowSevereError( + state, + EnergyPlus::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)."); } } @@ -6303,8 +6379,9 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA this->Mass = this->Volume * rho; this->UseSidePlantSizNum = state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).PlantSizNum; if ((this->UseDesignVolFlowRateWasAutoSized) && (this->UseSidePlantSizNum == 0)) { - ShowSevereError(state, - format("InitWaterThermalTank: Did not find Sizing:Plant object for use side of plant thermal tank = {}", this->Name)); + ShowSevereError( + state, + EnergyPlus::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)."); } } @@ -6314,8 +6391,9 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; this->SourceSidePlantSizNum = state.dataPlnt->PlantLoop(this->SrcSidePlantLoc.loopNum).PlantSizNum; if ((this->SourceDesignVolFlowRateWasAutoSized) && (this->SourceSidePlantSizNum == 0)) { - ShowSevereError( - state, format("InitWaterThermalTank: Did not find Sizing:Plant object for source side of plant thermal tank = {}", this->Name)); + ShowSevereError(state, + EnergyPlus::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)."); } } @@ -6356,11 +6434,12 @@ 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, format("Occurs for stratified tank name = {}", this->Name)); - ShowContinueError(state, format("Tank volume = {:.4R} [m3]", this->Volume)); - ShowContinueError(state, format("Tank use side volume flow rate = {:.4R} [m3/s]", this->UseDesignVolFlowRate)); - ShowContinueError(state, format("Tank source side volume flow rate = {:.4R} [m3/s]", this->SourceDesignVolFlowRate)); - ShowContinueError(state, format("Nominal tank change over rate = {:.2R} [s]", TankChangeRateScale)); + ShowContinueError(state, EnergyPlus::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, + EnergyPlus::format("Tank source side volume flow rate = {:.4R} [m3/s]", this->SourceDesignVolFlowRate)); + ShowContinueError(state, EnergyPlus::format("Nominal tank change over rate = {:.2R} [s]", TankChangeRateScale)); ShowContinueError( state, "Change over rate is too fast, increase tank volume, decrease connection flow rates or use mixed tank model"); @@ -6544,12 +6623,14 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA if (this->ShowSetPointWarning) { ShowSevereError( state, - format("Water heater = {}: Water heater tank set point temperature is greater than the maximum tank temperature limit.", - this->Name)); - ShowContinueErrorTimeStamp(state, - format("Water heater tank set point temperature is reset to Tank Temperature Limit minus 1 C " - "({:.2T}) and simulation continues.", - this->SetPointTemp)); + 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)); this->ShowSetPointWarning = false; } } @@ -6561,12 +6642,14 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA if (this->ShowSetPointWarning) { ShowSevereError( state, - format("Chilled Water Tank = {}: Water heater tank set point temperature is lower than the minimum tank temperature limit.", - this->Name)); - ShowContinueErrorTimeStamp(state, - format("Chilled water tank set point temperature is reset to Tank Temperature Limit plus 1 C " - "({:.2T}) and simulation continues.", - this->SetPointTemp)); + EnergyPlus::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)); this->ShowSetPointWarning = false; } } @@ -6613,14 +6696,16 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).SetPointTemp = this->TankTempLimit - 1.0; if (state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).ShowSetPointWarning) { - ShowSevereError(state, - format("Heat Pump Water Heater = {}: Heat Pump water heater set point temperature is equal to or greater than " + 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, - 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)); + 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)); state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).ShowSetPointWarning = false; } } @@ -6949,27 +7034,29 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA state.dataWaterThermalTanks->HPWaterHeater(HPNum).NumofSpeed)) { // but this is the not the scaled mas flow // if ( FanVolFlow < HPWaterHeater( HPNum ).HPWHAirVolFlowRate( HPWaterHeater( HPNum ).NumofSpeed ) ) { - ShowWarningError(state, - 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))); + 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))); ShowContinueError(state, " The MSHP system flow rate when waterheating is required is reset to the" " fan flow rate and the simulation continues."); - ShowContinueError(state, format(" Occurs in {}", state.dataWaterThermalTanks->HPWaterHeater(HPNum).Name)); + ShowContinueError(state, EnergyPlus::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, - 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, format(" Occurs in {}", state.dataWaterThermalTanks->HPWaterHeater(HPNum).Name)); + 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)); state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate(Iter) = state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate(Iter + 1); } @@ -7534,7 +7621,8 @@ void WaterThermalTankData::CalcWaterThermalTankMixed(EnergyPlusData &state) // W if (!state.dataGlobal->WarmupFlag) { if (this->MaxCycleErrorIndex == 0) { - ShowWarningError(state, format("WaterHeater:Mixed = {}: Heater is cycling on and off more than once per second.", this->Name)); + ShowWarningError( + state, EnergyPlus::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, ""); } @@ -7582,12 +7670,13 @@ void WaterThermalTankData::CalcWaterThermalTankMixed(EnergyPlusData &state) // W // Warn for potential freezing when avg of final temp over all nodes is below 2°C (nearing 0°C) if (this->TankTemp < 2) { if (this->FreezingErrorIndex == 0) { - ShowWarningError(state, - format("{}: {} = '{}': Temperature of tank < 2C indicates of possibility of freeze. Tank Temperature = {:.2R} C.", - RoutineName, - this->Type, - this->Name, - this->TankTemp)); + ShowWarningError( + state, + EnergyPlus::format("{}: {} = '{}': Temperature of tank < 2C indicates of possibility of freeze. Tank Temperature = {:.2R} C.", + RoutineName, + this->Type, + this->Name, + this->TankTemp)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -8527,12 +8616,13 @@ void WaterThermalTankData::CalcWaterThermalTankStratified(EnergyPlusData &state) // Warn for potential freezing when avg of final temp over all nodes is below 2°C (nearing 0°C) if (this->TankTemp < 2) { if (this->FreezingErrorIndex == 0) { - ShowWarningError(state, - format("{}: {} = '{}': Temperature of tank < 2C indicates of possibility of freeze. Tank Temperature = {:.2R} C.", - RoutineName, - this->Type, - this->Name, - this->TankTemp)); + ShowWarningError( + state, + EnergyPlus::format("{}: {} = '{}': Temperature of tank < 2C indicates of possibility of freeze. Tank Temperature = {:.2R} C.", + RoutineName, + this->Type, + this->Name, + this->TankTemp)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -8996,12 +9086,13 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b Real64 MinTemp = desupHtrSetPointTemp - DeadBandTempDiff; ++DesupHtr.SetPointError; if (DesupHtr.SetPointError < 5) { - ShowWarningError(state, - 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, format(" ...Desuperheater cut-in temperature = {:.2R}", MinTemp)); + 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)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format(" ...Desuperheater cut-in temperature = {:.2R}", MinTemp)); } else { ShowRecurringWarningErrorAtEnd(state, DesupHtr.Type + " \"" + DesupHtr.Name + @@ -9169,12 +9260,12 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (!state.dataGlobal->WarmupFlag) { ++DesupHtr.IterLimitExceededNum1; if (DesupHtr.IterLimitExceededNum1 == 1) { - ShowWarningError(state, format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); ShowContinueError(state, - format("Iteration limit exceeded calculating desuperheater unit part-load ratio, " - "maximum iterations = {}. Part-load ratio returned = {:.3R}", - IterNum, - partLoadRatio)); + EnergyPlus::format("Iteration limit exceeded calculating desuperheater unit part-load ratio, " + "maximum iterations = {}. Part-load ratio returned = {:.3R}", + IterNum, + partLoadRatio)); ShowContinueErrorTimeStamp(state, "This error occurred in heating mode."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -9194,11 +9285,12 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (!state.dataGlobal->WarmupFlag) { ++DesupHtr.RegulaFalsiFailedNum1; if (DesupHtr.RegulaFalsiFailedNum1 == 1) { - ShowWarningError(state, format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); - ShowContinueError(state, - format("Desuperheater unit part-load ratio calculation failed: PLR limits of 0 to 1 " - "exceeded. Part-load ratio used = {:.3R}", - partLoadRatio)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); + ShowContinueError( + state, + EnergyPlus::format("Desuperheater unit part-load ratio calculation failed: PLR limits of 0 to 1 " + "exceeded. Part-load ratio used = {:.3R}", + partLoadRatio)); ShowContinueError(state, "Please send this information to the EnergyPlus support group."); ShowContinueErrorTimeStamp(state, "This error occurred in heating mode."); } else { @@ -9294,12 +9386,13 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (!state.dataGlobal->WarmupFlag) { ++DesupHtr.IterLimitExceededNum2; if (DesupHtr.IterLimitExceededNum2 == 1) { - ShowWarningError(state, format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); - ShowContinueError(state, - format("Iteration limit exceeded calculating desuperheater unit part-load ratio, " - "maximum iterations = {}. Part-load ratio returned = {:.3R}", - IterNum, - partLoadRatio)); + ShowWarningError(state, EnergyPlus::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}", + IterNum, + partLoadRatio)); ShowContinueErrorTimeStamp(state, "This error occurred in float mode."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -9317,11 +9410,12 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (!state.dataGlobal->WarmupFlag) { ++DesupHtr.RegulaFalsiFailedNum2; if (DesupHtr.RegulaFalsiFailedNum2 == 1) { - ShowWarningError(state, format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); - ShowContinueError(state, - format("Desuperheater unit part-load ratio calculation failed: PLR limits of 0 to " - "1 exceeded. Part-load ratio used = {:.3R}", - partLoadRatio)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); + ShowContinueError( + state, + EnergyPlus::format("Desuperheater unit part-load ratio calculation failed: PLR limits of 0 to " + "1 exceeded. Part-load ratio used = {:.3R}", + partLoadRatio)); ShowContinueError(state, "Please send this information to the EnergyPlus support group."); ShowContinueErrorTimeStamp(state, "This error occurred in float mode."); } else { @@ -9351,10 +9445,10 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b // should never get here, case is checked in GetWaterThermalTankInput } else { ShowFatalError(state, - 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)); + 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)); } } @@ -9666,12 +9760,13 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c ++HeatPump.HPSetPointError; // add logic for warmup, DataGlobals::KickOffSimulation and doing sizing here if (HeatPump.HPSetPointError == 1) { - ShowWarningError(state, - 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, format(" ...Heat Pump cut-in temperature={}", HPMinTempChar)); + 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)); } else { ShowRecurringWarningErrorAtEnd(state, HeatPump.Type + " \"" + HeatPump.Name + @@ -9985,12 +10080,13 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (!state.dataGlobal->WarmupFlag) { ++HeatPump.IterLimitExceededNum2; if (HeatPump.IterLimitExceededNum2 == 1) { - ShowWarningError(state, format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); - ShowContinueError(state, - format("Iteration limit exceeded calculating heat pump water heater compressor part-load ratio, " - "maximum iterations = {}. Part-load ratio returned = {:.3R}", - IterNum, - state.dataWaterThermalTanks->hpPartLoadRatio)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); + ShowContinueError( + state, + EnergyPlus::format("Iteration limit exceeded calculating heat pump water heater compressor part-load ratio, " + "maximum iterations = {}. Part-load ratio returned = {:.3R}", + IterNum, + state.dataWaterThermalTanks->hpPartLoadRatio)); ShowContinueErrorTimeStamp(state, "This error occurred in float mode."); } else { ShowRecurringWarningErrorAtEnd( @@ -10008,11 +10104,12 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (!state.dataGlobal->WarmupFlag) { ++HeatPump.RegulaFalsiFailedNum2; if (HeatPump.RegulaFalsiFailedNum2 == 1) { - ShowWarningError(state, format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); - ShowContinueError(state, - format("Heat pump water heater compressor part-load ratio calculation failed: PLR limits of 0 to 1 " - "exceeded. Part-load ratio used = {:.3R}", - state.dataWaterThermalTanks->hpPartLoadRatio)); + ShowWarningError(state, EnergyPlus::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 " + "exceeded. Part-load ratio used = {:.3R}", + state.dataWaterThermalTanks->hpPartLoadRatio)); ShowContinueError(state, "Please send this information to the EnergyPlus support group."); ShowContinueErrorTimeStamp(state, "This error occurred in float mode."); } else { @@ -10159,12 +10256,13 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (!state.dataGlobal->WarmupFlag) { ++HeatPump.IterLimitExceededNum1; if (HeatPump.IterLimitExceededNum1 == 1) { - ShowWarningError(state, format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); - ShowContinueError(state, - format("Iteration limit exceeded calculating heat pump water heater speed speed ratio ratio, " - "maximum iterations = {}. speed ratio returned = {:.3R}", - IterNum, - SpeedRatio)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); + ShowContinueError( + state, + EnergyPlus::format("Iteration limit exceeded calculating heat pump water heater speed speed ratio ratio, " + "maximum iterations = {}. speed ratio returned = {:.3R}", + IterNum, + SpeedRatio)); ShowContinueErrorTimeStamp(state, "This error occurred in heating mode."); } else { ShowRecurringWarningErrorAtEnd( @@ -10181,11 +10279,12 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (!state.dataGlobal->WarmupFlag) { ++HeatPump.RegulaFalsiFailedNum1; if (HeatPump.RegulaFalsiFailedNum1 == 1) { - ShowWarningError(state, format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); - ShowContinueError(state, - format("Heat pump water heater speed ratio calculation failed: speed ratio limits of 0 to 1 " - "exceeded. speed ratio used = {:.3R}", - SpeedRatio)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); + ShowContinueError( + state, + EnergyPlus::format("Heat pump water heater speed ratio calculation failed: speed ratio limits of 0 to 1 " + "exceeded. speed ratio used = {:.3R}", + SpeedRatio)); ShowContinueError(state, "Please send this information to the EnergyPlus support group."); ShowContinueErrorTimeStamp(state, "This error occurred in heating mode."); } else { @@ -11107,9 +11206,9 @@ void WaterThermalTankData::MinePlantStructForInfo(EnergyPlusData &state) if ((this->UseDesignVolFlowRateWasAutoSized) && (this->UseSidePlantSizNum == 0)) { ShowSevereError(state, - format("Water heater = {} for autosizing Use side flow rate, did not find Sizing:Plant object {}", - this->Name, - state.dataPlnt->PlantLoop(PlantLoopNum).Name)); + EnergyPlus::format("Water heater = {} for autosizing Use side flow rate, did not find Sizing:Plant object {}", + this->Name, + state.dataPlnt->PlantLoop(PlantLoopNum).Name)); ErrorsFound = true; } // Is this wh Use side plumbed in series (default) or are there other branches in parallel? @@ -11128,9 +11227,9 @@ void WaterThermalTankData::MinePlantStructForInfo(EnergyPlusData &state) if ((this->SourceDesignVolFlowRateWasAutoSized) && (this->SourceSidePlantSizNum == 0) && (this->DesuperheaterNum == 0) && (this->HeatPumpNum == 0)) { ShowSevereError(state, - format("Water heater = {}for autosizing Source side flow rate, did not find Sizing:Plant object {}", - this->Name, - state.dataPlnt->PlantLoop(this->SrcSidePlantLoc.loopNum).Name)); + EnergyPlus::format("Water heater = {}for autosizing Source side flow rate, did not find Sizing:Plant object {}", + this->Name, + state.dataPlnt->PlantLoop(this->SrcSidePlantLoc.loopNum).Name)); ErrorsFound = true; } // Is this wh Source side plumbed in series (default) or are there other branches in parallel? @@ -11789,8 +11888,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, format("{}: Tank=\"{}\", requested sizing for max capacity but entered Recovery Time is zero.", RoutineName, this->Name)); + ShowFatalError(state, + EnergyPlus::format( + "{}: Tank=\"{}\", requested sizing for max capacity but entered Recovery Time is zero.", RoutineName, this->Name)); } } @@ -11822,10 +11922,10 @@ void WaterThermalTankData::SizeTankForSupplySide(EnergyPlusData &state) tmpTankVolume = this->Sizing.TotalSolarCollectorArea * this->Sizing.TankCapacityPerCollectorArea; } else { ShowFatalError(state, - format("{}: Tank=\"{}\", requested sizing for volume with PerSolarCollectorArea but total found " - "area of Collectors is zero.", - RoutineName, - this->Name)); + EnergyPlus::format("{}: Tank=\"{}\", requested sizing for volume with PerSolarCollectorArea but total found " + "area of Collectors is zero.", + RoutineName, + this->Name)); } } if (this->MaxCapacityWasAutoSized) { @@ -11948,13 +12048,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, format("Occurs for water heater object={}", this->Name)); + ShowContinueError(state, EnergyPlus::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, format("Occurs for chilled water storage tank object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs for chilled water storage tank object={}", this->Name)); } ErrorsFound = true; } @@ -12029,13 +12129,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, format("Occurs for WaterHeater:Mixed object={}", this->Name)); + ShowContinueError(state, EnergyPlus::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, format("Occurs for chilled water storage tank object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs for chilled water storage tank object={}", this->Name)); } ErrorsFound = true; } @@ -12130,9 +12230,10 @@ void WaterThermalTankData::SizeStandAloneWaterHeater(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, - format("{}: Tank=\"{}\", requested sizing for max capacity but entered Recovery Time is zero.", routineName, this->Name)); + ShowFatalError(state, + EnergyPlus::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); @@ -12470,10 +12571,10 @@ void WaterThermalTankData::SizeStandAloneWaterHeater(EnergyPlusData &state) tmpTankVolume = this->Sizing.TotalSolarCollectorArea * this->Sizing.TankCapacityPerCollectorArea; } else { ShowFatalError(state, - format("{}: Tank=\"{}\", requested sizing for volume with PerSolarCollectorArea but total found " - "area of Collectors is zero.", - routineName, - this->Name)); + EnergyPlus::format("{}: Tank=\"{}\", requested sizing for volume with PerSolarCollectorArea but total found " + "area of Collectors is zero.", + routineName, + this->Name)); } } if (this->MaxCapacityWasAutoSized) { @@ -12912,8 +13013,9 @@ void WaterThermalTankData::CalcStandardRatings(EnergyPlusData &state) if ((this->HeatPumpNum == 0) || !state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).bIsIHP) { ShowWarningError( state, - format("Water heater = {}: Recovery Efficiency and Energy Factor could not be calculated during the test for standard ratings", - this->Name)); + EnergyPlus::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"); } } diff --git a/src/EnergyPlus/WaterToAirHeatPump.cc b/src/EnergyPlus/WaterToAirHeatPump.cc index 85d257c55c5..baa29ea8f81 100644 --- a/src/EnergyPlus/WaterToAirHeatPump.cc +++ b/src/EnergyPlus/WaterToAirHeatPump.cc @@ -128,26 +128,28 @@ namespace WaterToAirHeatPump { if (CompIndex == 0) { HPNum = Util::FindItemInList(CompName, state.dataWaterToAirHeatPump->WatertoAirHP); if (HPNum == 0) { - ShowFatalError(state, format("WaterToAir HP not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("WaterToAir HP not found={}", CompName)); } CompIndex = HPNum; } else { HPNum = CompIndex; if (HPNum > state.dataWaterToAirHeatPump->NumWatertoAirHPs || HPNum < 1) { - ShowFatalError(state, - format("SimWatertoAirHP: Invalid CompIndex passed={}, Number of Water to Air HPs={}, WaterToAir HP name={}", - HPNum, - state.dataWaterToAirHeatPump->NumWatertoAirHPs, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimWatertoAirHP: Invalid CompIndex passed={}, Number of Water to Air HPs={}, WaterToAir HP name={}", + HPNum, + state.dataWaterToAirHeatPump->NumWatertoAirHPs, + CompName)); } if (state.dataWaterToAirHeatPump->CheckEquipName(HPNum)) { if (!CompName.empty() && CompName != state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).Name) { ShowFatalError( state, - format("SimWatertoAirHP: Invalid CompIndex passed={}, WaterToAir HP name={}, stored WaterToAir HP Name for that index={}", - HPNum, - CompName, - state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).Name)); + EnergyPlus::format( + "SimWatertoAirHP: Invalid CompIndex passed={}, WaterToAir HP name={}, stored WaterToAir HP Name for that index={}", + HPNum, + CompName, + state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).Name)); } state.dataWaterToAirHeatPump->CheckEquipName(HPNum) = false; } @@ -239,7 +241,8 @@ namespace WaterToAirHeatPump { heatPump.WatertoAirHPType = "COOLING"; heatPump.WAHPType = DataPlant::PlantEquipmentType::CoilWAHPCoolingParamEst; ErrorObjectHeader eoh{routineName, CurrentModuleObject, heatPump.Name}; - GlobalNames::VerifyUniqueCoilName(state, CurrentModuleObject, heatPump.Name, ErrorsFound, format("{} Name", CurrentModuleObject)); + GlobalNames::VerifyUniqueCoilName( + state, CurrentModuleObject, heatPump.Name, ErrorsFound, EnergyPlus::format("{} Name", CurrentModuleObject)); std::string const availSchedName = s_ip->getAlphaFieldValue(fields, schemaProps, "availability_schedule_name"); if (availSchedName.empty()) { heatPump.availSched = Sched::GetScheduleAlwaysOn(state); @@ -309,7 +312,7 @@ namespace WaterToAirHeatPump { heatPump.LoadSideTotalUACoeff = s_ip->getRealFieldValue(fields, schemaProps, "load_side_total_heat_transfer_coefficient"); heatPump.LoadSideOutsideUACoeff = s_ip->getRealFieldValue(fields, schemaProps, "load_side_outside_surface_heat_transfer_coefficient"); if ((heatPump.LoadSideOutsideUACoeff < Constant::rTinyValue) || (heatPump.LoadSideTotalUACoeff < Constant::rTinyValue)) { - ShowSevereError(state, format("Input problem for {}={}", CurrentModuleObject, heatPump.Name)); + ShowSevereError(state, EnergyPlus::format("Input problem for {}={}", CurrentModuleObject, heatPump.Name)); ShowContinueError(state, " One or both load side UA values entered are below tolerance, likely zero or blank."); ShowContinueError(state, " Verify inputs, as the parameter syntax for this object went through a change with"); ShowContinueError(state, " the release of EnergyPlus version 5."); @@ -479,7 +482,8 @@ namespace WaterToAirHeatPump { heatPump.WatertoAirHPType = "HEATING"; heatPump.WAHPType = DataPlant::PlantEquipmentType::CoilWAHPHeatingParamEst; ErrorObjectHeader eoh{routineName, CurrentModuleObject, heatPump.Name}; - GlobalNames::VerifyUniqueCoilName(state, CurrentModuleObject, heatPump.Name, ErrorsFound, format("{} Name", CurrentModuleObject)); + GlobalNames::VerifyUniqueCoilName( + state, CurrentModuleObject, heatPump.Name, ErrorsFound, EnergyPlus::format("{} Name", CurrentModuleObject)); std::string const availSchedName = s_ip->getAlphaFieldValue(fields, schemaProps, "availability_schedule_name"); if (availSchedName.empty()) { heatPump.availSched = Sched::GetScheduleAlwaysOn(state); @@ -546,7 +550,7 @@ namespace WaterToAirHeatPump { heatPump.LoadSideTotalUACoeff = s_ip->getRealFieldValue(fields, schemaProps, "load_side_total_heat_transfer_coefficient"); if (heatPump.LoadSideTotalUACoeff < Constant::rTinyValue) { - ShowSevereError(state, format("Input problem for {}={}", CurrentModuleObject, heatPump.Name)); + ShowSevereError(state, EnergyPlus::format("Input problem for {}={}", CurrentModuleObject, heatPump.Name)); ShowContinueError(state, " Load side UA value is less than tolerance, likely zero or blank."); ShowContinueError(state, " Verify inputs, as the parameter syntax for this object went through a change with"); ShowContinueError(state, " the release of EnergyPlus version 5."); @@ -677,7 +681,7 @@ namespace WaterToAirHeatPump { } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found getting input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found getting input. Program terminates.", RoutineName)); } for (HPNum = 1; HPNum <= state.dataWaterToAirHeatPump->NumWatertoAirHPs; ++HPNum) { @@ -948,7 +952,7 @@ namespace WaterToAirHeatPump { if (state.dataPlnt->PlantLoop(heatPump.plantLoc.loopNum).FluidName == "WATER") { if (heatPump.SourceSideUACoeff < Constant::rTinyValue) { - ShowSevereError(state, format("Input problem for water to air heat pump, \"{}\".", heatPump.Name)); + ShowSevereError(state, EnergyPlus::format("Input problem for water to air heat pump, \"{}\".", heatPump.Name)); ShowContinueError(state, " Source side UA value is less than tolerance, likely zero or blank."); ShowContinueError(state, " Verify inputs, as the parameter syntax for this object went through a change with"); ShowContinueError(state, " the release of EnergyPlus version 5."); @@ -956,7 +960,7 @@ namespace WaterToAirHeatPump { } } else { if ((heatPump.SourceSideHTR1 < Constant::rTinyValue) || (heatPump.SourceSideHTR2 < Constant::rTinyValue)) { - ShowSevereError(state, format("Input problem for water to air heat pump, \"{}\".", heatPump.Name)); + ShowSevereError(state, EnergyPlus::format("Input problem for water to air heat pump, \"{}\".", heatPump.Name)); ShowContinueError(state, " A source side heat transfer resistance value is less than tolerance, likely zero or blank."); ShowContinueError(state, " Verify inputs, as the parameter syntax for this object went through a change with"); ShowContinueError(state, " the release of EnergyPlus version 5."); @@ -1344,15 +1348,16 @@ namespace WaterToAirHeatPump { if (LoadSidePressure < heatPump.LowPressCutoff && !FirstHVACIteration) { if (!state.dataGlobal->WarmupFlag) { - ShowRecurringWarningErrorAtEnd( - state, - format("WaterToAir Heat pump:cooling [{}] shut off on low pressure < {:.0R}", heatPump.Name, heatPump.LowPressCutoff), - heatPump.LowPressClgError, - LoadSidePressure, - LoadSidePressure, - _, - "[Pa]", - "[Pa]"); + ShowRecurringWarningErrorAtEnd(state, + EnergyPlus::format("WaterToAir Heat pump:cooling [{}] shut off on low pressure < {:.0R}", + heatPump.Name, + heatPump.LowPressCutoff), + heatPump.LowPressClgError, + LoadSidePressure, + LoadSidePressure, + _, + "[Pa]", + "[Pa]"); } heatPump.SimFlag = false; return; @@ -1361,9 +1366,9 @@ namespace WaterToAirHeatPump { if (SourceSidePressure > heatPump.HighPressCutoff && !FirstHVACIteration) { if (!state.dataGlobal->WarmupFlag) { ShowRecurringWarningErrorAtEnd(state, - format("WaterToAir Heat pump:cooling [{}] shut off on high pressure > {:.0R}", - heatPump.Name, - heatPump.HighPressCutoff), + EnergyPlus::format("WaterToAir Heat pump:cooling [{}] shut off on high pressure > {:.0R}", + heatPump.Name, + heatPump.HighPressCutoff), heatPump.HighPressClgError, heatPump.InletWaterTemp, heatPump.InletWaterTemp, @@ -1743,15 +1748,16 @@ namespace WaterToAirHeatPump { LoadSidePressure = heatPump.refrig->getSatPressure(state, LoadSideTemp, RoutineNameLoadSideTemp); if (SourceSidePressure < heatPump.LowPressCutoff && !FirstHVACIteration) { if (!state.dataGlobal->WarmupFlag) { - ShowRecurringWarningErrorAtEnd( - state, - format("WaterToAir Heat pump:heating [{}] shut off on low pressure < {:.0R}", heatPump.Name, heatPump.LowPressCutoff), - heatPump.LowPressHtgError, - SourceSidePressure, - SourceSidePressure, - _, - "[Pa]", - "[Pa]"); + ShowRecurringWarningErrorAtEnd(state, + EnergyPlus::format("WaterToAir Heat pump:heating [{}] shut off on low pressure < {:.0R}", + heatPump.Name, + heatPump.LowPressCutoff), + heatPump.LowPressHtgError, + SourceSidePressure, + SourceSidePressure, + _, + "[Pa]", + "[Pa]"); } heatPump.SimFlag = false; return; @@ -1759,15 +1765,16 @@ namespace WaterToAirHeatPump { if (LoadSidePressure > heatPump.HighPressCutoff && !FirstHVACIteration) { if (!state.dataGlobal->WarmupFlag) { - ShowRecurringWarningErrorAtEnd( - state, - format("WaterToAir Heat pump:heating [{}] shut off on high pressure > {:.0R}", heatPump.Name, heatPump.HighPressCutoff), - heatPump.HighPressHtgError, - heatPump.InletWaterTemp, - heatPump.InletWaterTemp, - _, - "SourceSideInletTemp[C]", - "SourceSideInletTemp[C]"); + ShowRecurringWarningErrorAtEnd(state, + EnergyPlus::format("WaterToAir Heat pump:heating [{}] shut off on high pressure > {:.0R}", + heatPump.Name, + heatPump.HighPressCutoff), + heatPump.HighPressHtgError, + heatPump.InletWaterTemp, + heatPump.InletWaterTemp, + _, + "SourceSideInletTemp[C]", + "SourceSideInletTemp[C]"); } // CALL ShowWarningError(state, 'Heat pump:heating shut off on high pressure') // WRITE(CErrCount,*) SourceSideInletTemp @@ -2243,7 +2250,7 @@ namespace WaterToAirHeatPump { int IndexNum = Util::FindItemInList(CoilName, state.dataWaterToAirHeatPump->WatertoAirHP); if (IndexNum == 0) { - ShowSevereError(state, format("Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -2293,7 +2300,7 @@ namespace WaterToAirHeatPump { } if (WhichCoil == 0) { - ShowSevereError(state, format("Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CoilCapacity = -1000.0; } @@ -2332,7 +2339,7 @@ namespace WaterToAirHeatPump { } if (WhichCoil == 0) { - ShowSevereError(state, format("Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -2371,7 +2378,7 @@ namespace WaterToAirHeatPump { } if (WhichCoil == 0) { - ShowSevereError(state, format("Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format("Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc index c93b1a95755..2c7f87925e2 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc @@ -153,25 +153,27 @@ namespace WaterToAirHeatPumpSimple { if (CompIndex == 0) { HPNum = Util::FindItemInList(CompName, state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP); if (HPNum == 0) { - ShowFatalError(state, format("WaterToAirHPSimple not found= {}", CompName)); + ShowFatalError(state, EnergyPlus::format("WaterToAirHPSimple not found= {}", CompName)); } CompIndex = HPNum; } else { HPNum = CompIndex; if (HPNum > state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs || HPNum < 1) { - ShowFatalError(state, - format("SimWatertoAirHPSimple: Invalid CompIndex passed={}, Number of Water to Air HPs={}, WaterToAir HP name={}", - HPNum, - state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs, - CompName)); + ShowFatalError( + state, + EnergyPlus::format("SimWatertoAirHPSimple: Invalid CompIndex passed={}, Number of Water to Air HPs={}, WaterToAir HP name={}", + HPNum, + state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs, + CompName)); } if (!CompName.empty() && CompName != state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum).Name) { ShowFatalError( state, - format("SimWatertoAirHPSimple: Invalid CompIndex passed={}, WaterToAir HP name={}, stored WaterToAir HP Name for that index={}", - HPNum, - CompName, - state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum).Name)); + EnergyPlus::format( + "SimWatertoAirHPSimple: Invalid CompIndex passed={}, WaterToAir HP name={}, stored WaterToAir HP Name for that index={}", + HPNum, + CompName, + state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum).Name)); } } @@ -261,7 +263,8 @@ namespace WaterToAirHeatPumpSimple { simpleWAHP.Name = Util::makeUPPER(thisObjectName); ErrorObjectHeader eoh{RoutineName, CurrentModuleObject, simpleWAHP.Name}; // ErrorsFound will be set to True if problem was found, left untouched otherwise - GlobalNames::VerifyUniqueCoilName(state, CurrentModuleObject, simpleWAHP.Name, ErrorsFound, format("{} Name", CurrentModuleObject)); + GlobalNames::VerifyUniqueCoilName( + state, CurrentModuleObject, simpleWAHP.Name, ErrorsFound, EnergyPlus::format("{} Name", CurrentModuleObject)); simpleWAHP.WAHPType = WatertoAirHP::Cooling; simpleWAHP.WAHPPlantType = DataPlant::PlantEquipmentType::CoilWAHPCoolingEquationFit; std::string const availSchedName = s_ip->getAlphaFieldValue(fields, schemaProps, "availability_schedule_name"); @@ -498,7 +501,8 @@ namespace WaterToAirHeatPumpSimple { simpleWAHP.Name = Util::makeUPPER(thisObjectName); ErrorObjectHeader eoh{RoutineName, CurrentModuleObject, simpleWAHP.Name}; // ErrorsFound will be set to True if problem was found, left untouched otherwise - GlobalNames::VerifyUniqueCoilName(state, CurrentModuleObject, simpleWAHP.Name, ErrorsFound, format("{} Name", CurrentModuleObject)); + GlobalNames::VerifyUniqueCoilName( + state, CurrentModuleObject, simpleWAHP.Name, ErrorsFound, EnergyPlus::format("{} Name", CurrentModuleObject)); simpleWAHP.WAHPType = WatertoAirHP::Heating; simpleWAHP.WAHPPlantType = DataPlant::PlantEquipmentType::CoilWAHPHeatingEquationFit; std::string const availSchedName = s_ip->getAlphaFieldValue(fields, schemaProps, "availability_schedule_name"); @@ -682,7 +686,7 @@ namespace WaterToAirHeatPumpSimple { } if (ErrorsFound) { - ShowFatalError(state, format("{} Errors found getting input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{} Errors found getting input. Program terminates.", RoutineName)); } for (int HPNumIdx = 1; HPNumIdx <= state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs; ++HPNumIdx) { @@ -1316,7 +1320,8 @@ namespace WaterToAirHeatPumpSimple { RatedCapHeatUser = 0.0; RatedWaterVolFlowRateDes = 0.0; RatedWaterVolFlowRateUser = 0.0; - std::string CompType = format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]); + std::string CompType = + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]); if (simpleWatertoAirHP.RatedAirVolFlowRate == DataSizing::AutoSize) { IsAutoSize = true; @@ -1325,17 +1330,18 @@ namespace WaterToAirHeatPumpSimple { if (!IsAutoSize && !SizingDesRunThisAirSys) { // Simulation continue HardSizeNoDesRun = true; if (simpleWatertoAirHP.RatedAirVolFlowRate > 0.0) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Air Flow Rate [m3/s]", - simpleWatertoAirHP.RatedAirVolFlowRate); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Air Flow Rate [m3/s]", + simpleWatertoAirHP.RatedAirVolFlowRate); } } else { - CheckSysSizing(state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name); + CheckSysSizing( + state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name); if (state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow >= HVAC::SmallAirVolFlow) { RatedAirVolFlowRateDes = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow; CoolingAirVolFlowRateDes = state.dataSize->CalcSysSizing(state.dataSize->CurSysNum).DesCoolVolFlow; @@ -1348,17 +1354,18 @@ namespace WaterToAirHeatPumpSimple { if (!IsAutoSize && !SizingDesRunThisZone) { // Simulation continue HardSizeNoDesRun = true; if (simpleWatertoAirHP.RatedAirVolFlowRate > 0.0) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Air Flow Rate [m3/s]", - simpleWatertoAirHP.RatedAirVolFlowRate); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Air Flow Rate [m3/s]", + simpleWatertoAirHP.RatedAirVolFlowRate); } } else { - CheckZoneSizing(state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name); + CheckZoneSizing( + state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name); RatedAirVolFlowRateDes = max(state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).DesCoolVolFlow, state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).DesHeatVolFlow); CoolingAirVolFlowRateDes = state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).DesCoolVolFlow; @@ -1373,7 +1380,7 @@ namespace WaterToAirHeatPumpSimple { simpleWatertoAirHP.RatedAirVolFlowRate = RatedAirVolFlowRateDes; BaseSizer::reportSizerOutput( state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), simpleWatertoAirHP.Name, "Design Size Rated Air Flow Rate [m3/s]", RatedAirVolFlowRateDes); @@ -1382,33 +1389,36 @@ namespace WaterToAirHeatPumpSimple { RatedAirVolFlowRateUser = simpleWatertoAirHP.RatedAirVolFlowRate; if ((std::abs(RatedAirVolFlowRateDes - RatedAirVolFlowRateUser) / RatedAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "Design Size Rated Air Flow Rate [m3/s]", - RatedAirVolFlowRateDes, - "User-Specified Rated Air Flow Rate [m3/s]", - RatedAirVolFlowRateUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "Design Size Rated Air Flow Rate [m3/s]", + RatedAirVolFlowRateDes, + "User-Specified Rated Air Flow Rate [m3/s]", + RatedAirVolFlowRateUser); } else { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Air Flow Rate [m3/s]", - RatedAirVolFlowRateUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Air Flow Rate [m3/s]", + RatedAirVolFlowRateUser); } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedAirVolFlowRateDes - RatedAirVolFlowRateUser) / RatedAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - format("SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); - ShowContinueError(state, format("User-Specified Rated Air Volume Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateUser)); - ShowContinueError(state, - format("differs from Design Size Rated Air Volume Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateDes)); + EnergyPlus::format( + "SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); + ShowContinueError( + state, EnergyPlus::format("User-Specified Rated Air Volume Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateUser)); + ShowContinueError( + state, + EnergyPlus::format("differs from Design Size Rated Air Volume Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -1434,18 +1444,18 @@ namespace WaterToAirHeatPumpSimple { if (!RatedCapCoolTotalAutoSized && !SizingDesRunThisAirSys) { // Simulation continue HardSizeNoDesRun = true; if (simpleWatertoAirHP.RatedCapCoolTotal > 0.0) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Total Cooling Capacity [W]", - simpleWatertoAirHP.RatedCapCoolTotal); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Total Cooling Capacity [W]", + simpleWatertoAirHP.RatedCapCoolTotal); } } else { - CheckSysSizing( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name); + CheckSysSizing(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name); if (CoolingAirVolFlowRateDes > 0.0) { VolFlowRate = CoolingAirVolFlowRateDes; } else { @@ -1518,14 +1528,15 @@ namespace WaterToAirHeatPumpSimple { RatedMixWetBulb = simpleWatertoAirHP.RatedEntAirWetbulbTemp; // calculate temperatue ratio at design day peak conditions ratioTWB = (MixWetBulb + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; - PltSizNum = PlantUtilities::MyPlantSizingIndex( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - simpleWatertoAirHP.WaterInletNodeNum, - simpleWatertoAirHP.WaterOutletNodeNum, - ErrorsFound, - false); + PltSizNum = + PlantUtilities::MyPlantSizingIndex(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + simpleWatertoAirHP.WaterInletNodeNum, + simpleWatertoAirHP.WaterOutletNodeNum, + ErrorsFound, + false); if (PltSizNum > 0) { DesignEntWaterTemp = state.dataSize->PlantSizData(PltSizNum).ExitTemp; ratioTS = (DesignEntWaterTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; @@ -1533,9 +1544,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, - format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); + EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); ratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value ErrorsFound = true; } @@ -1565,18 +1576,18 @@ namespace WaterToAirHeatPumpSimple { if (!RatedCapCoolTotalAutoSized && !SizingDesRunThisZone) { // Simulation continue HardSizeNoDesRun = true; if (simpleWatertoAirHP.RatedCapCoolTotal > 0.0) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Total Cooling Capacity [W]", - simpleWatertoAirHP.RatedCapCoolTotal); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Total Cooling Capacity [W]", + simpleWatertoAirHP.RatedCapCoolTotal); } } else { - CheckZoneSizing( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name); + CheckZoneSizing(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name); if (CoolingAirVolFlowRateDes > 0.0) { VolFlowRate = CoolingAirVolFlowRateDes; } else { @@ -1648,14 +1659,15 @@ namespace WaterToAirHeatPumpSimple { RatedMixWetBulb = simpleWatertoAirHP.RatedEntAirWetbulbTemp; // calculate temperatue ratio at design day peak conditions ratioTWB = (MixWetBulb + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; - PltSizNum = PlantUtilities::MyPlantSizingIndex( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - simpleWatertoAirHP.WaterInletNodeNum, - simpleWatertoAirHP.WaterOutletNodeNum, - ErrorsFound, - false); + PltSizNum = + PlantUtilities::MyPlantSizingIndex(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + simpleWatertoAirHP.WaterInletNodeNum, + simpleWatertoAirHP.WaterOutletNodeNum, + ErrorsFound, + false); if (PltSizNum > 0) { DesignEntWaterTemp = state.dataSize->PlantSizData(PltSizNum).ExitTemp; ratioTS = (DesignEntWaterTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; @@ -1663,9 +1675,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, - format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); + EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); ratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value ErrorsFound = true; } @@ -1706,18 +1718,18 @@ namespace WaterToAirHeatPumpSimple { if (!RatedCapCoolSensAutoSized && !SizingDesRunThisAirSys) { // Simulation continue HardSizeNoDesRun = true; if (simpleWatertoAirHP.RatedCapCoolSens > 0.0) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Sensible Cooling Capacity [W]", - simpleWatertoAirHP.RatedCapCoolSens); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Sensible Cooling Capacity [W]", + simpleWatertoAirHP.RatedCapCoolSens); } } else { - CheckSysSizing( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name); + CheckSysSizing(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name); if (CoolingAirVolFlowRateDes > 0.0) { VolFlowRate = CoolingAirVolFlowRateDes; } else { @@ -1778,14 +1790,15 @@ namespace WaterToAirHeatPumpSimple { // calculate temperature ratios at design day peak conditions ratioTDB = (MixTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; ratioTWB = (MixWetBulb + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; - PltSizNum = PlantUtilities::MyPlantSizingIndex( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - simpleWatertoAirHP.WaterInletNodeNum, - simpleWatertoAirHP.WaterOutletNodeNum, - ErrorsFound, - false); + PltSizNum = + PlantUtilities::MyPlantSizingIndex(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + simpleWatertoAirHP.WaterInletNodeNum, + simpleWatertoAirHP.WaterOutletNodeNum, + ErrorsFound, + false); if (PltSizNum > 0) { DesignEntWaterTemp = state.dataSize->PlantSizData(PltSizNum).ExitTemp; ratioTS = (DesignEntWaterTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; @@ -1793,9 +1806,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, - format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); + EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); ErrorsFound = true; } // calculate temperatue ratio at rated conditions @@ -1819,18 +1832,18 @@ namespace WaterToAirHeatPumpSimple { if (!RatedCapCoolSensAutoSized && !SizingDesRunThisZone) { // Simulation continue HardSizeNoDesRun = true; if (simpleWatertoAirHP.RatedCapCoolSens > 0.0) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Sensible Cooling Capacity [W]", - simpleWatertoAirHP.RatedCapCoolSens); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Sensible Cooling Capacity [W]", + simpleWatertoAirHP.RatedCapCoolSens); } } else { - CheckZoneSizing( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name); + CheckZoneSizing(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name); if (CoolingAirVolFlowRateDes > 0.0) { VolFlowRate = CoolingAirVolFlowRateDes; } else { @@ -1886,14 +1899,15 @@ namespace WaterToAirHeatPumpSimple { // calculate temperature ratios at design day peak conditions ratioTDB = (MixTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; ratioTWB = (MixWetBulb + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; - PltSizNum = PlantUtilities::MyPlantSizingIndex( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - simpleWatertoAirHP.WaterInletNodeNum, - simpleWatertoAirHP.WaterOutletNodeNum, - ErrorsFound, - false); + PltSizNum = + PlantUtilities::MyPlantSizingIndex(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + simpleWatertoAirHP.WaterInletNodeNum, + simpleWatertoAirHP.WaterOutletNodeNum, + ErrorsFound, + false); if (PltSizNum > 0) { DesignEntWaterTemp = state.dataSize->PlantSizData(PltSizNum).ExitTemp; ratioTS = (DesignEntWaterTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; @@ -1901,9 +1915,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, - format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); + EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); ErrorsFound = true; } // calculate temperatue ratio at rated conditions @@ -2007,12 +2021,12 @@ namespace WaterToAirHeatPumpSimple { simpleWatertoAirHP.RatedCapCoolAtRatedCdts / simpleWatertoAirHP.RatedCOPCoolAtRatedCdts; simpleWatertoAirHP.RatedPowerCool = simpleWatertoAirHP.RatedPowerCoolAtRatedCdts / RatedCoolPowerTempModFac; if (simpleWatertoAirHP.RatedCapCoolTotal != DataSizing::AutoSize) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "Design Size Rated Total Cooling Capacity [W]", - simpleWatertoAirHP.RatedCapCoolTotal); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "Design Size Rated Total Cooling Capacity [W]", + simpleWatertoAirHP.RatedCapCoolTotal); } OutputReportPredefined::PreDefTableEntry( state, state.dataOutRptPredefined->pdchWAHPRatedAirDBT, simpleWatertoAirHP.Name, RatedMixDryBulb); @@ -2027,33 +2041,36 @@ namespace WaterToAirHeatPumpSimple { simpleWatertoAirHP.RatedPowerCool = simpleWatertoAirHP.RatedCapCoolTotal / simpleWatertoAirHP.RatedCOPCoolAtRatedCdts; if ((std::abs(RatedCapCoolTotalDes - RatedCapCoolTotalUser) / RatedCapCoolTotalUser) > state.dataSize->AutoVsHardSizingThreshold) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "Design Size Rated Total Cooling Capacity [W]", - RatedCapCoolTotalDes, - "User-Specified Rated Total Cooling Capacity [W]", - RatedCapCoolTotalUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "Design Size Rated Total Cooling Capacity [W]", + RatedCapCoolTotalDes, + "User-Specified Rated Total Cooling Capacity [W]", + RatedCapCoolTotalUser); } else { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Total Cooling Capacity [W]", - RatedCapCoolTotalUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Total Cooling Capacity [W]", + RatedCapCoolTotalUser); } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedCapCoolTotalDes - RatedCapCoolTotalUser) / RatedCapCoolTotalUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - format("SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); - ShowContinueError(state, format("User-Specified Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalUser)); + EnergyPlus::format( + "SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); + ShowContinueError( + state, EnergyPlus::format("User-Specified Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalUser)); ShowContinueError( - state, format("differs from Design Size Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalDes)); + state, + EnergyPlus::format("differs from Design Size Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2120,46 +2137,48 @@ namespace WaterToAirHeatPumpSimple { simpleWatertoAirHP.RatedCapCoolSens = RatedCapCoolSensDes; simpleWatertoAirHP.RatedCapCoolSensDesAtRatedCdts = RatedCapCoolSensDes * RatedSensCapTempModFac; if (simpleWatertoAirHP.RatedCapCoolTotal != DataSizing::AutoSize) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "Design Size Rated Sensible Cooling Capacity [W]", - RatedCapCoolSensDes); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "Design Size Rated Sensible Cooling Capacity [W]", + RatedCapCoolSensDes); } } else { if (simpleWatertoAirHP.RatedCapCoolSens > 0.0 && RatedCapCoolSensDes > 0.0) { RatedCapCoolSensUser = simpleWatertoAirHP.RatedCapCoolSens; if ((std::abs(RatedCapCoolSensDes - RatedCapCoolSensUser) / RatedCapCoolSensUser) > state.dataSize->AutoVsHardSizingThreshold) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "Design Size Rated Sensible Cooling Capacity [W]", - RatedCapCoolSensDes, - "User-Specified Rated Sensible Cooling Capacity [W]", - RatedCapCoolSensUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "Design Size Rated Sensible Cooling Capacity [W]", + RatedCapCoolSensDes, + "User-Specified Rated Sensible Cooling Capacity [W]", + RatedCapCoolSensUser); } else { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Sensible Cooling Capacity [W]", - RatedCapCoolSensUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Sensible Cooling Capacity [W]", + RatedCapCoolSensUser); } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedCapCoolSensDes - RatedCapCoolSensUser) / RatedCapCoolSensUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - format("SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); - ShowContinueError(state, - format("User-Specified Rated Sensible Cooling Capacity of {:.2R} [W]", RatedCapCoolSensUser)); + EnergyPlus::format( + "SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); ShowContinueError( - state, format("differs from Design Size Rated Sensible Cooling Capacity of {:.2R} [W]", RatedCapCoolSensDes)); + state, EnergyPlus::format("User-Specified Rated Sensible Cooling Capacity of {:.2R} [W]", RatedCapCoolSensUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Rated Sensible Cooling Capacity of {:.2R} [W]", + RatedCapCoolSensDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2192,36 +2211,39 @@ namespace WaterToAirHeatPumpSimple { if ((RatedCapCoolSensAutoSized && RatedCapCoolTotalAutoSized) || RatedCapCoolSensAutoSized) { if (simpleWatertoAirHP.RatedCapCoolSensDesAtRatedCdts > simpleWatertoAirHP.RatedCapCoolAtRatedCdts) { ShowWarningError(state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); - ShowContinueError(state, format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); + ShowContinueError(state, EnergyPlus::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); ShowContinueError(state, "Both of these capacity inputs have been autosized."); - ShowContinueError( - state, - format("Rated Sensible Cooling Capacity at Rated Conditions = {:.2T} W", simpleWatertoAirHP.RatedCapCoolSensDesAtRatedCdts)); - ShowContinueError( - state, format("Rated Total Cooling Capacity at Rated Conditions = {:.2T} W", simpleWatertoAirHP.RatedCapCoolAtRatedCdts)); + ShowContinueError(state, + EnergyPlus::format("Rated Sensible Cooling Capacity at Rated Conditions = {:.2T} W", + simpleWatertoAirHP.RatedCapCoolSensDesAtRatedCdts)); + ShowContinueError(state, + EnergyPlus::format("Rated Total Cooling Capacity at Rated Conditions = {:.2T} W", + simpleWatertoAirHP.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, format("Rated entering Air Wet-Bulb Temperature = {:.3T} C", RatedMixWetBulb)); - ShowContinueError(state, format("Peak entering Air Wet-Bulb Temperature = {:.3T} C", MixWetBulb)); - ShowContinueError(state, format("Entering Water Temperature used = {:.3T} C", simpleWatertoAirHP.RatedEntWaterTemp)); + 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", simpleWatertoAirHP.RatedEntWaterTemp)); ShowContinueError(state, "Design air and water flow rates = 1.0"); ShowContinueError( - state, format("Rated ratio of load-side air wet-bulb temperature to 283.15 C (Rated ratioTWB) = {:.3T}", RatedratioTWB)); + state, + EnergyPlus::format("Rated ratio of load-side air wet-bulb temperature to 283.15 C (Rated ratioTWB) = {:.3T}", RatedratioTWB)); ShowContinueError( - state, format("Rated ratio of source-side inlet water temperature to 283.15 C (Rated ratioTS) = {:.3T}", RatedratioTS)); - ShowContinueError(state, - format("Peak ratio of load-side air wet-bulb temperature to 283.15 C (Peak ratioTWB) = {:.3T}", ratioTWB)); - ShowContinueError(state, - format("Peak ratio of source-side inlet water temperature to 283.15 C (Peak ratioTS) = {:.3T}", ratioTS)); - ShowContinueError(state, format("Rated Total Cooling Capacity Modifier = {:.5T}", RatedTotCapTempModFac)); - ShowContinueError(state, format("Peak Design Total Cooling Capacity Modifier = {:.5T}", PeakTotCapTempModFac)); - ShowContinueError(state, format("Rated Sensible Cooling Capacity Modifier = {:.5T}", RatedSensCapTempModFac)); - ShowContinueError(state, format("Peak Design Sensible Cooling Capacity Modifier = {:.5T}", PeakSensCapTempModFac)); + 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)); + 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)); ShowContinueError(state, "...Rated Total Cooling Capacity at Rated Conditions = Total Peak Design Load * Rated Total " "Cooling Capacity Modifier / " @@ -2236,31 +2258,35 @@ namespace WaterToAirHeatPumpSimple { } else if (RatedCapCoolTotalAutoSized) { if (simpleWatertoAirHP.RatedCapCoolSensDesAtRatedCdts > simpleWatertoAirHP.RatedCapCoolAtRatedCdts) { ShowWarningError(state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); - ShowContinueError(state, format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); + ShowContinueError(state, EnergyPlus::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, format("Rated Sensible Cooling Capacity = {:.2T} W", simpleWatertoAirHP.RatedCapCoolSensDesAtRatedCdts)); - ShowContinueError(state, format("Rated Total Cooling Capacity = {:.2T} W", simpleWatertoAirHP.RatedCapCoolAtRatedCdts)); + ShowContinueError( + state, EnergyPlus::format("Rated Sensible Cooling Capacity = {:.2T} W", simpleWatertoAirHP.RatedCapCoolSensDesAtRatedCdts)); + ShowContinueError(state, + EnergyPlus::format("Rated Total Cooling Capacity = {:.2T} W", simpleWatertoAirHP.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, format("Rated entering Air Wet-Bulb Temperature = {:.3T} C", RatedMixWetBulb)); - ShowContinueError(state, format("Peak entering Air Wet-Bulb Temperature = {:.3T} C", MixWetBulb)); - ShowContinueError(state, format("Entering Water Temperature used = {:.3T} C", simpleWatertoAirHP.RatedEntWaterTemp)); + 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", simpleWatertoAirHP.RatedEntWaterTemp)); ShowContinueError(state, "Design air and water flow rates = 1.0"); ShowContinueError( - state, format("Rated ratio of load-side air wet-bulb temperature to 283.15 C (Rated ratioTWB) = {:.3T}", RatedratioTWB)); + state, + EnergyPlus::format("Rated ratio of load-side air wet-bulb temperature to 283.15 C (Rated ratioTWB) = {:.3T}", RatedratioTWB)); ShowContinueError( - state, format("Rated ratio of source-side inlet water temperature to 283.15 C (Rated ratioTS) = {:.3T}", RatedratioTS)); - ShowContinueError(state, - format("Peak ratio of load-side air wet-bulb temperature to 283.15 C (Peak ratioTWB) = {:.3T}", ratioTWB)); - ShowContinueError(state, - format("Peak ratio of source-side inlet water temperature to 283.15 C (Peak ratioTS) = {:.3T}", ratioTS)); - ShowContinueError(state, format("Rated Total Cooling Capacity Modifier = {:.5T}", RatedTotCapTempModFac)); - ShowContinueError(state, format("Peak Design Total Cooling Capacity Modifier = {:.5T}", PeakTotCapTempModFac)); + 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)); + 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, "...Rated Total Cooling Capacity at Rated Conditions = Total Peak Design Load * Rated Total " "Cooling Capacity Modifier / " @@ -2287,10 +2313,10 @@ namespace WaterToAirHeatPumpSimple { } if (IsAutoSize) { if (state.dataSize->CurSysNum > 0) { - CheckSysSizing( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name); + CheckSysSizing(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name); if (HeatingAirVolFlowRateDes > 0.0) { VolFlowRate = HeatingAirVolFlowRateDes; } else { @@ -2356,14 +2382,15 @@ namespace WaterToAirHeatPumpSimple { RatedHeatMixDryBulb = simpleWatertoAirHP.RatedEntAirDrybulbTemp; // calculate temperatue ratio at design day peak conditions HeatratioTDB = (HeatMixTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; - PltSizNum = PlantUtilities::MyPlantSizingIndex( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - simpleWatertoAirHP.WaterInletNodeNum, - simpleWatertoAirHP.WaterOutletNodeNum, - ErrorsFound, - false); + PltSizNum = + PlantUtilities::MyPlantSizingIndex(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + simpleWatertoAirHP.WaterInletNodeNum, + simpleWatertoAirHP.WaterOutletNodeNum, + ErrorsFound, + false); if (PltSizNum > 0) { DesignEntWaterTemp = state.dataSize->PlantSizData(PltSizNum).ExitTemp; HeatratioTS = (DesignEntWaterTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; @@ -2371,9 +2398,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, - format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); + EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); HeatratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value ErrorsFound = true; } @@ -2386,12 +2413,13 @@ 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, - format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWatertoAirHP.Name)); + ShowWarningError( + state, + EnergyPlus::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWatertoAirHP.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, format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); } } // calculate the rated capacity based on peak conditions @@ -2404,10 +2432,10 @@ namespace WaterToAirHeatPumpSimple { RatedHeatratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value } } else if (state.dataSize->CurZoneEqNum > 0) { - CheckZoneSizing( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name); + CheckZoneSizing(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name); if (HeatingAirVolFlowRateDes > 0.0) { VolFlowRate = HeatingAirVolFlowRateDes; } else { @@ -2460,14 +2488,15 @@ namespace WaterToAirHeatPumpSimple { RatedHeatMixDryBulb = simpleWatertoAirHP.RatedEntAirDrybulbTemp; // calculate temperatue ratio at design day peak conditions HeatratioTDB = (HeatMixTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; - PltSizNum = PlantUtilities::MyPlantSizingIndex( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - simpleWatertoAirHP.WaterInletNodeNum, - simpleWatertoAirHP.WaterOutletNodeNum, - ErrorsFound, - false); + PltSizNum = + PlantUtilities::MyPlantSizingIndex(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + simpleWatertoAirHP.WaterInletNodeNum, + simpleWatertoAirHP.WaterOutletNodeNum, + ErrorsFound, + false); if (PltSizNum > 0) { DesignEntWaterTemp = state.dataSize->PlantSizData(PltSizNum).ExitTemp; HeatratioTS = (DesignEntWaterTemp + state.dataWaterToAirHeatPumpSimple->CelsiustoKelvin) / Tref; @@ -2475,9 +2504,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, - format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); + EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); HeatratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value ErrorsFound = true; } @@ -2491,20 +2520,22 @@ 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, - format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWatertoAirHP.Name)); + ShowWarningError( + state, + EnergyPlus::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWatertoAirHP.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, format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); } if (RatedHeatPowerTempModFac > 1.02 || RatedHeatPowerTempModFac < 0.98) { - ShowWarningError(state, - format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWatertoAirHP.Name)); + ShowWarningError( + state, + EnergyPlus::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWatertoAirHP.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, format("Curve output at rated conditions = {:.3T}", RatedHeatPowerTempModFac)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatPowerTempModFac)); } } // calculate the rated capacity based on peak conditions @@ -2589,18 +2620,18 @@ namespace WaterToAirHeatPumpSimple { // update Cooling Coils output reports OutputReportPredefined::PreDefTableEntry( state, state.dataOutRptPredefined->pdchCoolCoilTotCap, companionCoolingCoil.Name, RatedCapCoolTotalDes); - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), - companionCoolingCoil.Name, - "Design Size Rated Total Cooling Capacity [W]", - companionCoolingCoil.RatedCapCoolTotal); - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), - companionCoolingCoil.Name, - "Design Size Rated Sensible Cooling Capacity [W]", - companionCoolingCoil.RatedCapCoolSens); + BaseSizer::reportSizerOutput(state, + EnergyPlus::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)]), + companionCoolingCoil.Name, + "Design Size Rated Sensible Cooling Capacity [W]", + companionCoolingCoil.RatedCapCoolSens); } else if (companionCoolingCoil.WAHPPlantType == DataPlant::PlantEquipmentType::CoilWAHPCoolingEquationFit) { // case 2: companion coil is of EquationFit type but is // not autosized @@ -2629,7 +2660,7 @@ namespace WaterToAirHeatPumpSimple { state, state.dataOutRptPredefined->pdchWAHPRatedWtrT, simpleWatertoAirHP.Name, simpleWatertoAirHP.RatedEntWaterTemp); BaseSizer::reportSizerOutput( state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), simpleWatertoAirHP.Name, "Design Size Rated Heating Capacity [W]", simpleWatertoAirHP.RatedCapHeat); @@ -2647,31 +2678,32 @@ namespace WaterToAirHeatPumpSimple { if (simpleWatertoAirHP.RatedCapHeat > 0.0 && RatedCapHeatDes > 0.0 && !HardSizeNoDesRun) { RatedCapHeatUser = simpleWatertoAirHP.RatedCapHeat; if ((std::abs(RatedCapHeatDes - RatedCapHeatUser) / RatedCapHeatUser) > state.dataSize->AutoVsHardSizingThreshold) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "Design Size Rated Heating Capacity [W]", - RatedCapHeatDes, - "User-Specified Rated Heating Capacity [W]", - RatedCapHeatUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "Design Size Rated Heating Capacity [W]", + RatedCapHeatDes, + "User-Specified Rated Heating Capacity [W]", + RatedCapHeatUser); } else { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Heating Capacity [W]", - RatedCapHeatUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Heating Capacity [W]", + RatedCapHeatUser); } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedCapHeatDes - RatedCapHeatUser) / RatedCapHeatUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - format("SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); - ShowContinueError(state, format("User-Specified Rated Heating Capacity of {:.2R} [W]", RatedCapHeatUser)); - ShowContinueError(state, format("differs from Design Size Rated Heating Capacity of {:.2R} [W]", RatedCapHeatDes)); + ShowMessage(state, + EnergyPlus::format( + "SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); + ShowContinueError(state, EnergyPlus::format("User-Specified Rated Heating Capacity of {:.2R} [W]", RatedCapHeatUser)); + ShowContinueError(state, + EnergyPlus::format("differs from Design Size Rated Heating Capacity of {:.2R} [W]", RatedCapHeatDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -2679,12 +2711,12 @@ namespace WaterToAirHeatPumpSimple { } else { if (simpleWatertoAirHP.RatedCapHeat > 0.0) { RatedCapHeatUser = simpleWatertoAirHP.RatedCapHeat; - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Heating Capacity [W]", - RatedCapHeatUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Heating Capacity [W]", + RatedCapHeatUser); } } @@ -2702,16 +2734,16 @@ namespace WaterToAirHeatPumpSimple { 0.2) { ShowWarningError(state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); ShowContinueError(state, - format("...used with COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", - companionCoolingCoil.WAHPType, - companionCoolingCoil.Name)); + 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, format("...heating capacity = {:.3T} W", simpleWatertoAirHP.RatedCapHeat)); - ShowContinueError(state, format("...cooling capacity = {:.3T} W", companionCoolingCoil.RatedCapCoolTotal)); + ShowContinueError(state, EnergyPlus::format("...heating capacity = {:.3T} W", simpleWatertoAirHP.RatedCapHeat)); + ShowContinueError(state, EnergyPlus::format("...cooling capacity = {:.3T} W", companionCoolingCoil.RatedCapCoolTotal)); } } } @@ -2719,7 +2751,7 @@ namespace WaterToAirHeatPumpSimple { state.dataRptCoilSelection->coilSelectionReportObj->setCoilHeatingCapacity( state, simpleWatertoAirHP.Name, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), RatedCapHeatDes, IsAutoSize, state.dataSize->CurSysNum, @@ -2812,7 +2844,7 @@ namespace WaterToAirHeatPumpSimple { if (IsAutoSize) { PltSizNum = PlantUtilities::MyPlantSizingIndex( state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), simpleWatertoAirHP.Name, simpleWatertoAirHP.WaterInletNodeNum, simpleWatertoAirHP.WaterOutletNodeNum, @@ -2833,15 +2865,15 @@ namespace WaterToAirHeatPumpSimple { state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(simpleWatertoAirHP.CompanionCoolingCoilNum); if (companionCoolingCoil.RatedCapCoolTotal != DataSizing::AutoSize) { int PltSizNumCompanionCoil = 0; - PltSizNumCompanionCoil = - PlantUtilities::MyPlantSizingIndex(state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), - companionCoolingCoil.Name, - companionCoolingCoil.WaterInletNodeNum, - companionCoolingCoil.WaterOutletNodeNum, - ErrorsFound, - false); + PltSizNumCompanionCoil = PlantUtilities::MyPlantSizingIndex( + state, + EnergyPlus::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 / @@ -2871,37 +2903,37 @@ 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, - format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], - simpleWatertoAirHP.Name)); + EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)], + simpleWatertoAirHP.Name)); } if (SystemCapacity != DataSizing::AutoSize) { simpleWatertoAirHP.RatedWaterVolFlowRate = RatedWaterVolFlowRateDes; BaseSizer::reportSizerOutput( state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), simpleWatertoAirHP.Name, "Design Size Rated Water Flow Rate [m3/s]", RatedWaterVolFlowRateDes); if (simpleWatertoAirHP.WAHPType == WatertoAirHP::Heating && simpleWatertoAirHP.CompanionCoolingCoilNum > 0) { auto &companionCoolingCoil(state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(simpleWatertoAirHP.CompanionCoolingCoilNum)); companionCoolingCoil.RatedWaterVolFlowRate = RatedWaterVolFlowRateDes; - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), - companionCoolingCoil.Name, - "Design Size Rated Water Flow Rate [m3/s]", - 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); } else if (simpleWatertoAirHP.WAHPType == WatertoAirHP::Cooling && simpleWatertoAirHP.CompanionHeatingCoilNum > 0) { auto &companionHeatingCoil(state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(simpleWatertoAirHP.CompanionHeatingCoilNum)); companionHeatingCoil.RatedWaterVolFlowRate = RatedWaterVolFlowRateDes; - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(companionHeatingCoil.WAHPType)]), - companionHeatingCoil.Name, - "Design Size Rated Water Flow Rate [m3/s]", - 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); } } } else { @@ -2909,31 +2941,34 @@ namespace WaterToAirHeatPumpSimple { RatedWaterVolFlowRateUser = simpleWatertoAirHP.RatedWaterVolFlowRate; if ((std::abs(RatedWaterVolFlowRateDes - RatedWaterVolFlowRateUser) / RatedWaterVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "Design Size Rated Water Flow Rate [m3/s]", - RatedWaterVolFlowRateDes, - "User-Specified Rated Water Flow Rate [m3/s]", - RatedWaterVolFlowRateUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "Design Size Rated Water Flow Rate [m3/s]", + RatedWaterVolFlowRateDes, + "User-Specified Rated Water Flow Rate [m3/s]", + RatedWaterVolFlowRateUser); } else { - BaseSizer::reportSizerOutput( - state, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), - simpleWatertoAirHP.Name, - "User-Specified Rated Water Flow Rate [m3/s]", - RatedWaterVolFlowRateUser); + BaseSizer::reportSizerOutput(state, + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + simpleWatertoAirHP.Name, + "User-Specified Rated Water Flow Rate [m3/s]", + RatedWaterVolFlowRateUser); } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedWaterVolFlowRateDes - RatedWaterVolFlowRateUser) / RatedWaterVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - format("SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", - simpleWatertoAirHP.WAHPType, - simpleWatertoAirHP.Name)); - ShowContinueError(state, format("User-Specified Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateUser)); - ShowContinueError(state, format("differs from Design Size Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateDes)); + EnergyPlus::format( + "SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", + simpleWatertoAirHP.WAHPType, + simpleWatertoAirHP.Name)); + ShowContinueError(state, + EnergyPlus::format("User-Specified Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateUser)); + ShowContinueError( + state, EnergyPlus::format("differs from Design Size Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -3596,7 +3631,8 @@ namespace WaterToAirHeatPumpSimple { state.dataRptCoilSelection->coilSelectionReportObj->setCoilFinalSizes( state, simpleWatertoAirHP.Name, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), simpleWatertoAirHP.RatedCapCoolTotal, simpleWatertoAirHP.RatedCapCoolSens, simpleWatertoAirHP.RatedAirVolFlowRate, @@ -3605,7 +3641,8 @@ namespace WaterToAirHeatPumpSimple { state.dataRptCoilSelection->coilSelectionReportObj->setCoilFinalSizes( state, simpleWatertoAirHP.Name, - format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), + EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(simpleWatertoAirHP.WAHPType)]), simpleWatertoAirHP.RatedCapHeat, simpleWatertoAirHP.RatedCapHeat, simpleWatertoAirHP.RatedAirVolFlowRate, @@ -3788,7 +3825,7 @@ namespace WaterToAirHeatPumpSimple { IndexNum = Util::FindItemInList(CoilName, state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP); if (IndexNum == 0) { - ShowSevereError(state, format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; } @@ -3850,7 +3887,7 @@ namespace WaterToAirHeatPumpSimple { } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; CoilCapacity = -1000.0; } @@ -3897,7 +3934,7 @@ namespace WaterToAirHeatPumpSimple { } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; CoilAirFlowRate = -1000.0; } @@ -3939,7 +3976,7 @@ namespace WaterToAirHeatPumpSimple { } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -3981,7 +4018,7 @@ namespace WaterToAirHeatPumpSimple { } if (WhichCoil == 0) { - ShowSevereError(state, format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -4014,9 +4051,9 @@ namespace WaterToAirHeatPumpSimple { if (SimpleWSHPNum <= 0 || SimpleWSHPNum > state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs) { ShowSevereError(state, - format("SetSimpleWSHPData: called with WSHP Coil Number out of range={} should be >0 and <{}", - SimpleWSHPNum, - state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs)); + EnergyPlus::format("SetSimpleWSHPData: called with WSHP Coil Number out of range={} should be >0 and <{}", + SimpleWSHPNum, + state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs)); ErrorsFound = true; return; } @@ -4054,18 +4091,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, format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, EnergyPlus::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, format("Curve output at rated conditions = {:.3T}", RatedTotCapTempModFac)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedTotCapTempModFac)); } if (RatedCoolPowerTempModFac > 1.02 || RatedCoolPowerTempModFac < 0.98) { - ShowWarningError(state, format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, EnergyPlus::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, format("Curve output at rated conditions = {:.3T}", RatedCoolPowerTempModFac)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedCoolPowerTempModFac)); } } @@ -4076,11 +4113,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, format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, EnergyPlus::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, format("Curve output at rated conditions = {:.3T}", RatedSensCapTempModFac)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedSensCapTempModFac)); } } @@ -4091,17 +4128,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, format("{}: Coil:Heating:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, EnergyPlus::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, format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); } if (RatedHeatPowerTempModFac > 1.02 || RatedHeatPowerTempModFac < 0.98) { - ShowWarningError(state, format("{}: Coil:Heating:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, EnergyPlus::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, format("Curve output at rated conditions = {:.3T}", RatedHeatPowerTempModFac)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatPowerTempModFac)); } } } diff --git a/src/EnergyPlus/WaterUse.cc b/src/EnergyPlus/WaterUse.cc index e33a6aca2cb..c892b935ea9 100644 --- a/src/EnergyPlus/WaterUse.cc +++ b/src/EnergyPlus/WaterUse.cc @@ -164,8 +164,9 @@ namespace WaterUse { if (NumIteration > MaxIterations) { if (!state.dataGlobal->WarmupFlag) { if (waterConnection.MaxIterationsErrorIndex == 0) { - ShowWarningError(state, - format("WaterUse:Connections = {}: Heat recovery temperature did not converge", waterConnection.Name)); + ShowWarningError( + state, + EnergyPlus::format("WaterUse:Connections = {}: Heat recovery temperature did not converge", waterConnection.Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -199,7 +200,8 @@ namespace WaterUse { } } // If we didn't find it, fatal - ShowFatalError(state, format("LocalWaterUseConnectionFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, + EnergyPlus::format("LocalWaterUseConnectionFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -262,7 +264,8 @@ namespace WaterUse { if (NumIteration > MaxIterations) { if (!state.dataGlobal->WarmupFlag) { if (this->MaxIterationsErrorIndex == 0) { - ShowWarningError(state, format("WaterUse:Connections = {}: Heat recovery temperature did not converge", this->Name)); + ShowWarningError(state, + EnergyPlus::format("WaterUse:Connections = {}: Heat recovery temperature did not converge", this->Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -371,7 +374,7 @@ namespace WaterUse { } // WaterEquipNum if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -471,18 +474,22 @@ namespace WaterUse { waterConnection.HeatRecoveryHX = static_cast(getEnumValue(HeatRecoverHXNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(8)))); if (waterConnection.HeatRecoveryHX == HeatRecovHX::Invalid) { - ShowSevereError(state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); - ShowContinueError(state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, waterConnection.Name)); + ShowSevereError( + state, + EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); + ShowContinueError(state, + EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, waterConnection.Name)); ErrorsFound = true; } waterConnection.HeatRecoveryConfig = static_cast(getEnumValue(HeatRecoveryConfigNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(9)))); if (waterConnection.HeatRecoveryConfig == HeatRecovConfig::Invalid) { - ShowSevereError(state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); - ShowContinueError(state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, waterConnection.Name)); + ShowSevereError( + state, + EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + ShowContinueError(state, + EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, waterConnection.Name)); ErrorsFound = true; } } @@ -495,18 +502,20 @@ namespace WaterUse { int WaterEquipNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(AlphaNum), state.dataWaterUse->WaterEquipment); if (WaterEquipNum == 0) { - ShowSevereError( - state, - format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(AlphaNum), state.dataIPShortCut->cAlphaArgs(AlphaNum))); - ShowContinueError(state, format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, waterConnection.Name)); + ShowSevereError(state, + EnergyPlus::format("Invalid {} = {}", + state.dataIPShortCut->cAlphaFieldNames(AlphaNum), + state.dataIPShortCut->cAlphaArgs(AlphaNum))); + ShowContinueError(state, + EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, waterConnection.Name)); ErrorsFound = true; } else { if (state.dataWaterUse->WaterEquipment(WaterEquipNum).Connections > 0) { ShowSevereError(state, - format("{} = {}: WaterUse:Equipment = {} is already referenced by another object.", - state.dataIPShortCut->cCurrentModuleObject, - waterConnection.Name, - state.dataIPShortCut->cAlphaArgs(AlphaNum))); + EnergyPlus::format("{} = {}: WaterUse:Equipment = {} is already referenced by another object.", + state.dataIPShortCut->cCurrentModuleObject, + waterConnection.Name, + state.dataIPShortCut->cAlphaArgs(AlphaNum))); ErrorsFound = true; } else { state.dataWaterUse->WaterEquipment(WaterEquipNum).Connections = WaterConnNum; @@ -523,7 +532,7 @@ namespace WaterUse { } // WaterConnNum if (ErrorsFound) { - ShowFatalError(state, format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } if (state.dataWaterUse->numWaterConnections > 0) { @@ -1036,19 +1045,20 @@ namespace WaterUse { if (this->TargetCWTempErrorCount < 2) { ShowWarningError( state, - format("CalcEquipmentFlowRates: \"{}\" - Target water temperature is less than the cold water temperature by ({:.2R} C)", - this->Name, - TempDiff)); + EnergyPlus::format( + "CalcEquipmentFlowRates: \"{}\" - Target water temperature is less than the cold water temperature by ({:.2R} C)", + this->Name, + TempDiff)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("...target water temperature = {:.2R} C", this->TargetTemp)); - ShowContinueError(state, format("...cold water temperature = {:.2R} C", this->ColdTemp)); + ShowContinueError(state, EnergyPlus::format("...target water temperature = {:.2R} C", this->TargetTemp)); + ShowContinueError(state, EnergyPlus::format("...cold water temperature = {:.2R} C", this->ColdTemp)); ShowContinueError(state, "...Target water temperature should be greater than or equal to the cold water temperature. " "Verify temperature setpoints and schedules."); } else { ShowRecurringWarningErrorAtEnd( state, - format( + EnergyPlus::format( "\"{}\" - Target water temperature should be greater than or equal to the cold water temperature error continues...", this->Name), this->TargetCWTempErrIndex, @@ -1068,20 +1078,22 @@ namespace WaterUse { if (this->CWHWTempErrorCount < 2) { ShowWarningError( state, - format("CalcEquipmentFlowRates: \"{}\" - Hot water temperature is less than the cold water temperature by ({:.2R} C)", - this->Name, - TempDiff)); + EnergyPlus::format( + "CalcEquipmentFlowRates: \"{}\" - Hot water temperature is less than the cold water temperature by ({:.2R} C)", + this->Name, + TempDiff)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("...hot water temperature = {:.2R} C", this->HotTemp)); - ShowContinueError(state, format("...cold water temperature = {:.2R} C", this->ColdTemp)); + ShowContinueError(state, EnergyPlus::format("...hot water temperature = {:.2R} C", this->HotTemp)); + ShowContinueError(state, EnergyPlus::format("...cold water temperature = {:.2R} C", this->ColdTemp)); ShowContinueError(state, "...Hot water temperature should be greater than or equal to the cold water temperature. " "Verify temperature setpoints and schedules."); } else { ShowRecurringWarningErrorAtEnd( state, - format("\"{}\" - Hot water temperature should be greater than the cold water temperature error continues... ", - this->Name), + EnergyPlus::format( + "\"{}\" - Hot water temperature should be greater than the cold water temperature error continues... ", + this->Name), this->CWHWTempErrIndex, TempDiff, TempDiff); @@ -1090,25 +1102,27 @@ namespace WaterUse { TempDiff = this->TargetTemp - this->HotTemp; ++this->TargetHWTempErrorCount; if (this->TargetHWTempErrorCount < 2) { - ShowWarningError(state, - format("CalcEquipmentFlowRates: \"{}\" - Target water temperature is greater than the hot water " - "temperature by ({:.2R} C)", - this->Name, - TempDiff)); + ShowWarningError( + state, + EnergyPlus::format("CalcEquipmentFlowRates: \"{}\" - Target water temperature is greater than the hot water " + "temperature by ({:.2R} C)", + this->Name, + TempDiff)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("...target water temperature = {:.2R} C", this->TargetTemp)); - ShowContinueError(state, format("...hot water temperature = {:.2R} C", this->HotTemp)); + ShowContinueError(state, EnergyPlus::format("...target water temperature = {:.2R} C", this->TargetTemp)); + ShowContinueError(state, EnergyPlus::format("...hot water temperature = {:.2R} C", this->HotTemp)); ShowContinueError(state, "...Target water temperature should be less than or equal to the hot water temperature. " "Verify temperature setpoints and schedules."); } else { - ShowRecurringWarningErrorAtEnd(state, - format("\"{}\" - Target water temperature should be less than or equal to the hot " - "water temperature error continues...", - this->Name), - this->TargetHWTempErrIndex, - TempDiff, - TempDiff); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format("\"{}\" - Target water temperature should be less than or equal to the hot " + "water temperature error continues...", + this->Name), + this->TargetHWTempErrIndex, + TempDiff, + TempDiff); } } } @@ -1124,21 +1138,22 @@ namespace WaterUse { TempDiff = this->ColdTemp - this->HotTemp; if (this->CWHWTempErrorCount < 2) { ShowWarningError(state, - format("CalcEquipmentFlowRates: \"{}\" - Hot water temperature is less than the cold water " - "temperature by ({:.2R} C)", - this->Name, - TempDiff)); + EnergyPlus::format("CalcEquipmentFlowRates: \"{}\" - Hot water temperature is less than the cold water " + "temperature by ({:.2R} C)", + this->Name, + TempDiff)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, format("...hot water temperature = {:.2R} C", this->HotTemp)); - ShowContinueError(state, format("...cold water temperature = {:.2R} C", this->ColdTemp)); + ShowContinueError(state, EnergyPlus::format("...hot water temperature = {:.2R} C", this->HotTemp)); + ShowContinueError(state, EnergyPlus::format("...cold water temperature = {:.2R} C", this->ColdTemp)); ShowContinueError(state, "...Hot water temperature should be greater than or equal to the cold water temperature. " "Verify temperature setpoints and schedules."); } else { ShowRecurringWarningErrorAtEnd( state, - format("\"{}\" - Hot water temperature should be greater than the cold water temperature error continues... ", - this->Name), + EnergyPlus::format( + "\"{}\" - Hot water temperature should be greater than the cold water temperature error continues... ", + this->Name), this->CWHWTempErrIndex, TempDiff, TempDiff); diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index 5266a61d40d..ccd294a03a8 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -715,7 +715,8 @@ namespace Weather { if (state.dataWeather->NumIntervalsPerHour != state.dataGlobal->TimeStepsInHour) { ShowSevereError( state, - format("{}Number of intervals per hour on Weather file does not match specified number of Time Steps Per Hour", RoutineName)); + EnergyPlus::format("{}Number of intervals per hour on Weather file does not match specified number of Time Steps Per Hour", + RoutineName)); ErrorsFound = true; } } @@ -729,24 +730,25 @@ namespace Weather { CheckWeatherFileValidity(state); } if (ErrorsFound) { - ShowSevereError(state, format("{}No location specified, program will terminate.", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{}No location specified, program will terminate.", RoutineName)); } } else { ErrorsFound = true; - ShowSevereError(state, format("{}No Design Days or Run Period(s) specified, program will terminate.", RoutineName)); + ShowSevereError(state, EnergyPlus::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, - format("{}Requested Design Days only (DataSystemVariables::DDOnly) but no Design Days specified, program will terminate.", - RoutineName)); + EnergyPlus::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, - format( + EnergyPlus::format( "{}Requested Reverse Design Days (DataSystemVariables::ReverseDD) but only 1 Design Day specified, program will terminate.", RoutineName)); } @@ -754,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, format("{}Errors found in Weather Data Input. Program terminates.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in Weather Data Input. Program terminates.", RoutineName)); } state.dataEnvrn->CurrentOverallSimDay = 0; @@ -790,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, format("{}Adaptive Comfort being reported during design day.", RoutineName)); + ShowWarningError(state, EnergyPlus::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,7 +893,8 @@ namespace Weather { ShowSevereError( state, - format("{}Weatherfile does not support leap years but runperiod includes a leap year ({})", RoutineName, year)); + EnergyPlus::format( + "{}Weatherfile does not support leap years but runperiod includes a leap year ({})", RoutineName, year)); missingLeap = true; } } @@ -904,8 +907,9 @@ namespace Weather { int runStartJulian = dataperiod.DataStJDay; int runEndJulian = dataperiod.DataEnJDay; if (!dataperiod.HasYearData) { - ShowSevereError(state, - format("{}Actual weather runperiod has been entered but weatherfile DATA PERIOD does not have " + ShowSevereError( + state, + EnergyPlus::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"); @@ -946,56 +950,58 @@ namespace Weather { if (!OkRun) { if (!envCurr.ActualWeather) { - StDate = format(DateFormat, envCurr.StartMonth, envCurr.StartDay); - EnDate = format(DateFormat, envCurr.EndMonth, envCurr.EndDay); - ShowSevereError(state, - format("{}Runperiod [mm/dd] (Start={},End={}) requested not within Data Period(s) from Weather File", + StDate = EnergyPlus::format(DateFormat, envCurr.StartMonth, envCurr.StartDay); + 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)); } else { - StDate = format(DateFormatWithYear, envCurr.StartMonth, envCurr.StartDay, envCurr.StartYear); - EnDate = format(DateFormatWithYear, envCurr.EndMonth, envCurr.EndDay, envCurr.EndYear); + StDate = EnergyPlus::format(DateFormatWithYear, envCurr.StartMonth, envCurr.StartDay, envCurr.StartYear); + EnDate = EnergyPlus::format(DateFormatWithYear, envCurr.EndMonth, envCurr.EndDay, envCurr.EndYear); ShowSevereError( state, - format("{}Runperiod [mm/dd/yyyy] (Start={},End={}) requested not within Data Period(s) from Weather File", - RoutineName, - StDate, - EnDate)); + EnergyPlus::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 = format(DateFormat, dataPeriod1.StMon, dataPeriod1.StDay); - EnDate = format(DateFormat, dataPeriod1.EnMon, dataPeriod1.EnDay); + StDate = EnergyPlus::format(DateFormat, dataPeriod1.StMon, dataPeriod1.StDay); + EnDate = EnergyPlus::format(DateFormat, dataPeriod1.EnMon, dataPeriod1.EnDay); if (dataPeriod1.StYear > 0) { - StDate += format("/{}", dataPeriod1.StYear); + StDate += EnergyPlus::format("/{}", dataPeriod1.StYear); } else { StDate += "/"; } if (dataPeriod1.EnYear > 0) { - EnDate += format("/{}", dataPeriod1.EnYear); + EnDate += EnergyPlus::format("/{}", dataPeriod1.EnYear); } else { EnDate += "/"; } if (state.dataWeather->NumDataPeriods == 1) { - ShowContinueError(state, format("Weather Data Period (Start={},End={})", StDate, EnDate)); + ShowContinueError(state, EnergyPlus::format("Weather Data Period (Start={},End={})", StDate, EnDate)); } else { - ShowContinueError(state, format("Multiple Weather Data Periods 1st (Start={},End={})", StDate, EnDate)); + ShowContinueError(state, EnergyPlus::format("Multiple Weather Data Periods 1st (Start={},End={})", StDate, EnDate)); } - ShowFatalError(state, format("{}Program terminates due to preceding condition.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Program terminates due to preceding condition.", RoutineName)); } if (missingLeap) { // Bail out now if we still need to - ShowFatalError(state, format("{}Program terminates due to preceding condition.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Program terminates due to preceding condition.", RoutineName)); } // Following builds Environment start/end for ASHRAE 55 warnings - StDate = format(DateFormat, envCurr.StartMonth, envCurr.StartDay); - EnDate = format(DateFormat, envCurr.EndMonth, envCurr.EndDay); + StDate = EnergyPlus::format(DateFormat, envCurr.StartMonth, envCurr.StartDay); + EnDate = EnergyPlus::format(DateFormat, envCurr.EndMonth, envCurr.EndDay); if (envCurr.KindOfEnvrn == Constant::KindOfSim::RunPeriodWeather) { - StDate += format("/{}", envCurr.StartYear); - EnDate += format("/{}", envCurr.EndYear); + StDate += EnergyPlus::format("/{}", envCurr.StartYear); + EnDate += EnergyPlus::format("/{}", envCurr.EndYear); } state.dataEnvrn->EnvironmentStartEnd = StDate + " - " + EnDate; state.dataEnvrn->StartYear = envCurr.StartYear; @@ -1034,14 +1040,15 @@ namespace Weather { if (state.dataWeather->WFAllowsLeapYears) { ShowSevereError( state, - format("{}AdaptiveComfort Reporting does not work correctly with leap years in weather files.", RoutineName)); + EnergyPlus::format("{}AdaptiveComfort Reporting does not work correctly with leap years in weather files.", + RoutineName)); ErrorsFound = true; } if (state.dataWeather->NumDataPeriods != 1) { - ShowSevereError( - state, - format("{}AdaptiveComfort Reporting does not work correctly with multiple dataperiods in weather files.", - RoutineName)); + ShowSevereError(state, + EnergyPlus::format( + "{}AdaptiveComfort Reporting does not work correctly with multiple dataperiods in weather files.", + RoutineName)); ErrorsFound = true; } auto const &dataPeriod1 = state.dataWeather->DataPeriods(1); @@ -1049,24 +1056,26 @@ 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, - format("{}AdaptiveComfort Reporting does not work correctly with weather files that do " + ShowSevereError( + state, + EnergyPlus::format("{}AdaptiveComfort Reporting does not work correctly with weather files that do " "not contain 365 days.", RoutineName)); ErrorsFound = true; } } else { - ShowSevereError(state, - format("{}AdaptiveComfort Reporting does not work correctly with weather files that do not " + ShowSevereError( + state, + EnergyPlus::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, - format("{}AdaptiveComfort Reporting does not work correctly with weather files that have " - "multiple interval records per hour.", - RoutineName)); + EnergyPlus::format("{}AdaptiveComfort Reporting does not work correctly with weather files that have " + "multiple interval records per hour.", + RoutineName)); ErrorsFound = true; } } // if @@ -1132,8 +1141,8 @@ namespace Weather { Source = "InputFile"; } if (state.dataWeather->DaylightSavingIsActive && state.dataReportFlag->DoWeatherInitReporting) { - StDate = format(DateFormat, DSTActStMon, DSTActStDay); - EnDate = format(DateFormat, DSTActEnMon, DSTActEnDay); + StDate = EnergyPlus::format(DateFormat, DSTActStMon, DSTActStDay); + EnDate = EnergyPlus::format(DateFormat, DSTActEnMon, DSTActEnDay); print(state.files.eio, EnvDSTYFormat, Source, StDate, EnDate); } else if (state.dataGlobal->DoOutputReporting) { print(state.files.eio, EnvDSTNFormat, Source); @@ -1142,7 +1151,7 @@ namespace Weather { auto &specialDay = state.dataWeather->SpecialDays(k); static constexpr std::string_view EnvSpDyFormat("Environment:Special Days,{},{},{},{},{:3}\n"); if (specialDay.WthrFile && state.dataWeather->UseSpecialDays && state.dataReportFlag->DoWeatherInitReporting) { - StDate = format(DateFormat, specialDay.ActStMon, specialDay.ActStDay); + StDate = EnergyPlus::format(DateFormat, specialDay.ActStMon, specialDay.ActStDay); print(state.files.eio, EnvSpDyFormat, specialDay.Name, @@ -1152,7 +1161,7 @@ namespace Weather { specialDay.Duration); } if (!specialDay.WthrFile && state.dataReportFlag->DoWeatherInitReporting) { - StDate = format(DateFormat, specialDay.ActStMon, specialDay.ActStDay); + StDate = EnergyPlus::format(DateFormat, specialDay.ActStMon, specialDay.ActStDay); print(state.files.eio, EnvSpDyFormat, specialDay.Name, @@ -1168,7 +1177,7 @@ namespace Weather { state.dataGlobal->KindOfSim == Constant::KindOfSim::HVACSizeDesignDay) { // Design Day auto const &desDayInput = state.dataWeather->DesDayInput(envCurr.DesignDayNum); state.dataEnvrn->RunPeriodEnvironment = false; - StDate = format(DateFormat, desDayInput.Month, desDayInput.DayOfMonth); + StDate = EnergyPlus::format(DateFormat, desDayInput.Month, desDayInput.DayOfMonth); EnDate = StDate; if (state.dataReportFlag->DoWeatherInitReporting) { print(state.files.eio, @@ -1198,7 +1207,7 @@ namespace Weather { } if (ErrorsFound && !state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation) { - ShowSevereError(state, format("{}Errors found in getting a new environment", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{}Errors found in getting a new environment", RoutineName)); Available = false; } else if (ErrorsFound) { Available = false; @@ -1219,7 +1228,7 @@ namespace Weather { envNew = envBase; // copy over seed data from current array element envNew.SeedEnvrnNum = i; envNew.KindOfEnvrn = Constant::KindOfSim::HVACSizeDesignDay; - envNew.Title = format("{} HVAC Sizing Pass {}", envBase.Title, HVACSizingIterCount); + envNew.Title = EnergyPlus::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); @@ -1228,7 +1237,7 @@ namespace Weather { envNew = envBase; // copy over seed data envNew.SeedEnvrnNum = i; envNew.KindOfEnvrn = Constant::KindOfSim::HVACSizeRunPeriodDesign; - envNew.Title = format("{} HVAC Sizing Pass {}", envBase.Title, HVACSizingIterCount); + envNew.Title = EnergyPlus::format("{} HVAC Sizing Pass {}", envBase.Title, HVACSizingIterCount); envNew.HVACSizingIterationNum = HVACSizingIterCount; } } // for each loop over Environment data structure @@ -1552,7 +1561,7 @@ namespace Weather { } ThisDay += 7 * (state.dataWeather->DST.StDay - 1); if (ThisDay > state.dataWeather->EndDayOfMonthWithLeapDay(state.dataWeather->DST.StMon)) { - ShowSevereError(state, format("{}Determining DST: DST Start Date, Nth Day of Month, not enough Nths", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{}Determining DST: DST Start Date, Nth Day of Month, not enough Nths", RoutineName)); ErrorsFound = true; } else { ActStartMonth = state.dataWeather->DST.StMon; @@ -1579,7 +1588,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, format("{}Determining DST: DST End Date, Nth Day of Month, not enough Nths", RoutineName)); + ShowSevereError(state, EnergyPlus::format("{}Determining DST: DST End Date, Nth Day of Month, not enough Nths", RoutineName)); ErrorsFound = true; } else { ActEndMonth = state.dataWeather->DST.EnMon; @@ -1595,7 +1604,7 @@ namespace Weather { } if (ErrorsFound) { - ShowFatalError(state, format("{}Program terminates due to preceding condition(s).", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Program terminates due to preceding condition(s).", RoutineName)); } if (present(DSTActStMon)) { @@ -1667,8 +1676,9 @@ namespace Weather { } ThisDay += 7 * (specialDay.Day - 1); if (ThisDay > state.dataWeather->EndDayOfMonthWithLeapDay(specialDay.Month)) { - ShowSevereError(state, - format("{}Special Day Date, Nth Day of Month, not enough Nths, for SpecialDay={}", RoutineName, specialDay.Name)); + ShowSevereError( + state, + EnergyPlus::format("{}Special Day Date, Nth Day of Month, not enough Nths, for SpecialDay={}", RoutineName, specialDay.Name)); ErrorsFound = true; continue; } @@ -1685,9 +1695,10 @@ namespace Weather { JDay = General::OrdinalDay(specialDay.Month, ThisDay, state.dataWeather->LeapYearAdd); } if (state.dataWeather->SpecialDayTypes(JDay) != 0) { - ShowWarningError( - state, - format("{}Special Day definition ({}) is overwriting previously entered special day period", RoutineName, specialDay.Name)); + ShowWarningError(state, + EnergyPlus::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."); } @@ -1707,7 +1718,7 @@ namespace Weather { } if (ErrorsFound) { - ShowFatalError(state, format("{}Program terminates due to preceding condition(s).", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Program terminates due to preceding condition(s).", RoutineName)); } } @@ -2067,11 +2078,11 @@ namespace Weather { Sched::UpdateScheduleVals(state); - state.dataEnvrn->CurMnDyHr = - format("{:02d}/{:02d} {:02d}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, (unsigned short)(state.dataGlobal->HourOfDay - 1)); - state.dataEnvrn->CurMnDy = format("{:02d}/{:02d}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth); + state.dataEnvrn->CurMnDyHr = EnergyPlus::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->CurMnDyYr = - format("{:02d}/{:02d}/{:04d}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->CalendarYear); + EnergyPlus::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; @@ -2097,7 +2108,8 @@ 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, format("SetCurrentWeather: At {} Sun is Up but Solar Altitude Angle is < 0.0", state.dataEnvrn->CurMnDyHr)); + ShowFatalError(state, + EnergyPlus::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); @@ -2399,7 +2411,7 @@ namespace Weather { if (thisEnviron.MatchYear) { date += '/' + fmt::to_string(thisEnviron.StartYear); } - ShowSevereError(state, format("Multiple rewinds on EPW while searching for first day {}", date)); + ShowSevereError(state, EnergyPlus::format("Multiple rewinds on EPW while searching for first day {}", date)); } else { state.files.inputWeatherFile.rewind(); ++NumRewinds; @@ -2446,13 +2458,13 @@ namespace Weather { } if (!WeatherDataLine.good) { ShowFatalError(state, - 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()), + 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}); } if (state.dataWeather->CurDayOfWeek <= 7) { @@ -2470,50 +2482,50 @@ 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, format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); - ShowContinueError(state, format("DryBulb Temperature ({:.2R}) is out of range [-90.0, 70.0]", DryBulb)); + ShowSevereError(state, EnergyPlus::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, format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); - ShowContinueError(state, format("DewPoint Temperature ({:.2R}) is out of range [-90.0, 70.0]", DewPoint)); + ShowSevereError(state, EnergyPlus::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, format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); - ShowContinueError(state, format("Relative Humidity ({:.2R}) is out of range [0.0, 100.0]", RelHum)); + ShowSevereError(state, EnergyPlus::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, format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); - ShowContinueError(state, format("Atmospheric Pressure ({:.0R}) is out of range [31000, 120000]", AtmPress)); + ShowSevereError(state, EnergyPlus::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, format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); - ShowContinueError(state, format("Direct Radiation ({:.2R}) is out of range [0.0, -]", DirectRad)); + ShowSevereError(state, EnergyPlus::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, format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); - ShowContinueError(state, format("Diffuse Radiation ({:.2R}) is out of range [0.0, -]", DiffuseRad)); + ShowSevereError(state, EnergyPlus::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, format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); - ShowContinueError(state, format("Wind Direction ({:.2R}) is out of range [0.0, 360.0]", WindDir)); + ShowSevereError(state, EnergyPlus::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, format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); - ShowContinueError(state, format("Wind Speed ({:.2R}) is out of range [0.0, 40.0]", WindSpeed)); + ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowContinueError(state, EnergyPlus::format("Wind Speed ({:.2R}) is out of range [0.0, 40.0]", WindSpeed)); ErrorsFound = true; } @@ -2526,30 +2538,32 @@ namespace Weather { WeatherDataLine.update(state.files.inputWeatherFile.readLine()); if (!WeatherDataLine.good) { readList(WeatherDataLine.data, WYear, WMonth, WDay, WHour, WMinute); - ShowFatalError(state, - 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, + 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}); } } 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, - 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, + 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}); } } } @@ -2688,35 +2702,36 @@ namespace Weather { Albedo, LiquidPrecip); } else { - ShowFatalError(state, - format("End-of-File encountered after {}/{}/{} {}:{}, starting from first day of Weather File would " - "not be \"next day\"", - WYear, - WMonth, - WDay, - WHour, - WMinute)); + ShowFatalError( + state, + EnergyPlus::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, - format("Unexpected error condition in middle of reading EPW file, stopped at {}/{}/{} {}:{}", - WYear, - WMonth, - WDay, - WHour, - WMinute), + EnergyPlus::format("Unexpected error condition in middle of reading EPW file, stopped at {}/{}/{} {}:{}", + WYear, + WMonth, + WDay, + WHour, + WMinute), OptionalOutputFileRef{state.files.eso}); } } if (hour != WHour) { ShowFatalError(state, - format("Unexpected error condition in middle of reading EPW file, stopped at {}/{}/{} {}:{}", - WYear, - WMonth, - WDay, - WHour, - WMinute), + EnergyPlus::format("Unexpected error condition in middle of reading EPW file, stopped at {}/{}/{} {}:{}", + WYear, + WMonth, + WDay, + WHour, + WMinute), OptionalOutputFileRef{state.files.eso}); } @@ -3335,15 +3350,16 @@ namespace Weather { } if (DateInError) { - ShowSevereError(state, format("Reading Weather Data Line, Invalid Date, Year={}, Month={}, Day={}", WYear, WMonth, WDay)); + ShowSevereError(state, EnergyPlus::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, format("Invalid Weather Line (no commas) at date={:4}/{:2}/{:2} Hour#={:2} Min#={:2}", WYear, WMonth, WDay, WHour, WMinute)); + 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)); ShowFatalError(state, "Error in Reading Weather Data"); } @@ -3538,7 +3554,7 @@ namespace Weather { designDay.DayOfMonth = desDayInput.DayOfMonth; designDay.DayOfYear = General::OrdinalDay(designDay.Month, designDay.DayOfMonth, 0); static constexpr std::string_view MnDyFmt("{:02}/{:02}"); - state.dataEnvrn->CurMnDy = format(MnDyFmt, desDayInput.Month, desDayInput.DayOfMonth); + state.dataEnvrn->CurMnDy = EnergyPlus::format(MnDyFmt, desDayInput.Month, desDayInput.DayOfMonth); // EnvironmentName = DesDayInput( EnvrnNum ).Title; state.dataEnvrn->RunPeriodEnvironment = false; // Following builds Environment start/end for ASHRAE 55 warnings @@ -3547,14 +3563,15 @@ namespace Weather { // Check that barometric pressure is within range if (desDayInput.PressureEntered) { if (std::abs((desDayInput.PressBarom - state.dataEnvrn->StdBaroPress) / state.dataEnvrn->StdBaroPress) > 0.1) { // 10% off - ShowWarningError(state, - format("SetUpDesignDay: Entered DesignDay Barometric Pressure={:.0R} differs by more than 10% from Standard " - "Barometric Pressure={:.0R}.", - desDayInput.PressBarom, - state.dataEnvrn->StdBaroPress)); - ShowContinueError( + ShowWarningError( state, - format("...occurs in DesignDay={}, Standard Pressure (based on elevation) will be used.", state.dataEnvrn->EnvironmentName)); + EnergyPlus::format("SetUpDesignDay: Entered DesignDay Barometric Pressure={:.0R} differs by more than 10% from Standard " + "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)); desDayInput.PressBarom = state.dataEnvrn->StdBaroPress; } } else { @@ -3703,7 +3720,7 @@ namespace Weather { } break; default: { ShowSevereError(state, "SetUpDesignDay: Invalid Humidity Indicator type"); - ShowContinueError(state, format("Occurred in Design Day={}", desDayInput.Title)); + ShowContinueError(state, EnergyPlus::format("Occurred in Design Day={}", desDayInput.Title)); } break; } // switch @@ -4367,8 +4384,9 @@ namespace Weather { if (Line.eof) { ShowFatalError( state, - format("OpenWeatherFile: Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", - epwHeaders[typeNum]), + EnergyPlus::format( + "OpenWeatherFile: Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", + epwHeaders[typeNum]), OptionalOutputFileRef(state.files.eso)); } @@ -4423,19 +4441,21 @@ 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, format("..Location object={}", state.dataWeather->LocationTitle)); - ShowContinueError(state, format("..Weather File Location={}", state.dataEnvrn->WeatherFileLocationTitle)); + ShowContinueError(state, EnergyPlus::format("..Location object={}", state.dataWeather->LocationTitle)); + ShowContinueError(state, EnergyPlus::format("..Weather File Location={}", state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError( state, - format("..due to location differences, Latitude difference=[{:.2R}] degrees, Longitude difference=[{:.2R}] degrees.", - std::abs(state.dataEnvrn->Latitude - state.dataWeather->WeatherFileLatitude), - std::abs(state.dataEnvrn->Longitude - state.dataWeather->WeatherFileLongitude))); - ShowContinueError(state, - format("..Time Zone difference=[{:.1R}] hour(s), Elevation difference=[{:.2R}] percent, [{:.2R}] meters.", - std::abs(state.dataEnvrn->TimeZoneNumber - state.dataWeather->WeatherFileTimeZone), - std::abs((state.dataEnvrn->Elevation - state.dataWeather->WeatherFileElevation) / - max(state.dataEnvrn->Elevation, 1.0) * 100.0), - std::abs(state.dataEnvrn->Elevation - state.dataWeather->WeatherFileElevation))); + EnergyPlus::format( + "..due to location differences, Latitude difference=[{:.2R}] degrees, Longitude difference=[{:.2R}] degrees.", + std::abs(state.dataEnvrn->Latitude - state.dataWeather->WeatherFileLatitude), + std::abs(state.dataEnvrn->Longitude - state.dataWeather->WeatherFileLongitude))); + ShowContinueError( + state, + EnergyPlus::format("..Time Zone difference=[{:.1R}] hour(s), Elevation difference=[{:.2R}] percent, [{:.2R}] meters.", + std::abs(state.dataEnvrn->TimeZoneNumber - state.dataWeather->WeatherFileTimeZone), + std::abs((state.dataEnvrn->Elevation - state.dataWeather->WeatherFileElevation) / + max(state.dataEnvrn->Elevation, 1.0) * 100.0), + std::abs(state.dataEnvrn->Elevation - state.dataWeather->WeatherFileElevation))); } } } @@ -4496,17 +4516,17 @@ namespace Weather { } if ((state.dataEnvrn->Latitude < -90.0) || (state.dataEnvrn->Latitude > 90.0)) { - ShowSevereError(state, format("Latitude must be between -90 and 90; Entered={:.2R}", state.dataEnvrn->Latitude)); + ShowSevereError(state, EnergyPlus::format("Latitude must be between -90 and 90; Entered={:.2R}", state.dataEnvrn->Latitude)); LocationError = true; } if ((state.dataEnvrn->Longitude < -180.0) || (state.dataEnvrn->Longitude > 180.0)) { - ShowSevereError(state, format("Longitude must be between -180 and 180; Entered={:.2R}", state.dataEnvrn->Longitude)); + ShowSevereError(state, EnergyPlus::format("Longitude must be between -180 and 180; Entered={:.2R}", state.dataEnvrn->Longitude)); LocationError = true; } if ((state.dataEnvrn->TimeZoneNumber < -12.00) || (state.dataEnvrn->TimeZoneNumber > 14.00)) { - ShowSevereError(state, format("Time Zone must be between -12 and +14; Entered={:.2R}", state.dataEnvrn->TimeZoneNumber)); + ShowSevereError(state, EnergyPlus::format("Time Zone must be between -12 and +14; Entered={:.2R}", state.dataEnvrn->TimeZoneNumber)); LocationError = true; } @@ -4524,11 +4544,12 @@ namespace Weather { Real64 const DiffCalc = std::abs(state.dataEnvrn->TimeZoneNumber - StdTimeMerid); if (DiffCalc > 1.0 && DiffCalc < 24.0) { if (DiffCalc < 3.0) { - ShowWarningError(state, - format("Standard Time Meridian and Time Zone differ by more than 1, Difference=\"{:.1R}\"", DiffCalc)); + ShowWarningError( + state, EnergyPlus::format("Standard Time Meridian and Time Zone differ by more than 1, Difference=\"{:.1R}\"", DiffCalc)); ShowContinueError(state, "Solar Positions may be incorrect"); } else { - ShowSevereError(state, format("Standard Time Meridian and Time Zone differ by more than 2, Difference=\"{:.1R}\"", DiffCalc)); + ShowSevereError( + state, EnergyPlus::format("Standard Time Meridian and Time Zone differ by more than 2, Difference=\"{:.1R}\"", DiffCalc)); ShowContinueError(state, "Solar Positions will be incorrect"); // LocationError=.TRUE. } @@ -4913,27 +4934,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, - format("{}: object={}, end year cannot be specified if the start year is not.", - ipsc->cCurrentModuleObject, - reportPeriodInput.title)); + EnergyPlus::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, - format("{}: object={}, start year ({}) is too early, please choose a date after 1582.", - ipsc->cCurrentModuleObject, - reportPeriodInput.title, - reportPeriodInput.startYear)); + EnergyPlus::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, - format("{}: object={}, start year ({}) is after the end year ({}).", - ipsc->cCurrentModuleObject, - reportPeriodInput.title, - reportPeriodInput.startYear, - reportPeriodInput.endYear)); + EnergyPlus::format("{}: object={}, start year ({}) is after the end year ({}).", + ipsc->cCurrentModuleObject, + reportPeriodInput.title, + reportPeriodInput.startYear, + reportPeriodInput.endYear)); ErrorsFound = true; } @@ -5071,27 +5092,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, - format("{}: object={}, end year cannot be specified if the start year is not.", - ipsc->cCurrentModuleObject, - runPeriodInput.title)); + EnergyPlus::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, - format("{}: object={}, start year ({}) is too early, please choose a date after 1582.", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startYear)); + EnergyPlus::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, - format("{}: object={}, start year ({}) is after the end year ({}).", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startYear, - runPeriodInput.endYear)); + EnergyPlus::format("{}: object={}, start year ({}) is after the end year ({}).", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startYear, + runPeriodInput.endYear)); ErrorsFound = true; } @@ -5101,11 +5122,11 @@ namespace Weather { int dayType = getEnumValue(Sched::dayTypeNamesUC, state.dataIPShortCut->cAlphaArgs(2)); if (dayType < 1) { ShowWarningError(state, - 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))); + 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))); runPeriodInput.startWeekDay = Sched::DayType::Sunday; } else { runPeriodInput.startWeekDay = static_cast(dayType); @@ -5131,23 +5152,24 @@ namespace Weather { } else { // Have an input start year if (!isLeapYear(runPeriodInput.startYear)) { // Start year is not a leap year ShowSevereError(state, - format("{}: object={}, start year ({}) is not a leap year but the requested start date is 2/29.", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startYear)); + EnergyPlus::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, - 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, + 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)])); runPeriodInput.startWeekDay = weekday; } } else { // Set the weekday if it was not input @@ -5159,11 +5181,11 @@ namespace Weather { // Non leap-day start date if (!validMonthDay(runPeriodInput.startMonth, runPeriodInput.startDay)) { ShowSevereError(state, - format("{}: object={}, Invalid input start month/day ({}/{})", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startMonth, - runPeriodInput.startDay)); + EnergyPlus::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 @@ -5181,13 +5203,14 @@ namespace Weather { calculateDayOfWeek(state, runPeriodInput.startYear, runPeriodInput.startMonth, runPeriodInput.startDay); if (inputWeekday) { // Check for correctness of input if (weekday != runPeriodInput.startWeekDay) { - ShowWarningError(state, - 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, + 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)])); runPeriodInput.startWeekDay = weekday; } } else { // Set the weekday if it was not input @@ -5219,20 +5242,20 @@ namespace Weather { } else { // Have an input end year if (!isLeapYear(runPeriodInput.endYear)) { // End year is not a leap year ShowSevereError(state, - format("{}: object={}, end year ({}) is not a leap year but the requested end date is 2/29.", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startYear)); + EnergyPlus::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, - format("{}: object={}, start Julian date ({}) is after the end Julian date ({}).", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startJulianDate, - runPeriodInput.endJulianDate)); + EnergyPlus::format("{}: object={}, start Julian date ({}) is after the end Julian date ({}).", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startJulianDate, + runPeriodInput.endJulianDate)); ErrorsFound = true; } } @@ -5241,11 +5264,11 @@ namespace Weather { // Non leap-day end date if (!validMonthDay(runPeriodInput.endMonth, runPeriodInput.endDay)) { ShowSevereError(state, - format("{}: object={}, Invalid input end month/day ({}/{})", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startMonth, - runPeriodInput.startDay)); + EnergyPlus::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 @@ -5260,11 +5283,11 @@ namespace Weather { runPeriodInput.endJulianDate = computeJulianDate(runPeriodInput.endYear, runPeriodInput.endMonth, runPeriodInput.endDay); if (runPeriodInput.startJulianDate > runPeriodInput.endJulianDate) { ShowSevereError(state, - format("{}: object={}, start Julian date ({}) is after the end Julian date ({}).", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startJulianDate, - runPeriodInput.endJulianDate)); + EnergyPlus::format("{}: object={}, start Julian date ({}) is after the end Julian date ({}).", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startJulianDate, + runPeriodInput.endJulianDate)); ErrorsFound = true; } } @@ -5448,11 +5471,11 @@ namespace Weather { case 12: { if (runPerDesInput.startDay > 31) { ShowSevereError(state, - format("{}: object={} {} invalid (Day of Month) [{}]", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cNumericFieldNames(2), - runPerDesInput.startDay)); + EnergyPlus::format("{}: object={} {} invalid (Day of Month) [{}]", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cNumericFieldNames(2), + runPerDesInput.startDay)); ErrorsFound = true; } } break; @@ -5462,32 +5485,32 @@ namespace Weather { case 11: { if (runPerDesInput.startDay > 30) { ShowSevereError(state, - format("{}: object={} {} invalid (Day of Month) [{}]", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cNumericFieldNames(2), - runPerDesInput.startDay)); + EnergyPlus::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, - format("{}: object={} {} invalid (Day of Month) [{}]", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cNumericFieldNames(2), - runPerDesInput.startDay)); + EnergyPlus::format("{}: object={} {} invalid (Day of Month) [{}]", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cNumericFieldNames(2), + runPerDesInput.startDay)); ErrorsFound = true; } } break; default: { ShowSevereError(state, - format("{}: object={} {} invalid (Month) [{}]", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cNumericFieldNames(1), - runPerDesInput.startMonth)); + EnergyPlus::format("{}: object={} {} invalid (Month) [{}]", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cNumericFieldNames(1), + runPerDesInput.startMonth)); ErrorsFound = true; } break; } // switch @@ -5498,11 +5521,11 @@ namespace Weather { runPerDesInput.dayOfWeek = getEnumValue(Sched::dayTypeNamesUC, ipsc->cAlphaArgs(2)); if (runPerDesInput.dayOfWeek < 1 || runPerDesInput.dayOfWeek == 8) { ShowWarningError(state, - 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))); + 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))); runPerDesInput.dayOfWeek = (int)Sched::DayType::Monday; // Defaults to Monday } } @@ -5595,21 +5618,21 @@ namespace Weather { WhichPeriod = Util::FindItem(ipsc->cAlphaArgs(2), state.dataWeather->TypicalExtremePeriods, &TypicalExtremeData::MatchValue2); if (WhichPeriod != 0) { ShowWarningError(state, - format("{}: object={} {}={} matched to {}", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cAlphaFieldNames(2), - ipsc->cAlphaArgs(2), - state.dataWeather->TypicalExtremePeriods(WhichPeriod).MatchValue2)); + EnergyPlus::format("{}: object={} {}={} matched to {}", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaArgs(2), + state.dataWeather->TypicalExtremePeriods(WhichPeriod).MatchValue2)); } } if (WhichPeriod == 0) { ShowSevereError(state, - format("{}: object={} {} invalid (not on Weather File)={}", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cAlphaFieldNames(2), - ipsc->cAlphaArgs(2))); + EnergyPlus::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); @@ -5761,8 +5784,9 @@ namespace Weather { if (Duration(1) > 0) { specialDay.Duration = int(Duration(1)); } else { - ShowSevereError( - state, format("{}: {} Invalid {}={:.0T}", ipsc->cCurrentModuleObject, AlphArray(1), ipsc->cNumericFieldNames(1), Duration(1))); + ShowSevereError(state, + EnergyPlus::format( + "{}: {} Invalid {}={:.0T}", ipsc->cCurrentModuleObject, AlphArray(1), ipsc->cNumericFieldNames(1), Duration(1))); ErrorsFound = true; } @@ -5805,10 +5829,11 @@ namespace Weather { for (int j = 1; j <= specialDay.Duration; ++j) { ++JDay; if (JDay > 366) { - ShowWarningError(state, format("SpecialDay={} causes index of more than 366, ignoring those beyond 366", specialDay.Name)); + ShowWarningError(state, + EnergyPlus::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, format("SpecialDay={} attempted overwrite of previous set special day", specialDay.Name)); + ShowWarningError(state, EnergyPlus::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; @@ -5875,7 +5900,7 @@ namespace Weather { ErrorObjectHeader eoh{routineName, ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1)}; if (NumAlphas != 2) { - ShowSevereError(state, format("{}: Insufficient fields, must have Start AND End Dates", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Insufficient fields, must have Start AND End Dates", ipsc->cCurrentModuleObject)); ErrorsFound = true; } else { // Correct number of arguments General::ProcessDateString(state, @@ -5903,7 +5928,7 @@ namespace Weather { state.dataWeather->IDFDaylightSaving = true; } } else if (NumFound > 1) { - ShowSevereError(state, format("{}: Too many objects in Input File, only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects in Input File, only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -6127,8 +6152,8 @@ namespace Weather { desDayInput.dryBulbRangeType != DesDayDryBulbRangeType::Profile) { Real64 testval = desDayInput.MaxDryBulb - desDayInput.DailyDBRange; if (testval < -90.0 || testval > 70.0) { - ShowSevereError(state, format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError(state, format("{} ({:.2R}) is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(3), testval)); + ShowSevereError(state, EnergyPlus::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; } } @@ -6200,19 +6225,20 @@ namespace Weather { if (desDayInput.dryBulbRangeType == DesDayDryBulbRangeType::Profile) { if (MaxDryBulbEntered) { - ShowWarningError(state, format("{}=\"{}\", data override.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError(state, format("..{}=[{:.2R}] will be overwritten.", ipsc->cNumericFieldNames(3), desDayInput.MaxDryBulb)); - ShowContinueError(state, format("..{}=\"{}\".", ipsc->cAlphaFieldNames(3), ipsc->cAlphaArgs(3))); - ShowContinueError(state, format("..with max value=[{:.2R}].", testval)); + ShowWarningError(state, EnergyPlus::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, EnergyPlus::format("..with max value=[{:.2R}].", testval)); } desDayInput.MaxDryBulb = testval; } testval = desDayInput.MaxDryBulb - testval; if (testval < -90.0 || testval > 70.0) { - ShowSevereError(state, format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); // should this be cNumericFieldNames? - ShowContinueError(state, format("{} = ({:.2R}) is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(4), testval)); + ShowContinueError(state, EnergyPlus::format("{} = ({:.2R}) is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(4), testval)); ErrorsFound = true; } } @@ -6231,10 +6257,11 @@ namespace Weather { } if (desDayInput.HumIndValue < -90.0 || desDayInput.HumIndValue > 70.0) { - ShowSevereError(state, format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError( - state, - format("{} = {:.2R} is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(5) + " - WetBulb", desDayInput.HumIndValue)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, + EnergyPlus::format("{} = {:.2R} is out of range [-90.0, 70.0]", + ipsc->cAlphaFieldNames(5) + " - WetBulb", + desDayInput.HumIndValue)); ErrorsFound = true; } } break; @@ -6248,10 +6275,11 @@ namespace Weather { } if (desDayInput.HumIndValue < -90.0 || desDayInput.HumIndValue > 70.0) { - ShowSevereError(state, format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError( - state, - format("{} = {:.2R} is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(5) + " - DewPoint", desDayInput.HumIndValue)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, + EnergyPlus::format("{} = {:.2R} is out of range [-90.0, 70.0]", + ipsc->cAlphaFieldNames(5) + " - DewPoint", + desDayInput.HumIndValue)); ErrorsFound = true; } } break; @@ -6266,10 +6294,11 @@ namespace Weather { } if (desDayInput.HumIndValue < 0.0 || desDayInput.HumIndValue > 0.03) { - ShowSevereError(state, format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError( - state, - format("{} = {:.2R} is out of range [0.0, 0.03]", ipsc->cAlphaFieldNames(5) + " - Humidity-Ratio", desDayInput.HumIndValue)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, + EnergyPlus::format("{} = {:.2R} is out of range [0.0, 0.03]", + ipsc->cAlphaFieldNames(5) + " - Humidity-Ratio", + desDayInput.HumIndValue)); ErrorsFound = true; } } break; @@ -6285,10 +6314,11 @@ namespace Weather { desDayInput.HumIndType = DesDayHumIndType::Enthalpy; if (desDayInput.HumIndValue < 0.0 || desDayInput.HumIndValue > 130000.0) { - ShowSevereError(state, format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError( - state, - format("{} = {.0R} is out of range [0.0, 130000.0]", ipsc->cAlphaFieldNames(5) + " - Enthalpy", desDayInput.HumIndValue)); + ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, + EnergyPlus::format("{} = {.0R} is out of range [0.0, 130000.0]", + ipsc->cAlphaFieldNames(5) + " - Enthalpy", + desDayInput.HumIndValue)); ErrorsFound = true; } } break; @@ -6330,8 +6360,8 @@ namespace Weather { } break; default: { - ShowWarningError(state, format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError(state, format("..invalid field: {}=\"{}\".", ipsc->cAlphaFieldNames(5), ipsc->cAlphaArgs(5))); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, EnergyPlus::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); @@ -6419,12 +6449,12 @@ namespace Weather { desDayInput.HumIndType == DesDayHumIndType::WBProfMul || desDayInput.HumIndType == DesDayHumIndType::WBProfDef || desDayInput.HumIndType == DesDayHumIndType::WBProfDif) { if (desDayInput.HumIndValue > desDayInput.MaxDryBulb) { - ShowWarningError(state, format("{}=\"{}\", range check data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowWarningError(state, EnergyPlus::format("{}=\"{}\", range check data.", ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, - format("..Humidity Indicator Temperature at Max Temperature={:.1R} > Max DryBulb={:.1R}", - desDayInput.HumIndValue, - desDayInput.MaxDryBulb)); - ShowContinueError(state, format("..{}=\"{}\".", ipsc->cAlphaFieldNames(5), ipsc->cAlphaArgs(5))); + 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, "..Conditions for day will be set to Relative Humidity = 100%"); if (desDayInput.HumIndType == DesDayHumIndType::DewPoint) { desDayInput.DewPointNeedsSet = true; @@ -6539,10 +6569,11 @@ namespace Weather { case 10: case 12: { if (desDayInput.DayOfMonth > 31) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError( state, - format(".. invalid field: {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); + EnergyPlus::format( + ".. invalid field: {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); ErrorsFound = true; } } break; @@ -6551,23 +6582,25 @@ namespace Weather { case 9: case 11: { if (desDayInput.DayOfMonth > 30) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError( - state, format(".. invalid {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, + EnergyPlus::format( + ".. invalid {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); ErrorsFound = true; } } break; case 2: { if (desDayInput.DayOfMonth > 28) { - ShowSevereError(state, format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError( - state, format(".. invalid {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, + EnergyPlus::format( + ".. invalid {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); ErrorsFound = true; } } break; default: { - ShowSevereError(state, format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError(state, format(".. invalid {} invalid (Month) [{}].", ipsc->cNumericFieldNames(1), desDayInput.Month)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, EnergyPlus::format(".. invalid {} invalid (Month) [{}].", ipsc->cNumericFieldNames(1), desDayInput.Month)); ErrorsFound = true; } break; } // switch (desDayInput.Month) @@ -6637,7 +6670,7 @@ namespace Weather { int const NumLocations = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); if (NumLocations > 1) { - ShowSevereError(state, format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -6733,21 +6766,21 @@ namespace Weather { } if (environJ.WP_Type1 != 0) { ShowSevereError(state, - format("{}: {}=\"{}\", indicated Environment Name already assigned.", - routineName, - ipsc->cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + EnergyPlus::format("{}: {}=\"{}\", indicated Environment Name already assigned.", + routineName, + ipsc->cCurrentModuleObject, + ipsc->cAlphaArgs(1))); if (!environJ.Title.empty()) { ShowContinueError(state, - format("...Environment=\"{}\", already using {}=\"{}\".", - environJ.Title, - ipsc->cCurrentModuleObject, - state.dataWeather->WPSkyTemperature(environJ.WP_Type1).Name)); + EnergyPlus::format("...Environment=\"{}\", already using {}=\"{}\".", + environJ.Title, + ipsc->cCurrentModuleObject, + state.dataWeather->WPSkyTemperature(environJ.WP_Type1).Name)); } else { ShowContinueError(state, - format("... Runperiod Environment, already using {}=\"{}\".", - ipsc->cCurrentModuleObject, - state.dataWeather->WPSkyTemperature(environJ.WP_Type1).Name)); + EnergyPlus::format("... Runperiod Environment, already using {}=\"{}\".", + ipsc->cCurrentModuleObject, + state.dataWeather->WPSkyTemperature(environJ.WP_Type1).Name)); } ErrorsFound = true; } else { @@ -6772,15 +6805,15 @@ namespace Weather { auto &envrnFound = state.dataWeather->Environment(Found); if (envrnFound.WP_Type1 != 0) { ShowSevereError(state, - format("{}:{}=\"{}\", indicated Environment Name already assigned.", - routineName, - ipsc->cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + EnergyPlus::format("{}:{}=\"{}\", indicated Environment Name already assigned.", + routineName, + ipsc->cCurrentModuleObject, + ipsc->cAlphaArgs(1))); ShowContinueError(state, - format("...Environment=\"{}\", already using {}=\"{}\".", - envrnFound.Title, - ipsc->cCurrentModuleObject, - state.dataWeather->WPSkyTemperature(envrnFound.WP_Type1).Name)); + EnergyPlus::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; @@ -6924,7 +6957,7 @@ namespace Weather { state, ipsc->cCurrentModuleObject, 1, GndAlphas, GndNumAlpha, GndProps, GndNumProp, IOStat); if (GndNumProp < 12) { - ShowSevereError(state, format("{}: Less than 12 values entered.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Less than 12 values entered.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -6932,7 +6965,7 @@ namespace Weather { state.dataWeather->GroundReflectances({1, 12}) = GndProps({1, 12}); } else { - ShowSevereError(state, format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -6982,7 +7015,7 @@ namespace Weather { state.dataWeather->SnowGndRefModifierForDayltg = GndProps(2); } else { - ShowSevereError(state, format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -7071,10 +7104,11 @@ namespace Weather { case WaterMainsTempCalcMethod::Correlation: { if (NumNums == 0) { - ShowSevereError(state, format("{}: Missing Annual Average and Maximum Difference fields.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("{}: Missing Annual Average and Maximum Difference fields.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } else if (NumNums == 1) { - ShowSevereError(state, format("{}: Missing Maximum Difference field.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Missing Maximum Difference field.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } else { state.dataWeather->WaterMainsTempsAnnualAvgAirTemp = NumArray(1); @@ -7094,7 +7128,7 @@ namespace Weather { state.dataWeather->WaterMainsTempsOffset = NumArray(4); } else if (NumObjects > 1) { - ShowSevereError(state, format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -7239,7 +7273,7 @@ namespace Weather { } } else if (NumObjects > 1) { - ShowSevereError(state, format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -7470,7 +7504,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, format("Line={}", Line)); + ShowContinueError(state, EnergyPlus::format("Line={}", Line)); ShowFatalError(state, "Previous conditions cause termination."); } if (Pos != std::string::npos) { @@ -7539,7 +7573,7 @@ namespace Weather { } } break; default: - ShowSevereError(state, format("GetEPWHeader:LOCATION, invalid numeric={}", Line.substr(0, Pos))); + ShowSevereError(state, EnergyPlus::format("GetEPWHeader:LOCATION, invalid numeric={}", Line.substr(0, Pos))); ErrorsFound = true; break; } @@ -7573,8 +7607,9 @@ namespace Weather { state.dataWeather->TypicalExtremePeriods(i).Title = Line.substr(0, Pos); Line.erase(0, Pos + 1); } else { - ShowWarningError(state, format("ProcessEPWHeader: Invalid Typical/Extreme Periods Header(WeatherFile)={}", Line.substr(0, Pos))); - ShowContinueError(state, format("...on processing Typical/Extreme period #{}", i)); + 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)); state.dataWeather->NumEPWTypExtSets = i - 1; break; } @@ -7650,10 +7685,10 @@ namespace Weather { } } else { ShowWarningError(state, - format("ProcessEPWHeader: Invalid Typical/Extreme Periods Header(WeatherFile)={} {}", - state.dataWeather->TypicalExtremePeriods(i).Title, - Line.substr(0, Pos))); - ShowContinueError(state, format("...on processing Typical/Extreme period #{}", i)); + 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)); state.dataWeather->NumEPWTypExtSets = i - 1; break; } @@ -7671,9 +7706,10 @@ namespace Weather { state.dataWeather->TypicalExtremePeriods(i).StartDay = PDay; } } else { - ShowSevereError( - state, format("ProcessEPWHeader: Invalid Typical/Extreme Periods Start Date Field(WeatherFile)={}", Line.substr(0, Pos))); - ShowContinueError(state, format("...on processing Typical/Extreme period #{}", i)); + 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)); ErrorsFound = true; } Line.erase(0, Pos + 1); @@ -7689,9 +7725,10 @@ namespace Weather { state.dataWeather->TypicalExtremePeriods(i).EndDay = PDay; } } else { - ShowSevereError( - state, format("ProcessEPWHeader: Invalid Typical/Extreme Periods End Date Field(WeatherFile)={}", Line.substr(0, Pos))); - ShowContinueError(state, format("...on processing Typical/Extreme period #{}", i)); + 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)); ErrorsFound = true; } Line.erase(0, Pos + 1); @@ -7704,8 +7741,9 @@ namespace Weather { state.dataWeather->TypicalExtremePeriods(i).EndDay = PDay; } } else { - ShowSevereError( - state, format("ProcessEPWHeader: Invalid Typical/Extreme Periods End Date Field(WeatherFile)={}", Line.substr(0, Pos))); + ShowSevereError(state, + EnergyPlus::format("ProcessEPWHeader: Invalid Typical/Extreme Periods End Date Field(WeatherFile)={}", + Line.substr(0, Pos))); ErrorsFound = true; } } @@ -7884,9 +7922,10 @@ namespace Weather { } } else { // ErrorsFound is untouched - ShowContinueError( - state, format("ProcessEPWHeader: Invalid Daylight Saving Period Start Date Field(WeatherFile)={}", Line.substr(0, Pos))); - ShowContinueError(state, format("...invalid header={}", epwHeaders[static_cast(headerType)])); + 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, "...Setting Weather File DST to false."); state.dataWeather->EPWDaylightSaving = false; } @@ -7900,9 +7939,9 @@ namespace Weather { state.dataWeather->EPWDST.EnDay = PDay; state.dataWeather->EPWDST.EnWeekDay = PWeekDay; } else { - ShowWarningError( - state, - format("ProcessEPWHeader: Invalid Daylight Saving Period End Date Field(WeatherFile)={}", Line.substr(0, Pos))); + ShowWarningError(state, + EnergyPlus::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; } @@ -7950,7 +7989,7 @@ namespace Weather { specialDay.DayType = 1; specialDay.WthrFile = true; } else { - ShowSevereError(state, format("Invalid SpecialDay Date Field(WeatherFile)={}", Line.substr(0, Pos))); + ShowSevereError(state, EnergyPlus::format("Invalid SpecialDay Date Field(WeatherFile)={}", Line.substr(0, Pos))); ErrorsFound = true; } } @@ -8067,8 +8106,9 @@ namespace Weather { dataPeriod.HasYearData = true; } } else { - ShowSevereError(state, - format("Data Periods must be of the form or (WeatherFile), found={}", + ShowSevereError( + state, + EnergyPlus::format("Data Periods must be of the form or (WeatherFile), found={}", Line.substr(0, Pos))); ErrorsFound = true; } @@ -8088,8 +8128,9 @@ namespace Weather { dataPeriod.EnYear = dataPeriod.StYear; } } else { - ShowSevereError(state, - format("Data Periods must be of the form or , (WeatherFile) found={}", + ShowSevereError( + state, + EnergyPlus::format("Data Periods must be of the form or , (WeatherFile) found={}", Line.substr(0, Pos))); ErrorsFound = true; } @@ -8147,9 +8188,10 @@ namespace Weather { while (true) { Line = state.files.inputWeatherFile.readLine(); if (Line.eof) { - ShowFatalError(state, - format("Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", Header), - OptionalOutputFileRef{state.files.eso}); + ShowFatalError( + state, + EnergyPlus::format("Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", Header), + OptionalOutputFileRef{state.files.eso}); } uppercase(Line.data); if (has(Line.data, Header)) { @@ -8234,7 +8276,7 @@ namespace Weather { ShowWarningError(state, std::string{MissString}); MissedHeader = true; } - ShowMessage(state, format(msFmt, "\"" + description + "\"", value)); + ShowMessage(state, EnergyPlus::format(msFmt, "\"" + description + "\"", value)); } }; @@ -8251,7 +8293,7 @@ namespace Weather { missedHeaderCheck(state.dataWeather->wvarsMissedCounts.SnowDepth, "Snow Depth"); if (state.dataWeather->wvarsMissedCounts.WeathCodes > 0) { ShowWarningError(state, std::string{InvString}); - ShowMessage(state, format(ivFmt, "\"Weather Codes\" (not equal 9 digits)", state.dataWeather->wvarsMissedCounts.WeathCodes)); + ShowMessage(state, EnergyPlus::format(ivFmt, "\"Weather Codes\" (not equal 9 digits)", state.dataWeather->wvarsMissedCounts.WeathCodes)); } missedHeaderCheck(state.dataWeather->wvarsMissedCounts.LiquidPrecip, "Liquid Precipitation Depth"); @@ -8652,7 +8694,8 @@ namespace Weather { if (statFileExists) { auto statFile = state.files.inStatFilePath.try_open(); if (!statFile.good()) { - ShowSevereError(state, format("CalcAnnualAndMonthlyDryBulbTemp: Could not open file {} for input (read).", statFile.filePath)); + ShowSevereError( + state, EnergyPlus::format("CalcAnnualAndMonthlyDryBulbTemp: Could not open file {} for input (read).", statFile.filePath)); ShowContinueError(state, "Water Mains Temperature will be set to a fixed default value of 10.0 C."); return; } @@ -8670,16 +8713,17 @@ namespace Weather { } } if (lineAvg.empty()) { - ShowSevereError( - state, - format("CalcAnnualAndMonthlyDryBulbTemp: Stat file '{}' does not have Monthly Statistics for Dry Bulb temperatures.", - statFile.filePath)); + ShowSevereError(state, + EnergyPlus::format( + "CalcAnnualAndMonthlyDryBulbTemp: Stat file '{}' does not have Monthly Statistics for Dry Bulb temperatures.", + statFile.filePath)); 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, - format("CalcAnnualAndMonthlyDryBulbTemp: Stat file '{}' does not have the 'Daily Avg' line in the Monthly " + ShowSevereError( + state, + EnergyPlus::format("CalcAnnualAndMonthlyDryBulbTemp: Stat file '{}' does not have the 'Daily Avg' line in the Monthly " "Statistics for Dry Bulb temperatures.", statFile.filePath)); ShowContinueError(state, "Water Mains Temperature will be set to a fixed default value of 10.0 C."); @@ -8702,7 +8746,8 @@ namespace Weather { auto epwFile = state.files.inputWeatherFilePath.try_open(); bool epwHasLeapYear(false); if (!epwFile.good()) { - ShowSevereError(state, format("CalcAnnualAndMonthlyDryBulbTemp: Could not open file {} for input (read).", epwFile.filePath)); + ShowSevereError( + state, EnergyPlus::format("CalcAnnualAndMonthlyDryBulbTemp: Could not open file {} for input (read).", epwFile.filePath)); ShowContinueError(state, "Water Mains Temperature will be set to a fixed default value of 10.0 C."); return; } @@ -8761,8 +8806,8 @@ namespace Weather { this->OADryBulbWeatherDataProcessed = true; } else { ShowSevereError(state, "CalcAnnualAndMonthlyDryBulbTemp: weather file or stat file does not exist."); - ShowContinueError(state, format("Weather file: {}.", state.files.inputWeatherFilePath.filePath)); - ShowContinueError(state, format("Stat file: {}.", state.files.inStatFilePath.filePath)); + ShowContinueError(state, EnergyPlus::format("Weather file: {}.", state.files.inputWeatherFilePath.filePath)); + ShowContinueError(state, EnergyPlus::format("Stat file: {}.", state.files.inStatFilePath.filePath)); 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."); } @@ -8795,31 +8840,31 @@ namespace Weather { *eiostream << "Site Water Mains Temperature Information,"; *eiostream << waterMainsCalcMethodNames[static_cast(state.dataWeather->WaterMainsTempsMethod)] << "," << state.dataWeather->waterMainsTempSched->Name << ","; - *eiostream << format("{:.2R}", state.dataWeather->WaterMainsTempsAnnualAvgAirTemp) << "," - << format("{:.2R}", state.dataWeather->WaterMainsTempsMaxDiffAirTemp) << ","; + *eiostream << EnergyPlus::format("{:.2R}", state.dataWeather->WaterMainsTempsAnnualAvgAirTemp) << "," + << EnergyPlus::format("{:.2R}", state.dataWeather->WaterMainsTempsMaxDiffAirTemp) << ","; *eiostream << "NA\n"; break; case WaterMainsTempCalcMethod::Correlation: *eiostream << "Site Water Mains Temperature Information,"; *eiostream << waterMainsCalcMethodNames[static_cast(state.dataWeather->WaterMainsTempsMethod)] << "," << "NA" << ","; - *eiostream << format("{:.2R}", state.dataWeather->WaterMainsTempsAnnualAvgAirTemp) << "," - << format("{:.2R}", state.dataWeather->WaterMainsTempsMaxDiffAirTemp) << ","; + *eiostream << EnergyPlus::format("{:.2R}", state.dataWeather->WaterMainsTempsAnnualAvgAirTemp) << "," + << EnergyPlus::format("{:.2R}", state.dataWeather->WaterMainsTempsMaxDiffAirTemp) << ","; *eiostream << "NA\n"; break; case WaterMainsTempCalcMethod::CorrelationFromWeatherFile: if (state.dataWeather->OADryBulbAverage.OADryBulbWeatherDataProcessed) { *eiostream << "Site Water Mains Temperature Information,"; *eiostream << waterMainsCalcMethodNames[static_cast(state.dataWeather->WaterMainsTempsMethod)] << "," << "NA" << ","; - *eiostream << format("{:.2R}", state.dataWeather->OADryBulbAverage.AnnualAvgOADryBulbTemp) << "," - << format("{:.2R}", state.dataWeather->OADryBulbAverage.MonthlyAvgOADryBulbTempMaxDiff) << "," << "NA\n"; + *eiostream << EnergyPlus::format("{:.2R}", state.dataWeather->OADryBulbAverage.AnnualAvgOADryBulbTemp) << "," + << EnergyPlus::format("{:.2R}", state.dataWeather->OADryBulbAverage.MonthlyAvgOADryBulbTempMaxDiff) << "," << "NA\n"; } else { *eiostream << "Site Water Mains Temperature Information,"; - *eiostream << "FixedDefault" << "," << "NA" << "," << "NA" << "," << "NA" << "," << format("{:.1R}", 10.0) << '\n'; + *eiostream << "FixedDefault" << "," << "NA" << "," << "NA" << "," << "NA" << "," << EnergyPlus::format("{:.1R}", 10.0) << '\n'; } break; default: *eiostream << "Site Water Mains Temperature Information,"; - *eiostream << "FixedDefault" << "," << "NA" << "," << "NA" << "," << "NA" << "," << format("{:.1R}", 10.0) << '\n'; + *eiostream << "FixedDefault" << "," << "NA" << "," << "NA" << "," << "NA" << "," << EnergyPlus::format("{:.1R}", 10.0) << '\n'; break; } diff --git a/src/EnergyPlus/WindTurbine.cc b/src/EnergyPlus/WindTurbine.cc index 48c5e514e51..3d064365664 100644 --- a/src/EnergyPlus/WindTurbine.cc +++ b/src/EnergyPlus/WindTurbine.cc @@ -133,25 +133,28 @@ namespace WindTurbine { if (GeneratorIndex == 0) { WindTurbineNum = Util::FindItemInList(GeneratorName, state.dataWindTurbine->WindTurbineSys); if (WindTurbineNum == 0) { - ShowFatalError(state, format("SimWindTurbine: Specified Generator not one of Valid Wind Turbine Generators {}", GeneratorName)); + ShowFatalError(state, + EnergyPlus::format("SimWindTurbine: Specified Generator not one of Valid Wind Turbine Generators {}", GeneratorName)); } GeneratorIndex = WindTurbineNum; } else { WindTurbineNum = GeneratorIndex; int NumWindTurbines = (int)state.dataWindTurbine->WindTurbineSys.size(); if (WindTurbineNum > NumWindTurbines || WindTurbineNum < 1) { - ShowFatalError(state, - format("SimWindTurbine: Invalid GeneratorIndex passed={}, Number of Wind Turbine Generators={}, Generator name={}", - WindTurbineNum, - NumWindTurbines, - GeneratorName)); + ShowFatalError( + state, + EnergyPlus::format("SimWindTurbine: Invalid GeneratorIndex passed={}, Number of Wind Turbine Generators={}, Generator name={}", + WindTurbineNum, + NumWindTurbines, + GeneratorName)); } if (GeneratorName != state.dataWindTurbine->WindTurbineSys(WindTurbineNum).Name) { ShowFatalError(state, - format("SimMWindTurbine: Invalid GeneratorIndex passed={}, Generator name={}, stored Generator Name for that index={}", - WindTurbineNum, - GeneratorName, - state.dataWindTurbine->WindTurbineSys(WindTurbineNum).Name)); + EnergyPlus::format( + "SimMWindTurbine: Invalid GeneratorIndex passed={}, Generator name={}, stored Generator Name for that index={}", + WindTurbineNum, + GeneratorName, + state.dataWindTurbine->WindTurbineSys(WindTurbineNum).Name)); } } @@ -272,11 +275,11 @@ namespace WindTurbine { windTurbine.rotorType = RotorType::HorizontalAxis; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\".", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cAlphaFields(3), - state.dataIPShortCut->cAlphaArgs(3))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cAlphaFields(3), + state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; } } @@ -289,11 +292,11 @@ namespace WindTurbine { windTurbine.controlType = ControlType::VariableSpeedVariablePitch; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\".", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cAlphaFields(4), - state.dataIPShortCut->cAlphaArgs(4))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cAlphaFields(4), + state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } } @@ -302,17 +305,17 @@ namespace WindTurbine { if (windTurbine.RatedRotorSpeed <= 0.0) { if (lNumericBlanks(1)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(1))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(1))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(1), - rNumericArgs(1))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(1), + rNumericArgs(1))); } ErrorsFound = true; } @@ -321,17 +324,17 @@ namespace WindTurbine { if (windTurbine.RotorDiameter <= 0.0) { if (lNumericBlanks(2)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(2))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(2))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.1R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(2), - rNumericArgs(2))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.1R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(2), + rNumericArgs(2))); } ErrorsFound = true; } @@ -340,17 +343,17 @@ namespace WindTurbine { if (windTurbine.RotorHeight <= 0.0) { if (lNumericBlanks(3)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(3))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(3))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.1R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(3), - rNumericArgs(3))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.1R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(3), + rNumericArgs(3))); } ErrorsFound = true; } @@ -358,11 +361,11 @@ namespace WindTurbine { windTurbine.NumOfBlade = state.dataIPShortCut->rNumericArgs(4); // Total number of blade if (windTurbine.NumOfBlade == 0) { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.0R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(4), - rNumericArgs(4))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.0R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(4), + rNumericArgs(4))); ErrorsFound = true; } @@ -370,17 +373,17 @@ namespace WindTurbine { if (windTurbine.RatedPower == 0.0) { if (lNumericBlanks(5)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(5))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(5))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(5), - rNumericArgs(5))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(5), + rNumericArgs(5))); } ErrorsFound = true; } @@ -389,17 +392,17 @@ namespace WindTurbine { if (windTurbine.RatedWindSpeed == 0.0) { if (lNumericBlanks(6)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(6))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(6))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(6), - rNumericArgs(6))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(6), + rNumericArgs(6))); } ErrorsFound = true; } @@ -408,17 +411,17 @@ namespace WindTurbine { if (windTurbine.CutInSpeed == 0.0) { if (lNumericBlanks(7)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(7))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(7))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(7), - rNumericArgs(7))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(7), + rNumericArgs(7))); } ErrorsFound = true; } @@ -427,26 +430,26 @@ namespace WindTurbine { if (windTurbine.CutOutSpeed == 0.0) { if (lNumericBlanks(8)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(8))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(8))); } else if (windTurbine.CutOutSpeed <= windTurbine.RatedWindSpeed) { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than {}=[{:.2R}].", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(8), - rNumericArgs(8), - cNumericFields(6), - rNumericArgs(6))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than {}=[{:.2R}].", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(8), + rNumericArgs(8), + cNumericFields(6), + rNumericArgs(6))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(8), - rNumericArgs(8))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(8), + rNumericArgs(8))); } ErrorsFound = true; } @@ -455,87 +458,87 @@ namespace WindTurbine { if (lNumericBlanks(9) || windTurbine.SysEfficiency == 0.0 || windTurbine.SysEfficiency > 1.0) { windTurbine.SysEfficiency = SysEffDefault; ShowWarningError(state, - format("{}=\"{}\" invalid {}=[{:.2R}].", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(9), - state.dataIPShortCut->rNumericArgs(9))); - ShowContinueError(state, format("...The default value of {:.3R} was assumed. for {}", SysEffDefault, cNumericFields(9))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}].", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(9), + state.dataIPShortCut->rNumericArgs(9))); + ShowContinueError(state, EnergyPlus::format("...The default value of {:.3R} was assumed. for {}", SysEffDefault, cNumericFields(9))); } windTurbine.MaxTipSpeedRatio = state.dataIPShortCut->rNumericArgs(10); // Maximum tip speed ratio if (windTurbine.MaxTipSpeedRatio == 0.0) { if (lNumericBlanks(10)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(10))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(10))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(10), - rNumericArgs(10))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(10), + rNumericArgs(10))); } ErrorsFound = true; } if (windTurbine.SysEfficiency > MaxTSR) { windTurbine.SysEfficiency = MaxTSR; ShowWarningError(state, - format("{}=\"{}\" invalid {}=[{:.2R}].", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(10), - state.dataIPShortCut->rNumericArgs(10))); - ShowContinueError(state, format("...The default value of {:.1R} was assumed. for {}", MaxTSR, cNumericFields(10))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}].", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(10), + state.dataIPShortCut->rNumericArgs(10))); + ShowContinueError(state, EnergyPlus::format("...The default value of {:.1R} was assumed. for {}", MaxTSR, cNumericFields(10))); } windTurbine.MaxPowerCoeff = state.dataIPShortCut->rNumericArgs(11); // Maximum power coefficient if (windTurbine.rotorType == RotorType::HorizontalAxis && windTurbine.MaxPowerCoeff == 0.0) { if (lNumericBlanks(11)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(11))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(11))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(11), - rNumericArgs(11))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(11), + rNumericArgs(11))); } ErrorsFound = true; } if (windTurbine.MaxPowerCoeff > MaxPowerCoeff) { windTurbine.MaxPowerCoeff = DefaultPC; ShowWarningError(state, - format("{}=\"{}\" invalid {}=[{:.2R}].", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(11), - state.dataIPShortCut->rNumericArgs(11))); - ShowContinueError(state, format("...The default value of {:.2R} will be used. for {}", DefaultPC, cNumericFields(11))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}].", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(11), + state.dataIPShortCut->rNumericArgs(11))); + ShowContinueError(state, EnergyPlus::format("...The default value of {:.2R} will be used. for {}", DefaultPC, cNumericFields(11))); } windTurbine.LocalAnnualAvgWS = state.dataIPShortCut->rNumericArgs(12); // Local wind speed annually averaged if (windTurbine.LocalAnnualAvgWS == 0.0) { if (lNumericBlanks(12)) { ShowWarningError(state, - format("{}=\"{}\" invalid {} is necessary for accurate prediction but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(12))); + EnergyPlus::format("{}=\"{}\" invalid {} is necessary for accurate prediction but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(12))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(12), - rNumericArgs(12))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(12), + rNumericArgs(12))); ErrorsFound = true; } } @@ -548,18 +551,19 @@ namespace WindTurbine { windTurbine.HeightForLocalWS = DefaultH; if (lNumericBlanks(13)) { ShowWarningError(state, - format("{}=\"{}\" invalid {} is necessary for accurate prediction but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(13))); - ShowContinueError(state, format("...The default value of {:.2R} will be used. for {}", DefaultH, cNumericFields(13))); + EnergyPlus::format("{}=\"{}\" invalid {} is necessary for accurate prediction but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(13))); + ShowContinueError(state, + EnergyPlus::format("...The default value of {:.2R} will be used. for {}", DefaultH, cNumericFields(13))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(13), - rNumericArgs(13))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(13), + rNumericArgs(13))); ErrorsFound = true; } } @@ -569,17 +573,17 @@ namespace WindTurbine { if (windTurbine.rotorType == RotorType::VerticalAxis && windTurbine.ChordArea == 0.0) { if (lNumericBlanks(14)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(14))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(14))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(14), - rNumericArgs(14))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(14), + rNumericArgs(14))); } ErrorsFound = true; } @@ -588,17 +592,17 @@ namespace WindTurbine { if (windTurbine.rotorType == RotorType::VerticalAxis && windTurbine.DragCoeff == 0.0) { if (lNumericBlanks(15)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(15))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(15))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(15), - rNumericArgs(15))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(15), + rNumericArgs(15))); } ErrorsFound = true; } @@ -607,17 +611,17 @@ namespace WindTurbine { if (windTurbine.rotorType == RotorType::VerticalAxis && windTurbine.LiftCoeff == 0.0) { if (lNumericBlanks(16)) { ShowSevereError(state, - format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(16))); + EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(16))); } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(16), - rNumericArgs(16))); + EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(16), + rNumericArgs(16))); } ErrorsFound = true; } @@ -656,7 +660,7 @@ namespace WindTurbine { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); } for (WindTurbineNum = 1; WindTurbineNum <= NumWindTurbines; ++WindTurbineNum) { @@ -807,20 +811,22 @@ namespace WindTurbine { } } else { // blank field if (!warningShown) { - ShowWarningError(state, - format("InitWindTurbine: read from {} file shows <365 days in weather file. Annual average " - "wind speed used will be inaccurate.", - state.files.inStatFilePath.filePath)); + 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)); lineIn.data.erase(0, lnPtr + 1); warningShown = true; } } } else { // two tabs in succession if (!warningShown) { - ShowWarningError(state, - format("InitWindTurbine: read from {} file shows <365 days in weather file. Annual average wind " - "speed used will be inaccurate.", - state.files.inStatFilePath.filePath)); + 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)); lineIn.data.erase(0, lnPtr + 1); warningShown = true; } diff --git a/src/EnergyPlus/WindowAC.cc b/src/EnergyPlus/WindowAC.cc index 2401bccab3b..b4e84289670 100644 --- a/src/EnergyPlus/WindowAC.cc +++ b/src/EnergyPlus/WindowAC.cc @@ -150,25 +150,25 @@ namespace WindowAC { if (CompIndex == 0) { WindACNum = Util::FindItemInList(CompName, state.dataWindowAC->WindAC); if (WindACNum == 0) { - ShowFatalError(state, format("SimWindowAC: Unit not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimWindowAC: Unit not found={}", CompName)); } CompIndex = WindACNum; } else { WindACNum = CompIndex; if (WindACNum > state.dataWindowAC->NumWindAC || WindACNum < 1) { ShowFatalError(state, - format("SimWindowAC: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - WindACNum, - state.dataWindowAC->NumWindAC, - CompName)); + EnergyPlus::format("SimWindowAC: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + WindACNum, + state.dataWindowAC->NumWindAC, + CompName)); } if (state.dataWindowAC->CheckEquipName(WindACNum)) { if (CompName != state.dataWindowAC->WindAC(WindACNum).Name) { ShowFatalError(state, - format("SimWindowAC: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - WindACNum, - CompName, - state.dataWindowAC->WindAC(WindACNum).Name)); + EnergyPlus::format("SimWindowAC: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + WindACNum, + CompName, + state.dataWindowAC->WindAC(WindACNum).Name)); } state.dataWindowAC->CheckEquipName(WindACNum) = false; } @@ -339,14 +339,16 @@ namespace WindowAC { errFlag, CurrentModuleObject); if (errFlag) { - ShowContinueError(state, format("specified in {} = \"{}\".", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); + ShowContinueError(state, + EnergyPlus::format("specified in {} = \"{}\".", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); ErrorsFound = true; } else { // Get outdoor air mixer node numbers OANodeNums = GetOAMixerNodeNumbers(state, state.dataWindowAC->WindAC(WindACNum).OAMixName, errFlag); if (errFlag) { - ShowContinueError(state, - format("that was specified in {} = \"{}\"", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); + ShowContinueError( + state, + EnergyPlus::format("that was specified in {} = \"{}\"", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); ShowContinueError(state, "..OutdoorAir:Mixer is required. Enter an OutdoorAir:Mixer object with this name."); ErrorsFound = true; } else { @@ -377,15 +379,17 @@ namespace WindowAC { if (FanVolFlow != AutoSize) { if (FanVolFlow < windAC.MaxAirVolFlow) { ShowWarningError(state, - format("Air flow rate = {:.7T} in fan object {} is less than the maximum supply air flow " - "rate ({:.7T}) in the {} object.", - FanVolFlow, - windAC.FanName, - windAC.MaxAirVolFlow, - CurrentModuleObject)); + EnergyPlus::format("Air flow rate = {:.7T} in fan object {} is less than the maximum supply air flow " + "rate ({:.7T}) in the {} object.", + FanVolFlow, + windAC.FanName, + windAC.MaxAirVolFlow, + CurrentModuleObject)); ShowContinueError( - state, format(" The fan flow rate must be >= to the {} in the {} object.", cNumericFields(1), CurrentModuleObject)); - ShowContinueError(state, format(" Occurs in {} = {}", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); + state, + EnergyPlus::format(" The fan flow rate must be >= to the {} in the {} object.", cNumericFields(1), CurrentModuleObject)); + ShowContinueError(state, + EnergyPlus::format(" Occurs in {} = {}", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); ErrorsFound = true; } } @@ -415,13 +419,14 @@ namespace WindowAC { VariableSpeedCoils::GetVSCoilNumOfSpeeds(state, state.dataWindowAC->WindAC(WindACNum).DXCoilName, ErrorsFound); } if (CoilNodeErrFlag) { - ShowContinueError(state, - format(" that was specified in {} = \"{}\".", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); + ShowContinueError( + state, + EnergyPlus::format(" that was specified in {} = \"{}\".", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); ErrorsFound = true; } } else { - ShowWarningError(state, format("Invalid {} = {}", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); + ShowWarningError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); ErrorsFound = true; } @@ -445,8 +450,9 @@ namespace WindowAC { if (!lAlphaBlanks(14)) { state.dataWindowAC->WindAC(WindACNum).HVACSizingIndex = Util::FindItemInList(Alphas(14), state.dataSize->ZoneHVACSizing); if (state.dataWindowAC->WindAC(WindACNum).HVACSizingIndex == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(14), Alphas(14))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(14), Alphas(14))); + ShowContinueError(state, + EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, state.dataWindowAC->WindAC(WindACNum).Name)); ErrorsFound = true; } } @@ -470,13 +476,13 @@ namespace WindowAC { } if (ZoneNodeNotFound) { ShowSevereError(state, - format("{} = \"{}\". Window AC air inlet node name must be the same as a zone exhaust node name.", - CurrentModuleObject, - state.dataWindowAC->WindAC(WindACNum).Name)); + EnergyPlus::format("{} = \"{}\". Window AC air inlet node name must be the same as a zone exhaust node name.", + CurrentModuleObject, + state.dataWindowAC->WindAC(WindACNum).Name)); ShowContinueError(state, "..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError( - state, - format("..Window AC air inlet node name = {}", state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).AirInNode))); + ShowContinueError(state, + EnergyPlus::format("..Window AC air inlet node name = {}", + state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).AirInNode))); ErrorsFound = true; } // check that Window AC air outlet node is a zone inlet node. @@ -495,13 +501,13 @@ namespace WindowAC { } if (ZoneNodeNotFound) { ShowSevereError(state, - format("{} = \"{}\". Window AC air outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - state.dataWindowAC->WindAC(WindACNum).Name)); + EnergyPlus::format("{} = \"{}\". Window AC air outlet node name must be the same as a zone inlet node name.", + CurrentModuleObject, + state.dataWindowAC->WindAC(WindACNum).Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, - format("..Window AC air outlet node name = {}", - state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).AirOutNode))); + EnergyPlus::format("..Window AC air outlet node name = {}", + state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).AirOutNode))); ErrorsFound = true; } CompSetFanInlet = state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).MixedAirNode); @@ -524,13 +530,13 @@ namespace WindowAC { } if (ZoneNodeNotFound) { ShowSevereError(state, - format("{} = \"{}\". Window AC air inlet node name must be the same as a zone exhaust node name.", - CurrentModuleObject, - state.dataWindowAC->WindAC(WindACNum).Name)); + EnergyPlus::format("{} = \"{}\". Window AC air inlet node name must be the same as a zone exhaust node name.", + CurrentModuleObject, + state.dataWindowAC->WindAC(WindACNum).Name)); ShowContinueError(state, "..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError( - state, - format("..Window AC inlet node name = {}", state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).AirInNode))); + ShowContinueError(state, + EnergyPlus::format("..Window AC inlet node name = {}", + state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).AirInNode))); ErrorsFound = true; } // check that Window AC air outlet node is the same as a zone inlet node. @@ -549,13 +555,13 @@ namespace WindowAC { } if (ZoneNodeNotFound) { ShowSevereError(state, - format("{} = \"{}\". Window AC air outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - state.dataWindowAC->WindAC(WindACNum).Name)); + EnergyPlus::format("{} = \"{}\". Window AC air outlet node name must be the same as a zone inlet node name.", + CurrentModuleObject, + state.dataWindowAC->WindAC(WindACNum).Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError( - state, - format("..Window AC outlet node name = {}", state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).AirOutNode))); + ShowContinueError(state, + EnergyPlus::format("..Window AC outlet node name = {}", + state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).AirOutNode))); ErrorsFound = true; } CompSetFanInlet = state.dataLoopNodes->NodeID(state.dataWindowAC->WindAC(WindACNum).CoilOutletNodeNum); @@ -599,8 +605,9 @@ namespace WindowAC { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, - format("{}Errors found in getting {} input. Preceding condition causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + EnergyPlus::format("{}Errors found in getting {} input. Preceding condition causes termination.", RoutineName, CurrentModuleObject)); } for (WindACNum = 1; WindACNum <= state.dataWindowAC->NumWindAC; ++WindACNum) { @@ -752,8 +759,9 @@ namespace WindowAC { state.dataWindowAC->WindAC(Loop).Name)) { continue; } - ShowSevereError(state, - format("InitWindowAC: Window AC Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + 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)); } @@ -1359,11 +1367,12 @@ namespace WindowAC { } if (Iter > MaxIter) { if (state.dataWindowAC->WindAC(WindACNum).MaxIterIndex1 == 0) { - ShowWarningMessage(state, - format("ZoneHVAC:WindowAirConditioner=\"{}\" -- Exceeded max iterations while adjusting compressor sensible " - "runtime to meet the zone load within the cooling convergence tolerance.", - state.dataWindowAC->WindAC(WindACNum).Name)); - ShowContinueErrorTimeStamp(state, format("Iterations={}", MaxIter)); + ShowWarningMessage( + state, + EnergyPlus::format("ZoneHVAC:WindowAirConditioner=\"{}\" -- Exceeded max iterations while adjusting compressor sensible " + "runtime to meet the zone load within the cooling convergence tolerance.", + state.dataWindowAC->WindAC(WindACNum).Name)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("Iterations={}", MaxIter)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:WindowAirConditioner=\"" + state.dataWindowAC->WindAC(WindACNum).Name + @@ -1408,11 +1417,12 @@ namespace WindowAC { } if (Iter > MaxIter) { if (state.dataWindowAC->WindAC(WindACNum).MaxIterIndex2 == 0) { - ShowWarningMessage(state, - format("ZoneHVAC:WindowAirConditioner=\"{}\" -- Exceeded max iterations while adjusting compressor latent " - "runtime to meet the zone load within the cooling convergence tolerance.", - state.dataWindowAC->WindAC(WindACNum).Name)); - ShowContinueErrorTimeStamp(state, format("Iterations={}", MaxIter)); + ShowWarningMessage( + state, + EnergyPlus::format("ZoneHVAC:WindowAirConditioner=\"{}\" -- Exceeded max iterations while adjusting compressor latent " + "runtime to meet the zone load within the cooling convergence tolerance.", + state.dataWindowAC->WindAC(WindACNum).Name)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("Iterations={}", MaxIter)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:WindowAirConditioner=\"" + state.dataWindowAC->WindAC(WindACNum).Name + diff --git a/src/EnergyPlus/WindowComplexManager.cc b/src/EnergyPlus/WindowComplexManager.cc index ed192d15490..8058e1d46eb 100644 --- a/src/EnergyPlus/WindowComplexManager.cc +++ b/src/EnergyPlus/WindowComplexManager.cc @@ -3219,9 +3219,9 @@ namespace WindowComplexManager { tarcogErrorMessage = "message = \"" + tarcogErrorMessage + "\""; ShowContinueErrorTimeStamp(state, tarcogErrorMessage); if (CalcCondition == DataBSDFWindow::Condition::Invalid) { - ShowContinueError(state, format("surface name = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, EnergyPlus::format("surface name = {}", state.dataSurface->Surface(SurfNum).Name)); } - ShowContinueError(state, format("construction name = {}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, EnergyPlus::format("construction name = {}", state.dataConstruction->Construct(ConstrNum).Name)); ShowFatalError(state, "halting because of error in tarcog"); } diff --git a/src/EnergyPlus/WindowEquivalentLayer.cc b/src/EnergyPlus/WindowEquivalentLayer.cc index 98fcb629cbb..137c703fd37 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.cc +++ b/src/EnergyPlus/WindowEquivalentLayer.cc @@ -491,8 +491,8 @@ void CalcEQLWindowUvalue(EnergyPlusData &state, } } if (!CFSURated) { - ShowWarningMessage(state, format("{}Fenestration U-Value calculation failed for {}", RoutineName, FS.Name)); - ShowContinueError(state, format("...Calculated U-value = {:.4T}", U)); + ShowWarningMessage(state, EnergyPlus::format("{}Fenestration U-Value calculation failed for {}", RoutineName, FS.Name)); + ShowContinueError(state, EnergyPlus::format("...Calculated U-value = {:.4T}", U)); ShowContinueError(state, "...Check consistency of inputs"); } UNFRC = U; @@ -598,9 +598,9 @@ void CalcEQLWindowSHGCAndTransNormal(EnergyPlusData &state, true); if (!CFSSHGC) { - ShowWarningMessage(state, format("{}Solar heat gain coefficient calculation failed for {}", RoutineName, FS.Name)); - ShowContinueError(state, format("...Calculated SHGC = {:.4T}", SHGC)); - ShowContinueError(state, format("...Calculated U-Value = {:.4T}", UCG)); + 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, "...Check consistency of inputs."); return; } @@ -910,8 +910,8 @@ Real64 P01(EnergyPlusData &state, static constexpr std::string_view RoutineName("P01: "); if (P < -0.05 || P > 1.05) { - ShowWarningMessage(state, format("{}property value should have been between 0 and 1", RoutineName)); - ShowContinueError(state, format("{}=: property value is ={:.4T}", WHAT, P)); + ShowWarningMessage(state, EnergyPlus::format("{}property value should have been between 0 and 1", RoutineName)); + ShowContinueError(state, EnergyPlus::format("{}=: property value is ={:.4T}", WHAT, P)); if (P < 0.0) { ShowContinueError(state, "property value is reset to 0.0"); } else if (P > 1.0) { @@ -1025,10 +1025,10 @@ void RB_DIFF(EnergyPlusData &state, if (RHO_DD + TAU_DD > 1.0) { SumRefAndTran = RHO_DD + TAU_DD; - ShowWarningMessage(state, format("{}Roller blind diffuse-diffuse properties are inconsistent", RoutineName)); - ShowContinueError(state, format("...The diffuse-diffuse reflectance = {:.4T}", RHO_DD)); - ShowContinueError(state, format("...The diffuse-diffuse transmittance = {:.4T}", TAU_DD)); - ShowContinueError(state, format("...Sum of diffuse reflectance and transmittance = {:.4T}", SumRefAndTran)); + 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, "...This sum cannot be > 1.0. Transmittance will be reset to 1 minus reflectance"); TAU_DD = 1.0 - RHO_DD; } @@ -1159,10 +1159,10 @@ void IS_DIFF(EnergyPlusData &state, if (RHO_DD + TAU_DD > 1.0) { SumRefAndTran = RHO_DD + TAU_DD; - ShowWarningMessage(state, format("{}Calculated insect screen diffuse-diffuse properties are inconsistent", RoutineName)); - ShowContinueError(state, format("...The diffuse-diffuse reflectance = {:.4T}", RHO_DD)); - ShowContinueError(state, format("...The diffuse-diffuse transmittance = {:.4T}", TAU_DD)); - ShowContinueError(state, format("...Sum of diffuse reflectance and transmittance = {:.4T}", SumRefAndTran)); + 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, "...This sum cannot be > 1.0. Transmittance will be reset to 1 minus reflectance"); TAU_DD = 1.0 - RHO_DD; } @@ -1330,10 +1330,10 @@ void FM_DIFF(EnergyPlusData &state, if (RHO_DD + TAU_DD > 1.0) { SumRefAndTran = RHO_DD + TAU_DD; - ShowWarningMessage(state, format("{}Calculated drape fabric diffuse-diffuse properties are inconsistent", RoutineName)); - ShowContinueError(state, format("...The diffuse-diffuse reflectance = {:.4T}", RHO_DD)); - ShowContinueError(state, format("...The diffuse-diffuse transmittance = {:.4T}", TAU_DD)); - ShowContinueError(state, format("...Sum of diffuse reflectance and transmittance = {:.4T}", SumRefAndTran)); + 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, "...This sum cannot be > 1.0. Transmittance will be reset to 1 minus reflectance"); TAU_DD = 1.0 - RHO_DD; } @@ -4634,10 +4634,10 @@ void ASHWAT_ThermalCalc(EnergyPlusData &state, if (FS.WEQLSolverErrorIndex < 1) { ++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)); + 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)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd(state, @@ -7612,7 +7612,7 @@ void BuildGap(EnergyPlusData &state, static constexpr std::string_view RoutineName("BuildGap: "); if (TAS < GapThickMin) { - ShowSevereError(state, format("{}{}", RoutineName, G.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}", RoutineName, G.Name)); ShowContinueError(state, "...specified gap thickness is < 0.0001 m. Reset to 0.00001 m"); TAS = GapThickMin; } @@ -7766,7 +7766,7 @@ void FillDefaultsSWP(EnergyPlusData &state, } else if (L.LTYPE == LayerType::NONE || L.LTYPE == LayerType::ROOM) { // none or room: do nothing } else { - ShowSevereError(state, format("{}{}.", RoutineName, L.Name)); + ShowSevereError(state, EnergyPlus::format("{}{}.", RoutineName, L.Name)); ShowContinueError(state, "...invalid layer type specified."); } } @@ -7791,7 +7791,7 @@ void FinalizeCFS(EnergyPlusData &state, CFSTY &FS) if (!IsVBLayer(FS.L(iL))) { LVBPREV = false; } else if (LVBPREV) { - ShowSevereError(state, format("{}=\"{}\", illegal.", CurrentModuleObject, FS.Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}\", illegal.", CurrentModuleObject, FS.Name)); ShowContinueError(state, "...adjacent VB layers are specified."); ErrorsFound = true; } else { @@ -7806,19 +7806,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, format("{}=\"{}", CurrentModuleObject, FS.Name)); - ShowContinueError(state, format("...invalid EquivalentLayer window gap type specified ={}.", FS.G(iL).Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}", CurrentModuleObject, FS.Name)); + ShowContinueError(state, EnergyPlus::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, format("{}=\"{}", CurrentModuleObject, FS.Name)); - ShowContinueError(state, format("...invalid EquivalentLayer window gap type specified ={}.", FS.G(iL).Name)); + ShowSevereError(state, EnergyPlus::format("{}=\"{}", CurrentModuleObject, FS.Name)); + ShowContinueError(state, EnergyPlus::format("...invalid EquivalentLayer window gap type specified ={}.", FS.G(iL).Name)); ShowContinueError(state, "...VentedIndoor gap is not innermost."); } } } if (ErrorsFound) { - ShowFatalError(state, format("{}Program terminates for preceding reason(s).", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Program terminates for preceding reason(s).", RoutineName)); } } diff --git a/src/EnergyPlus/WindowManager.cc b/src/EnergyPlus/WindowManager.cc index 55823b3ecf5..9237e780779 100644 --- a/src/EnergyPlus/WindowManager.cc +++ b/src/EnergyPlus/WindowManager.cc @@ -560,12 +560,12 @@ namespace Window { // Add warning message for the glazing defined with full spectral data. ShowWarningError( state, - format( + EnergyPlus::format( "Window glazing material \"{}\" was defined with full spectral data and has been converted to average spectral data", matGlass->Name)); - ShowContinueError( - state, - format("due to its use with between-glass shades or blinds of the window construction \"{}\".", thisConstruct.Name)); + ShowContinueError(state, + EnergyPlus::format("due to its use with between-glass shades or blinds of the window construction \"{}\".", + thisConstruct.Name)); ShowContinueError(state, "All occurrences of this glazing material will be modeled as SpectralAverage."); ShowContinueError(state, "If this material is also used in other window constructions without between-glass shades or blinds,"); @@ -621,13 +621,14 @@ namespace Window { numpt[IGlass - 1] = numptDAT; if (wm->BGFlag) { // 5/16/2012 CR 8793. Add warning message for the glazing defined with full spectral data. - ShowWarningError(state, - format("Window glazing material \"{}\" was defined with full spectral and angular data and has been " - "converted to average spectral data", - matGlass->Name)); - ShowContinueError( + ShowWarningError( state, - format("due to its use with between-glass shades or blinds of the window construction \"{}\".", thisConstruct.Name)); + EnergyPlus::format("Window glazing material \"{}\" was defined with full spectral and angular data and has been " + "converted to average spectral data", + matGlass->Name)); + ShowContinueError(state, + EnergyPlus::format("due to its use with between-glass shades or blinds of the window construction \"{}\".", + thisConstruct.Name)); ShowContinueError(state, "All occurrences of this glazing material will be modeled as SpectralAverage."); ShowContinueError(state, "If this material is also used in other window constructions without between-glass shades or blinds,"); @@ -1785,22 +1786,24 @@ namespace Window { ++DifOverrideCount; if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - format("W5InitGlassParameters: Window=\"{}\" has interior material with Solar Diffusing=Yes, but " - "existing Window Shading Device sets Diffusing=No.", - surf.Name)); + EnergyPlus::format("W5InitGlassParameters: Window=\"{}\" has interior material with Solar Diffusing=Yes, but " + "existing Window Shading Device sets Diffusing=No.", + surf.Name)); } } } // for (SurfNum) if (DifOverrideCount > 0) { if (!state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, - format("W5InitGlassParameters: {} Windows had Solar Diffusing=Yes overridden by presence of Window Shading Device.", - DifOverrideCount)); + ShowWarningError( + state, + EnergyPlus::format("W5InitGlassParameters: {} Windows had Solar Diffusing=Yes overridden by presence of Window Shading Device.", + DifOverrideCount)); } else { - ShowMessage(state, - format("W5InitGlassParameters: {} Windows had Solar Diffusing=Yes overridden by presence of Window Shading Device.", - DifOverrideCount)); + ShowMessage( + state, + EnergyPlus::format("W5InitGlassParameters: {} Windows had Solar Diffusing=Yes overridden by presence of Window Shading Device.", + DifOverrideCount)); } } } // W5InitGlassParameters() @@ -2383,9 +2386,9 @@ namespace Window { if (state.dataGlobal->AnyEnergyManagementSystemInModel) { // check to make sure the user hasn't messed up the shade control values if (matShade->group == Material::Group::Blind) { - ShowSevereError( - state, - format("CalcWindowHeatBalance: ShadeFlag indicates Shade but Blind=\"{}\" is being used.", matShade->Name)); + ShowSevereError(state, + EnergyPlus::format("CalcWindowHeatBalance: ShadeFlag indicates Shade but Blind=\"{}\" is being used.", + matShade->Name)); ShowContinueError(state, "This is most likely a fault of the EMS values for shading control."); ShowFatalError(state, "Preceding condition terminates program."); } @@ -2410,8 +2413,9 @@ namespace Window { if (state.dataGlobal->AnyEnergyManagementSystemInModel) { // check to make sure the user hasn't messed up the shade control values if (matShade->group == Material::Group::Shade || matShade->group == Material::Group::Screen) { - ShowSevereError(state, - format("CalcWindowHeatBalance: ShadeFlag indicates Blind but Shade/Screen=\"{}\" is being used.", + ShowSevereError( + state, + EnergyPlus::format("CalcWindowHeatBalance: ShadeFlag indicates Blind but Shade/Screen=\"{}\" is being used.", matShade->Name)); ShowContinueError(state, "This is most likely a fault of the EMS values for shading control."); ShowFatalError(state, "Preceding condition terminates program."); @@ -3193,7 +3197,8 @@ namespace Window { } } else { - ShowFatalError(state, format("SolveForWindowTemperatures: Invalid number of Glass Layers={}, up to 4 allowed.", wm->ngllayer)); + ShowFatalError(state, + EnergyPlus::format("SolveForWindowTemperatures: Invalid number of Glass Layers={}, up to 4 allowed.", wm->ngllayer)); } } // GetHeatBalanceEqCoefMatrix() @@ -3609,23 +3614,24 @@ namespace Window { } } else { // No convergence after MaxIterations even with relaxed error tolerance - ShowSevereError(state, format("Convergence error in SolveForWindowTemperatures for window {}", s_surf->Surface(SurfNum).Name)); + ShowSevereError(state, + EnergyPlus::format("Convergence error in SolveForWindowTemperatures for window {}", s_surf->Surface(SurfNum).Name)); ShowContinueErrorTimeStamp(state, ""); if (state.dataGlobal->DisplayExtraWarnings) { // report out temperatures for (int i = 1; i <= wm->nglfacep; ++i) { ShowContinueError(state, - format("Glazing face index = {} ; new temperature ={:.4R}C ; previous temperature = {:.4R}C", - i, - wm->thetas[i - 1] - Constant::Kelvin, - wm->thetasPrev[i - 1] - Constant::Kelvin)); + EnergyPlus::format("Glazing face index = {} ; new temperature ={:.4R}C ; previous temperature = {:.4R}C", + i, + wm->thetas[i - 1] - Constant::Kelvin, + wm->thetasPrev[i - 1] - Constant::Kelvin)); } } - ShowFatalError( - state, - format("Program halted because of convergence error in SolveForWindowTemperatures for window {}", s_surf->Surface(SurfNum).Name)); + ShowFatalError(state, + EnergyPlus::format("Program halted because of convergence error in SolveForWindowTemperatures for window {}", + s_surf->Surface(SurfNum).Name)); } } // SolveForWindowTemperatures() @@ -6653,9 +6659,9 @@ namespace Window { // No convergence after MaxIterations; and/or error tolerance if (errtemp >= 10 * errtemptol) { // Fatal error: didn't converge - ShowFatalError( - state, - format("Convergence error in WindowTempsForNominalCond for construction {}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowFatalError(state, + EnergyPlus::format("Convergence error in WindowTempsForNominalCond for construction {}", + state.dataConstruction->Construct(ConstrNum).Name)); } } // WindowTempsForNominalCond() @@ -6927,7 +6933,7 @@ namespace Window { CalcNominalWindowCond(state, ThisNum, 1, NominalConductanceWinter, SHGCWinter, TransSolNorm, TransVisNorm, errFlag); if (errFlag == 1) { - ShowWarningError(state, format("Window construction {} has an interior or exterior blind", construct.Name)); + ShowWarningError(state, EnergyPlus::format("Window construction {} has an interior or exterior blind", construct.Name)); ShowContinueError(state, "but the corresponding construction without the blind cannot be found."); ShowContinueError(state, "The ReportGlass entry for this construction will not be printed in eplusout.eio."); continue; @@ -6937,7 +6943,7 @@ namespace Window { // nominal conductance and SHGC. if (errFlag == 2) { - ShowWarningError(state, format("Window construction {} has a between-glass shade or blind", construct.Name)); + ShowWarningError(state, EnergyPlus::format("Window construction {} has a between-glass shade or blind", construct.Name)); ShowContinueError(state, "The ReportGlass entry for this construction will not be printed in eplusout.eio."); continue; } @@ -7051,10 +7057,10 @@ namespace Window { if (matGlass->windowOpticalData == Window::OpticalDataModel::Spectral) { SpectralDataName = s_mat->SpectralData(matGlass->GlassSpectralDataPtr).Name; } else if (matGlass->windowOpticalData == Window::OpticalDataModel::SpectralAndAngle) { - SpectralDataName = format("{}, {}, {}", - matGlass->GlassSpecAngTransCurve->Name, - matGlass->GlassSpecAngFReflCurve->Name, - matGlass->GlassSpecAngBReflCurve->Name); + SpectralDataName = EnergyPlus::format("{}, {}, {}", + matGlass->GlassSpecAngTransCurve->Name, + matGlass->GlassSpecAngFReflCurve->Name, + matGlass->GlassSpecAngBReflCurve->Name); } else { SpectralDataName = ""; } @@ -8433,7 +8439,7 @@ namespace Window { // read custom spectrum data from Site:SolarAndVisibleSpectrum if (NumSiteSpectrum > 1) { // throw error - ShowSevereError(state, format("Only one {} object is allowed", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Only one {} object is allowed", cCurrentModuleObject)); ErrorsFound = true; } @@ -8465,7 +8471,7 @@ namespace Window { cCurrentModuleObject = "Site:SpectrumData"; NumSiteSpectrum = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (NumSiteSpectrum == 0) { // throw error - ShowSevereError(state, format("No {} object is found", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} object is found", cCurrentModuleObject)); ErrorsFound = true; } @@ -8492,9 +8498,10 @@ namespace Window { iSolarSpectrum = Loop; // overwrite the default solar spectrum if (NumNumbers > 2 * nume) { - ShowSevereError( - state, - format("Solar spectrum data pair is more than 107 - {} - {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + EnergyPlus::format("Solar spectrum data pair is more than 107 - {} - {}", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { // Step 3 - overwrite default solar spectrum data @@ -8514,9 +8521,9 @@ namespace Window { // overwrite the default solar spectrum if (NumNumbers > 2 * numt3) { ShowSevereError(state, - format("Visible spectrum data pair is more than 81 - {} - {}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + EnergyPlus::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/ZoneAirLoopEquipmentManager.cc b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc index ffd2accc3ec..bfafa28e575 100644 --- a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc +++ b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc @@ -156,24 +156,26 @@ namespace ZoneAirLoopEquipmentManager { if (CompIndex == 0) { AirDistUnitNum = Util::FindItemInList(ZoneAirLoopEquipName, state.dataDefineEquipment->AirDistUnit); if (AirDistUnitNum == 0) { - ShowFatalError(state, format("ManageZoneAirLoopEquipment: Unit not found={}", ZoneAirLoopEquipName)); + ShowFatalError(state, EnergyPlus::format("ManageZoneAirLoopEquipment: Unit not found={}", ZoneAirLoopEquipName)); } CompIndex = AirDistUnitNum; } else { AirDistUnitNum = CompIndex; if (AirDistUnitNum > (int)state.dataDefineEquipment->AirDistUnit.size() || AirDistUnitNum < 1) { - ShowFatalError(state, - format("ManageZoneAirLoopEquipment: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", - AirDistUnitNum, - (int)state.dataDefineEquipment->AirDistUnit.size(), - ZoneAirLoopEquipName)); + ShowFatalError( + state, + EnergyPlus::format("ManageZoneAirLoopEquipment: Invalid CompIndex passed={}, Number of Units={}, Entered Unit name={}", + AirDistUnitNum, + (int)state.dataDefineEquipment->AirDistUnit.size(), + ZoneAirLoopEquipName)); } if (ZoneAirLoopEquipName != state.dataDefineEquipment->AirDistUnit(AirDistUnitNum).Name) { - ShowFatalError(state, - format("ManageZoneAirLoopEquipment: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", - AirDistUnitNum, - ZoneAirLoopEquipName, - state.dataDefineEquipment->AirDistUnit(AirDistUnitNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("ManageZoneAirLoopEquipment: Invalid CompIndex passed={}, Unit name={}, stored Unit Name for that index={}", + AirDistUnitNum, + ZoneAirLoopEquipName, + state.dataDefineEquipment->AirDistUnit(AirDistUnitNum).Name)); } } state.dataSize->CurTermUnitSizingNum = state.dataDefineEquipment->AirDistUnit(AirDistUnitNum).TermUnitSizingNum; @@ -270,7 +272,7 @@ namespace ZoneAirLoopEquipmentManager { airDistUnit.EquipName(AirDistCompUnitNum) = AlphArray(4); ValidateComponent(state, AlphArray(3), AlphArray(4), IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, format("In {} = {}", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("In {} = {}", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } airDistUnit.UpStreamLeakFrac = NumArray(1); @@ -280,8 +282,8 @@ namespace ZoneAirLoopEquipmentManager { } else if (airDistUnit.DownStreamLeakFrac < 1.0 && airDistUnit.DownStreamLeakFrac > 0.0) { airDistUnit.LeakLoadMult = 1.0 / (1.0 - airDistUnit.DownStreamLeakFrac); } else { - ShowSevereError(state, format("Error found in {} = {}", CurrentModuleObject, airDistUnit.Name)); - ShowContinueError(state, format("{} must be less than 1.0", cNumericFields(2))); + ShowSevereError(state, EnergyPlus::format("Error found in {} = {}", CurrentModuleObject, airDistUnit.Name)); + ShowContinueError(state, EnergyPlus::format("{} must be less than 1.0", cNumericFields(2))); ErrorsFound = true; } if (airDistUnit.UpStreamLeakFrac > 0.0) { @@ -300,8 +302,8 @@ namespace ZoneAirLoopEquipmentManager { if (!lAlphaBlanks(5)) { airDistUnit.AirTerminalSizingSpecIndex = Util::FindItemInList(AlphArray(5), state.dataSize->AirTerminalSizingSpec); if (airDistUnit.AirTerminalSizingSpecIndex == 0) { - ShowSevereError(state, format("{} = {} not found.", cAlphaFields(5), AlphArray(5))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, airDistUnit.Name)); + ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(5), AlphArray(5))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, airDistUnit.Name)); ErrorsFound = true; } } @@ -321,22 +323,22 @@ namespace ZoneAirLoopEquipmentManager { case DataDefineEquip::ZnAirLoopEquipType::SingleDuctUserDefined: case DataDefineEquip::ZnAirLoopEquipType::SingleDuctATMixer: if (airDistUnit.UpStreamLeak || airDistUnit.DownStreamLeak) { - ShowSevereError(state, format("Error found in {} = {}", CurrentModuleObject, airDistUnit.Name)); + ShowSevereError(state, EnergyPlus::format("Error found in {} = {}", CurrentModuleObject, airDistUnit.Name)); ShowContinueError(state, - format("Simple duct leakage model not available for {} = {}", - cAlphaFields(3), - airDistUnit.EquipType(AirDistCompUnitNum))); + EnergyPlus::format("Simple duct leakage model not available for {} = {}", + cAlphaFields(3), + airDistUnit.EquipType(AirDistCompUnitNum))); ErrorsFound = true; } break; case DataDefineEquip::ZnAirLoopEquipType::SingleDuctConstVolFourPipeBeam: airDistUnit.airTerminalPtr = FourPipeBeam::HVACFourPipeBeam::fourPipeBeamFactory(state, airDistUnit.EquipName(1)); if (airDistUnit.UpStreamLeak || airDistUnit.DownStreamLeak) { - ShowSevereError(state, format("Error found in {} = {}", CurrentModuleObject, airDistUnit.Name)); + ShowSevereError(state, EnergyPlus::format("Error found in {} = {}", CurrentModuleObject, airDistUnit.Name)); ShowContinueError(state, - format("Simple duct leakage model not available for {} = {}", - cAlphaFields(3), - airDistUnit.EquipType(AirDistCompUnitNum))); + EnergyPlus::format("Simple duct leakage model not available for {} = {}", + cAlphaFields(3), + airDistUnit.EquipType(AirDistCompUnitNum))); ErrorsFound = true; } break; @@ -350,8 +352,8 @@ namespace ZoneAirLoopEquipmentManager { airDistUnit.IsConstLeakageRate = true; break; default: - ShowSevereError(state, format("Error found in {} = {}", CurrentModuleObject, airDistUnit.Name)); - ShowContinueError(state, format("Invalid {} = {}", cAlphaFields(3), airDistUnit.EquipType(AirDistCompUnitNum))); + ShowSevereError(state, EnergyPlus::format("Error found in {} = {}", CurrentModuleObject, airDistUnit.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(3), airDistUnit.EquipType(AirDistCompUnitNum))); ErrorsFound = true; break; } // end switch @@ -440,7 +442,7 @@ namespace ZoneAirLoopEquipmentManager { } } if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in getting {} Input", RoutineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {} Input", RoutineName, CurrentModuleObject)); } } @@ -745,8 +747,8 @@ namespace ZoneAirLoopEquipmentManager { ProvideSysOutput = false; } break; default: { - ShowSevereError(state, format("Error found in ZoneHVAC:AirDistributionUnit={}", airDistUnit.Name)); - ShowContinueError(state, format("Invalid Component={}", airDistUnit.EquipType(AirDistCompNum))); + ShowSevereError(state, EnergyPlus::format("Error found in ZoneHVAC:AirDistributionUnit={}", airDistUnit.Name)); + ShowContinueError(state, EnergyPlus::format("Invalid Component={}", airDistUnit.EquipType(AirDistCompNum))); ShowFatalError(state, "Preceding condition causes termination."); } break; } diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index ea3fb14c481..f2a9a614802 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -248,12 +248,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.ActualZoneNum = Util::FindItemInList(AlphaName(2), state.dataHeatBal->Zone); if (contam.ActualZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} entered={}", - RoutineName, - CurrentModuleObject, - AlphaName(1), - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + EnergyPlus::format("{}{}=\"{}\", invalid {} entered={}", + RoutineName, + CurrentModuleObject, + AlphaName(1), + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaName(2))); ErrorsFound = true; } @@ -351,12 +351,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.SurfNum = Util::FindItemInList(AlphaName(2), state.afn->MultizoneSurfaceData, &AirflowNetwork::MultizoneSurfaceProp::SurfName); if (contam.SurfNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} entered={}", - RoutineName, - CurrentModuleObject, - AlphaName(1), - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + EnergyPlus::format("{}{}=\"{}\", invalid {} entered={}", + RoutineName, + CurrentModuleObject, + AlphaName(1), + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaName(2))); ShowContinueError(state, "which is not listed in AirflowNetwork:MultiZone:Surface."); ErrorsFound = true; } @@ -365,7 +365,7 @@ void GetZoneContaminanInputs(EnergyPlusData &state) state.dataSurface->Surface(state.afn->MultizoneSurfaceData(contam.SurfNum).SurfNum).ExtBoundCond != DataSurfaces::ExternalEnvironment) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{}=\"{}. The entered surface ({}) is not an exterior surface", RoutineName, CurrentModuleObject, AlphaName(1), AlphaName(2))); ErrorsFound = true; } @@ -384,34 +384,34 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.GenRateCoef = IHGNumbers(1); if (IHGNumbers(1) < 0.0) { ShowSevereError(state, - format("{}Negative values are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(1), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(1))); + EnergyPlus::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; } contam.Expo = IHGNumbers(2); if (IHGNumbers(2) <= 0.0) { ShowSevereError(state, - format("{}Negative or zero value is not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(2), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(2))); + EnergyPlus::format("{}Negative or zero value is not allowed for {} in {} = {}", + RoutineName, + state.dataIPShortCut->cNumericFieldNames(2), + CurrentModuleObject, + AlphaName(1))); + ShowContinueError(state, EnergyPlus::format("The input value is {:.2R}", IHGNumbers(2))); ErrorsFound = true; } if (IHGNumbers(2) > 1.0) { ShowSevereError(state, - format("{}The value greater than 1.0 is not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(2), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(2))); + EnergyPlus::format("{}The value greater than 1.0 is not allowed for {} in {} = {}", + RoutineName, + state.dataIPShortCut->cNumericFieldNames(2), + CurrentModuleObject, + AlphaName(1))); + ShowContinueError(state, EnergyPlus::format("The input value is {:.2R}", IHGNumbers(2))); ErrorsFound = true; } @@ -486,12 +486,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.ActualZoneNum = Util::FindItemInList(AlphaName(2), state.dataHeatBal->Zone); if (contam.ActualZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} entered={}", - RoutineName, - CurrentModuleObject, - AlphaName(1), - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + EnergyPlus::format("{}{}=\"{}\", invalid {} entered={}", + RoutineName, + CurrentModuleObject, + AlphaName(1), + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaName(2))); ErrorsFound = true; } @@ -511,22 +511,22 @@ void GetZoneContaminanInputs(EnergyPlusData &state) if (IHGNumbers(1) < 0.0) { ShowSevereError(state, - format("{}Negative values are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(1), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(1))); + EnergyPlus::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; } if (IHGNumbers(2) <= 0.0) { ShowSevereError(state, - format("{}Negative values or zero are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(2), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(2))); + EnergyPlus::format("{}Negative values or zero are not allowed for {} in {} = {}", + RoutineName, + state.dataIPShortCut->cNumericFieldNames(2), + CurrentModuleObject, + AlphaName(1))); + ShowContinueError(state, EnergyPlus::format("The input value is {:.2R}", IHGNumbers(2))); ErrorsFound = true; } @@ -595,12 +595,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.ActualZoneNum = Util::FindItemInList(AlphaName(2), state.dataHeatBal->Zone); if (contam.ActualZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} entered={}", - RoutineName, - CurrentModuleObject, - AlphaName(1), - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + EnergyPlus::format("{}{}=\"{}\", invalid {} entered={}", + RoutineName, + CurrentModuleObject, + AlphaName(1), + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaName(2))); ErrorsFound = true; } @@ -620,22 +620,22 @@ void GetZoneContaminanInputs(EnergyPlusData &state) if (IHGNumbers(1) < 0.0) { ShowSevereError(state, - format("{}Negative values are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(1), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(1))); + EnergyPlus::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; } if (IHGNumbers(2) <= 0.0) { ShowSevereError(state, - format("{}Negative values or zero are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(2), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(2))); + EnergyPlus::format("{}Negative values or zero are not allowed for {} in {} = {}", + RoutineName, + state.dataIPShortCut->cNumericFieldNames(2), + CurrentModuleObject, + AlphaName(1))); + ShowContinueError(state, EnergyPlus::format("The input value is {:.2R}", IHGNumbers(2))); ErrorsFound = true; } @@ -710,12 +710,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.SurfNum = Util::FindItemInList(AlphaName(2), state.dataSurface->Surface); if (contam.SurfNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} entered={}", - RoutineName, - CurrentModuleObject, - AlphaName(1), - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + EnergyPlus::format("{}{}=\"{}\", invalid {} entered={}", + RoutineName, + CurrentModuleObject, + AlphaName(1), + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaName(2))); ErrorsFound = true; } @@ -734,22 +734,22 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.HenryCoef = IHGNumbers(2); if (IHGNumbers(1) < 0.0) { ShowSevereError(state, - format("{}Negative values are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(1), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(1))); + EnergyPlus::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; } if (IHGNumbers(2) <= 0.0) { ShowSevereError(state, - format("{}Negative values or zero are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(2), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(2))); + EnergyPlus::format("{}Negative values or zero are not allowed for {} in {} = {}", + RoutineName, + state.dataIPShortCut->cNumericFieldNames(2), + CurrentModuleObject, + AlphaName(1))); + ShowContinueError(state, EnergyPlus::format("The input value is {:.2R}", IHGNumbers(2))); ErrorsFound = true; } @@ -826,12 +826,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.SurfNum = Util::FindItemInList(AlphaName(2), state.dataSurface->Surface); if (contam.SurfNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} entered={}", - RoutineName, - CurrentModuleObject, - AlphaName(1), - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + EnergyPlus::format("{}{}=\"{}\", invalid {} entered={}", + RoutineName, + CurrentModuleObject, + AlphaName(1), + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaName(2))); ErrorsFound = true; } @@ -849,12 +849,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.DepoVelo = IHGNumbers(1); if (IHGNumbers(1) < 0.0) { ShowSevereError(state, - format("{}Negative values are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(1), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(1))); + EnergyPlus::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; } @@ -923,12 +923,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) contam.ActualZoneNum = Util::FindItemInList(AlphaName(2), state.dataHeatBal->Zone); if (contam.ActualZoneNum == 0) { ShowSevereError(state, - format("{}{}=\"{}\", invalid {} entered={}", - RoutineName, - CurrentModuleObject, - AlphaName(1), - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + EnergyPlus::format("{}{}=\"{}\", invalid {} entered={}", + RoutineName, + CurrentModuleObject, + AlphaName(1), + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaName(2))); ErrorsFound = true; } @@ -947,12 +947,12 @@ void GetZoneContaminanInputs(EnergyPlusData &state) if (IHGNumbers(1) < 0.0) { ShowSevereError(state, - format("{}Negative values are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(1), - CurrentModuleObject, - AlphaName(1))); - ShowContinueError(state, format("The input value is {:.2R}", IHGNumbers(1))); + EnergyPlus::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; } @@ -1076,11 +1076,11 @@ void GetZoneContaminanSetPoints(EnergyPlusData &state) controlledZone.ActualZoneNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->Zone); if (controlledZone.ActualZoneNum == 0) { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + EnergyPlus::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 @@ -1423,8 +1423,9 @@ void InitZoneContSetPoints(EnergyPlusData &state) } } } else { - ShowSevereError(state, - format("ZoneControl:ContaminantController: a corresponding AirLoopHVAC is not found for the controlled zone ={}", + ShowSevereError( + state, + EnergyPlus::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 092a6723135..2a371d8c887 100644 --- a/src/EnergyPlus/ZoneDehumidifier.cc +++ b/src/EnergyPlus/ZoneDehumidifier.cc @@ -142,7 +142,7 @@ namespace ZoneDehumidifier { if (CompIndex == 0) { ZoneDehumidNum = Util::FindItemInList(CompName, state.dataZoneDehumidifier->ZoneDehumid); if (ZoneDehumidNum == 0) { - ShowFatalError(state, format("SimZoneDehumidifier: Unit not found= {}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimZoneDehumidifier: Unit not found= {}", CompName)); } CompIndex = ZoneDehumidNum; } else { @@ -150,18 +150,19 @@ namespace ZoneDehumidifier { int NumDehumidifiers = (int)state.dataZoneDehumidifier->ZoneDehumid.size(); if (ZoneDehumidNum > NumDehumidifiers || ZoneDehumidNum < 1) { ShowFatalError(state, - format("SimZoneDehumidifier: Invalid CompIndex passed= {}, Number of Units= {}, Entered Unit name= {}", - ZoneDehumidNum, - NumDehumidifiers, - CompName)); + EnergyPlus::format("SimZoneDehumidifier: Invalid CompIndex passed= {}, Number of Units= {}, Entered Unit name= {}", + ZoneDehumidNum, + NumDehumidifiers, + CompName)); } if (state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidNum).CheckEquipName) { if (CompName != state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidNum).Name) { - ShowFatalError(state, - format("SimZoneDehumidifier: Invalid CompIndex passed={}, Unit name= {}, stored Unit Name for that index= {}", - ZoneDehumidNum, - CompName, - state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidNum).Name)); + ShowFatalError( + state, + EnergyPlus::format("SimZoneDehumidifier: Invalid CompIndex passed={}, Unit name= {}, stored Unit Name for that index= {}", + ZoneDehumidNum, + CompName, + state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidNum).Name)); } state.dataZoneDehumidifier->ZoneDehumid(ZoneDehumidNum).CheckEquipName = false; } @@ -285,27 +286,27 @@ namespace ZoneDehumidifier { // N1, \field Rated Water Removal dehumid.RatedWaterRemoval = Numbers(1); if (dehumid.RatedWaterRemoval <= 0.0) { - ShowSevereError(state, format("{} must be greater than zero.", cNumericFields(1))); - ShowContinueError(state, format("Value specified = {:.5T}", Numbers(1))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); + ShowSevereError(state, EnergyPlus::format("{} must be greater than zero.", cNumericFields(1))); + ShowContinueError(state, EnergyPlus::format("Value specified = {:.5T}", Numbers(1))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } // N2, \field Rated Energy Factor dehumid.RatedEnergyFactor = Numbers(2); if (dehumid.RatedEnergyFactor <= 0.0) { - ShowSevereError(state, format("{} must be greater than zero.", cNumericFields(2))); - ShowContinueError(state, format("Value specified = {:.5T}", Numbers(2))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); + ShowSevereError(state, EnergyPlus::format("{} must be greater than zero.", cNumericFields(2))); + ShowContinueError(state, EnergyPlus::format("Value specified = {:.5T}", Numbers(2))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } // N3, \field Rated Air Flow Rate dehumid.RatedAirVolFlow = Numbers(3); if (dehumid.RatedAirVolFlow <= 0.0) { - ShowSevereError(state, format("{} must be greater than zero.", cNumericFields(3))); - ShowContinueError(state, format("Value specified = {:.5T}", Numbers(3))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); + ShowSevereError(state, EnergyPlus::format("{} must be greater than zero.", cNumericFields(3))); + ShowContinueError(state, EnergyPlus::format("Value specified = {:.5T}", Numbers(3))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } @@ -322,9 +323,9 @@ namespace ZoneDehumidifier { } else { Real64 CurveVal = dehumid.WaterRemovalCurve->value(state, RatedInletAirTemp, RatedInletAirRH); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{} output is not equal to 1.0", cAlphaFields(5))); - ShowContinueError(state, format("(+ or -10%) at rated conditions for {} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, EnergyPlus::format("{} output is not equal to 1.0", cAlphaFields(5))); + ShowContinueError(state, EnergyPlus::format("(+ or -10%) at rated conditions for {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", CurveVal)); } } @@ -341,9 +342,9 @@ namespace ZoneDehumidifier { } else { Real64 CurveVal = dehumid.EnergyFactorCurve->value(state, RatedInletAirTemp, RatedInletAirRH); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, format("{} output is not equal to 1.0", cAlphaFields(6))); - ShowContinueError(state, format("(+ or -10%) at rated conditions for {} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, format("Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, EnergyPlus::format("{} output is not equal to 1.0", cAlphaFields(6))); + ShowContinueError(state, EnergyPlus::format("(+ or -10%) at rated conditions for {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", CurveVal)); } } @@ -365,10 +366,10 @@ namespace ZoneDehumidifier { dehumid.MaxInletAirTemp = Numbers(5); if (dehumid.MinInletAirTemp >= dehumid.MaxInletAirTemp) { - ShowSevereError(state, format("{} must be greater than {}", cNumericFields(5), cNumericFields(4))); - ShowContinueError(state, format("{} specified = {:.1T}", cNumericFields(5), Numbers(5))); - ShowContinueError(state, format("{} specified = {:.1T}", cNumericFields(4), Numbers(4))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); + ShowSevereError(state, EnergyPlus::format("{} must be greater than {}", cNumericFields(5), cNumericFields(4))); + ShowContinueError(state, EnergyPlus::format("{} specified = {:.1T}", cNumericFields(5), Numbers(5))); + ShowContinueError(state, EnergyPlus::format("{} specified = {:.1T}", cNumericFields(4), Numbers(4))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } @@ -376,9 +377,9 @@ namespace ZoneDehumidifier { dehumid.OffCycleParasiticLoad = Numbers(6); // Off Cycle Parasitic Load [W] if (dehumid.OffCycleParasiticLoad < 0.0) { - ShowSevereError(state, format("{} must be >= zero.", cNumericFields(6))); - ShowContinueError(state, format("Value specified = {:.2T}", Numbers(6))); - ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); + ShowSevereError(state, EnergyPlus::format("{} must be >= zero.", cNumericFields(6))); + ShowContinueError(state, EnergyPlus::format("Value specified = {:.2T}", Numbers(6))); + ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } @@ -407,7 +408,7 @@ namespace ZoneDehumidifier { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}:{}: Errors found in input.", routineName, CurrentModuleObject)); + ShowFatalError(state, EnergyPlus::format("{}:{}: Errors found in input.", routineName, CurrentModuleObject)); } for (ZoneDehumidIndex = 1; ZoneDehumidIndex <= NumDehumidifiers; ++ZoneDehumidIndex) { @@ -552,9 +553,10 @@ namespace ZoneDehumidifier { if (!CheckZoneEquipmentList(state, dehumid.UnitType, dehumid.Name)) { ShowSevereError( state, - format("InitZoneDehumidifier: Zone Dehumidifier=\"{},{}\" is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - dehumid.UnitType, - dehumid.Name)); + EnergyPlus::format( + "InitZoneDehumidifier: Zone Dehumidifier=\"{},{}\" is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + dehumid.UnitType, + dehumid.Name)); } } @@ -697,11 +699,11 @@ namespace ZoneDehumidifier { if (WaterRemovalRateFactor <= 0.0) { if (dehumid.WaterRemovalCurveErrorCount < 1) { ++dehumid.WaterRemovalCurveErrorCount; - ShowWarningError(state, format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError(state, format(" Water Removal Rate Curve output is <= 0.0 ({:.5T}).", WaterRemovalRateFactor)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowContinueError(state, EnergyPlus::format(" Water Removal Rate Curve output is <= 0.0 ({:.5T}).", WaterRemovalRateFactor)); ShowContinueError( state, - format( + EnergyPlus::format( " Negative value occurs using an inlet air dry-bulb temperature of {:.2T} and an inlet air relative humidity of {:.1T}.", InletAirTemp, InletAirRH)); @@ -736,11 +738,11 @@ namespace ZoneDehumidifier { if (EnergyFactorAdjFactor <= 0.0) { if (dehumid.EnergyFactorCurveErrorCount < 1) { ++dehumid.EnergyFactorCurveErrorCount; - ShowWarningError(state, format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError(state, format(" Energy Factor Curve output is <= 0.0 ({:.5T}).", EnergyFactorAdjFactor)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowContinueError(state, EnergyPlus::format(" Energy Factor Curve output is <= 0.0 ({:.5T}).", EnergyFactorAdjFactor)); ShowContinueError( state, - format( + EnergyPlus::format( " Negative value occurs using an inlet air dry-bulb temperature of {:.2T} and an inlet air relative humidity of {:.1T}.", InletAirTemp, InletAirRH)); @@ -769,9 +771,10 @@ namespace ZoneDehumidifier { if (PLF < 0.7) { if (dehumid.LowPLFErrorCount < 1) { ++dehumid.LowPLFErrorCount; - ShowWarningError(state, format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError( - state, format(" The Part Load Fraction Correlation Curve output is ({:.2T}) at a part-load ratio ={:.3T}", PLF, PLR)); + 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)); ShowContinueErrorTimeStamp(state, " PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); } else { @@ -788,19 +791,20 @@ namespace ZoneDehumidifier { if (PLF > 1.0) { if (dehumid.HighPLFErrorCount < 1) { ++dehumid.HighPLFErrorCount; - ShowWarningError(state, format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError( - state, format(" The Part Load Fraction Correlation Curve output is ({:.2T}) at a part-load ratio ={:.3T}", PLF, PLR)); + 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)); ShowContinueErrorTimeStamp(state, " PLF curve values must be < 1.0. PLF has been reset to 1.0 and simulation is continuing."); } else { - ShowRecurringWarningErrorAtEnd(state, - format("{} \"{}\": Part Load Fraction Correlation Curve output > 1.0 warning continues...", - dehumid.UnitType, - dehumid.Name), - dehumid.HighPLFErrorIndex, - PLF, - PLF); + ShowRecurringWarningErrorAtEnd( + state, + EnergyPlus::format( + "{} \"{}\": Part Load Fraction Correlation Curve output > 1.0 warning continues...", dehumid.UnitType, dehumid.Name), + dehumid.HighPLFErrorIndex, + PLF, + PLF); } PLF = 1.0; } @@ -810,12 +814,13 @@ namespace ZoneDehumidifier { } else { if (dehumid.PLFPLRErrorCount < 1) { ++dehumid.PLFPLRErrorCount; - ShowWarningError(state, format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); ShowContinueError( state, - format("The part load fraction was less than the part load ratio calculated for this time step [PLR={:.4T}, PLF={:.4T}].", - PLR, - PLF)); + EnergyPlus::format( + "The part load fraction was less than the part load ratio calculated for this time step [PLR={:.4T}, PLF={:.4T}].", + PLR, + PLF)); ShowContinueError(state, "Runtime fraction reset to 1 and the simulation will continue."); ShowContinueErrorTimeStamp(state, ""); } else { @@ -830,8 +835,9 @@ namespace ZoneDehumidifier { if (RunTimeFraction > 1.0 && std::abs(RunTimeFraction - 1.0) > 0.001) { if (dehumid.HighRTFErrorCount < 1) { ++dehumid.HighRTFErrorCount; - ShowWarningError(state, format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError(state, format("The runtime fraction for this zone dehumidifier exceeded 1.0 [{:.4T}].", RunTimeFraction)); + ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowContinueError( + state, EnergyPlus::format("The runtime fraction for this zone dehumidifier exceeded 1.0 [{:.4T}].", 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 dafe475ac6c..5674e4d9597 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -375,7 +375,8 @@ void sizeZoneSpaceEquipmentPart1(EnergyPlusData &state, supplyAirNodeNum1 = zoneEquipConfig.InletNode(1); supplyAirNodeNum2 = 0; } else { - ShowSevereError(state, format("{}: to account for the effect a Dedicated Outside Air System on zone equipment sizing", RoutineName)); + ShowSevereError(state, + EnergyPlus::format("{}: to account for the effect a Dedicated Outside Air System on zone equipment sizing", RoutineName)); ShowContinueError(state, "there must be at least one zone air inlet node"); ShowFatalError(state, "Previous severe error causes abort "); } @@ -759,7 +760,7 @@ void CalcDOASSupCondsForSizing(EnergyPlusData &state, DOASSupHR = min(OutHR, W90L); } } else { - ShowFatalError(state, format("{}:illegal DOAS design control strategy", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}:illegal DOAS design control strategy", RoutineName)); } } @@ -786,9 +787,9 @@ void SetUpZoneSizingArrays(EnergyPlusData &state) for (int ZoneSizIndex = 1; ZoneSizIndex <= state.dataSize->NumZoneSizingInput; ++ZoneSizIndex) { int ZoneIndex = Util::FindItemInList(state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName, state.dataHeatBal->Zone); if (ZoneIndex == 0) { - ShowSevereError( - state, - format("SetUpZoneSizingArrays: Sizing:Zone=\"{}\" references unknown zone", state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName)); + ShowSevereError(state, + EnergyPlus::format("SetUpZoneSizingArrays: Sizing:Zone=\"{}\" references unknown zone", + state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName)); ErrorsFound = true; } if (std::any_of(state.dataZoneEquip->ZoneEquipConfig.begin(), state.dataZoneEquip->ZoneEquipConfig.end(), [](EquipConfiguration const &e) { @@ -798,9 +799,10 @@ void SetUpZoneSizingArrays(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName, state.dataZoneEquip->ZoneEquipConfig, &EquipConfiguration::ZoneName); if (ZoneIndex == 0) { if (!state.dataGlobal->isPulseZoneSizing) { - ShowWarningError(state, - format("SetUpZoneSizingArrays: Requested Sizing for Zone=\"{}\", Zone is not found in the Controlled Zones List", - state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName)); + ShowWarningError( + state, + EnergyPlus::format("SetUpZoneSizingArrays: Requested Sizing for Zone=\"{}\", Zone is not found in the Controlled Zones List", + state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName)); } } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneNum = ZoneIndex; @@ -810,9 +812,9 @@ void SetUpZoneSizingArrays(EnergyPlusData &state) if (!ZoneTempPredictorCorrector::VerifyThermostatInZone(state, state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName)) { if (!state.dataGlobal->isPulseZoneSizing) { ShowWarningError(state, - format("SetUpZoneSizingArrays: Requested Sizing for Zone=\"{}\", Zone has no thermostat (ref: " - "ZoneControl:Thermostat, et al)", - state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName)); + EnergyPlus::format("SetUpZoneSizingArrays: Requested Sizing for Zone=\"{}\", Zone has no thermostat (ref: " + "ZoneControl:Thermostat, et al)", + state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName)); } } } @@ -863,10 +865,11 @@ void SetUpZoneSizingArrays(EnergyPlusData &state) auto &zoneSizingInput = (ZoneSizNum > 0) ? state.dataSize->ZoneSizingInput(ZoneSizNum) : state.dataSize->ZoneSizingInput(1); if (ZoneSizNum == 0) { // LKL I think this is sufficient for warning -- no need for array if (!state.dataGlobal->isPulseZoneSizing) { - ShowWarningError(state, - format("SetUpZoneSizingArrays: Sizing for Zone=\"{}\" will use Sizing:Zone specifications listed for Zone=\"{}\".", - state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).ZoneName, - zoneSizingInput.ZoneName)); + ShowWarningError( + state, + EnergyPlus::format("SetUpZoneSizingArrays: Sizing for Zone=\"{}\" will use Sizing:Zone specifications listed for Zone=\"{}\".", + state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).ZoneName, + zoneSizingInput.ZoneName)); } } @@ -998,16 +1001,17 @@ void SetUpZoneSizingArrays(EnergyPlusData &state) if (thisSpaceNum > 0) { thisOAReq.dsoaSpaceIndexes.emplace_back(thisSpaceNum); } else { - ShowSevereError(state, format("SetUpZoneSizingArrays: DesignSpecification:OutdoorAir:SpaceList={}", thisOAReq.Name)); - ShowContinueError(state, format("Space Name={} not found.", thisSpaceName)); + ShowSevereError(state, EnergyPlus::format("SetUpZoneSizingArrays: DesignSpecification:OutdoorAir:SpaceList={}", thisOAReq.Name)); + ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", thisSpaceName)); dsoaError = true; ErrorsFound = true; } // Check for duplicate spaces for (int loop = 1; loop <= int(thisOAReq.dsoaSpaceIndexes.size()) - 1; ++loop) { if (thisSpaceNum == thisOAReq.dsoaSpaceIndexes(loop)) { - ShowSevereError(state, format("SetUpZoneSizingArrays: DesignSpecification:OutdoorAir:SpaceList={}", thisOAReq.Name)); - ShowContinueError(state, format("Space Name={} appears more than once in the list.", thisSpaceName)); + ShowSevereError(state, + EnergyPlus::format("SetUpZoneSizingArrays: DesignSpecification:OutdoorAir:SpaceList={}", thisOAReq.Name)); + ShowContinueError(state, EnergyPlus::format("Space Name={} appears more than once in the list.", thisSpaceName)); dsoaError = true; ErrorsFound = true; } @@ -1100,8 +1104,9 @@ void calcSizingOA(EnergyPlusData &state, int thisSpaceNum = thisOAReq.dsoaSpaceIndexes(spaceCounter); if (thisSpaceNum > 0) { if (state.dataHeatBal->space(thisSpaceNum).zoneNum != zoneNum) { - ShowSevereError(state, format("SetUpZoneSizingArrays: DesignSpecification:OutdoorAir:SpaceList={}", thisOAReq.Name)); - ShowContinueError(state, format("is invalid for Sizing:Zone={}", zsFinalSizing.ZoneName)); + ShowSevereError(state, + EnergyPlus::format("SetUpZoneSizingArrays: DesignSpecification:OutdoorAir:SpaceList={}", thisOAReq.Name)); + ShowContinueError(state, EnergyPlus::format("is invalid for Sizing:Zone={}", zsFinalSizing.ZoneName)); ShowContinueError(state, "All spaces in the list must be part of this zone."); ErrorsFound = true; } @@ -2276,11 +2281,11 @@ void updateZoneSizingEndZoneSizingCalc1(EnergyPlusData &state, int const zoneNum void updateZoneSizingEndZoneSizingCalc2(EnergyPlusData &state, DataSizing::ZoneSizingData &zsCalcSizing) { if (std::abs(zsCalcSizing.DesCoolLoad) <= 1.e-8) { - ShowWarningError(state, format("Calculated design cooling load for zone={} is zero.", zsCalcSizing.ZoneName)); + ShowWarningError(state, EnergyPlus::format("Calculated design cooling load for zone={} is zero.", zsCalcSizing.ZoneName)); ShowContinueError(state, "Check Sizing:Zone and ZoneControl:Thermostat inputs."); } if (std::abs(zsCalcSizing.DesHeatLoad) <= 1.e-8) { - ShowWarningError(state, format("Calculated design heating load for zone={} is zero.", zsCalcSizing.ZoneName)); + ShowWarningError(state, EnergyPlus::format("Calculated design heating load for zone={} is zero.", zsCalcSizing.ZoneName)); ShowContinueError(state, "Check Sizing:Zone and ZoneControl:Thermostat inputs."); } @@ -2305,25 +2310,25 @@ void updateZoneSizingEndZoneSizingCalc2(EnergyPlusData &state, DataSizing::ZoneS ShowSevereError(state, "UpdateZoneSizing: Cooling supply air temperature (calculated) within 2C of zone temperature"); } ShowContinueError(state, "...check zone thermostat set point and design supply air temperatures"); - ShowContinueError(state, format("...zone name = {}", zsCalcSizing.ZoneName)); - ShowContinueError(state, format("...design sensible cooling load = {:.2R} W", zsCalcSizing.DesCoolLoad)); - ShowContinueError(state, format("...thermostat set point temp = {:.3R} C", zsCalcSizing.CoolTstatTemp)); - ShowContinueError(state, format("...zone temperature = {:.3R} C", zsCalcSizing.ZoneTempAtCoolPeak)); - ShowContinueError(state, format("...supply air temperature = {:.3R} C", SupplyTemp)); - ShowContinueError(state, format("...temperature difference = {:.5R} C", DeltaTemp)); - ShowContinueError(state, format("...calculated volume flow rate = {:.5R} m3/s", (zsCalcSizing.DesCoolVolFlow))); - ShowContinueError(state, format("...calculated mass flow rate = {:.5R} kg/s", (zsCalcSizing.DesCoolMassFlow))); + ShowContinueError(state, EnergyPlus::format("...zone name = {}", zsCalcSizing.ZoneName)); + ShowContinueError(state, EnergyPlus::format("...design sensible cooling load = {:.2R} W", zsCalcSizing.DesCoolLoad)); + ShowContinueError(state, EnergyPlus::format("...thermostat set point temp = {:.3R} C", zsCalcSizing.CoolTstatTemp)); + ShowContinueError(state, EnergyPlus::format("...zone temperature = {:.3R} C", zsCalcSizing.ZoneTempAtCoolPeak)); + ShowContinueError(state, EnergyPlus::format("...supply air temperature = {:.3R} C", SupplyTemp)); + ShowContinueError(state, EnergyPlus::format("...temperature difference = {:.5R} C", DeltaTemp)); + ShowContinueError(state, EnergyPlus::format("...calculated volume flow rate = {:.5R} m3/s", (zsCalcSizing.DesCoolVolFlow))); + ShowContinueError(state, EnergyPlus::format("...calculated mass flow rate = {:.5R} kg/s", (zsCalcSizing.DesCoolMassFlow))); if (SupplyTemp > zsCalcSizing.ZoneTempAtCoolPeak) { ShowContinueError(state, "...Note: supply air temperature should be less than zone temperature during cooling air flow calculations"); } } else if (std::abs(DeltaTemp) > HVAC::SmallTempDiff && SupplyTemp > zsCalcSizing.ZoneTempAtCoolPeak) { ShowSevereError(state, "UpdateZoneSizing: Supply air temperature is greater than zone temperature during cooling air flow calculations"); - ShowContinueError(state, format("...calculated volume flow rate = {:.5R} m3/s", (zsCalcSizing.DesCoolVolFlow))); - ShowContinueError(state, format("...calculated mass flow rate = {:.5R} kg/s", (zsCalcSizing.DesCoolMassFlow))); - ShowContinueError(state, format("...thermostat set point temp = {:.3R} C", zsCalcSizing.CoolTstatTemp)); - ShowContinueError(state, format("...zone temperature = {:.3R} C", zsCalcSizing.ZoneTempAtCoolPeak)); - ShowContinueError(state, format("...supply air temperature = {:.3R} C", SupplyTemp)); - ShowContinueError(state, format("...occurs in zone = {}", zsCalcSizing.ZoneName)); + ShowContinueError(state, EnergyPlus::format("...calculated volume flow rate = {:.5R} m3/s", (zsCalcSizing.DesCoolVolFlow))); + ShowContinueError(state, EnergyPlus::format("...calculated mass flow rate = {:.5R} kg/s", (zsCalcSizing.DesCoolMassFlow))); + ShowContinueError(state, EnergyPlus::format("...thermostat set point temp = {:.3R} C", zsCalcSizing.CoolTstatTemp)); + ShowContinueError(state, EnergyPlus::format("...zone temperature = {:.3R} C", zsCalcSizing.ZoneTempAtCoolPeak)); + ShowContinueError(state, EnergyPlus::format("...supply air temperature = {:.3R} C", SupplyTemp)); + ShowContinueError(state, EnergyPlus::format("...occurs in zone = {}", zsCalcSizing.ZoneName)); ShowContinueError(state, "...Note: supply air temperature should be less than zone temperature during cooling air flow calculations"); } } @@ -2345,14 +2350,14 @@ void updateZoneSizingEndZoneSizingCalc2(EnergyPlusData &state, DataSizing::ZoneS ShowSevereError(state, "UpdateZoneSizing: Heating supply air temperature (calculated) within 2C of zone temperature"); } ShowContinueError(state, "...check zone thermostat set point and design supply air temperatures"); - ShowContinueError(state, format("...zone name = {}", zsCalcSizing.ZoneName)); - ShowContinueError(state, format("...design heating load = {:.2R} W", zsCalcSizing.DesHeatLoad)); - ShowContinueError(state, format("...thermostat set point temp = {:.3R} C", zsCalcSizing.HeatTstatTemp)); - ShowContinueError(state, format("...zone temperature = {:.3R} C", zsCalcSizing.ZoneTempAtHeatPeak)); - ShowContinueError(state, format("...supply air temperature = {:.3R} C", SupplyTemp)); - ShowContinueError(state, format("...temperature difference = {:.5R} C", DeltaTemp)); - ShowContinueError(state, format("...calculated volume flow rate = {:.5R} m3/s", (zsCalcSizing.DesHeatVolFlow))); - ShowContinueError(state, format("...calculated mass flow rate = {:.5R} kg/s", (zsCalcSizing.DesHeatMassFlow))); + ShowContinueError(state, EnergyPlus::format("...zone name = {}", zsCalcSizing.ZoneName)); + ShowContinueError(state, EnergyPlus::format("...design heating load = {:.2R} W", zsCalcSizing.DesHeatLoad)); + ShowContinueError(state, EnergyPlus::format("...thermostat set point temp = {:.3R} C", zsCalcSizing.HeatTstatTemp)); + ShowContinueError(state, EnergyPlus::format("...zone temperature = {:.3R} C", zsCalcSizing.ZoneTempAtHeatPeak)); + ShowContinueError(state, EnergyPlus::format("...supply air temperature = {:.3R} C", SupplyTemp)); + ShowContinueError(state, EnergyPlus::format("...temperature difference = {:.5R} C", DeltaTemp)); + ShowContinueError(state, EnergyPlus::format("...calculated volume flow rate = {:.5R} m3/s", (zsCalcSizing.DesHeatVolFlow))); + ShowContinueError(state, EnergyPlus::format("...calculated mass flow rate = {:.5R} kg/s", (zsCalcSizing.DesHeatMassFlow))); if (SupplyTemp < zsCalcSizing.ZoneTempAtHeatPeak) { ShowContinueError(state, "...Note: supply air temperature should be greater than zone temperature during heating air " @@ -2360,12 +2365,14 @@ void updateZoneSizingEndZoneSizingCalc2(EnergyPlusData &state, DataSizing::ZoneS } } else if (std::abs(DeltaTemp) > HVAC::SmallTempDiff && SupplyTemp < zsCalcSizing.ZoneTempAtHeatPeak) { ShowSevereError(state, "UpdateZoneSizing: Supply air temperature is less than zone temperature during heating air flow calculations"); - ShowContinueError(state, format("...calculated design heating volume flow rate = {:.5R} m3/s", (zsCalcSizing.DesHeatVolFlow))); - ShowContinueError(state, format("...calculated design heating mass flow rate = {:.5R} kg/s", (zsCalcSizing.DesHeatMassFlow))); - ShowContinueError(state, format("...thermostat set point temp = {:.3R} C", zsCalcSizing.HeatTstatTemp)); - ShowContinueError(state, format("...zone temperature = {:.3R} C", zsCalcSizing.ZoneTempAtHeatPeak)); - ShowContinueError(state, format("...supply air temperature = {:.3R} C", SupplyTemp)); - ShowContinueError(state, format("...occurs in zone = {}", zsCalcSizing.ZoneName)); + ShowContinueError(state, + EnergyPlus::format("...calculated design heating volume flow rate = {:.5R} m3/s", (zsCalcSizing.DesHeatVolFlow))); + ShowContinueError(state, + EnergyPlus::format("...calculated design heating mass flow rate = {:.5R} kg/s", (zsCalcSizing.DesHeatMassFlow))); + ShowContinueError(state, EnergyPlus::format("...thermostat set point temp = {:.3R} C", zsCalcSizing.HeatTstatTemp)); + ShowContinueError(state, EnergyPlus::format("...zone temperature = {:.3R} C", zsCalcSizing.ZoneTempAtHeatPeak)); + ShowContinueError(state, EnergyPlus::format("...supply air temperature = {:.3R} C", SupplyTemp)); + ShowContinueError(state, EnergyPlus::format("...occurs in zone = {}", zsCalcSizing.ZoneName)); ShowContinueError(state, "...Note: supply air temperature should be greater than zone temperature during heating air " "flow calculations"); @@ -2389,7 +2396,7 @@ std::string sizingPeakTimeStamp(EnergyPlusData const &state, int timeStepIndex) Real64 timeInSeconds = timeStepIndex * state.dataGlobal->MinutesInTimeStep * minToSec; General::ParseTime(timeInSeconds, hour, minute, second); - return format(PeakHrMinFmt, hour, minute); + return EnergyPlus::format(PeakHrMinFmt, hour, minute); } void writeZszSpsz(EnergyPlusData &state, @@ -3027,9 +3034,10 @@ 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, - format("{}: Thermostat cooling set point temperatures are not initialized for Zone = {}", RoutineName, zsFinalSizing.ZoneName)); + ShowSevereError(state, + EnergyPlus::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()); @@ -3176,8 +3184,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, format("{}: Thermostat heating set point temperatures not initialized for Zone = {}", RoutineName, zsFinalSizing.ZoneName)); + ShowSevereError(state, + EnergyPlus::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()); @@ -3599,10 +3608,11 @@ void SimZoneEquipment(EnergyPlusData &state, bool const FirstHVACIteration, bool break; } default: { - ShowSevereError(state, format("Error found in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).Name)); - ShowContinueError( - state, - format("Invalid Supply Air Path Component={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).ComponentType(CompNum))); + 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))); ShowFatalError(state, "Preceding condition causes termination."); break; @@ -4153,10 +4163,11 @@ void SimZoneEquipment(EnergyPlusData &state, bool const FirstHVACIteration, bool } break; default: { - ShowSevereError(state, format("Error found in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).Name)); - ShowContinueError( - state, - format("Invalid Supply Air Path Component={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).ComponentType(CompNum))); + 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))); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -5218,25 +5229,27 @@ 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, - format("In zone {} there is unbalanced air flow. Load due to induced outdoor air is neglected.", - thisZoneEquip.ZoneName)); + ShowWarningError( + state, + EnergyPlus::format("In zone {} there is unbalanced air flow. Load due to induced outdoor air is neglected.", + thisZoneEquip.ZoneName)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - format(" Flows [m3/s]: Inlets: {:.6R} Unbalanced exhausts: {:.6R} Returns: {:.6R}", - thisZoneEquip.TotInletAirMassFlowRate / state.dataEnvrn->StdRhoAir, - sysUnbalExhaust / state.dataEnvrn->StdRhoAir, - totalZoneReturnMassFlow / state.dataEnvrn->StdRhoAir)); + EnergyPlus::format(" Flows [m3/s]: Inlets: {:.6R} Unbalanced exhausts: {:.6R} Returns: {:.6R}", + thisZoneEquip.TotInletAirMassFlowRate / state.dataEnvrn->StdRhoAir, + sysUnbalExhaust / state.dataEnvrn->StdRhoAir, + totalZoneReturnMassFlow / state.dataEnvrn->StdRhoAir)); ShowContinueError(state, - format(" Infiltration: {:.6R} Zone Ventilation: {:.6R} Mixing (incoming): {:.6R}", - thisZoneHB.OAMFL / rhoZone, - thisZoneHB.VAMFL / rhoZone, - thisZoneHB.MixingMassFlowZone / rhoZone)); + EnergyPlus::format(" Infiltration: {:.6R} Zone Ventilation: {:.6R} Mixing (incoming): {:.6R}", + thisZoneHB.OAMFL / rhoZone, + thisZoneHB.VAMFL / rhoZone, + thisZoneHB.MixingMassFlowZone / rhoZone)); ShowContinueError( state, - format(" Imbalance (excess outflow): {:.6R} Total system OA flow (for all airloops serving this zone): {:.6R}", - unbalancedVolFlow, - thisZoneEquip.TotAvailAirLoopOA / state.dataEnvrn->StdRhoAir)); + EnergyPlus::format( + " Imbalance (excess outflow): {:.6R} Total system OA flow (for all airloops serving this zone): {:.6R}", + unbalancedVolFlow, + thisZoneEquip.TotAvailAirLoopOA / state.dataEnvrn->StdRhoAir)); ShowContinueError(state, " This error will only be reported once per zone."); thisZoneEquip.FlowError = true; } @@ -5761,10 +5774,11 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (hybridControlVentilation.MinIndoorTemperature > hybridControlVentilation.MaxIndoorTemperature) { ++hybridControlVentilation.IndoorTempErrCount; if (hybridControlVentilation.IndoorTempErrCount < 2) { - ShowWarningError(state, - format("Ventilation indoor temperature control: The minimum indoor temperature is above the maximum indoor " - "temperature in {}", - hybridControlVentilation.Name)); + ShowWarningError( + state, + EnergyPlus::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 { @@ -5788,10 +5802,11 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (hybridControlVentilation.MinOutdoorTemperature > hybridControlVentilation.MaxOutdoorTemperature) { ++hybridControlVentilation.OutdoorTempErrCount; if (hybridControlVentilation.OutdoorTempErrCount < 2) { - ShowWarningError(state, - format("Ventilation outdoor temperature control: The minimum outdoor temperature is above the maximum " - "outdoor temperature in {}", - hybridControlVentilation.Name)); + ShowWarningError( + state, + EnergyPlus::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 { @@ -6104,8 +6119,9 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (thisMixing.IndoorTempErrCount < 2) { ShowWarningError( state, - format("Mixing zone temperature control: The minimum zone temperature is above the maximum zone temperature in {}", - thisMixing.Name)); + EnergyPlus::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 { @@ -6141,8 +6157,9 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (thisMixing.SourceTempErrCount < 2) { ShowWarningError( state, - format("Mixing source temperature control: The minimum source temperature is above the maximum source temperature in {}", - thisMixing.Name)); + EnergyPlus::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."); ShowContinueErrorTimeStamp(state, " Occurrence info:"); } else { @@ -6177,10 +6194,11 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (MixingTmin > MixingTmax) { ++thisMixing.OutdoorTempErrCount; if (thisMixing.OutdoorTempErrCount < 2) { - ShowWarningError(state, - format("Mixing outdoor temperature control: The minimum outdoor temperature is above the maximum " - "outdoor temperature in {}", - thisMixing.Name)); + ShowWarningError( + state, + EnergyPlus::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 { @@ -6373,8 +6391,9 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (thisCrossMixing.IndoorTempErrCount < 2) { ShowWarningError( state, - format("CrossMixing zone temperature control: The minimum zone temperature is above the maximum zone temperature in {}", - thisCrossMixing.Name)); + EnergyPlus::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."); ShowContinueErrorTimeStamp(state, " Occurrence info:"); } else { @@ -6408,10 +6427,11 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (MixingTmin > MixingTmax) { ++thisCrossMixing.SourceTempErrCount; if (thisCrossMixing.SourceTempErrCount < 2) { - ShowWarningError(state, - format("CrossMixing source temperature control: The minimum source temperature is above the maximum source " - "temperature in {}", - thisCrossMixing.Name)); + ShowWarningError( + state, + EnergyPlus::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 { @@ -6446,10 +6466,11 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (MixingTmin > MixingTmax) { ++thisCrossMixing.OutdoorTempErrCount; if (thisCrossMixing.OutdoorTempErrCount < 2) { - ShowWarningError(state, - format("CrossMixing outdoor temperature control: The minimum outdoor temperature is above the maximum " - "outdoor temperature in {}", - state.dataHeatBal->Mixing(j).Name)); + ShowWarningError( + state, + EnergyPlus::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 { @@ -7047,7 +7068,7 @@ void AutoCalcDOASControlStrategy(EnergyPlusData &state) headerAlreadyPrinted); } if (zoneSizingInput.DOASLowSetpoint > zoneSizingInput.DOASHighSetpoint) { - ShowSevereError(state, format("For Sizing:Zone = {}", zoneSizingInput.ZoneName)); + ShowSevereError(state, EnergyPlus::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 c283683c5dc..43f1b9532a3 100644 --- a/src/EnergyPlus/ZonePlenum.cc +++ b/src/EnergyPlus/ZonePlenum.cc @@ -122,7 +122,7 @@ void SimAirZonePlenum(EnergyPlusData &state, if (CompIndex == 0) { ZonePlenumNum = Util::FindItemInList(CompName, state.dataZonePlenum->ZoneRetPlenCond, &ZoneReturnPlenumConditions::ZonePlenumName); if (ZonePlenumNum == 0) { - ShowFatalError(state, format("SimAirZonePlenum: AirLoopHVAC:ReturnPlenum not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimAirZonePlenum: AirLoopHVAC:ReturnPlenum not found={}", CompName)); } CompIndex = ZonePlenumNum; } else { @@ -130,19 +130,20 @@ void SimAirZonePlenum(EnergyPlusData &state, if (ZonePlenumNum > state.dataZonePlenum->NumZoneReturnPlenums || ZonePlenumNum < 1) { ShowFatalError( state, - format("SimAirZonePlenum: Invalid CompIndex passed={}, Number of AirLoopHVAC:ReturnPlenum={}, AirLoopHVAC:ReturnPlenum name={}", - ZonePlenumNum, - state.dataZonePlenum->NumZoneReturnPlenums, - CompName)); + EnergyPlus::format( + "SimAirZonePlenum: Invalid CompIndex passed={}, Number of AirLoopHVAC:ReturnPlenum={}, AirLoopHVAC:ReturnPlenum name={}", + ZonePlenumNum, + state.dataZonePlenum->NumZoneReturnPlenums, + CompName)); } if (state.dataZonePlenum->ZoneRetPlenCond(ZonePlenumNum).checkEquipName) { if (CompName != state.dataZonePlenum->ZoneRetPlenCond(ZonePlenumNum).ZonePlenumName) { ShowFatalError(state, - format("SimAirZonePlenum: Invalid CompIndex passed={}, AirLoopHVAC:ReturnPlenum name={}, stored " - "AirLoopHVAC:ReturnPlenum Name for that index={}", - ZonePlenumNum, - CompName, - state.dataZonePlenum->ZoneRetPlenCond(ZonePlenumNum).ZonePlenumName)); + EnergyPlus::format("SimAirZonePlenum: Invalid CompIndex passed={}, AirLoopHVAC:ReturnPlenum name={}, stored " + "AirLoopHVAC:ReturnPlenum Name for that index={}", + ZonePlenumNum, + CompName, + state.dataZonePlenum->ZoneRetPlenCond(ZonePlenumNum).ZonePlenumName)); } state.dataZonePlenum->ZoneRetPlenCond(ZonePlenumNum).checkEquipName = false; } @@ -159,7 +160,7 @@ void SimAirZonePlenum(EnergyPlusData &state, if (CompIndex == 0) { ZonePlenumNum = Util::FindItemInList(CompName, state.dataZonePlenum->ZoneSupPlenCond, &ZoneSupplyPlenumConditions::ZonePlenumName); if (ZonePlenumNum == 0) { - ShowFatalError(state, format("SimAirZonePlenum: AirLoopHVAC:SupplyPlenum not found={}", CompName)); + ShowFatalError(state, EnergyPlus::format("SimAirZonePlenum: AirLoopHVAC:SupplyPlenum not found={}", CompName)); } CompIndex = ZonePlenumNum; } else { @@ -167,19 +168,20 @@ void SimAirZonePlenum(EnergyPlusData &state, if (ZonePlenumNum > state.dataZonePlenum->NumZoneSupplyPlenums || ZonePlenumNum < 1) { ShowFatalError( state, - format("SimAirZonePlenum: Invalid CompIndex passed={}, Number of AirLoopHVAC:SupplyPlenum={}, AirLoopHVAC:SupplyPlenum name={}", - ZonePlenumNum, - state.dataZonePlenum->NumZoneReturnPlenums, - CompName)); + EnergyPlus::format( + "SimAirZonePlenum: Invalid CompIndex passed={}, Number of AirLoopHVAC:SupplyPlenum={}, AirLoopHVAC:SupplyPlenum name={}", + ZonePlenumNum, + state.dataZonePlenum->NumZoneReturnPlenums, + CompName)); } if (state.dataZonePlenum->ZoneSupPlenCond(ZonePlenumNum).checkEquipName) { if (CompName != state.dataZonePlenum->ZoneSupPlenCond(ZonePlenumNum).ZonePlenumName) { ShowFatalError(state, - format("SimAirZonePlenum: Invalid CompIndex passed={}, AirLoopHVAC:SupplyPlenum name={}, stored " - "AirLoopHVAC:SupplyPlenum Name for that index={}", - ZonePlenumNum, - CompName, - state.dataZonePlenum->ZoneSupPlenCond(ZonePlenumNum).ZonePlenumName)); + EnergyPlus::format("SimAirZonePlenum: Invalid CompIndex passed={}, AirLoopHVAC:SupplyPlenum name={}, stored " + "AirLoopHVAC:SupplyPlenum Name for that index={}", + ZonePlenumNum, + CompName, + state.dataZonePlenum->ZoneSupPlenCond(ZonePlenumNum).ZonePlenumName)); } state.dataZonePlenum->ZoneSupPlenCond(ZonePlenumNum).checkEquipName = false; } @@ -192,8 +194,8 @@ void SimAirZonePlenum(EnergyPlusData &state, UpdateAirZoneSupplyPlenum(state, ZonePlenumNum, PlenumInletChanged, FirstCall); } else { - ShowSevereError(state, format("SimAirZonePlenum: Errors in Plenum={}", CompName)); - ShowContinueError(state, format("ZonePlenum: Unhandled plenum type found:{}", iCompType)); + ShowSevereError(state, EnergyPlus::format("SimAirZonePlenum: Errors in Plenum={}", CompName)); + ShowContinueError(state, EnergyPlus::format("ZonePlenum: Unhandled plenum type found:{}", iCompType)); ShowFatalError(state, "Preceding conditions cause termination."); } } @@ -301,17 +303,19 @@ void GetZonePlenumInput(EnergyPlusData &state) // Check if this zone is also used in another return plenum IOStat = Util::FindItemInList(AlphArray(2), state.dataZonePlenum->ZoneRetPlenCond, &ZoneReturnPlenumConditions::ZoneName, ZonePlenumNum - 1); if (IOStat != 0) { - ShowSevereError(state, - format("{}{} \"{}\" is used more than once as a {}.", RoutineName, cAlphaFields(2), AlphArray(2), CurrentModuleObject)); - ShowContinueError(state, format("..Only one {} object may be connected to a given zone.", CurrentModuleObject)); - ShowContinueError(state, format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); + ShowSevereError( + state, + EnergyPlus::format("{}{} \"{}\" is used more than once as a {}.", RoutineName, cAlphaFields(2), AlphArray(2), CurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("..Only one {} object may be connected to a given zone.", CurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } thisRetPlenum.ZoneName = AlphArray(2); // put the X-Ref to the zone heat balance data structure thisRetPlenum.ActualZoneNum = Util::FindItemInList(AlphArray(2), state.dataHeatBal->Zone); if (thisRetPlenum.ActualZoneNum == 0) { - ShowSevereError(state, format("For {} = {}, {} = {} not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); + ShowSevereError(state, + EnergyPlus::format("For {} = {}, {} = {} not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); ErrorsFound = true; continue; } @@ -323,9 +327,9 @@ void GetZonePlenumInput(EnergyPlusData &state) if (ZoneEquipConfigLoop != 0) { ShowSevereError( state, - format( + EnergyPlus::format( "{}{} \"{}\" is a controlled zone. It cannot be used as a {}", RoutineName, cAlphaFields(2), AlphArray(2), CurrentModuleObject)); - ShowContinueError(state, format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -399,16 +403,16 @@ void GetZonePlenumInput(EnergyPlusData &state) if (!CheckPurchasedAirForReturnPlenum(state, ZonePlenumNum)) { CheckUniqueNodeNumbers(state, "Return Plenum Induced Air Nodes", UniqueNodeError, NodeNums(NodeNum), CurrentModuleObject); if (UniqueNodeError) { - ShowContinueError(state, format("Occurs for ReturnPlenum = {}", AlphArray(1))); + ShowContinueError(state, EnergyPlus::format("Occurs for ReturnPlenum = {}", AlphArray(1))); ErrorsFound = true; } PIUInducesPlenumAir(state, thisRetPlenum.InducedNode(NodeNum), ZonePlenumNum); } } } else { - ShowContinueError( - state, - format("Invalid Induced Air Outlet Node or NodeList name in AirLoopHVAC:ReturnPlenum object = {}", thisRetPlenum.ZonePlenumName)); + ShowContinueError(state, + EnergyPlus::format("Invalid Induced Air Outlet Node or NodeList name in AirLoopHVAC:ReturnPlenum object = {}", + thisRetPlenum.ZonePlenumName)); ErrorsFound = true; } @@ -486,24 +490,26 @@ void GetZonePlenumInput(EnergyPlusData &state) // Check if this zone is also used in another plenum IOStat = Util::FindItemInList(AlphArray(2), state.dataZonePlenum->ZoneSupPlenCond, &ZoneSupplyPlenumConditions::ZoneName, ZonePlenumNum - 1); if (IOStat != 0) { - ShowSevereError(state, - format("{}{} \"{}\" is used more than once as a {}.", RoutineName, cAlphaFields(2), AlphArray(2), CurrentModuleObject)); - ShowContinueError(state, format("..Only one {} object may be connected to a given zone.", CurrentModuleObject)); - ShowContinueError(state, format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); + ShowSevereError( + state, + EnergyPlus::format("{}{} \"{}\" is used more than once as a {}.", RoutineName, cAlphaFields(2), AlphArray(2), CurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("..Only one {} object may be connected to a given zone.", CurrentModuleObject)); + ShowContinueError(state, EnergyPlus::format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } if (state.dataZonePlenum->NumZoneReturnPlenums > 0) { // Check if this zone is also used in another plenum IOStat = Util::FindItemInList(AlphArray(2), state.dataZonePlenum->ZoneRetPlenCond, &ZoneReturnPlenumConditions::ZoneName); if (IOStat != 0) { ShowSevereError(state, - format("{}{} \"{}\" is used more than once as a {} or AirLoopHVAC:ReturnPlenum.", - RoutineName, - cAlphaFields(2), - AlphArray(2), - CurrentModuleObject)); - ShowContinueError(state, - format("..Only one {} or AirLoopHVAC:ReturnPlenum object may be connected to a given zone.", CurrentModuleObject)); - ShowContinueError(state, format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); + EnergyPlus::format("{}{} \"{}\" is used more than once as a {} or AirLoopHVAC:ReturnPlenum.", + RoutineName, + cAlphaFields(2), + 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))); ErrorsFound = true; } } @@ -511,7 +517,8 @@ void GetZonePlenumInput(EnergyPlusData &state) // put the X-Ref to the zone heat balance data structure thisSupPlenum.ActualZoneNum = Util::FindItemInList(AlphArray(2), state.dataHeatBal->Zone); if (thisSupPlenum.ActualZoneNum == 0) { - ShowSevereError(state, format("For {} = {}, {} = {} not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); + ShowSevereError(state, + EnergyPlus::format("For {} = {}, {} = {} not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); ErrorsFound = true; continue; } @@ -525,12 +532,12 @@ void GetZonePlenumInput(EnergyPlusData &state) ZoneEquipConfigLoop = Util::FindItemInList(AlphArray(2), state.dataZoneEquip->ZoneEquipConfig, &EquipConfiguration::ZoneName); if (ZoneEquipConfigLoop != 0) { ShowSevereError(state, - format("{}{} \"{}\" is a controlled zone. It cannot be used as a {} or AirLoopHVAC:ReturnPlenum.", - RoutineName, - cAlphaFields(2), - AlphArray(2), - CurrentModuleObject)); - ShowContinueError(state, format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); + 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))); ErrorsFound = true; } } @@ -632,7 +639,7 @@ void GetZonePlenumInput(EnergyPlusData &state) NodeNums.deallocate(); if (ErrorsFound) { - ShowFatalError(state, format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -713,9 +720,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, - format("No return plenum found for simple duct leakage for ZoneHVAC:AirDistributionUnit={} in Zone={}", - thisADU.Name, - state.dataZoneEquip->ZoneEquipConfig(thisADU.ZoneEqNum).ZoneName)); + EnergyPlus::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 47a964cb273..1546cbe981e 100644 --- a/src/EnergyPlus/ZoneTempPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneTempPredictorCorrector.cc @@ -371,7 +371,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } if (ErrorsFound) { - ShowSevereError(state, format("GetZoneAirSetpoints: Errors with invalid names in {} objects.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::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->NumTempControlledZones = 0; } @@ -497,22 +497,23 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } } else { ShowSevereError(state, - format("{}=\"{} invalid {}=[{:.0T}].", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(1), - s_ipsc->rNumericArgs(1))); + EnergyPlus::format("{}=\"{} invalid {}=[{:.0T}].", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(1), + s_ipsc->rNumericArgs(1))); ShowContinueError(state, "..Allowable values must be greater or equal to 0"); ErrorsFound = true; } } if (tempZone.DeltaTCutSet > 0.0 && !tempZone.setpts[(int)HVAC::SetptType::SingleHeatCool].Name.empty()) { - ShowWarningError(state, - format("{}=\"{}: The choice of Temperature Difference Between Cutout And Setpoint will not be applied " - "to ThermostatSetpoint:SingleHeatingOrCooling.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + ShowWarningError( + state, + EnergyPlus::format("{}=\"{}: The choice of Temperature Difference Between Cutout And Setpoint will not be applied " + "to ThermostatSetpoint:SingleHeatingOrCooling.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); } } } // NumTStatStatements @@ -684,8 +685,9 @@ void GetZoneAirSetPoints(EnergyPlusData &state) int setptIdx = Util::FindItem(setpt.Name, s_ztpc->tempSetptScheds[(int)setptType]); if (setptIdx <= 0) { - ShowSevereError(state, - format("ZoneControl:Thermostat = {}, control name = {} was not found in ThermostatSetpoint object type = {}.", + ShowSevereError( + state, + EnergyPlus::format("ZoneControl:Thermostat = {}, control name = {} was not found in ThermostatSetpoint object type = {}.", tempZone.Name, setpt.Name, setptTypeNames[(int)setptType])); @@ -724,7 +726,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (SchedMin == (int)HVAC::SetptType::Uncontrolled && SchedMax == (int)HVAC::SetptType::Uncontrolled) { if (FindNumberInList(tempZone.setptTypeSched->Num, CTSchedMapToControlledZone, state.dataZoneCtrls->NumTempControlledZones) == 0) { - ShowSevereError(state, format("Control Type Schedule={}", tempZone.setptTypeSched->Name)); + ShowSevereError(state, EnergyPlus::format("Control Type Schedule={}", tempZone.setptTypeSched->Name)); ShowContinueError(state, "..specifies control type 0 for all entries."); ShowContinueError(state, "All zones using this Control Type Schedule have no heating or cooling available."); } @@ -737,12 +739,13 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (!setpt.isUsed) { // Catch early issues if (tempZone.setptTypeSched->hasVal(state, (int)setptType)) { - ShowSevereError(state, format("Control Type Schedule={}", tempZone.setptTypeSched->Name)); - ShowContinueError( - state, - format("..specifies {} ({}) as the control type. Not valid for this zone.", (int)setptType, setptTypeNames[(int)setptType])); - ShowContinueError(state, format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), tempZone.Name)); - ShowContinueError(state, format("..reference ZONE={}", tempZone.ZoneName)); + ShowSevereError(state, EnergyPlus::format("Control Type Schedule={}", tempZone.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), tempZone.Name)); + ShowContinueError(state, EnergyPlus::format("..reference ZONE={}", tempZone.ZoneName)); ErrorsFound = true; } continue; @@ -752,12 +755,13 @@ void GetZoneAirSetPoints(EnergyPlusData &state) (setptType == HVAC::SetptType::SingleHeat || setptType == HVAC::SetptType::SingleHeatCool || setptType == HVAC::SetptType::DualHeatCool) && tempZone.setptTypeSched->hasVal(state, (int)setptType)) { - ShowSevereError(state, format("Control Type Schedule={}", tempZone.setptTypeSched->Name)); - ShowContinueError( - state, - format("..specifies {} ({}) as the control type. Not valid for this zone.", (int)setptType, setptTypeNames[(int)setptType])); - ShowContinueError(state, format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), tempZone.Name)); - ShowContinueError(state, format("..reference ZONE={}", tempZone.ZoneName)); + ShowSevereError(state, EnergyPlus::format("Control Type Schedule={}", tempZone.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), tempZone.Name)); + ShowContinueError(state, EnergyPlus::format("..reference ZONE={}", tempZone.ZoneName)); ErrorsFound = true; } @@ -765,12 +769,13 @@ void GetZoneAirSetPoints(EnergyPlusData &state) (setptType == HVAC::SetptType::SingleCool || setptType == HVAC::SetptType::SingleHeatCool || setptType == HVAC::SetptType::DualHeatCool) && tempZone.setptTypeSched->hasVal(state, (int)setptType)) { - ShowSevereError(state, format("Control Type Schedule={}", tempZone.setptTypeSched->Name)); - ShowContinueError( - state, - format("..specifies {} ({}) as the control type. Not valid for this zone.", (int)setptType, setptTypeNames[(int)setptType])); - ShowContinueError(state, format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), tempZone.Name)); - ShowContinueError(state, format("..reference ZONE={}", tempZone.ZoneName)); + ShowSevereError(state, EnergyPlus::format("Control Type Schedule={}", tempZone.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), tempZone.Name)); + ShowContinueError(state, EnergyPlus::format("..reference ZONE={}", tempZone.ZoneName)); ErrorsFound = true; } } // for (setptType) @@ -793,10 +798,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (!TStatControlTypes(TempControlledZoneNum).MustHave[(int)setptType]) { continue; } - ShowWarningError(state, format("Schedule={}", tempZone.setptTypeSched->Name)); - ShowContinueError(state, format("...should include control type {} ({}) but does not.", (int)setptType, setptTypeNames[(int)setptType])); - ShowContinueError(state, format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), tempZone.Name)); - ShowContinueError(state, format("..reference ZONE={}", tempZone.ZoneName)); + 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)); } } @@ -843,11 +849,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) humidControlledZone.ActualZoneNum = Util::FindItem(s_ipsc->cAlphaArgs(2), Zone); if (humidControlledZone.ActualZoneNum == 0) { ShowSevereError(state, - format("{}=\"{} invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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; @@ -914,18 +920,18 @@ void GetZoneAirSetPoints(EnergyPlusData &state) ComfortTStatObjects(Item).ZoneOrZoneListPtr = ZLItem; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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, format("GetZoneAirSetpoints: Errors with invalid names in {} objects.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::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; } @@ -999,11 +1005,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // Could not find a people object for this particular zone if (IZoneCount == 0 && comfortZone.ActualZoneNum > 0) { ShowSevereError(state, - format("{}=\"{} no PEOPLE in {}=\"{}\" - cannot use Comfort Control.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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; } @@ -1041,40 +1047,42 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // Check activity level if (people.activityLevelSched == nullptr) { - ShowSevereError(state, format("GetPeople Activity Level: Activity level schedule is not found={}", people.Name)); + ShowSevereError(state, EnergyPlus::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, format("Outside of range values [72,909], Reference object={}", people.Name)); + ShowContinueError(state, EnergyPlus::format("Outside of range values [72,909], Reference object={}", people.Name)); } // Check Work Efficiency if (people.workEffSched == nullptr) { - ShowSevereError(state, format("GetPeople work efficiency: Work efficiency schedule is not found={}", people.Name)); + ShowSevereError(state, + EnergyPlus::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, format("Outside of range values [0,1], Reference object={}", people.Name)); + ShowContinueError(state, EnergyPlus::format("Outside of range values [0,1], Reference object={}", people.Name)); ErrorsFound = true; } // Check Clothing Insulation if (people.clothingSched == nullptr) { - ShowSevereError(state, format("GetPeople Clothing Insulation: Clothing Insulation schedule is not found={}", people.Name)); + ShowSevereError( + state, EnergyPlus::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, format("Outside of range values [0.0,2.0], Reference object={}", people.Name)); + ShowContinueError(state, EnergyPlus::format("Outside of range values [0.0,2.0], Reference object={}", people.Name)); ErrorsFound = true; } // Check Air velocity if (people.airVelocitySched == nullptr) { - ShowSevereError(state, format("GetPeople Air Velocity: Air velocity schedule is not found={}", people.Name)); + ShowSevereError(state, EnergyPlus::format("GetPeople Air Velocity: Air velocity schedule is not found={}", people.Name)); ShowContinueError(state, "Required when the zone has Thermal Comfort Controls."); ErrorsFound = true; } @@ -1085,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, - format("{}=\"{} invalid {}=[{:.0T}].", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(1), - s_ipsc->rNumericArgs(1))); + EnergyPlus::format("{}=\"{} invalid {}=[{:.0T}].", + 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; } @@ -1098,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, - format("{}=\"{} invalid {}=[{:.0T}].", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(2), - s_ipsc->rNumericArgs(2))); + EnergyPlus::format("{}=\"{} invalid {}=[{:.0T}].", + 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, format("{}=\"{}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("..{} > {}", s_ipsc->cNumericFieldNames(1), s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, format("..[{:.0T}] > [{:.0T}].", s_ipsc->rNumericArgs(1), s_ipsc->rNumericArgs(2))); + 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))); ErrorsFound = true; } // If MaxTemp = MinTemp, no thermal comfort control if (comfortZone.TdbMinSetPoint == comfortZone.TdbMaxSetPoint) { - ShowSevereError(state, format("{}=\"{}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, format("..{} = {}", s_ipsc->cNumericFieldNames(1), s_ipsc->cNumericFieldNames(2))); + 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, "The zone will be controlled using this dry-bulb temperature setpoint."); } @@ -1372,7 +1380,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, format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); + ShowWarningError(state, EnergyPlus::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."); } @@ -1391,12 +1399,13 @@ void GetZoneAirSetPoints(EnergyPlusData &state) (setptType == HVAC::SetptType::SingleHeat || setptType == HVAC::SetptType::SingleHeatCool || setptType == HVAC::SetptType::DualHeatCool) && comfortZone.setptTypeSched->hasVal(state, (int)setptType)) { - ShowSevereError(state, format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); - ShowContinueError( - state, - format("..specifies {} ({}) as the control type. Not valid for this zone.", (int)setptType, setptTypeNames[(int)setptType])); - ShowContinueError(state, format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), comfortZone.Name)); - ShowContinueError(state, format("..reference ZONE={}", comfortZone.ZoneName)); + 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)); ErrorsFound = true; } @@ -1404,12 +1413,13 @@ void GetZoneAirSetPoints(EnergyPlusData &state) (setptType == HVAC::SetptType::SingleCool || setptType == HVAC::SetptType::SingleHeatCool || setptType == HVAC::SetptType::DualHeatCool) && comfortZone.setptTypeSched->hasVal(state, (int)setptType)) { - ShowSevereError(state, format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); - ShowContinueError( - state, - format("..specifies {} ({}) as the control type. Not valid for this zone.", (int)setptType, setptTypeNames[(int)setptType])); - ShowContinueError(state, format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), comfortZone.Name)); - ShowContinueError(state, format("..reference ZONE={}", comfortZone.ZoneName)); + 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)); ErrorsFound = true; } } // for (setptType) @@ -1433,11 +1443,12 @@ void GetZoneAirSetPoints(EnergyPlusData &state) continue; } - ShowWarningError(state, format("Schedule={}", comfortZone.setptTypeSched->Name)); - ShowContinueError(state, - format("...should include control type {} ({}) but does not.", (int)setptType, comfortSetptTypeNames[(int)setptType])); - ShowContinueError(state, format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TCTStat), comfortZone.Name)); - ShowContinueError(state, format("...reference ZONE={}", comfortZone.ZoneName)); + ShowWarningError(state, EnergyPlus::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)); } } @@ -1518,11 +1529,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } } @@ -1745,10 +1756,10 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // throw error } else { ShowSevereError(state, - format("{}={} invalid {} reference not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - cZControlTypes(static_cast(ZoneControlTypes::TStat)))); + EnergyPlus::format("{}={} invalid {} reference not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + cZControlTypes(static_cast(ZoneControlTypes::TStat)))); ErrorsFound = true; } } // loop over NumOpTempControlledZones @@ -1783,10 +1794,10 @@ void GetZoneAirSetPoints(EnergyPlusData &state) found = Util::FindItem(s_ipsc->cAlphaArgs(1), state.dataZoneCtrls->TempControlledZone); if (found == 0) { // throw error ShowSevereError(state, - format("{}={} invalid {} reference not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - cZControlTypes(static_cast(ZoneControlTypes::TStat)))); + EnergyPlus::format("{}={} invalid {} reference not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + cZControlTypes(static_cast(ZoneControlTypes::TStat)))); ErrorsFound = true; } else { TempControlledZoneNum = found; @@ -1959,17 +1970,17 @@ void GetZoneAirSetPoints(EnergyPlusData &state) state.dataZoneCtrls->StagedTStatObjects(Item).ZoneOrZoneListPtr = ZLItem; } else { ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + EnergyPlus::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, format("GetStagedDualSetpoint: Errors with invalid names in {} objects.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::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; } @@ -2021,14 +2032,14 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } else { stageZone.ZoneName = s_ipsc->cAlphaArgs(2); // for continuity ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" zone previously assigned.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); - ShowContinueError( - state, - format("...Zone was previously assigned to Setpt=\"{}\".", state.dataZoneCtrls->StageControlledZone(ZoneAssigned).Name)); + 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)); ErrorsFound = true; continue; } @@ -2092,11 +2103,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (s_ipsc->rNumericArgs(2 + i) >= s_ipsc->rNumericArgs(1 + i)) { ShowSevereCustom(state, eoh, - format("{} = {:.1R} must be less than than {}={:.1R}", - s_ipsc->cNumericFieldNames(2 + i), - s_ipsc->rNumericArgs(2 + i), - s_ipsc->cNumericFieldNames(1 + i), - s_ipsc->rNumericArgs(1 + i))); + EnergyPlus::format("{} = {:.1R} must be less than than {}={:.1R}", + s_ipsc->cNumericFieldNames(2 + i), + s_ipsc->rNumericArgs(2 + i), + s_ipsc->cNumericFieldNames(1 + i), + s_ipsc->rNumericArgs(1 + i))); ErrorsFound = true; } } @@ -2142,11 +2153,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (i > 1 && s_ipsc->rNumericArgs(8 + i) <= s_ipsc->rNumericArgs(7 + i)) { ShowSevereCustom(state, eoh, - format("{} = {:.1R} must be greater than {} = {:.1R}", - s_ipsc->cNumericFieldNames(8 + i), - s_ipsc->rNumericArgs(8 + i), - s_ipsc->cNumericFieldNames(7 + i), - s_ipsc->rNumericArgs(7 + i))); + EnergyPlus::format("{} = {:.1R} must be greater than {} = {:.1R}", + s_ipsc->cNumericFieldNames(8 + i), + s_ipsc->rNumericArgs(8 + i), + s_ipsc->cNumericFieldNames(7 + i), + s_ipsc->rNumericArgs(7 + i))); ErrorsFound = true; } } @@ -2158,8 +2169,9 @@ void GetZoneAirSetPoints(EnergyPlusData &state) (s_ip->getNumObjectsFound(state, "AirLoopHVAC:UnitarySystem") == 0) && (s_ip->getNumObjectsFound(state, "SetpointManager:SingleZone:OneStageCooling") == 0) && (s_ip->getNumObjectsFound(state, "SetpointManager:SingleZone:OneStageHeating") == 0)) { - ShowWarningError(state, - format("{} is applicable to only selected HVAC objects which are missing from input.", s_ipsc->cCurrentModuleObject)); + ShowWarningError( + state, + EnergyPlus::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( @@ -2268,8 +2280,8 @@ void CalculateMonthlyRunningAverageDryBulb(EnergyPlusData &state, Array1DSurfTAirRef(SurfNum) != TRefFlag) { ShowWarningError(state, - format("Different reference air temperatures for difference surfaces encountered in zone {}", - state.dataHeatBal->Zone(zoneNum).Name)); + EnergyPlus::format("Different reference air temperatures for difference surfaces encountered in zone {}", + state.dataHeatBal->Zone(zoneNum).Name)); } } } @@ -2681,9 +2693,10 @@ void InitZoneAirSetPoints(EnergyPlusData &state) auto &tempZone = state.dataZoneCtrls->TempControlledZone(Loop); if (state.dataZoneEquip->ZoneEquipInputsFilled && !s_ztpc->ControlledZonesChecked) { if (!VerifyControlledZoneForThermostat(state, tempZone.ZoneName)) { - ShowSevereError( - state, - format("{}Zone=\"{}\" has specified a Thermostatic control but is not a controlled zone.", RoutineName, tempZone.ZoneName)); + ShowSevereError(state, + EnergyPlus::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; } @@ -2742,8 +2755,10 @@ 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, format("{}Zone=\"{}\" has specified a Comfort control but is not a controlled zone.", RoutineName, comfortZone.ZoneName)); + ShowSevereError(state, + EnergyPlus::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; } @@ -2834,28 +2849,28 @@ void ZoneSpaceHeatBalanceData::beginEnvironmentInit(EnergyPlusData &state) void ZoneSpaceHeatBalanceData::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string const &name) { SetupOutputVariable(state, - format("{} Air Temperature", prefix), + EnergyPlus::format("{} Air Temperature", prefix), Constant::Units::C, this->ZT, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Humidity Ratio", prefix), + EnergyPlus::format("{} Air Humidity Ratio", prefix), Constant::Units::None, this->airHumRat, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Air Relative Humidity", prefix), + EnergyPlus::format("{} Air Relative Humidity", prefix), Constant::Units::Perc, this->airRelHum, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - format("{} Mean Radiant Temperature", prefix), + EnergyPlus::format("{} Mean Radiant Temperature", prefix), Constant::Units::C, this->MRT, OutputProcessor::TimeStepType::Zone, @@ -2926,8 +2941,9 @@ void PredictSystemLoads(EnergyPlusData &state, if (thisStageControlZone.StageErrCount < 2) { ShowWarningError( state, - format("ZoneControl:Thermostat:StagedDualSetpoint: The heating setpoint is equal to or above the cooling setpoint in {}", - thisStageControlZone.Name)); + EnergyPlus::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 { @@ -3091,10 +3107,10 @@ void PredictSystemLoads(EnergyPlusData &state, ShowSevereError(state, "DualSetPointWithDeadBand: When Temperature Difference Between Cutout And Setpoint is applied, the heating " "setpoint is greater than the cooling setpoint. "); - ShowContinueErrorTimeStamp(state, - format("occurs in Zone={}", state.dataHeatBal->Zone(thisTempControlledZone.ActualZoneNum).Name)); - ShowContinueError(state, format("Zone Heating ThermostatSetPoint={:.2R}", zoneTstatSetpt.setptLo)); - ShowContinueError(state, format("Zone Cooling ThermostatSetPoint={:.2R}", zoneTstatSetpt.setptHi)); + ShowContinueErrorTimeStamp( + state, EnergyPlus::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."); } } break; @@ -3407,10 +3423,10 @@ void CalcZoneAirTempSetPoints(EnergyPlusData &state) default: { ShowSevereError(state, - format("CalcZoneAirTempSetpoints: Illegal control type for Zone={}, Found value={}, in Schedule={}", - Zone(ActualZoneNum).Name, - TempControlType(ActualZoneNum), - tempZone.setptTypeSched->Name)); + EnergyPlus::format("CalcZoneAirTempSetpoints: Illegal control type for Zone={}, Found value={}, in Schedule={}", + Zone(ActualZoneNum).Name, + TempControlType(ActualZoneNum), + tempZone.setptTypeSched->Name)); } break; } // switch @@ -3541,11 +3557,11 @@ void ZoneSpaceHeatBalanceData::calcPredictedHumidityRatio(EnergyPlusData &state, // The FaultsThermostatOffset specified in the FaultHumidistatOffset is not found if (!IsThermostatFound) { - ShowSevereError( - state, - format("FaultModel:HumidistatOffset = \"{}\" invalid Reference Humidistat Offset Name = \"{}\" not found.", - state.dataFaultsMgr->FaultsHumidistatOffset(iFault).Name, - state.dataFaultsMgr->FaultsHumidistatOffset(iFault).FaultyThermostatName)); + ShowSevereError(state, + EnergyPlus::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."); } @@ -3604,8 +3620,9 @@ void ZoneSpaceHeatBalanceData::calcPredictedHumidityRatio(EnergyPlusData &state, // Run-time error check if (ZoneRHHumidifyingSetPoint > ZoneRHDehumidifyingSetPoint) { if (humidityControlZone.ErrorIndex == 0) { - ShowWarningMessage( - state, format("HUMIDISTAT: The humidifying setpoint is above the dehumidifying setpoint in {}", humidityControlZone.ControlName)); + ShowWarningMessage(state, + EnergyPlus::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:"); } @@ -3772,12 +3789,13 @@ 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, format("occurs in Zone = {}", thisZone.Name)); - ShowContinueError( - state, - format("LoadToHumidifySetPoint={:.5R}, LoadToDehumidifySetPoint={:.5R}", LoadToHumidifySetPoint, LoadToDehumidifySetPoint)); - ShowContinueError(state, format("Zone RH Humidifying Set-point={:.1R}", ZoneRHHumidifyingSetPoint)); - ShowContinueError(state, format("Zone RH Dehumidifying Set-point={:.2R}", ZoneRHDehumidifyingSetPoint)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone = {}", thisZone.Name)); + ShowContinueError(state, + EnergyPlus::format("LoadToHumidifySetPoint={:.5R}, LoadToDehumidifySetPoint={:.5R}", + LoadToHumidifySetPoint, + LoadToDehumidifySetPoint)); + ShowContinueError(state, EnergyPlus::format("Zone RH Humidifying Set-point={:.1R}", ZoneRHHumidifyingSetPoint)); + ShowContinueError(state, EnergyPlus::format("Zone RH Dehumidifying Set-point={:.2R}", ZoneRHDehumidifyingSetPoint)); ShowFatalError(state, "Program terminates due to above conditions."); } } @@ -4963,9 +4981,9 @@ 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, format("Hybrid model thermal mass multiplier higher than the limit for {}", zone.Name)); + ShowWarningMessage(state, EnergyPlus::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, format("zone air heat storage is higher than the maximum limit of {:.1R}.", maxHMMultValue)); + ShowContinueError(state, EnergyPlus::format("zone air heat storage is higher than the maximum limit of {:.1R}.", maxHMMultValue)); } ShowRecurringWarningErrorAtEnd( state, "Hybrid model thermal mass multiplier limit exceeded in zone " + zone.Name, thisZoneHB.hmThermalMassMultErrIndex); @@ -5381,8 +5399,9 @@ SumHATOutput SpaceHeatBalanceData::calcSumHAT(EnergyPlusData &state, int const z case DataSurfaces::RefAirTemp::ZoneSupplyAirTemp: // check whether this zone is a controlled zone or not if (!thisZone.IsControlled) { - ShowFatalError(state, - format("Zones must be controlled for Ceiling-Diffuser Convection model. No system serves zone {}", thisZone.Name)); + ShowFatalError( + state, + EnergyPlus::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. @@ -5648,8 +5667,8 @@ 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, format("Zone Air Heat Balance is out of balance for zone named {}", thisZone.Name)); - ShowContinueError(state, format("Zone Air Heat Balance Deviation Rate is more than {:.1R} {{W}}", Threshold)); + ShowWarningMessage(state, EnergyPlus::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"); } @@ -5657,7 +5676,7 @@ void CalcZoneComponentLoadSums(EnergyPlusData &state, ShowContinueErrorTimeStamp(state, " Occurrence info:"); } ShowRecurringWarningErrorAtEnd(state, - format("Zone Air Heat Balance is out of balance ... zone named {}", thisZone.Name), + EnergyPlus::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, @@ -6024,10 +6043,11 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (zoneComfortControlsFanger.LowPMV > zoneComfortControlsFanger.HighPMV) { ++zoneComfortControlsFanger.DualPMVErrCount; if (zoneComfortControlsFanger.DualPMVErrCount < 2) { - ShowWarningError(state, - 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, + EnergyPlus::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 { @@ -6042,8 +6062,9 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) } break; default: { - ShowSevereError(state, - format("CalcZoneAirTempSetpoints: Illegal thermal control control type for Zone={}, Found value={}, in Schedule={}", + 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)); @@ -6121,10 +6142,11 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) } } else { if (comfortZone.PeopleAverageErrIndex == 0) { - ShowWarningMessage(state, - format("ZoneControl:Thermostat:ThermalComfort: The total number of people in Zone = {} is zero. The People " - "Average option is not used.", - zone.Name)); + 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)); ShowContinueError(state, "The Object Average option is used instead. Simulation continues ....."); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } @@ -6178,10 +6200,11 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (SetPointLo < comfortZone.TdbMinSetPoint) { SetPointLo = comfortZone.TdbMinSetPoint; if (comfortZone.TdbMinErrIndex < 2) { - ShowWarningMessage(state, - format("ThermostatSetpoint:ThermalComfort:Fanger:SingleHeating temperature is below the Minimum dry-bulb " - "temperature setpoint {}", - comfortZone.Name)); + ShowWarningMessage( + state, + EnergyPlus::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:"); } @@ -6202,10 +6225,11 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (SetPointLo > comfortZone.TdbMaxSetPoint) { SetPointLo = comfortZone.TdbMaxSetPoint; if (comfortZone.TdbMaxErrIndex == 0) { - ShowWarningMessage(state, - format("ThermostatSetpoint:ThermalComfort:Fanger:SingleCooling temperature is above the Maximum dry-bulb " - "temperature setpoint {}", - comfortZone.Name)); + ShowWarningMessage( + state, + EnergyPlus::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:"); } @@ -6234,10 +6258,11 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) } if (SetPointLo < comfortZone.TdbMinSetPoint || SetPointLo > comfortZone.TdbMaxSetPoint) { if (comfortZone.TdbHCErrIndex == 0) { - ShowWarningMessage(state, - format("ThermostatSetpoint:ThermalComfort:Fanger:SingleHeatingOrCooling temperature is above the Maximum or " - "below the Minimum dry-bulb temperature setpoint {}", - comfortZone.Name)); + ShowWarningMessage( + state, + EnergyPlus::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"); @@ -6262,10 +6287,11 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) SetPointLo = comfortZone.TdbMinSetPoint; if (comfortZone.TdbDualMinErrIndex == 0) { - ShowWarningMessage(state, - format("ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint temperature is below the Minimum dry-bulb " - "temperature setpoint {}", - comfortZone.Name)); + ShowWarningMessage( + state, + EnergyPlus::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:"); } @@ -6279,10 +6305,11 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (SetPointHi > comfortZone.TdbMaxSetPoint) { SetPointHi = comfortZone.TdbMaxSetPoint; if (comfortZone.TdbDualMaxErrIndex == 0) { - ShowWarningMessage(state, - format("ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint temperature is above the Maximum dry-bulb " - "temperature setpoint in zone = {}", - comfortZone.Name)); + ShowWarningMessage( + state, + EnergyPlus::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:"); } @@ -6301,8 +6328,9 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) } break; default: { - ShowSevereError(state, - format("CalcZoneAirComfortSetpoints: Illegal thermal control control type for Zone={}, Found value={}, in Schedule={}", + 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)); @@ -6361,8 +6389,9 @@ void GetComfortSetPoints(EnergyPlusData &state, if (s_ztpc->IterLimitExceededNum1 == 1) { ShowWarningError( state, - format("{}: Iteration limit exceeded calculating thermal comfort Fanger setpoint and non-converged setpoint is used", - comfortControlledZone.Name)); + EnergyPlus::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.", @@ -6375,14 +6404,14 @@ void GetComfortSetPoints(EnergyPlusData &state, if (!state.dataGlobal->WarmupFlag) { ++s_ztpc->IterLimitExceededNum2; if (s_ztpc->IterLimitExceededNum2 == 1) { - ShowWarningError( - state, - format("{}: Solution is not found in calculating thermal comfort Fanger setpoint and the minimum setpoint is used", - comfortControlledZone.Name)); + ShowWarningError(state, + EnergyPlus::format( + "{}: Solution is not found in calculating thermal comfort Fanger setpoint and the minimum setpoint is used", + comfortControlledZone.Name)); } else { ShowRecurringWarningErrorAtEnd( state, - format("{}: Solution is not found in calculating thermal comfort Fanger setpoint.", comfortControlledZone.Name), + EnergyPlus::format("{}: Solution is not found in calculating thermal comfort Fanger setpoint.", comfortControlledZone.Name), s_ztpc->IterLimitErrIndex2, Tset, Tset); @@ -6977,12 +7006,13 @@ 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, format("occurs in Zone={}", thisZone.Name)); - ShowContinueError(state, - format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); - ShowContinueError(state, format("Zone TempDepZnLd={:.2R}", this->tempDepLoad)); - ShowContinueError(state, format("Zone TempIndZnLd={:.2R}", this->tempIndLoad)); - ShowContinueError(state, format("Zone ThermostatSetPoint={:.2R}", zoneTstatSetpt.setpt)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone={}", thisZone.Name)); + ShowContinueError( + state, + EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); + ShowContinueError(state, EnergyPlus::format("Zone TempDepZnLd={:.2R}", this->tempDepLoad)); + ShowContinueError(state, EnergyPlus::format("Zone TempIndZnLd={:.2R}", this->tempIndLoad)); + ShowContinueError(state, EnergyPlus::format("Zone ThermostatSetPoint={:.2R}", zoneTstatSetpt.setpt)); ShowFatalError(state, "Program terminates due to above conditions."); } @@ -7001,12 +7031,13 @@ 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, format("occurs in Zone={}", thisZone.Name)); - ShowContinueError(state, - format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); - ShowContinueError(state, format("Zone TempDepZnLd={:.2R}", this->tempDepLoad)); - ShowContinueError(state, format("Zone TempIndZnLd={:.2R}", this->tempIndLoad)); - ShowContinueError(state, format("Zone ThermostatSetPoint={:.2R}", zoneTstatSetpt.setpt)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone={}", thisZone.Name)); + ShowContinueError( + state, + EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); + ShowContinueError(state, EnergyPlus::format("Zone TempDepZnLd={:.2R}", this->tempDepLoad)); + ShowContinueError(state, EnergyPlus::format("Zone TempIndZnLd={:.2R}", this->tempIndLoad)); + ShowContinueError(state, EnergyPlus::format("Zone ThermostatSetPoint={:.2R}", zoneTstatSetpt.setpt)); ShowFatalError(state, "Program terminates due to above conditions."); } } break; @@ -7063,13 +7094,14 @@ 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, format("occurs in Zone={}", thisZone.Name)); - ShowContinueError(state, - format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); - ShowContinueError(state, format("Zone TempDepZnLd={:.2R}", this->tempDepLoad)); - ShowContinueError(state, format("Zone TempIndZnLd={:.2R}", this->tempIndLoad)); - ShowContinueError(state, format("Zone Heating ThermostatSetPoint={:.2R}", zoneTstatSetpt.setptLo)); - ShowContinueError(state, format("Zone Cooling ThermostatSetPoint={:.2R}", zoneTstatSetpt.setptHi)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone={}", thisZone.Name)); + ShowContinueError( + state, + EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); + ShowContinueError(state, EnergyPlus::format("Zone TempDepZnLd={:.2R}", this->tempDepLoad)); + ShowContinueError(state, EnergyPlus::format("Zone TempIndZnLd={:.2R}", this->tempIndLoad)); + 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."); } @@ -7091,14 +7123,15 @@ 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, format("occurs in Zone={}", thisZone.Name)); - ShowContinueError(state, - format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); - ShowContinueError(state, format("Zone Heating Set-point={:.2R}", zoneTstatSetpt.setptLo)); - ShowContinueError(state, format("Zone Cooling Set-point={:.2R}", zoneTstatSetpt.setptHi)); - ShowContinueError(state, format("Zone TempDepZnLd={:.2R}", this->tempDepLoad)); - ShowContinueError(state, format("Zone TempIndZnLd={:.2R}", this->tempIndLoad)); - ShowContinueError(state, format("Zone ThermostatSetPoint={:.2R}", zoneTstatSetpt.setpt)); + ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone={}", thisZone.Name)); + ShowContinueError( + state, + EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); + ShowContinueError(state, EnergyPlus::format("Zone Heating Set-point={:.2R}", zoneTstatSetpt.setptLo)); + ShowContinueError(state, EnergyPlus::format("Zone Cooling Set-point={:.2R}", zoneTstatSetpt.setptHi)); + ShowContinueError(state, EnergyPlus::format("Zone TempDepZnLd={:.2R}", this->tempDepLoad)); + ShowContinueError(state, EnergyPlus::format("Zone TempIndZnLd={:.2R}", this->tempIndLoad)); + ShowContinueError(state, EnergyPlus::format("Zone ThermostatSetPoint={:.2R}", zoneTstatSetpt.setpt)); ShowFatalError(state, "Program terminates due to above conditions."); } diff --git a/src/EnergyPlus/api/datatransfer.cc b/src/EnergyPlus/api/datatransfer.cc index fcd19e1fa34..b77b4af6834 100644 --- a/src/EnergyPlus/api/datatransfer.cc +++ b/src/EnergyPlus/api/datatransfer.cc @@ -108,7 +108,8 @@ APIDataEntry *getAPIData(EnergyPlusState state, unsigned int *resultingSize) if (meter->Name.empty()) { break; } - localDataEntries.emplace_back("OutputMeter", "", "", meter->Name, format("{}", EnergyPlus::Constant::unitNames[(int)meter->units])); + localDataEntries.emplace_back( + "OutputMeter", "", "", meter->Name, EnergyPlus::format("{}", EnergyPlus::Constant::unitNames[(int)meter->units])); } for (auto const *variable : thisState->dataOutputProcessor->outVars) { if (variable->varType != EnergyPlus::OutputProcessor::VariableType::Real) { @@ -123,7 +124,7 @@ APIDataEntry *getAPIData(EnergyPlusState state, unsigned int *resultingSize) variable->keyUC, variable->units == EnergyPlus::Constant::Units::customEMS ? variable->unitNameCustomEMS - : format("{}", EnergyPlus::Constant::unitNames[(int)variable->units])); + : EnergyPlus::format("{}", EnergyPlus::Constant::unitNames[(int)variable->units])); } *resultingSize = localDataEntries.size(); auto *data = new APIDataEntry[*resultingSize]; From bd870fda41f3a795426138210765840974ac5ae5 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 18 Feb 2026 12:47:07 -0700 Subject: [PATCH 2/9] transition to cxx20, fix issues needed to clarify use of EnergyPlus::format or fmt::format --- CMakeLists.txt | 6 ++--- src/EnergyPlus/ChillerElectricEIR.cc | 6 +++-- .../CoilCoolingDXAshrae205Performance.cc | 2 +- src/EnergyPlus/FileSystem.hh | 10 ++++---- src/EnergyPlus/HeatBalanceKivaManager.cc | 2 +- src/EnergyPlus/IOFiles.hh | 24 +++++++++---------- .../InputProcessing/InputProcessor.cc | 4 ++-- src/EnergyPlus/OutputProcessor.cc | 14 +++++------ src/EnergyPlus/PlantLoopHeatPumpEIR.cc | 9 ++----- tst/EnergyPlus/unit/OutputFiles.unit.cc | 2 +- 10 files changed, 39 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 95390daec95..03d7ba549cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden) set_property(GLOBAL PROPERTY USE_FOLDERS ON) add_library(project_options INTERFACE) -target_compile_features(project_options INTERFACE cxx_std_17) +target_compile_features(project_options INTERFACE cxx_std_20) add_library(cpp_pch_files INTERFACE) option(ENABLE_PCH "Enable Precompiled Headers" ON) @@ -287,7 +287,7 @@ add_subdirectory(third_party) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/src) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party) -target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/fmt-8.0.1/include) +#target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/fmt-8.0.1/include) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/btwxt/include) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/re2) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/doj) @@ -298,7 +298,7 @@ target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third target_include_directories(project_options SYSTEM INTERFACE ${PROJECT_SOURCE_DIR}/third_party/SQLite/) target_include_directories(project_options SYSTEM INTERFACE "${PROJECT_SOURCE_DIR}/third_party/Expat" "${PROJECT_SOURCE_DIR}/third_party/Expat/lib") target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/CLI/) -target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/eigen/) +target_include_directories(project_options SYSTEM INTERFACE ${PROJECT_SOURCE_DIR}/third_party/eigen/) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Chromogenics/include) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Common/include) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Gases/include) diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index 4bfd23bf0d2..1461003983f 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -729,8 +729,10 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) ShowSevereError(state, EnergyPlus::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(state, fmt::format("PLR = {:7." + std::to_string(DecimalPrecision) + "F}", fmt::join(PLRArray, ","))); - ShowContinueError(state, fmt::format("Curve Output = {:7." + std::to_string(DecimalPrecision) + "F}", fmt::join(CurveValArray, ","))); + ShowContinueError( + state, fmt::format(fmt::runtime("PLR = {:7." + std::to_string(DecimalPrecision) + "F}"), fmt::join(PLRArray, ","))); + ShowContinueError( + state, fmt::format(fmt::runtime("Curve Output = {:7." + std::to_string(DecimalPrecision) + "F}"), fmt::join(CurveValArray, ","))); ErrorsFound = true; } } diff --git a/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc b/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc index 0e54d002e39..f970a5d6861 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc @@ -104,7 +104,7 @@ CoilCoolingDX205Performance::CoilCoolingDX205Performance(EnergyPlus::EnergyPlusD ShowFatalError(state, "Program terminates due to the missing ASHRAE 205 RS0004 representation file."); } std::shared_ptr coil_logger = std::make_shared(); - logger_context = {&state, EnergyPlus::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, name)}; + logger_context = std::make_pair(&state, EnergyPlus::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, name)); coil_logger->set_message_context(&logger_context); representation = std::dynamic_pointer_cast(RSInstanceFactory::create("RS0004", rep_file_path.string().c_str(), coil_logger)); diff --git a/src/EnergyPlus/FileSystem.hh b/src/EnergyPlus/FileSystem.hh index 3f117979ab0..edd806a8897 100644 --- a/src/EnergyPlus/FileSystem.hh +++ b/src/EnergyPlus/FileSystem.hh @@ -82,9 +82,7 @@ namespace fs = std::experimental::filesystem; // } namespace EnergyPlus { - namespace FileSystem { - extern std::string const exeExtension; enum class FileTypes @@ -116,18 +114,22 @@ namespace FileSystem { { return t > FileTypes::Invalid && t <= FileTypes::last_binary_json_type; } + constexpr bool is_json_type(FileTypes t) { return t > FileTypes::Invalid && t <= FileTypes::last_json_type; } + constexpr bool is_binary_json_type(FileTypes t) { return t > FileTypes::last_json_type && t <= FileTypes::last_binary_json_type; } + constexpr bool is_idf_type(FileTypes t) { return t == FileTypes::IDF || t == FileTypes::IMF; } + constexpr bool is_flat_file_type(FileTypes t) { return t > FileTypes::last_binary_json_type && t <= FileTypes::last_flat_file_type; @@ -318,7 +320,6 @@ namespace FileSystem { std::string toGenericString(fs::path const &p); fs::path appendSuffixToPath(fs::path const &outputFilePrefixFullPath, const std::string &suffix); - } // namespace FileSystem } // namespace EnergyPlus @@ -348,7 +349,8 @@ template <> struct fmt::formatter template auto format(const fs::path &p, FormatContext &ctx) -> decltype(ctx.out()) { - return format_to(ctx.out(), "{}", presentation == 'g' ? EnergyPlus::FileSystem::toGenericString(p) : EnergyPlus::FileSystem::toString(p)); + return fmt::format_to( + ctx.out(), "{}", presentation == 'g' ? EnergyPlus::FileSystem::toGenericString(p) : EnergyPlus::FileSystem::toString(p)); } }; diff --git a/src/EnergyPlus/HeatBalanceKivaManager.cc b/src/EnergyPlus/HeatBalanceKivaManager.cc index 2c7c21f6ade..e6fbf7bb126 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.cc +++ b/src/EnergyPlus/HeatBalanceKivaManager.cc @@ -80,7 +80,7 @@ namespace EnergyPlus::HeatBalanceKivaManager { void kivaErrorCallback(const int messageType, const std::string message, void *contextPtr) { if (contextPtr == nullptr) { - throw FatalError(format("Unhandled Kiva Error: {}", message)); + throw FatalError(EnergyPlus::format("Unhandled Kiva Error: {}", message)); } std::string fullMessage; std::pair contextPair = *(std::pair *)contextPtr; diff --git a/src/EnergyPlus/IOFiles.hh b/src/EnergyPlus/IOFiles.hh index 31581f53a36..cd1b1dd4522 100644 --- a/src/EnergyPlus/IOFiles.hh +++ b/src/EnergyPlus/IOFiles.hh @@ -291,17 +291,17 @@ public: // add '.' to match old RoundSigDigits buffer.push_back('.'); std::string_view fmt_buffer(buffer.data(), buffer.size()); - return fmt::format_to(ctx.out(), fmt_buffer, val); + return fmt::format_to(ctx.out(), fmt::runtime(fmt_buffer), val); } - return fmt::format_to(ctx.out(), spec_builder(), val); + return fmt::format_to(ctx.out(), fmt::runtime(spec_builder()), val); } if (val == 0.0 || val == -0.0) { - return fmt::format_to(ctx.out(), spec_builder(), 0.0); + return fmt::format_to(ctx.out(), fmt::runtime(spec_builder()), 0.0); } // nudge up to next rounded val - return fmt::format_to(ctx.out(), spec_builder(), next_float(next_float(next_float(val)))); + return fmt::format_to(ctx.out(), fmt::runtime(spec_builder()), next_float(next_float(next_float(val)))); } specs_.type = 'E'; - auto str = fmt::format(spec_builder(), next_float(val)); + 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 @@ -312,13 +312,13 @@ public: const auto adjusted = (val * magnitude) + 0.0001; const auto truncated = std::trunc(adjusted) / magnitude; specs_.type = 'F'; - return fmt::format_to(ctx.out(), spec_builder(), truncated); + 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(spec_builder(), val); + auto str = fmt::format(fmt::runtime(spec_builder()), val); str = zero_pad_exponent(str); // Erase last 2 numbers to truncate the value @@ -329,7 +329,7 @@ public: return fmt::format_to(ctx.out(), "{}", str); } - return fmt::format_to(ctx.out(), spec_builder(), val); + return fmt::format_to(ctx.out(), fmt::runtime(spec_builder()), val); } }; } // namespace fmt @@ -700,7 +700,7 @@ template void vprint(std::ostream &os, std::string_view forma // assert(os.good()); auto buffer = fmt::memory_buffer(); try { - fmt::format_to(std::back_inserter(buffer), format_str, args...); + fmt::format_to(std::back_inserter(buffer), fmt::runtime(format_str), args...); } catch (const fmt::format_error &) { throw EnergyPlus::FatalError(fmt::format("Error with format, '{}', passed {} args", format_str, sizeof...(Args))); } @@ -711,7 +711,7 @@ template std::string vprint(std::string_view format_str, cons { auto buffer = fmt::memory_buffer(); try { - fmt::format_to(std::back_inserter(buffer), format_str, args...); + fmt::format_to(std::back_inserter(buffer), fmt::runtime(format_str), args...); } catch (const fmt::format_error &) { throw EnergyPlus::FatalError(fmt::format("Error with format, '{}', passed {} args", format_str, sizeof...(Args))); } @@ -749,7 +749,7 @@ void print(std::ostream &os, std::string_view format_str, Args &&...args) if constexpr (formatSyntax == FormatSyntax::Fortran) { print_fortran_syntax(os, format_str, args...); } else if constexpr (formatSyntax == FormatSyntax::FMT) { - fmt::print(os, format_str, std::forward(args)...); + fmt::print(os, fmt::runtime(format_str), std::forward(args)...); } else { static_assert(!(formatSyntax == FormatSyntax::Fortran || formatSyntax == FormatSyntax::FMT), "Invalid FormatSyntax selection"); } @@ -781,7 +781,7 @@ template s if constexpr (formatSyntax == FormatSyntax::Fortran) { return format_fortran_syntax(format_str, args...); } else if constexpr (formatSyntax == FormatSyntax::FMT) { - return fmt::format(format_str, std::forward(args)...); + return fmt::format(fmt::runtime(format_str), std::forward(args)...); } else if constexpr (formatSyntax == FormatSyntax::Printf) { return fmt::sprintf(format_str, std::forward(args)...); } diff --git a/src/EnergyPlus/InputProcessing/InputProcessor.cc b/src/EnergyPlus/InputProcessing/InputProcessor.cc index 0f251c8a018..54e7525f03d 100644 --- a/src/EnergyPlus/InputProcessing/InputProcessor.cc +++ b/src/EnergyPlus/InputProcessing/InputProcessor.cc @@ -770,7 +770,7 @@ InputProcessor::MaxFields InputProcessor::findMaxFields( continue; } for (std::size_t i = maxFields.max_fields; i < legacy_idd_fields.size(); ++i) { - if (field_key == legacy_idd_fields[i]) { + if (field_key == legacy_idd_fields[i].get()) { maxFields.max_fields = (i + 1); } } @@ -788,7 +788,7 @@ InputProcessor::MaxFields InputProcessor::findMaxFields( for (auto const &ext : exts.value().items()) { auto const &ext_key = ext.key(); for (std::size_t i = max_extensible_field; i < legacy_idd_extensibles.size(); ++i) { - if (ext_key == legacy_idd_extensibles[i]) { + if (ext_key == legacy_idd_extensibles[i].get()) { max_extensible_field = (i + 1); } } diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index e8fb43b631b..57c5c4c040a 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -4777,10 +4777,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(format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + rf->RDD.push_back(EnergyPlus::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } else { print(state.files.rdd, "Output:Variable,*,{},hourly; !- {} {} [{}]\n", varName, timeStepName, storeTypeName, unitName); - rf->RDD.push_back(format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + rf->RDD.push_back(EnergyPlus::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } ddVar->ReportedOnDDFile = true; @@ -4794,10 +4794,10 @@ void ProduceRDDMDD(EnergyPlusData &state) if (op->ProduceReportVDD == ReportVDD::Yes) { print(state.files.rdd, "{},{},{} [{}]\n", timeStepName, storeTypeName, varName, unitName); - rf->RDD.push_back(format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + rf->RDD.push_back(EnergyPlus::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } else { print(state.files.rdd, "Output:Variable,*,{},hourly; !- {} {} [{}]\n", varName, timeStepName, storeTypeName, unitName); - rf->RDD.push_back(format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + rf->RDD.push_back(EnergyPlus::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } ddVar->ReportedOnDDFile = true; } // while (ddVar->Next != 0) @@ -4813,12 +4813,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(format("Zone,Meter,{} [{}]", meter->Name, unitName)); + rf->MDD.push_back(EnergyPlus::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(format("Output:Meter,{} [{}]", meter->Name, unitName)); + rf->MDD.push_back(EnergyPlus::format("Output:Meter,{} [{}]", meter->Name, unitName)); print(state.files.mdd, "Output:Meter:Cumulative,{},hourly; !- [{}]\n", meter->Name, unitName); - rf->MDD.push_back(format("Output:Meter:Cumulative,{} [{}]", meter->Name, unitName)); + rf->MDD.push_back(EnergyPlus::format("Output:Meter:Cumulative,{} [{}]", meter->Name, unitName)); } } state.files.mdd.close(); diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc index f9e585bb91d..75127e5f08c 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc @@ -1391,13 +1391,8 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) Real64 hardSizedCapacity = this->referenceCapacity; if (state.dataPlnt->PlantFinalSizesOkayToReport) { if (state.dataGlobal->DoPlantSizing) { - BaseSizer::reportSizerOutput(state, - typeName, - this->name, - fmt::format(designCapacityKW), - tmpCapacity, - fmt::format(userCapacityKW), - hardSizedCapacity); + BaseSizer::reportSizerOutput( + state, typeName, this->name, designCapacityKW, tmpCapacity, userCapacityKW, hardSizedCapacity); } else { BaseSizer::reportSizerOutput(state, typeName, this->name, userCapacityKW, hardSizedCapacity); } diff --git a/tst/EnergyPlus/unit/OutputFiles.unit.cc b/tst/EnergyPlus/unit/OutputFiles.unit.cc index edfae47ebc6..ea30019edfc 100644 --- a/tst/EnergyPlus/unit/OutputFiles.unit.cc +++ b/tst/EnergyPlus/unit/OutputFiles.unit.cc @@ -320,7 +320,7 @@ OutputControl:Files, bool extshd = (i == 30); bool tarcog = (i == 31); - std::string const idf_objects = fmt::format(idf_objects_fmt, + std::string const idf_objects = fmt::format(fmt::runtime(idf_objects_fmt), fmt::arg("csv", boolToString(csv)), fmt::arg("mtr", boolToString(mtr)), fmt::arg("eso", boolToString(eso)), From 9d1519f6135a6b4be839d6a719683016296621a6 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 18 Feb 2026 13:12:01 -0700 Subject: [PATCH 3/9] migrate some Boilers.cc format strings over to std::format --- src/EnergyPlus/Boilers.cc | 90 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index 73d18d8fe69..884f7000a05 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -107,7 +108,7 @@ BoilerSpecs *BoilerSpecs::factory(EnergyPlusData &state, std::string const &obje } // If we didn't find it, fatal - ShowFatalError(state, EnergyPlus::format("LocalBoilerFactory: Error getting inputs for boiler named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, std::format("LocalBoilerFactory: Error getting inputs for boiler named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -173,7 +174,7 @@ void GetBoilerInput(EnergyPlusData &state) int numBoilers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (numBoilers <= 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; } @@ -216,9 +217,9 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.NomCap = s_ipsc->rNumericArgs(1); if (s_ipsc->rNumericArgs(1) == 0.0) { - ShowSevereError(state, fmt::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, EnergyPlus::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(1))); + ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={:.2f}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); + ShowContinueError(state, std::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(1))); ErrorsFound = true; } if (thisBoiler.NomCap == DataSizing::AutoSize) { @@ -227,13 +228,13 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.NomEffic = s_ipsc->rNumericArgs(2); if (s_ipsc->rNumericArgs(2) == 0.0) { - ShowSevereError(state, fmt::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={:.3R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, EnergyPlus::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(2))); + ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={:.3f}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); + ShowContinueError(state, std::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(2))); ErrorsFound = true; } else if (s_ipsc->rNumericArgs(2) > 1.0) { ShowWarningError(state, - fmt::format("{} = {}: {}={} should not typically be greater than 1.", + std::format("{} = {}: {}={} should not typically be greater than 1.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), s_ipsc->cNumericFieldNames(2), @@ -261,20 +262,19 @@ void GetBoilerInput(EnergyPlusData &state) if (thisBoiler.EfficiencyCurve->numDims == 2) { // curve uses water temperature if (thisBoiler.CurveTempMode == TempMode::NOTSET) { // throw error if (!s_ipsc->lAlphaFieldBlanks(3)) { - ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); ShowContinueError(state, - EnergyPlus::format("boilers.Boiler using curve type of {} must specify {}", - Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType], - s_ipsc->cAlphaFieldNames(3))); + std::format("boilers.Boiler using curve type of {} must specify {}", + Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType], + s_ipsc->cAlphaFieldNames(3))); ShowContinueError(state, "Available choices are EnteringBoiler or LeavingBoiler"); } else { - ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Field {} is blank", s_ipsc->cAlphaFieldNames(3))); - ShowContinueError( - state, - EnergyPlus::format("boilers.Boiler using curve type of {} must specify either EnteringBoiler or LeavingBoiler", - Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType])); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Field {} is blank", s_ipsc->cAlphaFieldNames(3))); + ShowContinueError(state, + std::format("boilers.Boiler using curve type of {} must specify either EnteringBoiler or LeavingBoiler", + Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType])); } ErrorsFound = true; } @@ -297,8 +297,8 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.ParasiticElecLoad = s_ipsc->rNumericArgs(8); thisBoiler.ParasiticFuelCapacity = s_ipsc->rNumericArgs(10); if (thisBoiler.FuelType == Constant::eFuel::Electricity && thisBoiler.ParasiticFuelCapacity > 0) { - ShowWarningError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} should be zero when the fuel type is electricity.", s_ipsc->cNumericFieldNames(10))); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} should be zero when the fuel type is electricity.", s_ipsc->cNumericFieldNames(10))); ShowContinueError(state, "It will be ignored and the simulation continues."); thisBoiler.ParasiticFuelCapacity = 0.0; } @@ -336,8 +336,8 @@ void GetBoilerInput(EnergyPlusData &state) } else if (s_ipsc->cAlphaArgs(7) == "NOTMODULATED") { thisBoiler.FlowMode = DataPlant::FlowMode::NotModulated; } else { - ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); ShowContinueError(state, "Available choices are ConstantFlow, NotModulated, or LeavingSetpointModulated"); ShowContinueError(state, "Flow mode NotModulated is assumed and the simulation continues."); // We will assume variable flow if not specified @@ -353,7 +353,7 @@ void GetBoilerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}{}", RoutineName, "Errors found in processing " + s_ipsc->cCurrentModuleObject + " input.")); + ShowFatalError(state, std::format("{}{}", RoutineName, "Errors found in processing " + s_ipsc->cCurrentModuleObject + " input.")); } } @@ -378,14 +378,14 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state) OutputProcessor::Group::Plant, OutputProcessor::EndUseCat::Boilers); SetupOutputVariable(state, - EnergyPlus::format("Boiler {} Rate", sFuelType), + std::format("Boiler {} Rate", sFuelType), Constant::Units::W, this->FuelUsed, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - EnergyPlus::format("Boiler {} Energy", sFuelType), + std::format("Boiler {} Energy", sFuelType), Constant::Units::J, this->FuelConsumed, OutputProcessor::TimeStepType::System, @@ -436,14 +436,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, @@ -502,8 +502,8 @@ void BoilerSpecs::initEachEnvironment(EnergyPlusData &state) (state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo == DataLoopNode::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 ... "); @@ -516,8 +516,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 "); @@ -638,10 +638,9 @@ 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)); - 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)); + ShowMessage(state, std::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError(state, std::format("User-Specified Nominal Capacity of {:.2f} [W]", NomCapUser)); + ShowContinueError(state, std::format("differs from Design Size Nominal Capacity of {:.2f} [W]", tmpNomCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -653,7 +652,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 @@ -693,13 +692,10 @@ 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)); - ShowContinueError(state, - EnergyPlus::format("User-Specified Design Water Flow Rate of {:.2R} [m3/s]", VolFlowRateUser)); + ShowMessage(state, std::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); + ShowContinueError(state, std::format("User-Specified Design Water Flow Rate of {:.2f} [m3/s]", VolFlowRateUser)); ShowContinueError( - state, - EnergyPlus::format("differs from Design Size Design Water Flow Rate of {:.2R} [m3/s]", tmpBoilerVolFlowRate)); + state, std::format("differs from Design Size Design Water Flow Rate of {:.2f} [m3/s]", tmpBoilerVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -712,7 +708,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 && @@ -919,7 +915,7 @@ 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)); if (this->EfficiencyCurve->numDims == 2) { @@ -955,7 +951,7 @@ 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)); From f31e2d7c79cc3f6afa789de4c5afcce90aacd67e Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 19 Feb 2026 11:06:53 -0700 Subject: [PATCH 4/9] patch eigen and fmt for CXX20 on MacOS, qualify other remaining format statements --- CMakeLists.txt | 2 +- src/EnergyPlus/OutputReportTabular.cc | 2 +- src/EnergyPlus/PlantLoopHeatPumpEIR.cc | 31 +++++++++-------- src/EnergyPlus/api/datatransfer.cc | 9 ++--- .../eigen/Eigen/src/Core/util/Macros.h | 2 +- third_party/fmt-8.0.1/include/fmt/ranges.h | 8 ++--- tst/EnergyPlus/unit/DataHeatBalance.unit.cc | 2 +- tst/EnergyPlus/unit/DataSizing.unit.cc | 2 +- .../unit/ElectricPowerServiceManager.unit.cc | 2 +- .../unit/EvaporativeCoolers.unit.cc | 2 +- .../unit/HeatBalanceAirManager.unit.cc | 4 +-- .../unit/LowTempRadiantSystem.unit.cc | 22 ++++++------ tst/EnergyPlus/unit/PollutionModule.unit.cc | 34 +++++++++---------- tst/EnergyPlus/unit/WaterCoils.unit.cc | 22 ++++++------ .../unit/ZoneTempPredictorCorrector.unit.cc | 2 +- 15 files changed, 75 insertions(+), 71 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03d7ba549cf..ea7102f3667 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,7 +287,7 @@ add_subdirectory(third_party) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/src) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party) -#target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/fmt-8.0.1/include) +target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/fmt-8.0.1/include) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/btwxt/include) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/re2) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/doj) diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index 8892fd93972..37400c4810d 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -1807,7 +1807,7 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) } for (int iResource = 1; iResource <= numSourceTypes; ++iResource) { - int const meterNumber = GetMeterIndex(state, Util::makeUPPER(format("{}Emissions:Source", ort->sourceTypeNames(iResource)))); + int const meterNumber = GetMeterIndex(state, Util::makeUPPER(EnergyPlus::format("{}Emissions:Source", ort->sourceTypeNames(iResource)))); ort->meterNumTotalsSource(iResource) = meterNumber; } diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc index 75127e5f08c..b35f0522dd8 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc @@ -3933,22 +3933,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(format("{}_water_inlet_node_name", waterNodePrefix)) == fields.end()) { + if (fields.find(EnergyPlus::format("{}_water_inlet_node_name", waterNodePrefix)) == fields.end()) { continue; } - auto availSchedFound = fields.find(format("availability_schedule_name_{}", modeKeyWord)); + auto availSchedFound = fields.find(EnergyPlus::format("availability_schedule_name_{}", modeKeyWord)); if (availSchedFound == fields.end()) { thisAWHP.availSchedName = ""; thisAWHP.availSched = Sched::GetScheduleAlwaysOn(state); } else { - thisAWHP.availSchedName = Util::makeUPPER(fields.at(format("availability_schedule_name_{}", modeKeyWord)).get()); + thisAWHP.availSchedName = + Util::makeUPPER(fields.at(EnergyPlus::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); errorsFound = true; } } - auto boosterOnFound = fields.find(format("booster_mode_on_{}", modeKeyWord)); + auto boosterOnFound = fields.find(EnergyPlus::format("booster_mode_on_{}", modeKeyWord)); thisAWHP.boosterOn = false; if (boosterOnFound != fields.end()) { auto boosterOnStr = boosterOnFound.value().get(); @@ -3957,19 +3958,19 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) } } - auto const boosterMultCap = fields.find(format("booster_mode_{}_capacity_multiplier", modeKeyWord)); + auto const boosterMultCap = fields.find(EnergyPlus::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(format("booster_mode_{}_cop_multiplier", modeKeyWord)); + auto const boosterMultCOP = fields.find(EnergyPlus::format("booster_mode_{}_cop_multiplier", modeKeyWord)); if (boosterMultCOP != fields.end()) { thisAWHP.boosterMultCOP = boosterMultCOP.value().get(); } else { thisAWHP.boosterMultCOP = 1.0; } - auto sourceSideDesignInletTemp = fields.find(format("rated_inlet_air_temperature_in_{}_mode", modeKeyWord)); + auto sourceSideDesignInletTemp = fields.find(EnergyPlus::format("rated_inlet_air_temperature_in_{}_mode", modeKeyWord)); if (sourceSideDesignInletTemp != fields.end()) { thisAWHP.sourceSideDesignInletTemp = sourceSideDesignInletTemp.value().get(); } else { @@ -3980,7 +3981,7 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) if (thisAWHP.sourceSideDesignVolFlowRate == DataSizing::AutoSize) { thisAWHP.sourceSideDesignVolFlowRateWasAutoSized = true; } - auto ratedLeavingWaterTemperature = fields.find(format("rated_leaving_water_temperature_in_{}_mode", modeKeyWord)); + auto ratedLeavingWaterTemperature = fields.find(EnergyPlus::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)); @@ -3992,20 +3993,21 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) if (thisAWHP.loadSideDesignVolFlowRate == DataSizing::AutoSize) { thisAWHP.loadSideDesignVolFlowRateWasAutoSized = true; } - auto minSourceTempLimit = fields.find(format("minimum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); + auto minSourceTempLimit = fields.find(EnergyPlus::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)); } - auto maxSourceTempLimit = fields.find(format("maximum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); + auto maxSourceTempLimit = fields.find(EnergyPlus::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(format("minimum_leaving_water_temperature_curve_name_in_{}_mode", modeKeyWord)); + auto minLeavingWaterTempCurveName = + fields.find(EnergyPlus::format("minimum_leaving_water_temperature_curve_name_in_{}_mode", modeKeyWord)); if (minLeavingWaterTempCurveName != fields.end()) { thisAWHP.minSupplyWaterTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(minLeavingWaterTempCurveName.value().get())); @@ -4017,7 +4019,8 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) errorsFound = true; } } - auto maxLeavingWaterTempCurveName = fields.find(format("maximum_leaving_water_temperature_curve_name_in_{}_mode", modeKeyWord)); + auto maxLeavingWaterTempCurveName = + fields.find(EnergyPlus::format("maximum_leaving_water_temperature_curve_name_in_{}_mode", modeKeyWord)); if (maxLeavingWaterTempCurveName != fields.end()) { thisAWHP.maxSupplyWaterTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(maxLeavingWaterTempCurveName.value().get())); @@ -4106,9 +4109,9 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) } std::string loadSideInletNodeName = - Util::makeUPPER(fields.at(format("{}_water_inlet_node_name", waterNodePrefix)).get()); + Util::makeUPPER(fields.at(EnergyPlus::format("{}_water_inlet_node_name", waterNodePrefix)).get()); std::string loadSideOutletNodeName = - Util::makeUPPER(fields.at(format("{}_water_outlet_node_name", waterNodePrefix)).get()); + Util::makeUPPER(fields.at(EnergyPlus::format("{}_water_outlet_node_name", waterNodePrefix)).get()); bool nodeErrorsFound = false; thisAWHP.loadSideNodes.inlet = NodeInputManager::GetOnlySingleNode(state, diff --git a/src/EnergyPlus/api/datatransfer.cc b/src/EnergyPlus/api/datatransfer.cc index b77b4af6834..c022f1efafe 100644 --- a/src/EnergyPlus/api/datatransfer.cc +++ b/src/EnergyPlus/api/datatransfer.cc @@ -196,7 +196,7 @@ char *listAllAPIDataCSV(EnergyPlusState state) } output.append("OutputMeter").append(","); // This multiple append thing is not good output.append(meter->Name).append(","); - output.append(format("{}\n", EnergyPlus::Constant::unitNames[(int)meter->units])); + output.append(EnergyPlus::format("{}\n", EnergyPlus::Constant::unitNames[(int)meter->units])); } output.append("**VARIABLES**\n"); for (auto const *variable : thisState->dataOutputProcessor->outVars) { @@ -209,9 +209,10 @@ char *listAllAPIDataCSV(EnergyPlusState state) output.append("OutputVariable,"); output.append(variable->name).append(","); output.append(variable->keyUC).append(","); - output.append(format("{}\n", - variable->units == EnergyPlus::Constant::Units::customEMS ? variable->unitNameCustomEMS - : EnergyPlus::Constant::unitNames[(int)variable->units])); + output.append(EnergyPlus::format("{}\n", + variable->units == EnergyPlus::Constant::Units::customEMS + ? variable->unitNameCustomEMS + : EnergyPlus::Constant::unitNames[(int)variable->units])); } // note that we cannot just return a c_str to the local string, as the string will be destructed upon leaving // this function, and undefined behavior will occur. diff --git a/third_party/eigen/Eigen/src/Core/util/Macros.h b/third_party/eigen/Eigen/src/Core/util/Macros.h index aa054a0b7ff..4aadfb6822e 100644 --- a/third_party/eigen/Eigen/src/Core/util/Macros.h +++ b/third_party/eigen/Eigen/src/Core/util/Macros.h @@ -389,7 +389,7 @@ // Does the compiler support result_of? #ifndef EIGEN_HAS_STD_RESULT_OF -#if EIGEN_MAX_CPP_VER>=11 && ((__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L))) +#if EIGEN_MAX_CPP_VER>=11 && ((__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L))) && (!defined(__cplusplus) || __cplusplus < 202002L) #define EIGEN_HAS_STD_RESULT_OF 1 #else #define EIGEN_HAS_STD_RESULT_OF 0 diff --git a/third_party/fmt-8.0.1/include/fmt/ranges.h b/third_party/fmt-8.0.1/include/fmt/ranges.h index acff1574a87..cbd158fdc63 100644 --- a/third_party/fmt-8.0.1/include/fmt/ranges.h +++ b/third_party/fmt-8.0.1/include/fmt/ranges.h @@ -483,21 +483,21 @@ auto write_range_entry(OutputIt out, basic_string_view str) -> OutputIt { default: if (is_utf8()) { if (escape.cp < 0x100) { - out = format_to(out, "\\x{:02x}", escape.cp); + out = fmt::format_to(out, "\\x{:02x}", escape.cp); continue; } if (escape.cp < 0x10000) { - out = format_to(out, "\\u{:04x}", escape.cp); + out = fmt::format_to(out, "\\u{:04x}", escape.cp); continue; } if (escape.cp < 0x110000) { - out = format_to(out, "\\U{:08x}", escape.cp); + out = fmt::format_to(out, "\\U{:08x}", escape.cp); continue; } } for (Char escape_char : basic_string_view( escape.begin, to_unsigned(escape.end - escape.begin))) { - out = format_to( + out = fmt::format_to( out, "\\x{:02x}", static_cast::type>(escape_char)); } diff --git a/tst/EnergyPlus/unit/DataHeatBalance.unit.cc b/tst/EnergyPlus/unit/DataHeatBalance.unit.cc index 91588df8840..5ba5095487d 100644 --- a/tst/EnergyPlus/unit/DataHeatBalance.unit.cc +++ b/tst/EnergyPlus/unit/DataHeatBalance.unit.cc @@ -1047,7 +1047,7 @@ TEST_F(EnergyPlusFixture, DataHeatBalance_setThicknessPerpendicularTest) thisConstruct.Name = "TestThisConstruction"; std::string const error_string0 = delimited_string( - {format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), + {EnergyPlus::format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), " ** Warning ** ConstructionProperty:InternalHeatSource has a tube spacing that is less than 2 mm. This is not allowed.", " ** ~~~ ** Construction=TestThisConstruction has this problem. The tube spacing has been reset to 0.15m (~6 " "inches) for this construction.", diff --git a/tst/EnergyPlus/unit/DataSizing.unit.cc b/tst/EnergyPlus/unit/DataSizing.unit.cc index b0946cd1b7d..4570d2329cc 100644 --- a/tst/EnergyPlus/unit/DataSizing.unit.cc +++ b/tst/EnergyPlus/unit/DataSizing.unit.cc @@ -352,7 +352,7 @@ TEST_F(EnergyPlusFixture, OARequirements_calcDesignSpecificationOutdoorAir) HeatBalanceManager::GetZoneData(*state, ErrorsFound); std::string const error_string = delimited_string( - {format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), + {EnergyPlus::format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), " ** Warning ** No Timestep object found. Number of TimeSteps in Hour defaulted to 4."}); EXPECT_TRUE(compare_err_stream(error_string, true)); diff --git a/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc b/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc index f5c0393c8fd..08f02bf3058 100644 --- a/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc +++ b/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc @@ -1145,7 +1145,7 @@ TEST_F(EnergyPlusFixture, Battery_checkUserEfficiencyInputTest) functionResult = checkUserEfficiencyInput(*state, userInputEfficiencyCharge, true, "Tatooine", errorsFound); EXPECT_NEAR(functionResult, expectedResult, 0.00001); std::string const error_string1 = delimited_string( - {format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), + {EnergyPlus::format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), " ** Severe ** ElectricStorage charge efficiency was too low. This occurred for electric storage unit named Tatooine", " ** ~~~ ** Please check your input value for this electric storage unit and fix the charge efficiency."}); EXPECT_TRUE(compare_err_stream(error_string1, true)); diff --git a/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc b/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc index bbf43ba3737..38711766cf7 100644 --- a/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc +++ b/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc @@ -872,7 +872,7 @@ TEST_F(EnergyPlusFixture, DirectEvapCoolerAutosizeWithoutSysSizingRunDone) ASSERT_THROW(EvaporativeCoolers::SizeEvapCooler(*state, 1), std::runtime_error); std::string const error_string = delimited_string({ - format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), + EnergyPlus::format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), " ** Severe ** For autosizing of EvaporativeCooler:Direct:ResearchSpecial DIRECTEVAPCOOLER, a system sizing run must be done.", " ** ~~~ ** The \"SimulationControl\" object did not have the field \"Do System Sizing Calculation\" set to Yes.", " ** Fatal ** Program terminates due to previously shown condition(s).", diff --git a/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc index 030d95c7d2a..53a967def3d 100644 --- a/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc @@ -384,7 +384,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceAirManager_GetInfiltrationAndVentilation) HeatBalanceManager::GetHeatBalanceInput(*state); std::string const error_string = delimited_string( - {format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), + {EnergyPlus::format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), " ** Warning ** No Timestep object found. Number of TimeSteps in Hour defaulted to 4.", " ** Warning ** GetSurfaceData: Entered Space Floor Area(s) differ more than 5% from calculated Space Floor Area(s).", " ** ~~~ ** ...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual Spaces.", @@ -830,7 +830,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceAirManager_GetMixingAndCrossMixing) // HeatBalanceManager::GetHeatBalanceInput(*state); std::string const error_string = delimited_string( - {format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), + {EnergyPlus::format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), " ** Warning ** No Timestep object found. Number of TimeSteps in Hour defaulted to 4.", " ** Warning ** No reporting elements have been requested. No simulation results produced.", " ** ~~~ ** ...Review requirements such as \"Output:Table:SummaryReports\", \"Output:Table:Monthly\", \"Output:Variable\", " diff --git a/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc b/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc index 624863de5d9..e132d2862ff 100644 --- a/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc +++ b/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc @@ -2153,10 +2153,10 @@ TEST_F(LowTempRadiantSystemTest, InitLowTempRadiantSystemCFloPump) 0.4; // because of how other parameters are set, this value is equal to the pump efficiency InitLowTempRadiantSystem(*state, false, RadSysNum, systemType, InitErrorFound); actualEfficiencyPercentage = state->dataLowTempRadSys->CFloRadSys(RadSysNum).PumpEffic * 100.0; - std::string const error_string02 = - delimited_string({format(" ** Warning ** Check input. Calc Pump Efficiency={:.5R}% which is less than 50%, for pump in radiant system {}", - actualEfficiencyPercentage, - state->dataLowTempRadSys->CFloRadSys(RadSysNum).Name)}); + std::string const error_string02 = delimited_string( + {EnergyPlus::format(" ** Warning ** Check input. Calc Pump Efficiency={:.5R}% which is less than 50%, for pump in radiant system {}", + actualEfficiencyPercentage, + state->dataLowTempRadSys->CFloRadSys(RadSysNum).Name)}); EXPECT_EQ(state->dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax, state->dataLowTempRadSys->CFloRadSys(RadSysNum).PumpEffic); EXPECT_TRUE(compare_err_stream(error_string02, true)); EXPECT_EQ(InitErrorFound, false); @@ -2198,10 +2198,10 @@ TEST_F(LowTempRadiantSystemTest, InitLowTempRadiantSystemCFloPump) 0.98; // because of how other parameters are set, this value is equal to the pump efficiency InitLowTempRadiantSystem(*state, false, RadSysNum, systemType, InitErrorFound); actualEfficiencyPercentage = state->dataLowTempRadSys->CFloRadSys(RadSysNum).PumpEffic * 100.0; - std::string const error_string03 = - delimited_string({format(" ** Warning ** Check input. Calc Pump Efficiency={:.5R}% is approaching 100%, for pump in radiant system {}", - actualEfficiencyPercentage, - state->dataLowTempRadSys->CFloRadSys(RadSysNum).Name)}); + std::string const error_string03 = delimited_string( + {EnergyPlus::format(" ** Warning ** Check input. Calc Pump Efficiency={:.5R}% is approaching 100%, for pump in radiant system {}", + actualEfficiencyPercentage, + state->dataLowTempRadSys->CFloRadSys(RadSysNum).Name)}); EXPECT_EQ(state->dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax, state->dataLowTempRadSys->CFloRadSys(RadSysNum).PumpEffic); EXPECT_TRUE(compare_err_stream(error_string03, true)); EXPECT_EQ(InitErrorFound, false); @@ -2244,9 +2244,9 @@ TEST_F(LowTempRadiantSystemTest, InitLowTempRadiantSystemCFloPump) InitLowTempRadiantSystem(*state, false, RadSysNum, systemType, InitErrorFound); actualEfficiencyPercentage = state->dataLowTempRadSys->CFloRadSys(RadSysNum).PumpEffic * 100.0; std::string const error_string04 = delimited_string( - {format(" ** Severe ** Check input. Calc Pump Efficiency={:.5R}% which is bigger than 100%, for pump in radiant system {}", - actualEfficiencyPercentage, - state->dataLowTempRadSys->CFloRadSys(RadSysNum).Name)}); + {EnergyPlus::format(" ** Severe ** Check input. Calc Pump Efficiency={:.5R}% which is bigger than 100%, for pump in radiant system {}", + actualEfficiencyPercentage, + state->dataLowTempRadSys->CFloRadSys(RadSysNum).Name)}); EXPECT_EQ(state->dataLowTempRadSys->CFloRadSys(RadSysNum).WaterVolFlowMax, state->dataLowTempRadSys->CFloRadSys(RadSysNum).PumpEffic); EXPECT_TRUE(compare_err_stream(error_string04, true)); EXPECT_EQ(InitErrorFound, true); diff --git a/tst/EnergyPlus/unit/PollutionModule.unit.cc b/tst/EnergyPlus/unit/PollutionModule.unit.cc index 9d1f4866ef6..485ab322248 100644 --- a/tst/EnergyPlus/unit/PollutionModule.unit.cc +++ b/tst/EnergyPlus/unit/PollutionModule.unit.cc @@ -474,39 +474,39 @@ TEST_F(EnergyPlusFixture, PollutionModule_TestOutputVariables) // Test get output variables for Total Sky Cover and Opaque Sky Cover std::string fuelTypeNames[9] = {"NaturalGas", "Diesel", "Gasoline", "Propane", "FuelOilNo1", "FuelOilNo2", "OtherFuel1", "Coal", "Electricity"}; for (unsigned long i = 0; i < size(fuelTypeNames); i++) { - EXPECT_EQ(format("Site:Environmental Impact {} Source Energy", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} Source Energy", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 0]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} CO2 Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} CO2 Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 1]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} CO Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} CO Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 2]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} CH4 Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} CH4 Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 3]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} NOx Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} NOx Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 4]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} N2O Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} N2O Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 5]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} SO2 Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} SO2 Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 6]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} PM Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} PM Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 7]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} PM10 Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} PM10 Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 8]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} PM2.5 Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} PM2.5 Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 9]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} NH3 Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} NH3 Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 10]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} NMVOC Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} NMVOC Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 11]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} Hg Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} Hg Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 12]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} Pb Emissions Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} Pb Emissions Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 13]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} Water Consumption Volume", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} Water Consumption Volume", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 14]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} Nuclear High Level Waste Mass", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} Nuclear High Level Waste Mass", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 15]->keyColonName); - EXPECT_EQ(format("Site:Environmental Impact {} Nuclear Low Level Waste Volume", fuelTypeNames[i]), + EXPECT_EQ(EnergyPlus::format("Site:Environmental Impact {} Nuclear Low Level Waste Volume", fuelTypeNames[i]), state->dataOutputProcessor->outVars[i * 17 + 16]->keyColonName); } diff --git a/tst/EnergyPlus/unit/WaterCoils.unit.cc b/tst/EnergyPlus/unit/WaterCoils.unit.cc index 8abf829ccbb..25fbf047129 100644 --- a/tst/EnergyPlus/unit/WaterCoils.unit.cc +++ b/tst/EnergyPlus/unit/WaterCoils.unit.cc @@ -1170,14 +1170,14 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterDetailed_WarningMath) EXPECT_EQ(0.81060636699999999, state->dataWaterCoils->WaterCoil(CoilNum).MinAirFlowArea); std::string expected_error = delimited_string({ - format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), + 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", - format(" ** ~~~ ** Air Mass Flow Rate[kg/s]={:.6T}", state->dataWaterCoils->WaterCoil(CoilNum).InletAirMassFlowRate), - format(" ** ~~~ ** Air Face Velocity[m/s]={:.6T}", - AirMassFlow / (state->dataWaterCoils->WaterCoil(CoilNum).MinAirFlowArea * AirDensity)), - format(" ** ~~~ ** Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", - 2.5 * state->dataWaterCoils->WaterCoil(CoilNum).MinAirFlowArea * AirDensity), + EnergyPlus::format(" ** ~~~ ** Air Mass Flow Rate[kg/s]={:.6T}", state->dataWaterCoils->WaterCoil(CoilNum).InletAirMassFlowRate), + EnergyPlus::format(" ** ~~~ ** Air Face Velocity[m/s]={:.6T}", + AirMassFlow / (state->dataWaterCoils->WaterCoil(CoilNum).MinAirFlowArea * AirDensity)), + EnergyPlus::format(" ** ~~~ ** Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", + 2.5 * state->dataWaterCoils->WaterCoil(CoilNum).MinAirFlowArea * AirDensity), " ** ~~~ ** Coil:Cooling:Water:DetailedGeometry could be resized/autosized to handle capacity", }); @@ -1197,11 +1197,11 @@ 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", - format(" ** ~~~ ** Air Mass Flow Rate[kg/s]={:.6T}", state->dataWaterCoils->WaterCoil(CoilNum).InletAirMassFlowRate), - format(" ** ~~~ ** Air Face Velocity[m/s]={:.6T}", - AirMassFlow / (state->dataWaterCoils->WaterCoil(CoilNum).MinAirFlowArea * AirDensity)), - format(" ** ~~~ ** Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", - 44.7 * state->dataWaterCoils->WaterCoil(CoilNum).MinAirFlowArea * AirDensity), + EnergyPlus::format(" ** ~~~ ** Air Mass Flow Rate[kg/s]={:.6T}", state->dataWaterCoils->WaterCoil(CoilNum).InletAirMassFlowRate), + EnergyPlus::format(" ** ~~~ ** Air Face Velocity[m/s]={:.6T}", + AirMassFlow / (state->dataWaterCoils->WaterCoil(CoilNum).MinAirFlowArea * AirDensity)), + EnergyPlus::format(" ** ~~~ ** Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", + 44.7 * state->dataWaterCoils->WaterCoil(CoilNum).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/ZoneTempPredictorCorrector.unit.cc b/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc index 73d654a424b..b33dd226924 100644 --- a/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc +++ b/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc @@ -1872,7 +1872,7 @@ TEST_F(EnergyPlusFixture, HybridModel_processInverseModelMultpHMTest) EXPECT_NE(state->dataZoneTempPredictorCorrector->zoneHeatBalance(numZones).hmThermalMassMultErrIndex, 0); // This is now set, won't be zero anymore std::string const error_string = delimited_string( - {format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), + {EnergyPlus::format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), " ** Warning ** Hybrid model thermal mass multiplier higher than the limit for Hybrid Zone", " ** ~~~ ** This means that the ratio of the zone air heat capacity for the current time step to the", " ** ~~~ ** zone air heat storage is higher than the maximum limit of 30.0."}); From 0702a0afca096f39baed44cf5aadd8d13eee882f Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 19 Feb 2026 12:55:33 -0700 Subject: [PATCH 5/9] ensure CXX20 set project wide --- CMakeLists.txt | 5 +++++ third_party/CMakeLists.txt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea7102f3667..2180859031d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,11 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_CXX_VISIBILITY_PRESET hidden) +# Project-wide default C++ language level (individual third-party targets may lower/raise as needed) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) add_library(project_options INTERFACE) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 38163c9e5ee..8b11c5ecf59 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -75,8 +75,8 @@ elseif(MSVC) # VisualStudio endif() target_compile_features(ssc PRIVATE cxx_std_11) -# C++17 flag is intentionally after ssc -set(CMAKE_CXX_STANDARD 17) +# C++20 flag is intentionally after ssc +set(CMAKE_CXX_STANDARD 20) #Note: the Tarcog files are improperly initializing their virtual base classes, and this 4589 warning # on MSVC is legitimate, but silencing the warning because it's a third-party library From e5bdb5561a4e1d04a2bd626a9f634e3c7ee34851 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 19 Feb 2026 13:39:25 -0700 Subject: [PATCH 6/9] patch fmt for MSVC --- third_party/fmt-8.0.1/include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/fmt-8.0.1/include/fmt/format.h b/third_party/fmt-8.0.1/include/fmt/format.h index 2b886a1be63..ea29f0cd987 100644 --- a/third_party/fmt-8.0.1/include/fmt/format.h +++ b/third_party/fmt-8.0.1/include/fmt/format.h @@ -255,7 +255,7 @@ namespace detail { template FMT_CONSTEXPR20 auto bit_cast(const Source& source) -> Dest { static_assert(sizeof(Dest) == sizeof(Source), "size mismatch"); -#ifdef __cpp_lib_bit_cast +#if defined(__cpp_lib_bit_cast) && !(FMT_MSC_VER >= 1944) if (is_constant_evaluated()) { return std::bit_cast(source); } From 19f24e2d7c6e78656b0d0b0b07a60e71c7d83288 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 19 Feb 2026 13:57:54 -0700 Subject: [PATCH 7/9] update macos_dev_target, time to retire support for intel-based mac? --- .github/workflows/test_pull_requests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pull_requests.yml b/.github/workflows/test_pull_requests.yml index 79e80de36ae..5aae90de714 100644 --- a/.github/workflows/test_pull_requests.yml +++ b/.github/workflows/test_pull_requests.yml @@ -20,7 +20,7 @@ jobs: matrix: include: - os: macos-14 - macos_dev_target: 13.0 + macos_dev_target: 14.0 arch: arm64 python-arch: arm64 run_regressions: true From eada619ca17383c374c5bd8c59fadb032629b8d8 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 19 Feb 2026 14:40:35 -0700 Subject: [PATCH 8/9] qualify format_to --- src/EnergyPlus/PluginManager.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EnergyPlus/PluginManager.cc b/src/EnergyPlus/PluginManager.cc index 9e79bad3300..77d4219ea9e 100644 --- a/src/EnergyPlus/PluginManager.cc +++ b/src/EnergyPlus/PluginManager.cc @@ -86,15 +86,15 @@ template <> struct fmt::formatter return ctx.out(); } if (PyStatus_IsExit(status) != 0) { - return format_to(ctx.out(), "Exited with code {}", status.exitcode); + return fmt::format_to(ctx.out(), "Exited with code {}", status.exitcode); } if (PyStatus_IsError(status) != 0) { auto it = ctx.out(); - it = format_to(it, "Fatal Python error: "); + it = fmt::format_to(it, "Fatal Python error: "); if (status.func != nullptr) { - it = format_to(it, "{}: ", status.func); + it = fmt::format_to(it, "{}: ", status.func); } - it = format_to(it, "{}", status.err_msg); + it = fmt::format_to(it, "{}", status.err_msg); return it; } return ctx.out(); From 602ab1b112f16de252000f529277d591e3609dde Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 19 Feb 2026 16:20:09 -0700 Subject: [PATCH 9/9] don't convert to std::format in Boilers for now --- CMakeLists.txt | 1 - src/EnergyPlus/Boilers.cc | 90 ++++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 44 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2180859031d..8642a21a64e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -292,7 +292,6 @@ add_subdirectory(third_party) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/src) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party) -target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/fmt-8.0.1/include) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/btwxt/include) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/re2) target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/doj) diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index 884f7000a05..73d18d8fe69 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -47,7 +47,6 @@ // C++ Headers #include -#include // ObjexxFCL Headers #include @@ -108,7 +107,7 @@ BoilerSpecs *BoilerSpecs::factory(EnergyPlusData &state, std::string const &obje } // If we didn't find it, fatal - ShowFatalError(state, std::format("LocalBoilerFactory: Error getting inputs for boiler named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, EnergyPlus::format("LocalBoilerFactory: Error getting inputs for boiler named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -174,7 +173,7 @@ void GetBoilerInput(EnergyPlusData &state) int numBoilers = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (numBoilers <= 0) { - ShowSevereError(state, std::format("No {} Equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("No {} Equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -217,9 +216,9 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.NomCap = s_ipsc->rNumericArgs(1); if (s_ipsc->rNumericArgs(1) == 0.0) { - ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, std::format("Invalid {}={:.2f}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, std::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(1))); + ShowSevereError(state, fmt::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); + ShowContinueError(state, EnergyPlus::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(1))); ErrorsFound = true; } if (thisBoiler.NomCap == DataSizing::AutoSize) { @@ -228,13 +227,13 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.NomEffic = s_ipsc->rNumericArgs(2); if (s_ipsc->rNumericArgs(2) == 0.0) { - ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, std::format("Invalid {}={:.3f}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, std::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(2))); + ShowSevereError(state, fmt::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={:.3R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); + ShowContinueError(state, EnergyPlus::format("...{} must be greater than 0.0", s_ipsc->cNumericFieldNames(2))); ErrorsFound = true; } else if (s_ipsc->rNumericArgs(2) > 1.0) { ShowWarningError(state, - std::format("{} = {}: {}={} should not typically be greater than 1.", + fmt::format("{} = {}: {}={} should not typically be greater than 1.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), s_ipsc->cNumericFieldNames(2), @@ -262,19 +261,20 @@ void GetBoilerInput(EnergyPlusData &state) if (thisBoiler.EfficiencyCurve->numDims == 2) { // curve uses water temperature if (thisBoiler.CurveTempMode == TempMode::NOTSET) { // throw error if (!s_ipsc->lAlphaFieldBlanks(3)) { - ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); ShowContinueError(state, - std::format("boilers.Boiler using curve type of {} must specify {}", - Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType], - s_ipsc->cAlphaFieldNames(3))); + EnergyPlus::format("boilers.Boiler using curve type of {} must specify {}", + Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType], + s_ipsc->cAlphaFieldNames(3))); ShowContinueError(state, "Available choices are EnteringBoiler or LeavingBoiler"); } else { - ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, std::format("Field {} is blank", s_ipsc->cAlphaFieldNames(3))); - ShowContinueError(state, - std::format("boilers.Boiler using curve type of {} must specify either EnteringBoiler or LeavingBoiler", - Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType])); + ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Field {} is blank", s_ipsc->cAlphaFieldNames(3))); + ShowContinueError( + state, + EnergyPlus::format("boilers.Boiler using curve type of {} must specify either EnteringBoiler or LeavingBoiler", + Curve::objectNames[(int)thisBoiler.EfficiencyCurve->curveType])); } ErrorsFound = true; } @@ -297,8 +297,8 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.ParasiticElecLoad = s_ipsc->rNumericArgs(8); thisBoiler.ParasiticFuelCapacity = s_ipsc->rNumericArgs(10); if (thisBoiler.FuelType == Constant::eFuel::Electricity && thisBoiler.ParasiticFuelCapacity > 0) { - ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, std::format("{} should be zero when the fuel type is electricity.", s_ipsc->cNumericFieldNames(10))); + ShowWarningError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("{} should be zero when the fuel type is electricity.", s_ipsc->cNumericFieldNames(10))); ShowContinueError(state, "It will be ignored and the simulation continues."); thisBoiler.ParasiticFuelCapacity = 0.0; } @@ -336,8 +336,8 @@ void GetBoilerInput(EnergyPlusData &state) } else if (s_ipsc->cAlphaArgs(7) == "NOTMODULATED") { thisBoiler.FlowMode = DataPlant::FlowMode::NotModulated; } else { - ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); + ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(7), s_ipsc->cAlphaArgs(7))); ShowContinueError(state, "Available choices are ConstantFlow, NotModulated, or LeavingSetpointModulated"); ShowContinueError(state, "Flow mode NotModulated is assumed and the simulation continues."); // We will assume variable flow if not specified @@ -353,7 +353,7 @@ void GetBoilerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, std::format("{}{}", RoutineName, "Errors found in processing " + s_ipsc->cCurrentModuleObject + " input.")); + ShowFatalError(state, EnergyPlus::format("{}{}", RoutineName, "Errors found in processing " + s_ipsc->cCurrentModuleObject + " input.")); } } @@ -378,14 +378,14 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state) OutputProcessor::Group::Plant, OutputProcessor::EndUseCat::Boilers); SetupOutputVariable(state, - std::format("Boiler {} Rate", sFuelType), + EnergyPlus::format("Boiler {} Rate", sFuelType), Constant::Units::W, this->FuelUsed, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - std::format("Boiler {} Energy", sFuelType), + EnergyPlus::format("Boiler {} Energy", sFuelType), Constant::Units::J, this->FuelConsumed, OutputProcessor::TimeStepType::System, @@ -436,14 +436,14 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state) "Boiler Parasitic"); if (this->FuelType != Constant::eFuel::Electricity) { SetupOutputVariable(state, - std::format("Boiler Ancillary {} Rate", sFuelType), + EnergyPlus::format("Boiler Ancillary {} Rate", sFuelType), Constant::Units::W, this->ParasiticFuelRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - std::format("Boiler Ancillary {} Energy", sFuelType), + EnergyPlus::format("Boiler Ancillary {} Energy", sFuelType), Constant::Units::J, this->ParasiticFuelConsumption, OutputProcessor::TimeStepType::System, @@ -502,8 +502,8 @@ void BoilerSpecs::initEachEnvironment(EnergyPlusData &state) (state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo == DataLoopNode::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - std::format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 ... "); @@ -516,8 +516,8 @@ void BoilerSpecs::initEachEnvironment(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->BoilerOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - std::format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); + ShowWarningError( + state, EnergyPlus::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 "); @@ -638,9 +638,10 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, std::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, std::format("User-Specified Nominal Capacity of {:.2f} [W]", NomCapUser)); - ShowContinueError(state, std::format("differs from Design Size Nominal Capacity of {:.2f} [W]", tmpNomCap)); + ShowMessage(state, + EnergyPlus::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."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -652,7 +653,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, std::format("Occurs in Boiler object={}", this->Name)); + ShowContinueError(state, EnergyPlus::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 @@ -692,10 +693,13 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) VolFlowRateUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpBoilerVolFlowRate - VolFlowRateUser) / VolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, std::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); - ShowContinueError(state, std::format("User-Specified Design Water Flow Rate of {:.2f} [m3/s]", VolFlowRateUser)); + ShowMessage(state, + EnergyPlus::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( - state, std::format("differs from Design Size Design Water Flow Rate of {:.2f} [m3/s]", tmpBoilerVolFlowRate)); + state, + EnergyPlus::format("differs from Design Size Design Water Flow Rate of {:.2R} [m3/s]", tmpBoilerVolFlowRate)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); ShowContinueError(state, "Verify that the value entered is intended and is consistent with other components."); } @@ -708,7 +712,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, std::format("Occurs in Boiler object={}", this->Name)); + ShowContinueError(state, EnergyPlus::format("Occurs in Boiler object={}", this->Name)); ErrorsFound = true; } if (!this->VolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && @@ -915,7 +919,7 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, if (this->BoilerLoad > 0.0) { if (this->EffCurveOutputError < 1) { ++this->EffCurveOutputError; - ShowWarningError(state, std::format("Boiler:HotWater \"{}\"", this->Name)); + ShowWarningError(state, EnergyPlus::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)); if (this->EfficiencyCurve->numDims == 2) { @@ -951,7 +955,7 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, NomEffic <= 1.0) { // NomEffic > 1 warning occurs elsewhere; avoid cascading warnings if (this->CalculatedEffError < 1) { ++this->CalculatedEffError; - ShowWarningError(state, std::format("Boiler:HotWater \"{}\"", this->Name)); + ShowWarningError(state, EnergyPlus::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));