diff --git a/src/EnergyPlus/BoilerSteam.hh b/src/EnergyPlus/BoilerSteam.hh index 4e649cc0ec1..886428f83c2 100644 --- a/src/EnergyPlus/BoilerSteam.hh +++ b/src/EnergyPlus/BoilerSteam.hh @@ -114,7 +114,7 @@ namespace BoilerSteam { // Default Constructor BoilerSpecs() - : FuelType(DataGlobalConstants::ResourceType::Unknown), Available(false), ON(false), MissingSetPointErrDone(false), UseLoopSetPoint(false), DesMassFlowRate(0.0), + : FuelType(DataGlobalConstants::ResourceType::None), Available(false), ON(false), MissingSetPointErrDone(false), UseLoopSetPoint(false), DesMassFlowRate(0.0), MassFlowRate(0.0), NomCap(0.0), NomCapWasAutoSized(false), NomEffic(0.0), MinPartLoadRat(0.0), MaxPartLoadRat(0.0), OptPartLoadRat(0.0), OperPartLoadRat(0.0), TempUpLimitBoilerOut(0.0), BoilerMaxOperPress(0.0), BoilerPressCheck(0.0), SizFac(0.0), BoilerInletNodeNum(0), BoilerOutletNodeNum(0), FullLoadCoef(3, 0.0), TypeNum(0), LoopNum(0), LoopSideNum(0), BranchNum(0), CompNum(0), PressErrIndex(0), diff --git a/src/EnergyPlus/Boilers.hh b/src/EnergyPlus/Boilers.hh index 3900572c86c..fc07a6d9869 100644 --- a/src/EnergyPlus/Boilers.hh +++ b/src/EnergyPlus/Boilers.hh @@ -138,7 +138,7 @@ namespace Boilers { // Default Constructor BoilerSpecs() - : FuelType(DataGlobalConstants::ResourceType::Unknown), TypeNum(0), LoopNum(0), LoopSideNum(0), BranchNum(0), CompNum(0), Available(false), + : FuelType(DataGlobalConstants::ResourceType::None), TypeNum(0), LoopNum(0), LoopSideNum(0), BranchNum(0), CompNum(0), Available(false), ON(false), NomCap(0.0), NomCapWasAutoSized(false), NomEffic(0.0), TempDesBoilerOut(0.0), FlowMode(DataPlant::FlowMode::NOTSET), ModulatedFlowSetToLoop(false), ModulatedFlowErrDone(false), VolFlowRate(0.0), VolFlowRateWasAutoSized(false), DesMassFlowRate(0.0), MassFlowRate(0.0), SizFac(0.0), diff --git a/src/EnergyPlus/DXCoils.hh b/src/EnergyPlus/DXCoils.hh index 8a2a486ae15..3340f9a7143 100644 --- a/src/EnergyPlus/DXCoils.hh +++ b/src/EnergyPlus/DXCoils.hh @@ -536,7 +536,7 @@ namespace DXCoils { ErrIndex4(0), LowAmbErrIndex(0), HighAmbErrIndex(0), PLFErrIndex(0), PLRErrIndex(0), PrintLowAmbMessage(false), PrintHighAmbMessage(false), EvapWaterSupplyMode(WaterSupplyFromMains), EvapWaterSupTankID(0), EvapWaterTankDemandARRID(0), CondensateCollectMode(CondensateDiscarded), CondensateTankID(0), CondensateTankSupplyARRID(0), CondensateVdot(0.0), CondensateVol(0.0), - CurrentEndTimeLast(0.0), TimeStepSysLast(0.0), FuelTypeNum(DataGlobalConstants::ResourceType::Unknown), NumOfSpeeds(0), PLRImpact(false), + CurrentEndTimeLast(0.0), TimeStepSysLast(0.0), FuelTypeNum(DataGlobalConstants::ResourceType::None), NumOfSpeeds(0), PLRImpact(false), LatentImpact(false), MSFuelWasteHeat(0.0), MSHPHeatRecActive(false), MSHPDesignSpecIndex(0), CoolingCoilPresent(true), HeatingCoilPresent(true), ISHundredPercentDOASDXCoil(false), SHRFTemp(MaxModes, 0), SHRFTempErrorIndex(0), SHRFFlow(MaxModes, 0), SHRFFlowErrorIndex(0), SHRFTemp2(0), SHRFFlow2(0), diff --git a/src/EnergyPlus/DataGlobalConstants.cc b/src/EnergyPlus/DataGlobalConstants.cc index dd2c602314a..2fef3b87d3d 100644 --- a/src/EnergyPlus/DataGlobalConstants.cc +++ b/src/EnergyPlus/DataGlobalConstants.cc @@ -98,8 +98,7 @@ namespace DataGlobalConstants { int const endUseRefrigeration(13); int const endUseCogeneration(14); - std::vector AllResourceTypes({ResourceType::Unknown, - ResourceType::None, + std::vector AllResourceTypes({ResourceType::None, ResourceType::Electricity, ResourceType::Natural_Gas, ResourceType::Gasoline, @@ -177,10 +176,10 @@ namespace DataGlobalConstants { } else if (SELECT_CASE_var == "COAL") { return ResourceType::Coal; - } else if ((SELECT_CASE_var == "FUELOILNO1") || (SELECT_CASE_var == "FuelOilNo1")) { + } else if (SELECT_CASE_var == "FUELOILNO1") { return ResourceType::FuelOil_1; - } else if ((SELECT_CASE_var == "FUELOILNO2") || (SELECT_CASE_var == "FuelOilNo2")) { + } else if (SELECT_CASE_var == "FUELOILNO2") { return ResourceType::FuelOil_2; } else if (SELECT_CASE_var == "PROPANE") { @@ -301,7 +300,7 @@ namespace DataGlobalConstants { return ResourceType::PlantLoopCoolingDemand; } else { - return ResourceType::Unknown; + return ResourceType::None; } } } diff --git a/src/EnergyPlus/DataGlobalConstants.hh b/src/EnergyPlus/DataGlobalConstants.hh index d6873c3d682..c81813388b1 100644 --- a/src/EnergyPlus/DataGlobalConstants.hh +++ b/src/EnergyPlus/DataGlobalConstants.hh @@ -80,7 +80,6 @@ namespace DataGlobalConstants { // Resource Types enum class ResourceType { - Unknown, None, Electricity, Natural_Gas, diff --git a/src/EnergyPlus/DataZoneEquipment.hh b/src/EnergyPlus/DataZoneEquipment.hh index 263787772d9..ff831c64a2c 100644 --- a/src/EnergyPlus/DataZoneEquipment.hh +++ b/src/EnergyPlus/DataZoneEquipment.hh @@ -172,7 +172,7 @@ namespace DataZoneEquipment { // Default Constructor EquipMeterData() - : ReportVarUnits(OutputProcessor::Unit::None), ResourceType(DataGlobalConstants::ResourceType::Unknown), EndUse_CompMode(0), ReportVarIndex(0), + : ReportVarUnits(OutputProcessor::Unit::None), ResourceType(DataGlobalConstants::ResourceType::None), EndUse_CompMode(0), ReportVarIndex(0), ReportVarIndexType(OutputProcessor::TimeStepType::TimeStepZone), ReportVarType(0), CurMeterReading(0.0) { } diff --git a/src/EnergyPlus/EconomicLifeCycleCost.cc b/src/EnergyPlus/EconomicLifeCycleCost.cc index c783f4eb872..1ee4c2600d8 100644 --- a/src/EnergyPlus/EconomicLifeCycleCost.cc +++ b/src/EnergyPlus/EconomicLifeCycleCost.cc @@ -1642,7 +1642,7 @@ namespace EconomicLifeCycleCost { } // compute the Single Present Value factors based on the discount rate SPV.allocate(lengthStudyYears); - for (int year = 1; year <= lengthStudyYears; ++lengthStudyYears) { + for (int year = 1; year <= lengthStudyYears; ++year) { std::map yearMap; for (auto iResource : DataGlobalConstants::AllResourceTypes) { yearMap.insert(std::pair (iResource, 0.0)); diff --git a/src/EnergyPlus/EconomicLifeCycleCost.hh b/src/EnergyPlus/EconomicLifeCycleCost.hh index 48e39f36b69..1013fe89bad 100644 --- a/src/EnergyPlus/EconomicLifeCycleCost.hh +++ b/src/EnergyPlus/EconomicLifeCycleCost.hh @@ -235,7 +235,7 @@ namespace EconomicLifeCycleCost { // last year is baseDateYear + lengthStudyYears - 1 // Default Constructor - UsePriceEscalationType() : resource(DataGlobalConstants::ResourceType::Unknown), escalationStartYear(0), escalationStartMonth(0) + UsePriceEscalationType() : resource(DataGlobalConstants::ResourceType::None), escalationStartYear(0), escalationStartMonth(0) { } }; @@ -249,7 +249,7 @@ namespace EconomicLifeCycleCost { // last year is baseDateYear + lengthStudyYears - 1 // Default Constructor - UseAdjustmentType() : resource(DataGlobalConstants::ResourceType::Unknown) + UseAdjustmentType() : resource(DataGlobalConstants::ResourceType::None) { } }; @@ -270,7 +270,7 @@ namespace EconomicLifeCycleCost { Array1D yrPresVal; // present value by year, first year is baseDateYear // Default Constructor - CashFlowType() : SourceKind(0), Resource(DataGlobalConstants::ResourceType::Unknown), Category(0), pvKind(0), presentValue(0.), orginalCost(0.) + CashFlowType() : SourceKind(0), Resource(DataGlobalConstants::ResourceType::None), Category(0), pvKind(0), presentValue(0.), orginalCost(0.) { } }; diff --git a/src/EnergyPlus/EconomicTariff.hh b/src/EnergyPlus/EconomicTariff.hh index 82471277af1..8a96e7d6f7f 100644 --- a/src/EnergyPlus/EconomicTariff.hh +++ b/src/EnergyPlus/EconomicTariff.hh @@ -414,7 +414,7 @@ namespace EconomicTariff { // Default Constructor TariffType() - : reportMeterIndx(0), kindElectricMtr(0), kindWaterMtr(0), kindGasMtr(0), resourceNum(DataGlobalConstants::ResourceType::Unknown), + : reportMeterIndx(0), kindElectricMtr(0), kindWaterMtr(0), kindGasMtr(0), resourceNum(DataGlobalConstants::ResourceType::None), convChoice(0), energyConv(0.0), demandConv(0.0), periodSchIndex(0), seasonSchIndex(0), monthSchIndex(0), demandWindow(0), demWinTime(0.0), monthChgVal(0.0), monthChgPt(0), minMonthChgVal(0.0), minMonthChgPt(0), chargeSchIndex(0), baseUseSchIndex(0), buyOrSell(0), firstCategory(0), lastCategory(0), diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh index b2150a236dd..d912e0c2d16 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh @@ -405,7 +405,7 @@ namespace HVACVariableRefrigerantFlow { OperatingMode(0), ElecPower(0.0), ElecCoolingPower(0.0), ElecHeatingPower(0.0), CoolElecConsumption(0.0), HeatElecConsumption(0.0), CrankCaseHeaterPower(0.0), CrankCaseHeaterElecConsumption(0.0), EvapCondPumpElecPower(0.0), EvapCondPumpElecConsumption(0.0), EvapWaterConsumpRate(0.0), HRMaxTempLimitIndex(0), CoolingMaxTempLimitIndex(0), HeatingMaxTempLimitIndex(0), - FuelTypeNum(DataGlobalConstants::ResourceType::Unknown), + FuelTypeNum(DataGlobalConstants::ResourceType::None), SUMultiplier(0.0), TUCoolingLoad(0.0), TUHeatingLoad(0.0), SwitchedMode(false), OperatingCOP(0.0), MinOATHeatRecovery(0.0), MaxOATHeatRecovery(0.0), HRCAPFTCool(0), HRCAPFTCoolConst(0.9), HRInitialCoolCapFrac(0.5), HRCoolCapTC(0.15), HREIRFTCool(0), HREIRFTCoolConst(1.1), HRInitialCoolEIRFrac(1.0), HRCoolEIRTC(0.0), HRCAPFTHeat(0), HRCAPFTHeatConst(1.1), HRInitialHeatCapFrac(1.0), diff --git a/src/EnergyPlus/HeatingCoils.hh b/src/EnergyPlus/HeatingCoils.hh index 631f62a439d..f58ac7f1ef6 100644 --- a/src/EnergyPlus/HeatingCoils.hh +++ b/src/EnergyPlus/HeatingCoils.hh @@ -176,7 +176,7 @@ namespace HeatingCoils { int AirLoopNum; // Airloop number // Default Constructor HeatingCoilEquipConditions() - : HCoilType_Num(0), FuelType_Num(DataGlobalConstants::ResourceType::Unknown), SchedPtr(0), InsuffTemperatureWarn(0), + : HCoilType_Num(0), FuelType_Num(DataGlobalConstants::ResourceType::None), SchedPtr(0), InsuffTemperatureWarn(0), InletAirMassFlowRate(0.0), OutletAirMassFlowRate(0.0), InletAirTemp(0.0), OutletAirTemp(0.0), InletAirHumRat(0.0), OutletAirHumRat(0.0), InletAirEnthalpy(0.0), OutletAirEnthalpy(0.0), HeatingCoilLoad(0.0), HeatingCoilRate(0.0), FuelUseLoad(0.0), ElecUseLoad(0.0), FuelUseRate(0.0), ElecUseRate(0.0), Efficiency(0.0), diff --git a/src/EnergyPlus/Plant/MeterData.hh b/src/EnergyPlus/Plant/MeterData.hh index abe88e98507..fe200bdd371 100644 --- a/src/EnergyPlus/Plant/MeterData.hh +++ b/src/EnergyPlus/Plant/MeterData.hh @@ -69,7 +69,7 @@ namespace DataPlant { // Default Constructor MeterData() - : ReportVarUnits(OutputProcessor::Unit::None), ResourceType(DataGlobalConstants::ResourceType::Unknown), EndUse_CompMode(0), ReportVarIndex(0), + : ReportVarUnits(OutputProcessor::Unit::None), ResourceType(DataGlobalConstants::ResourceType::None), EndUse_CompMode(0), ReportVarIndex(0), ReportVarIndexType(OutputProcessor::TimeStepType::TimeStepZone), ReportVarType(0), CurMeterReading(0.0) { } diff --git a/tst/EnergyPlus/unit/DataGlobalConstants.unit.cc b/tst/EnergyPlus/unit/DataGlobalConstants.unit.cc index 5d8437e6db4..a29f26c3076 100644 --- a/tst/EnergyPlus/unit/DataGlobalConstants.unit.cc +++ b/tst/EnergyPlus/unit/DataGlobalConstants.unit.cc @@ -106,7 +106,7 @@ TEST_F(EnergyPlusFixture, DataGlobalConstants_AssignResourceTypeNum) EXPECT_EQ(DataGlobalConstants::ResourceType::CarbonEquivalent, DataGlobalConstants::AssignResourceTypeNum("Carbon Equivalent")); EXPECT_EQ(DataGlobalConstants::ResourceType::PlantLoopHeatingDemand, DataGlobalConstants::AssignResourceTypeNum("PlantLoopHeatingDemand")); EXPECT_EQ(DataGlobalConstants::ResourceType::PlantLoopCoolingDemand, DataGlobalConstants::AssignResourceTypeNum("PlantLoopCoolingDemand")); - EXPECT_EQ(DataGlobalConstants::ResourceType::Unknown, DataGlobalConstants::AssignResourceTypeNum("XYZ")); + EXPECT_EQ(DataGlobalConstants::ResourceType::None, DataGlobalConstants::AssignResourceTypeNum("XYZ")); } TEST_F(EnergyPlusFixture, DataGlobalConstants_GetResourceTypeChar) @@ -157,7 +157,7 @@ TEST_F(EnergyPlusFixture, DataGlobalConstants_GetResourceTypeChar) EXPECT_EQ(DataGlobalConstants::GetResourceTypeChar(DataGlobalConstants::ResourceType::CarbonEquivalent), "Carbon Equivalent"); EXPECT_EQ(DataGlobalConstants::GetResourceTypeChar(DataGlobalConstants::ResourceType::PlantLoopHeatingDemand), "PlantLoopHeatingDemand"); EXPECT_EQ(DataGlobalConstants::GetResourceTypeChar(DataGlobalConstants::ResourceType::PlantLoopCoolingDemand), "PlantLoopCoolingDemand"); - EXPECT_EQ(DataGlobalConstants::GetResourceTypeChar(DataGlobalConstants::ResourceType::Unknown), "Unknown"); + EXPECT_EQ(DataGlobalConstants::GetResourceTypeChar(DataGlobalConstants::ResourceType::None), "Unknown"); EXPECT_EQ(DataGlobalConstants::GetResourceTypeChar(DataGlobalConstants::ResourceType::None), "Unknown"); }