diff --git a/src/EnergyPlus/BaseboardElectric.cc b/src/EnergyPlus/BaseboardElectric.cc index 61b00dadfc8..50b6c66a5ea 100644 --- a/src/EnergyPlus/BaseboardElectric.cc +++ b/src/EnergyPlus/BaseboardElectric.cc @@ -353,7 +353,7 @@ namespace BaseboardElectric { thisBaseboard.EquipName, Constant::eResource::EnergyTransfer, OutputProcessor::Group::HVAC, - OutputProcessor::EndUseCat::Baseboard); + OutputProcessor::EndUseCat::Baseboard); SetupOutputVariable(state, "Baseboard Total Heating Rate", @@ -371,7 +371,7 @@ namespace BaseboardElectric { OutputProcessor::StoreType::Sum, thisBaseboard.EquipName, Constant::eResource::Electricity, - OutputProcessor::Group::HVAC, + OutputProcessor::Group::HVAC, OutputProcessor::EndUseCat::Heating); SetupOutputVariable(state, diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index e7574e0c48c..ad0978f75ed 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -438,7 +438,7 @@ namespace BaseboardRadiator { OutputProcessor::StoreType::Sum, thisBaseboard.EquipID, Constant::eResource::EnergyTransfer, - OutputProcessor::Group::HVAC, + OutputProcessor::Group::HVAC, OutputProcessor::EndUseCat::Baseboard); SetupOutputVariable(state, diff --git a/src/EnergyPlus/ExternalInterface.cc b/src/EnergyPlus/ExternalInterface.cc index 536aad9232f..b71204e00fd 100644 --- a/src/EnergyPlus/ExternalInterface.cc +++ b/src/EnergyPlus/ExternalInterface.cc @@ -2403,7 +2403,7 @@ void GetReportVariableKey( // SUBROUTINE LOCAL VARIABLE DECLARATIONS: OutputProcessor::VariableType varType(OutputProcessor::VariableType::Invalid); // 0=not found, 1=integer, 2=real, 3=meter int numKeys(0); // Number of keys found - OutputProcessor::StoreType varAvgSum(OutputProcessor::StoreType::Average); // Variable is Averaged=1 or Summed=2 + OutputProcessor::StoreType varAvgSum(OutputProcessor::StoreType::Average); // Variable is Averaged=1 or Summed=2 OutputProcessor::TimeStepType varStepType(OutputProcessor::TimeStepType::Zone); // Variable time step is Zone=1 or HVAC=2 Constant::Units varUnits(Constant::Units::None); // Units sting, may be blank Array1D_string keyNames; diff --git a/src/EnergyPlus/HVACFan.cc b/src/EnergyPlus/HVACFan.cc index 752df92a671..d3d50685f6a 100644 --- a/src/EnergyPlus/HVACFan.cc +++ b/src/EnergyPlus/HVACFan.cc @@ -634,7 +634,7 @@ namespace HVACFan { Constant::eResource::Electricity, OutputProcessor::Group::HVAC, OutputProcessor::EndUseCat::Fans, - m_endUseSubcategoryName); + m_endUseSubcategoryName); SetupOutputVariable(state, "Fan Air Mass Flow Rate", Constant::Units::kg_s, diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index 9713a24787b..7d3222c5683 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -252,7 +252,7 @@ namespace OutputProcessor { void SetupTimePointers(EnergyPlusData &state, TimeStepType const timeStep, // Which timestep is being set up, 'Zone'=1, 'HVAC'=2 - Real64 &TimeStep // The timestep variable. Used to get the address + Real64 &TimeStep // The timestep variable. Used to get the address ) { @@ -545,7 +545,7 @@ namespace OutputProcessor { } } - std::string produceDateString(int const date, // Date of min/max + std::string produceDateString(int const date, // Date of min/max ReportFreq const freq // Reporting Frequency ) { @@ -578,7 +578,7 @@ namespace OutputProcessor { case ReportFreq::Year: case ReportFreq::Simulation: return format("{:2},{:2},{:2},{:2}", Mon, Day, Hour, Minute); - default: + default: return std::string(); } } @@ -1336,7 +1336,7 @@ namespace OutputProcessor { std::string const &Name, // Name for the meter Constant::Units const units, // Units for the meter Constant::eResource resource, // ResourceType for the meter - EndUseCat endUseCat, // EndUse for the meter + EndUseCat endUseCat, // EndUse for the meter std::string_view const EndUseSub, // EndUse subcategory for the meter Group group, int outVarNum) // Variable index @@ -1410,9 +1410,9 @@ namespace OutputProcessor { void AttachMeters(EnergyPlusData &state, Constant::Units const units, // Units for this meter Constant::eResource resource, // Electricity, Gas, etc. - EndUseCat endUseCat, // End-use category (Lights, Heating, etc.) + EndUseCat endUseCat, // End-use category (Lights, Heating, etc.) std::string_view const EndUseSub, // End-use subcategory (user-defined, e.g., General Lights, Task Lights, etc.) - Group group, // Group key (Facility, Zone, Building, etc.) + Group group, // Group key (Facility, Zone, Building, etc.) std::string const &ZoneName, // Zone key only applicable for Building group std::string const &SpaceType, // Space Type key only applicable for Building group int const outVarNum // Number of this report variable @@ -2433,7 +2433,7 @@ namespace OutputProcessor { : ((units == Constant::Units::Invalid) ? "" : Constant::unitNames[(int)units]); std::string_view schedString = (SchedPtr != 0) ? state.dataScheduleMgr->Schedule(SchedPtr).Name : ""; - + if (state.files.eso.good()) { print(state.files.eso, "{},{},{},{} [{}]{}{}{}\n", @@ -2452,8 +2452,7 @@ namespace OutputProcessor { op->freqTrackingVariables[(int)freq] = true; if (sql) { - sql->createSQLiteReportDictionaryRecord( - ReportID, storeType, indexGroup, key, name, timeStepType, unitsString, freq, false, schedString); + sql->createSQLiteReportDictionaryRecord(ReportID, storeType, indexGroup, key, name, timeStepType, unitsString, freq, false, schedString); } // add to ResultsFramework for output variable list, need to check RVI/MVI later @@ -2464,12 +2463,12 @@ namespace OutputProcessor { void WriteMeterDictionaryItem(EnergyPlusData &state, ReportFreq const freq, // The reporting interval (e.g., hourly, daily) StoreType const storeType, - int const reportID, // The reporting ID in for the variable - std::string const &indexGroup, // The reporting group for the variable - std::string const &meterName, // The variable's meter name - Constant::Units const units, // The variables units - bool const cumulativeMeterFlag, // A flag indicating cumulative data - bool const meterFileOnlyFlag // A flag indicating whether the data is to be written to standard output + int const reportID, // The reporting ID in for the variable + std::string const &indexGroup, // The reporting group for the variable + std::string const &meterName, // The variable's meter name + Constant::Units const units, // The variables units + bool const cumulativeMeterFlag, // A flag indicating cumulative data + bool const meterFileOnlyFlag // A flag indicating whether the data is to be written to standard output ) { @@ -2528,7 +2527,7 @@ namespace OutputProcessor { } // WriteMeterDictionaryItem() void OutVar::writeOutput(EnergyPlusData &state, - ReportFreq const reportFreq // The report type or interval (e.g., hourly) + ReportFreq const reportFreq // The report type or interval (e.g., hourly) ) { @@ -2547,7 +2546,7 @@ namespace OutputProcessor { if (state.dataSysVars->UpdateDataDuringWarmupExternalInterface && !state.dataSysVars->ReportDuringWarmup) return; if (!Report || freq != reportFreq || !Stored) return; - + if (NumStored > 0.0) { writeReportData(state); ++state.dataGlobal->StdOutputRecordCount; @@ -2601,9 +2600,7 @@ namespace OutputProcessor { } } // WriteCumulativeReportMeterData() - void MeterPeriod::WriteReportData(EnergyPlusData &state, - ReportFreq const freq - ) + void MeterPeriod::WriteReportData(EnergyPlusData &state, ReportFreq const freq) { // SUBROUTINE INFORMATION: @@ -2621,14 +2618,13 @@ namespace OutputProcessor { if (Value == 0.0) { NumberOut = "0.0"; } else { - char tmp[128]; - dtoa(Value, tmp); - NumberOut = std::string(tmp); + char tmp[128]; + dtoa(Value, tmp); + NumberOut = std::string(tmp); } if (sql) { - sql->createSQLiteReportDataRecord( - RptNum, Value, freq, MinVal, MinValDate, MaxVal, MaxValDate, state.dataGlobal->MinutesPerTimeStep); + sql->createSQLiteReportDataRecord(RptNum, Value, freq, MinVal, MinValDate, MaxVal, MaxValDate, state.dataGlobal->MinutesPerTimeStep); } if ((freq == ReportFreq::EachCall) || (freq == ReportFreq::TimeStep) || (freq == ReportFreq::Hour)) { // -1, 0, 1 @@ -2646,7 +2642,7 @@ namespace OutputProcessor { char minValString[128], maxValString[128]; dtoa(MinVal, minValString); dtoa(MaxVal, maxValString); - + std::string minDateString = produceDateString(MinValDate, freq); std::string maxDateString = produceDateString(MaxValDate, freq); @@ -2741,8 +2737,8 @@ namespace OutputProcessor { // easier maintenance and writing of data to the SQL database. // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - std::string MaxOut; // Character for Max out string - std::string MinOut; // Character for Min out string + std::string MaxOut; // Character for Max out string + std::string MinOut; // Character for Min out string auto &rf = state.dataResultsFramework->resultsFramework; auto &sql = state.dataSQLiteProcedures->sqlite; @@ -2771,22 +2767,22 @@ namespace OutputProcessor { // floats? NumberOut = (repVal == 0.0) ? "0.0" : format("{:f}", repVal); } - + if ((freq == ReportFreq::EachCall) || (freq == ReportFreq::TimeStep) || (freq == ReportFreq::Hour)) { // -1, 0, 1 print(state.files.eso, "{},{}\n", ReportID, NumberOut); } else { char minValString[128], maxValString[128]; dtoa(MinValue, minValString); dtoa(MaxValue, maxValString); - + std::string minDateString = produceDateString(minValueDate, freq); std::string maxDateString = produceDateString(maxValueDate, freq); - + print(state.files.eso, "{},{},{},{},{},{}\n", ReportID, NumberOut, minValString, minDateString, maxValString, maxDateString); } } } // OutVar::WriteReportData() - + int DetermineIndexGroupKeyFromMeterName([[maybe_unused]] EnergyPlusData &state, std::string const &meterName) // the meter name { @@ -2925,23 +2921,23 @@ namespace OutputProcessor { // TODO: Probably move these to a different location void SetupOutputVariable(EnergyPlusData &state, - std::string_view const name, // String Name of variable (with units) - Constant::Units const units, // Actual units corresponding to the actual variable - Real64 &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::TimeStepType timeStep, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::StoreType store, // State, Average=1, NonState, Sum=2 - std::string const &key, // Associated Key for this variable - Constant::eResource resource, // Meter Resource Type (Electricity, Gas, etc) - OutputProcessor::Group group, // Meter Super Group Key (Building, System, Plant) - OutputProcessor::EndUseCat endUseCat, // Meter End Use Key (Lights, Heating, Cooling, etc) - std::string_view const EndUseSub, // Meter End Use Sub Key (General Lights, Task Lights, etc) - std::string const &zone, // Meter Zone Key (zone name) - int const ZoneMult, // Zone Multiplier, defaults to 1 - int const ZoneListMult, // Zone List Multiplier, defaults to 1 - std::string const &spaceType, // Space type (applicable for Building group only) - int const indexGroupKey, // Group identifier for SQL output - std::string_view const customUnitName, // the custom name for the units from EMS definition of units - OutputProcessor::ReportFreq freq // Internal use -- causes reporting at this frequency + std::string_view const name, // String Name of variable (with units) + Constant::Units const units, // Actual units corresponding to the actual variable + Real64 &ActualVariable, // Actual Variable, used to set up pointer + OutputProcessor::TimeStepType timeStep, // Zone, HeatBalance=1, HVAC, System, Plant=2 + OutputProcessor::StoreType store, // State, Average=1, NonState, Sum=2 + std::string const &key, // Associated Key for this variable + Constant::eResource resource, // Meter Resource Type (Electricity, Gas, etc) + OutputProcessor::Group group, // Meter Super Group Key (Building, System, Plant) + OutputProcessor::EndUseCat endUseCat, // Meter End Use Key (Lights, Heating, Cooling, etc) + std::string_view const EndUseSub, // Meter End Use Sub Key (General Lights, Task Lights, etc) + std::string const &zone, // Meter Zone Key (zone name) + int const ZoneMult, // Zone Multiplier, defaults to 1 + int const ZoneListMult, // Zone List Multiplier, defaults to 1 + std::string const &spaceType, // Space type (applicable for Building group only) + int const indexGroupKey, // Group identifier for SQL output + std::string_view const customUnitName, // the custom name for the units from EMS definition of units + OutputProcessor::ReportFreq freq // Internal use -- causes reporting at this frequency ) { @@ -3030,7 +3026,7 @@ void SetupOutputVariable(EnergyPlusData &state, var->ZoneListMult = ZoneListMult; var->indexGroupKey = indexGroupKey; var->indexGroup = timeStepTypeNames[(int)var->timeStepType]; - + // This is only done for the first variable in the list. It // could be moved out of this loop entirely but then some // numberings in unit tests would not line up @@ -3056,14 +3052,14 @@ void SetupOutputVariable(EnergyPlusData &state, } // SetupOutputVariable() void SetupOutputVariable(EnergyPlusData &state, - std::string_view const name, // String Name of variable - Constant::Units const units, // Actual units corresponding to the actual variable - int &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::TimeStepType timeStepType, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::StoreType storeType, // State, Average=1, NonState, Sum=2 - std::string const &key, // Associated Key for this variable - int const indexGroupKey, // Group identifier for SQL output - OutputProcessor::ReportFreq freq // Internal use -- causes reporting at this freqency + std::string_view const name, // String Name of variable + Constant::Units const units, // Actual units corresponding to the actual variable + int &ActualVariable, // Actual Variable, used to set up pointer + OutputProcessor::TimeStepType timeStepType, // Zone, HeatBalance=1, HVAC, System, Plant=2 + OutputProcessor::StoreType storeType, // State, Average=1, NonState, Sum=2 + std::string const &key, // Associated Key for this variable + int const indexGroupKey, // Group identifier for SQL output + OutputProcessor::ReportFreq freq // Internal use -- causes reporting at this freqency ) { @@ -3131,7 +3127,7 @@ void SetupOutputVariable(EnergyPlusData &state, var->ReportID = ++op->ReportNumberCounter; var->Which = &ActualVariable; var->indexGroupKey = -1; - + if (reqVarNum == -1) continue; var->Report = true; @@ -3216,9 +3212,7 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co for (auto *var : op->outVars) { if (var->timeStepType != t_TimeStepTypeKey) continue; - Real64 value = (var->varType == VariableType::Real) ? - *(dynamic_cast(var))->Which : - *(dynamic_cast(var))->Which; + Real64 value = (var->varType == VariableType::Real) ? *(dynamic_cast(var))->Which : *(dynamic_cast(var))->Which; var->Stored = true; @@ -3226,7 +3220,7 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co Real64 CurVal = value * rxTime; // TODO: Is this correct? Integer logic is different if (var->varType == VariableType::Real) { - if (value > var->MaxValue) { + if (value > var->MaxValue) { var->MaxValue = value; var->maxValueDate = MDHM; } @@ -3235,7 +3229,7 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co var->minValueDate = MDHM; } } else { // var->varType == VariableType::Integer - if (CurVal > var->MaxValue) { + if (CurVal > var->MaxValue) { var->MaxValue = CurVal; var->maxValueDate = MDHM; } @@ -3271,7 +3265,7 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co } if (var->freq != ReportFreq::EachCall) continue; - + if (TimePrint) { if (op->LHourP != state.dataGlobal->HourOfDay || std::abs(op->LStartMin - StartMinute) > 0.001 || std::abs(op->LEndMin - op->TimeValue[(int)t_TimeStepTypeKey].CurMinute) > 0.001) { @@ -3298,16 +3292,15 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co } TimePrint = false; } - + WriteNumericData(state, var->ReportID, value); ++state.dataGlobal->StdOutputRecordCount; - + if (rf->timeSeriesEnabled()) { rf->detailedTSData[(int)t_TimeStepTypeKey].pushVariableValue(var->ReportID, value); - } + } } // for (var) - if (t_TimeStepTypeKey == TimeStepType::System) return; // All other stuff happens at the "zone" time step call to this routine. // TimeStep Block (Report on Zone TimeStep) @@ -3450,7 +3443,7 @@ void UpdateDataandReport(EnergyPlusData &state, OutputProcessor::TimeStepType co op->TimeValue[(int)TimeStepType::System].CurMinute = 0.0; for (auto *var : op->outVars) { - + if (var->timeStepType != TimeStepType::Zone && var->timeStepType != TimeStepType::System) continue; // ReportNow=.TRUE. @@ -4515,8 +4508,7 @@ void InitPollutionMeterReporting(EnergyPlusData &state, OutputProcessor::ReportF // has not been done previously if (!period.Rpt) { period.Rpt = true; - WriteMeterDictionaryItem( - state, freq, StoreType::Sum, period.RptNum, meter->indexGroup, meter->Name, meter->units, false, false); + WriteMeterDictionaryItem(state, freq, StoreType::Sum, period.RptNum, meter->indexGroup, meter->Name, meter->units, false, false); op->freqTrackingVariables[(int)freq] = true; } } diff --git a/src/EnergyPlus/OutputProcessor.hh b/src/EnergyPlus/OutputProcessor.hh index 17c0b85b0d9..48a2adab8f7 100644 --- a/src/EnergyPlus/OutputProcessor.hh +++ b/src/EnergyPlus/OutputProcessor.hh @@ -167,12 +167,12 @@ namespace OutputProcessor { { Invalid = -1, Average, // Type value for "averaged" variables // TODO: is this just for printing annual tables - Sum, // Type value for "summed" variables + Sum, // Type value for "summed" variables Num }; constexpr std::array storeTypeNames = { - // "UNUSED", + // "UNUSED", "Average", // Averaged "Sum" // Summed }; @@ -180,15 +180,15 @@ namespace OutputProcessor { enum class TimeStepType { Invalid = -1, - Zone, // Type value for "zone" timestep variables // TODO: is this just for printing Annual tables? - System, // Type value for "system" timestep variables + Zone, // Type value for "zone" timestep variables // TODO: is this just for printing Annual tables? + System, // Type value for "system" timestep variables Num }; constexpr std::array timeStepTypeNames = { - // "UNUSED", - "Zone", // Zone - "System" // System + // "UNUSED", + "Zone", // Zone + "System" // System }; enum class EndUseCat @@ -247,109 +247,107 @@ namespace OutputProcessor { Num }; - static constexpr std::array endUseCatNames = { - "Heating", - "Cooling", - "InteriorLights", - "ExteriorLights", - "InteriorEquipment", - "ExteriorEquipment", - "Fans", - "Pumps", - "HeatRejection", - "Humidifier", - "HeatRecovery", - "WaterSystems", - "Refrigeration", - "Cogeneration", - "Baseboard", - "Boilers", - "CarbonEquivalentEmissions", - "Chillers", - "CoalEmissions", - "ColdStorageCharge", - "ColdStorageDischarge", - "Condensate", - "CoolingCoils", - "CoolingPanel", - "DieselEmissions", - "DistrictChilledWater", - "DistrictHotWater", - "ElectricityEmissions", - "ElectricStorage", - "FreeCooling", - "FuelOilNo1Emissions", - "FuelOilNo2Emissions", - "GasolineEmissions", - "HeatingCoils", - "HeatProduced", - "HeatRecoveryForCooling", - "HeatRecoveryForHeating", - "LoopToLoop", - "MainsWater", - "NaturalGasEmissions", - "OtherFuel1Emissions", - "OtherFuel2Emissions", - "Photovoltaic", - "PowerConversion", - "PropaneEmissions", - "PurchasedElectricityEmissions", - "RainWater", - "SoldElectricityEmissions", - "WellWater", - "WindTurbine"}; - - static constexpr std::array endUseCatNamesUC = { - "HEATING", - "COOLING", - "INTERIORLIGHTS", - "EXTERIORLIGHTS", - "INTERIOREQUIPMENT", - "EXTERIOREQUIPMENT", - "FANS", - "PUMPS", - "HEATREJECTION", - "HUMIDIFIER", - "HEATRECOVERY", - "WATERSYSTEMS", - "REFRIGERATION", - "COGENERATION", - "BASEBOARD", - "BOILERS", - "CARBONEQUIVALENTEMISSIONS", - "CHILLERS", - "COALEMISSIONS", - "COLDSTORAGECHARGE", - "COLDSTORAGEDISCHARGE", - "CONDENSATE", - "COOLINGCOILS", - "COOLINGPANEL", - "DIESELEMISSIONS", - "DISTRICTCHILLEDWATER", - "DISTRICTHOTWATER", - "ELECTRICITYEMISSIONS", - "ELECTRICSTORAGE", - "FREECOOLING", - "FUELOILNO1EMISSIONS", - "FUELOILNO2EMISSIONS", - "GASOLINEEMISSIONS", - "HEATINGCOILS", - "HEATPRODUCED", - "HEATRECOVERYFORCOOLING", - "HEATRECOVERYFORHEATING", - "LOOPTOLOOP", - "MAINSWATER", - "NATURALGASEMISSIONS", - "OTHERFUEL1EMISSIONS", - "OTHERFUEL2EMISSIONS", - "PHOTOVOLTAIC", - "POWERCONVERSION", - "PROPANEEMISSIONS", - "PURCHASEDELECTRICITYEMISSIONS", - "RAINWATER", - "SOLDELECTRICITYEMISSIONS", - "WELLWATER", - "WINDTURBINE"}; + static constexpr std::array endUseCatNames = {"Heating", + "Cooling", + "InteriorLights", + "ExteriorLights", + "InteriorEquipment", + "ExteriorEquipment", + "Fans", + "Pumps", + "HeatRejection", + "Humidifier", + "HeatRecovery", + "WaterSystems", + "Refrigeration", + "Cogeneration", + "Baseboard", + "Boilers", + "CarbonEquivalentEmissions", + "Chillers", + "CoalEmissions", + "ColdStorageCharge", + "ColdStorageDischarge", + "Condensate", + "CoolingCoils", + "CoolingPanel", + "DieselEmissions", + "DistrictChilledWater", + "DistrictHotWater", + "ElectricityEmissions", + "ElectricStorage", + "FreeCooling", + "FuelOilNo1Emissions", + "FuelOilNo2Emissions", + "GasolineEmissions", + "HeatingCoils", + "HeatProduced", + "HeatRecoveryForCooling", + "HeatRecoveryForHeating", + "LoopToLoop", + "MainsWater", + "NaturalGasEmissions", + "OtherFuel1Emissions", + "OtherFuel2Emissions", + "Photovoltaic", + "PowerConversion", + "PropaneEmissions", + "PurchasedElectricityEmissions", + "RainWater", + "SoldElectricityEmissions", + "WellWater", + "WindTurbine"}; + + static constexpr std::array endUseCatNamesUC = {"HEATING", + "COOLING", + "INTERIORLIGHTS", + "EXTERIORLIGHTS", + "INTERIOREQUIPMENT", + "EXTERIOREQUIPMENT", + "FANS", + "PUMPS", + "HEATREJECTION", + "HUMIDIFIER", + "HEATRECOVERY", + "WATERSYSTEMS", + "REFRIGERATION", + "COGENERATION", + "BASEBOARD", + "BOILERS", + "CARBONEQUIVALENTEMISSIONS", + "CHILLERS", + "COALEMISSIONS", + "COLDSTORAGECHARGE", + "COLDSTORAGEDISCHARGE", + "CONDENSATE", + "COOLINGCOILS", + "COOLINGPANEL", + "DIESELEMISSIONS", + "DISTRICTCHILLEDWATER", + "DISTRICTHOTWATER", + "ELECTRICITYEMISSIONS", + "ELECTRICSTORAGE", + "FREECOOLING", + "FUELOILNO1EMISSIONS", + "FUELOILNO2EMISSIONS", + "GASOLINEEMISSIONS", + "HEATINGCOILS", + "HEATPRODUCED", + "HEATRECOVERYFORCOOLING", + "HEATRECOVERYFORHEATING", + "LOOPTOLOOP", + "MAINSWATER", + "NATURALGASEMISSIONS", + "OTHERFUEL1EMISSIONS", + "OTHERFUEL2EMISSIONS", + "PHOTOVOLTAIC", + "POWERCONVERSION", + "PROPANEEMISSIONS", + "PURCHASEDELECTRICITYEMISSIONS", + "RAINWATER", + "SOLDELECTRICITYEMISSIONS", + "WELLWATER", + "WINDTURBINE"}; static constexpr std::array endUseCat2endUse = { Constant::EndUse::Heating, // Heating @@ -429,7 +427,7 @@ namespace OutputProcessor { int ddVarNum = -1; VariableType varType = VariableType::Invalid; TimeStepType timeStepType = TimeStepType::Zone; // Zone or System - StoreType storeType = StoreType::Average; // Variable Type (Summed/Non-Static or Average/Static) + StoreType storeType = StoreType::Average; // Variable Type (Summed/Non-Static or Average/Static) Real64 Value = 0.0; // Current Value of the variable (to resolution of Zone Time Step) Real64 TSValue = 0.0; // Value of this variable at the Zone Time Step Real64 EITSValue = 0.0; // Value of this variable at the Zone Time Step for external interface @@ -441,15 +439,15 @@ namespace OutputProcessor { bool thisTSStored = false; // if stored for this zone timestep int thisTSCount = 0; ReportFreq freq = ReportFreq::Hour; // How often to report this variable - Real64 MaxValue = -9999.0; // Maximum reporting (only for Averaged variables, and those greater than Time Step) - Real64 MinValue = 9999.0; // Minimum reporting (only for Averaged variables, and those greater than Time Step) + Real64 MaxValue = -9999.0; // Maximum reporting (only for Averaged variables, and those greater than Time Step) + Real64 MinValue = 9999.0; // Minimum reporting (only for Averaged variables, and those greater than Time Step) int maxValueDate = 0; // Date stamp of maximum int minValueDate = 0; // Date stamp of minimum int ReportID = 0; // Report variable ID number int SchedPtr = 0; // If scheduled, this points to the schedule int ZoneMult = 1; // If metered, Zone Multiplier is applied int ZoneListMult = 1; // If metered, Zone List Multiplier is applied - + std::string keyColonName = ""; // Name of Variable key:variable std::string keyColonNameUC = ""; // Name of Variable (Uppercase) std::string name = ""; // Name of Variable @@ -461,8 +459,8 @@ namespace OutputProcessor { std::string unitNameCustomEMS; // name of units when customEMS is used for EMS variables that are unusual std::string indexGroup = ""; - int indexGroupKey = -1; // Is this thing even used? - + int indexGroupKey = -1; // Is this thing even used? + std::vector meterNums; // Meter Numbers virtual ~OutVar(){}; @@ -471,7 +469,7 @@ namespace OutputProcessor { void writeReportData(EnergyPlusData &state); - void writeOutput(EnergyPlusData &state, // Real variable to write out + void writeOutput(EnergyPlusData &state, // Real variable to write out ReportFreq const freq); void writeReportDictionaryItem(EnergyPlusData &state); @@ -479,9 +477,12 @@ namespace OutputProcessor { struct OutVarReal : public OutVar { - Real64 *Which = nullptr; // Pointer to the actual variable holding the value + Real64 *Which = nullptr; // Pointer to the actual variable holding the value - OutVarReal() { varType = VariableType::Real; } + OutVarReal() + { + varType = VariableType::Real; + } }; struct OutVarInt : public OutVar @@ -489,7 +490,10 @@ namespace OutputProcessor { // Members int *Which = nullptr; // The POINTER to the actual variable holding the value - OutVarInt() { varType = VariableType::Integer; } + OutVarInt() + { + varType = VariableType::Integer; + } }; struct DDOutVar @@ -545,7 +549,7 @@ namespace OutputProcessor { MinValDate = 0; } - void WriteReportData(EnergyPlusData &state, ReportFreq freq); + void WriteReportData(EnergyPlusData &state, ReportFreq freq); }; struct Meter @@ -554,16 +558,16 @@ namespace OutputProcessor { std::string Name = ""; // Name of the meter MeterType type = MeterType::Invalid; // type of meter Constant::eResource resource = Constant::eResource::Invalid; // Resource Type of the meter - EndUseCat endUseCat = EndUseCat::Invalid; // End Use of the meter + EndUseCat endUseCat = EndUseCat::Invalid; // End Use of the meter std::string EndUseSub = ""; // End Use subcategory of the meter - Group group = Group::Invalid; // Group of the meter + Group group = Group::Invalid; // Group of the meter Constant::Units units = Constant::Units::Invalid; // Units for the Meter RT_IPUnits RT_forIPUnits; // Resource type number for IP Units (tabular) reporting Real64 CurTSValue = 0.0; // Current TimeStep Value (internal access) std::string indexGroup = ""; - + std::array periods; MeterPeriod periodLastSM; @@ -636,8 +640,8 @@ namespace OutputProcessor { ReportFreq determineFrequency(EnergyPlusData &state, std::string_view const FreqString); - std::string produceDateString(int DateValue, // Date of min/max - ReportFreq freq // Reporting Frequency + std::string produceDateString(int DateValue, // Date of min/max + ReportFreq freq // Reporting Frequency ); // ***************************************************************************** @@ -650,17 +654,17 @@ namespace OutputProcessor { std::string const &Name, // Name for the meter Constant::Units units, // Units for the meter Constant::eResource resource, // ResourceType for the meter - EndUseCat endUseCat, // EndUse for the meter + EndUseCat endUseCat, // EndUse for the meter std::string_view const EndUseSub, // EndUse subcategory for the meter - Group group, // Group for the meter + Group group, // Group for the meter int outVarNum); void AttachMeters(EnergyPlusData &state, Constant::Units units, // Units for this meter Constant::eResource resource, // Electricity, Gas, etc. - EndUseCat endUseCat, // End-use category (Lights, Heating, etc.) + EndUseCat endUseCat, // End-use category (Lights, Heating, etc.) std::string_view const EndUseSub, // End-use subcategory (user-defined, e.g., General Lights, Task Lights, etc.) - Group group, // Group key (Facility, Zone, Building, etc.) + Group group, // Group key (Facility, Zone, Building, etc.) std::string const &ZoneName, // Zone key only applicable for Building group std::string const &SpaceTypeName, // Space Type key only applicable for Building group int RepVarNum // Number of this report variable @@ -777,31 +781,31 @@ namespace OutputProcessor { void SetupOutputVariable( EnergyPlusData &state, - std::string_view const name, // String Name of variable (with units) - Constant::Units units, // Actual units corresponding to the actual variable - Real64 &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::TimeStepType timeStepType, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::StoreType variableType, // State, Average=1, NonState, Sum=2 - std::string const &key, // Associated Key for this variable - Constant::eResource resource = Constant::eResource::Invalid, // Meter Resource Type (Electricity, Gas, etc) + std::string_view const name, // String Name of variable (with units) + Constant::Units units, // Actual units corresponding to the actual variable + Real64 &ActualVariable, // Actual Variable, used to set up pointer + OutputProcessor::TimeStepType timeStepType, // Zone, HeatBalance=1, HVAC, System, Plant=2 + OutputProcessor::StoreType variableType, // State, Average=1, NonState, Sum=2 + std::string const &key, // Associated Key for this variable + Constant::eResource resource = Constant::eResource::Invalid, // Meter Resource Type (Electricity, Gas, etc) OutputProcessor::Group group = OutputProcessor::Group::Invalid, // Meter Super Group Key (Building, System, Plant) OutputProcessor::EndUseCat endUseCat = OutputProcessor::EndUseCat::Invalid, // Meter End Use Key (Lights, Heating, etc) - std::string_view const endUseSub = {}, // Meter End Use Sub Key (General Lights, Task Lights, etc) - std::string const &zone = {}, // Meter Zone Key (zone name) - int const zoneMult = 1, // Zone Multiplier, defaults to 1 - int const zoneListMult = 1, // Zone List Multiplier, defaults to 1 - std::string const &spaceType = {}, // Space type (applicable for Building group only) - int const indexGroupKey = -999, // Group identifier for SQL output - std::string_view const customUnitName = {}, // the custom name for the units from EMS definition of units - OutputProcessor::ReportFreq reportFreq = OutputProcessor::ReportFreq::Hour // Internal use -- causes reporting at this freqency + std::string_view const endUseSub = {}, // Meter End Use Sub Key (General Lights, Task Lights, etc) + std::string const &zone = {}, // Meter Zone Key (zone name) + int const zoneMult = 1, // Zone Multiplier, defaults to 1 + int const zoneListMult = 1, // Zone List Multiplier, defaults to 1 + std::string const &spaceType = {}, // Space type (applicable for Building group only) + int const indexGroupKey = -999, // Group identifier for SQL output + std::string_view const customUnitName = {}, // the custom name for the units from EMS definition of units + OutputProcessor::ReportFreq reportFreq = OutputProcessor::ReportFreq::Hour // Internal use -- causes reporting at this freqency ); void SetupOutputVariable(EnergyPlusData &state, std::string_view const VariableName, // String Name of variable Constant::Units VariableUnit, // Actual units corresponding to the actual variable int &ActualVariable, // Actual Variable, used to set up pointer - OutputProcessor::TimeStepType TimeStepType, // Zone, HeatBalance=1, HVAC, System, Plant=2 - OutputProcessor::StoreType VariableType, // State, Average=1, NonState, Sum=2 + OutputProcessor::TimeStepType TimeStepType, // Zone, HeatBalance=1, HVAC, System, Plant=2 + OutputProcessor::StoreType VariableType, // State, Average=1, NonState, Sum=2 std::string const &KeyedValue, // Associated Key for this variable int const indexGroupKey = -999, // Group identifier for SQL output OutputProcessor::ReportFreq freq = OutputProcessor::ReportFreq::Hour // Internal use -- causes reporting at this freqency diff --git a/src/EnergyPlus/OutputReportTabular.hh b/src/EnergyPlus/OutputReportTabular.hh index 5a8ca617450..3fd6b218731 100644 --- a/src/EnergyPlus/OutputReportTabular.hh +++ b/src/EnergyPlus/OutputReportTabular.hh @@ -266,11 +266,11 @@ namespace OutputReportTabular { int resIndex = 0; // result index - pointer to BinResults array int numTables = 0; OutputProcessor::VariableType typeOfVar = OutputProcessor::VariableType::Invalid; // Was NotFound - OutputProcessor::StoreType avgSum = OutputProcessor::StoreType::Average; // Variable is Averaged=1 or Summed=2 - OutputProcessor::TimeStepType stepType = OutputProcessor::TimeStepType::Zone; // Variable time step is Zone=1 or HVAC=2 - Constant::Units units = Constant::Units::Invalid; // the units enumeration - std::string ScheduleName; // the name of the schedule - int scheduleIndex = 0; // index to the schedule specified - if no schedule use zero + OutputProcessor::StoreType avgSum = OutputProcessor::StoreType::Average; // Variable is Averaged=1 or Summed=2 + OutputProcessor::TimeStepType stepType = OutputProcessor::TimeStepType::Zone; // Variable time step is Zone=1 or HVAC=2 + Constant::Units units = Constant::Units::Invalid; // the units enumeration + std::string ScheduleName; // the name of the schedule + int scheduleIndex = 0; // index to the schedule specified - if no schedule use zero }; struct BinResultsType diff --git a/src/EnergyPlus/OutputReportTabularAnnual.cc b/src/EnergyPlus/OutputReportTabularAnnual.cc index 67a20bc1719..fe42ff37954 100644 --- a/src/EnergyPlus/OutputReportTabularAnnual.cc +++ b/src/EnergyPlus/OutputReportTabularAnnual.cc @@ -469,7 +469,7 @@ void AnnualTable::gatherForTimestep(EnergyPlusData &state, OutputProcessor::Time case AnnualFieldSet::AggregationKind::hoursInTenBinsPlusMinusTwoStdDev: case AnnualFieldSet::AggregationKind::hoursInTenBinsPlusMinusThreeStdDev: // for all of the binning options add the value to the deferred - if (fldStIt->m_varAvgSum == OutputProcessor::StoreType::Sum) { // if it is a summed variable + if (fldStIt->m_varAvgSum == OutputProcessor::StoreType::Sum) { // if it is a summed variable fldStIt->m_cell[row].deferredResults.push_back(curValue /= secondsInTimeStep); // divide by time just like max and min } else { fldStIt->m_cell[row].deferredResults.push_back(curValue); diff --git a/src/EnergyPlus/PlantLoadProfile.cc b/src/EnergyPlus/PlantLoadProfile.cc index 9288ed9d500..fa976ca3efe 100644 --- a/src/EnergyPlus/PlantLoadProfile.cc +++ b/src/EnergyPlus/PlantLoadProfile.cc @@ -537,7 +537,7 @@ void GetPlantProfileInput(EnergyPlusData &state) OutputProcessor::StoreType::Sum, state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name, Constant::eResource::EnergyTransfer, - OutputProcessor::Group::Plant, + OutputProcessor::Group::Plant, OutputProcessor::EndUseCat::Heating); // is EndUseKey right? SetupOutputVariable(state, diff --git a/src/EnergyPlus/PluginManager.cc b/src/EnergyPlus/PluginManager.cc index 20209acf55f..51a09c452f3 100644 --- a/src/EnergyPlus/PluginManager.cc +++ b/src/EnergyPlus/PluginManager.cc @@ -299,8 +299,7 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) EnergyPlus::ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); } std::string const groupType = EnergyPlus::Util::makeUPPER(fields.at("group_type").get()); - OutputProcessor::Group group = - static_cast(getEnumValue(OutputProcessor::groupNamesUC, groupType)); + OutputProcessor::Group group = static_cast(getEnumValue(OutputProcessor::groupNamesUC, groupType)); if (group == OutputProcessor::Group::Invalid) { ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected Group Type = {}", groupType)); ShowFatalError(state, "Python plugin output variable input problem causes program termination"); @@ -327,8 +326,7 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) if ((resource != Constant::eResource::EnergyTransfer) && (endUseCat == OutputProcessor::EndUseCat::HeatingCoils || endUseCat == OutputProcessor::EndUseCat::CoolingCoils || endUseCat == OutputProcessor::EndUseCat::Chillers || endUseCat == OutputProcessor::EndUseCat::Boilers || - endUseCat == OutputProcessor::EndUseCat::Baseboard || - endUseCat == OutputProcessor::EndUseCat::HeatRecoveryForCooling || + 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)); diff --git a/src/EnergyPlus/ResultsFramework.hh b/src/EnergyPlus/ResultsFramework.hh index 1a9a8ad2821..2d62ef5f08f 100644 --- a/src/EnergyPlus/ResultsFramework.hh +++ b/src/EnergyPlus/ResultsFramework.hh @@ -374,10 +374,9 @@ namespace ResultsFramework { void initializeMeters(const std::vector &EnergyMeters, const ReportFreq reportFrequency); - std::array detailedTSData = { - // DataFrame("Dummy"), - DataFrame("Detailed-Zone"), - DataFrame("Detailed-HVAC")}; + std::array detailedTSData = {// DataFrame("Dummy"), + DataFrame("Detailed-Zone"), + DataFrame("Detailed-HVAC")}; std::array freqTSData = {DataFrame("Each Call"), DataFrame("TimeStep"), diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.cc b/src/EnergyPlus/RuntimeLanguageProcessor.cc index c6634e6164c..2f63668ff35 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.cc +++ b/src/EnergyPlus/RuntimeLanguageProcessor.cc @@ -3390,11 +3390,11 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) Constant::eResource::Invalid, OutputProcessor::Group::Invalid, OutputProcessor::EndUseCat::Invalid, - "", // EndUseSubCat - "", // ZoneName - 1, // ZoneMult - 1, // ZoneListMult - "", // SpaceType + "", // EndUseSubCat + "", // ZoneName + 1, // ZoneMult + 1, // ZoneListMult + "", // SpaceType -999, // indexGroupKey UnitsB); } @@ -3616,8 +3616,7 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) if ((resource != Constant::eResource::EnergyTransfer) && (sovEndUseCat == OutputProcessor::EndUseCat::HeatingCoils || sovEndUseCat == OutputProcessor::EndUseCat::CoolingCoils || sovEndUseCat == OutputProcessor::EndUseCat::Chillers || sovEndUseCat == OutputProcessor::EndUseCat::Boilers || - sovEndUseCat == OutputProcessor::EndUseCat::Baseboard || - sovEndUseCat == OutputProcessor::EndUseCat::HeatRecoveryForCooling || + sovEndUseCat == OutputProcessor::EndUseCat::Baseboard || sovEndUseCat == OutputProcessor::EndUseCat::HeatRecoveryForCooling || sovEndUseCat == OutputProcessor::EndUseCat::HeatRecoveryForHeating)) { ShowWarningError(state, format("{}{}=\"{} invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError(state, diff --git a/src/EnergyPlus/SQLiteProcedures.cc b/src/EnergyPlus/SQLiteProcedures.cc index 1ce319eab69..798722e3a56 100644 --- a/src/EnergyPlus/SQLiteProcedures.cc +++ b/src/EnergyPlus/SQLiteProcedures.cc @@ -1399,10 +1399,12 @@ void SQLite::createSQLiteReportDictionaryRecord(int const reportVariableReportID "HVAC System Timestep", "Zone Timestep", "Hourly", "Daily", "Monthly", "Run Period", "Annual"}; static constexpr std::array storeTypeStrings = {// "Dummy", - "Avg", "Sum"}; + "Avg", + "Sum"}; static constexpr std::array timeStepTypeStrings = {// "Dummy", - "Zone", "HVAC System"}; + "Zone", + "HVAC System"}; if (m_writeOutputToSQLite) { sqliteBindInteger(m_reportDictionaryInsertStmt, 1, reportVariableReportID); diff --git a/src/EnergyPlus/SystemAvailabilityManager.cc b/src/EnergyPlus/SystemAvailabilityManager.cc index 3a3f5062353..74530b2300f 100644 --- a/src/EnergyPlus/SystemAvailabilityManager.cc +++ b/src/EnergyPlus/SystemAvailabilityManager.cc @@ -885,13 +885,13 @@ namespace SystemAvailabilityManager { Constant::eResource::Invalid, OutputProcessor::Group::Invalid, OutputProcessor::EndUseCat::Invalid, - "", // End-use SubCat - "", // Zone - 1, // ZoneMult - 1, // ZoneListMult - "", // space type + "", // End-use SubCat + "", // Zone + 1, // ZoneMult + 1, // ZoneListMult + "", // space type -999, // indexGroupKey - "", // custom units + "", // custom units OutputProcessor::ReportFreq::Day); } } diff --git a/src/EnergyPlus/WaterThermalTanks.cc b/src/EnergyPlus/WaterThermalTanks.cc index 3649e67dd15..835e2e16c85 100644 --- a/src/EnergyPlus/WaterThermalTanks.cc +++ b/src/EnergyPlus/WaterThermalTanks.cc @@ -5495,7 +5495,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) OutputProcessor::Group::Plant, OutputProcessor::EndUseCat::WaterSystem, // DHW this->EndUseSubcategoryName); - + SetupOutputVariable(state, "Water Heater Water Volume Flow Rate", Constant::Units::m3_s, diff --git a/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc b/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc index 031cf1c491f..c9b945ad512 100644 --- a/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc +++ b/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc @@ -116,8 +116,7 @@ class HVACSizingSimulationManagerTest : public EnergyPlusFixture state->dataLoopNodes->Node.allocate(1); // OutputProcessor::TimeValue.allocate(2); // set up time related - SetupTimePointers( - *state, OutputProcessor::TimeStepType::Zone, state->dataGlobal->TimeStepZone); // Set up Time pointer for HB/Zone Simulation + SetupTimePointers(*state, OutputProcessor::TimeStepType::Zone, state->dataGlobal->TimeStepZone); // Set up Time pointer for HB/Zone Simulation SetupTimePointers(*state, OutputProcessor::TimeStepType::System, state->dataHVACGlobal->TimeStepSys); state->dataGlobal->NumOfTimeStepInHour = 4; diff --git a/tst/EnergyPlus/unit/OutputProcessor.unit.cc b/tst/EnergyPlus/unit/OutputProcessor.unit.cc index 2e1d24a64fa..8fb874247db 100644 --- a/tst/EnergyPlus/unit/OutputProcessor.unit.cc +++ b/tst/EnergyPlus/unit/OutputProcessor.unit.cc @@ -788,7 +788,7 @@ namespace OutputProcessor { mp.MinVal = mp.MaxVal = 0.0; mp.MinValDate = mp.MaxValDate = 0; mp.RptFO = false; - + mp.WriteReportData(*state, ReportFreq::TimeStep); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,999.9"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.9"}, "\n"))); @@ -891,7 +891,7 @@ namespace OutputProcessor { rVar.MinValue = rVar.MaxValue = 0.0; rVar.minValueDate = rVar.maxValueDate = 0; rVar.freq = ReportFreq::TimeStep; - + rVar.writeReportData(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,999.9"}, "\n"))); @@ -909,7 +909,7 @@ namespace OutputProcessor { rVar.MaxValue = 4283136.2587211775; rVar.maxValueDate = 12212460; rVar.freq = ReportFreq::Day; - + rVar.writeReportData(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,616771620.9870273,4283136.251683925, 1,10,4283136.2587211775,24,60"}, "\n"))); @@ -952,7 +952,7 @@ namespace OutputProcessor { rVar.MinValue = rVar.MaxValue = 0.0; rVar.minValueDate = rVar.maxValueDate = 0; rVar.freq = ReportFreq::TimeStep; - + rVar.writeReportData(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0"}, "\n"))); @@ -1035,7 +1035,7 @@ namespace OutputProcessor { iVar.MinValue = iVar.MaxValue = 0; iVar.minValueDate = iVar.maxValueDate = 0; iVar.freq = ReportFreq::TimeStep; - + iVar.writeReportData(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,61677162.098703"}, "\n"))); @@ -1069,7 +1069,7 @@ namespace OutputProcessor { iVar.MinValue = iVar.MaxValue = 0; iVar.minValueDate = iVar.minValueDate = 0; iVar.freq = ReportFreq::TimeStep; - + iVar.writeReportData(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,0.0"}, "\n"))); @@ -1357,119 +1357,94 @@ namespace OutputProcessor { sql->createSQLiteTimeIndexRecord(ReportFreq::Simulation, 1, 1, 0, 2017, false); - WriteMeterDictionaryItem( - *state, ReportFreq::TimeStep, StoreType::Average, 1, "indexGroup", "meterName", Constant::Units::J, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::TimeStep, StoreType::Average, 1, "indexGroup", "meterName", Constant::Units::J, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"1,1,meterName [J] !TimeStep"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1,meterName [J] !TimeStep"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::TimeStep, StoreType::Sum, 2, "indexGroup", "meterName", Constant::Units::W, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::TimeStep, StoreType::Sum, 2, "indexGroup", "meterName", Constant::Units::W, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"2,1,meterName [W] !TimeStep"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"2,1,meterName [W] !TimeStep"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::TimeStep, StoreType::Average, 3, "indexGroup", "meterName", Constant::Units::J, true, false); + WriteMeterDictionaryItem(*state, ReportFreq::TimeStep, StoreType::Average, 3, "indexGroup", "meterName", Constant::Units::J, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"3,1,Cumulative meterName [J] !TimeStep"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"3,1,Cumulative meterName [J] !TimeStep"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::TimeStep, StoreType::Average, 4, "indexGroup", "meterName", Constant::Units::W, false, true); + WriteMeterDictionaryItem(*state, ReportFreq::TimeStep, StoreType::Average, 4, "indexGroup", "meterName", Constant::Units::W, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"4,1,meterName [W] !TimeStep"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::TimeStep, StoreType::Average, 5, "indexGroup", "meterName", Constant::Units::W, true, true); + WriteMeterDictionaryItem(*state, ReportFreq::TimeStep, StoreType::Average, 5, "indexGroup", "meterName", Constant::Units::W, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"5,1,Cumulative meterName [W] !TimeStep"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::EachCall, StoreType::Average, 6, "indexGroup", "meterName", Constant::Units::J, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::EachCall, StoreType::Average, 6, "indexGroup", "meterName", Constant::Units::J, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"6,1,meterName [J] !Each Call"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"6,1,meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::EachCall, StoreType::Sum, 7, "indexGroup", "meterName", Constant::Units::J, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::EachCall, StoreType::Sum, 7, "indexGroup", "meterName", Constant::Units::J, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"7,1,meterName [J] !Each Call"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"7,1,meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::EachCall, StoreType::Average, 8, "indexGroup", "meterName", Constant::Units::J, true, false); + WriteMeterDictionaryItem(*state, ReportFreq::EachCall, StoreType::Average, 8, "indexGroup", "meterName", Constant::Units::J, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"8,1,Cumulative meterName [J] !Each Call"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"8,1,Cumulative meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::EachCall, StoreType::Average, 9, "indexGroup", "meterName", Constant::Units::J, false, true); + WriteMeterDictionaryItem(*state, ReportFreq::EachCall, StoreType::Average, 9, "indexGroup", "meterName", Constant::Units::J, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"9,1,meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::EachCall, StoreType::Average, 10, "indexGroup", "meterName", Constant::Units::J, true, true); + WriteMeterDictionaryItem(*state, ReportFreq::EachCall, StoreType::Average, 10, "indexGroup", "meterName", Constant::Units::J, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"10,1,Cumulative meterName [J] !Each Call"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Hour, StoreType::Average, 11, "indexGroup", "meterName", Constant::Units::J, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::Hour, StoreType::Average, 11, "indexGroup", "meterName", Constant::Units::J, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"11,1,meterName [J] !Hourly"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"11,1,meterName [J] !Hourly"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Hour, StoreType::Sum, 12, "indexGroup", "meterName", Constant::Units::None, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::Hour, StoreType::Sum, 12, "indexGroup", "meterName", Constant::Units::None, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"12,1,meterName [] !Hourly"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"12,1,meterName [] !Hourly"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Hour, StoreType::Average, 13, "indexGroup", "meterName", Constant::Units::None, true, false); + WriteMeterDictionaryItem(*state, ReportFreq::Hour, StoreType::Average, 13, "indexGroup", "meterName", Constant::Units::None, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"13,1,Cumulative meterName [] !Hourly"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"13,1,Cumulative meterName [] !Hourly"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Hour, StoreType::Average, 14, "indexGroup", "meterName", Constant::Units::None, false, true); + WriteMeterDictionaryItem(*state, ReportFreq::Hour, StoreType::Average, 14, "indexGroup", "meterName", Constant::Units::None, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"14,1,meterName [] !Hourly"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Hour, StoreType::Average, 15, "indexGroup", "meterName", Constant::Units::None, true, true); + WriteMeterDictionaryItem(*state, ReportFreq::Hour, StoreType::Average, 15, "indexGroup", "meterName", Constant::Units::None, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"15,1,Cumulative meterName [] !Hourly"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Day, StoreType::Average, 16, "indexGroup", "meterName", Constant::Units::None, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::Day, StoreType::Average, 16, "indexGroup", "meterName", Constant::Units::None, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"16,7,meterName [] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"16,7,meterName [] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Day, StoreType::Sum, 17, "indexGroup", "meterName", Constant::Units::None, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::Day, StoreType::Sum, 17, "indexGroup", "meterName", Constant::Units::None, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"17,7,meterName [] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"17,7,meterName [] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Day, StoreType::Average, 18, "indexGroup", "meterName", Constant::Units::deltaC, true, false); + WriteMeterDictionaryItem(*state, ReportFreq::Day, StoreType::Average, 18, "indexGroup", "meterName", Constant::Units::deltaC, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"18,1,Cumulative meterName [deltaC] !Daily "}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"18,1,Cumulative meterName [deltaC] !Daily "}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Day, StoreType::Average, 19, "indexGroup", "meterName", Constant::Units::deltaC, false, true); + WriteMeterDictionaryItem(*state, ReportFreq::Day, StoreType::Average, 19, "indexGroup", "meterName", Constant::Units::deltaC, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"19,7,meterName [deltaC] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Day, StoreType::Average, 20, "indexGroup", "meterName", Constant::Units::deltaC, true, true); + WriteMeterDictionaryItem(*state, ReportFreq::Day, StoreType::Average, 20, "indexGroup", "meterName", Constant::Units::deltaC, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"20,1,Cumulative meterName [deltaC] !Daily "}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Month, StoreType::Average, 21, "indexGroup", "meterName", Constant::Units::deltaC, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::Month, StoreType::Average, 21, "indexGroup", "meterName", Constant::Units::deltaC, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"21,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"21,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Month, StoreType::Sum, 22, "indexGroup", "meterName", Constant::Units::deltaC, false, false); + WriteMeterDictionaryItem(*state, ReportFreq::Month, StoreType::Sum, 22, "indexGroup", "meterName", Constant::Units::deltaC, false, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"22,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"22,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Month, StoreType::Average, 23, "indexGroup", "meterName", Constant::Units::deltaC, true, false); + WriteMeterDictionaryItem(*state, ReportFreq::Month, StoreType::Average, 23, "indexGroup", "meterName", Constant::Units::deltaC, true, false); EXPECT_TRUE(compare_mtr_stream(delimited_string({"23,1,Cumulative meterName [deltaC] !Monthly "}, "\n"))); EXPECT_TRUE(compare_eso_stream(delimited_string({"23,1,Cumulative meterName [deltaC] !Monthly "}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Month, StoreType::Average, 24, "indexGroup", "meterName", Constant::Units::deltaC, false, true); + WriteMeterDictionaryItem(*state, ReportFreq::Month, StoreType::Average, 24, "indexGroup", "meterName", Constant::Units::deltaC, false, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"24,9,meterName [deltaC] !Monthly [Value,Min,Day,Hour,Minute,Max,Day,Hour,Minute]"}, "\n"))); - WriteMeterDictionaryItem( - *state, ReportFreq::Month, StoreType::Average, 25, "indexGroup", "meterName", Constant::Units::deltaC, true, true); + WriteMeterDictionaryItem(*state, ReportFreq::Month, StoreType::Average, 25, "indexGroup", "meterName", Constant::Units::deltaC, true, true); EXPECT_TRUE(compare_mtr_stream(delimited_string({"25,1,Cumulative meterName [deltaC] !Monthly "}, "\n"))); WriteMeterDictionaryItem( @@ -1576,14 +1551,14 @@ namespace OutputProcessor { rVar.name = "variableName"; rVar.unitNameCustomEMS = ""; rVar.SchedPtr = 0; - + rVar.writeReportDictionaryItem(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"1,1,keyedValue,variableName [m3/s] !TimeStep"}, "\n"))); rVar.freq = ReportFreq::TimeStep; rVar.storeType = StoreType::Sum; rVar.ReportID = 2; - + rVar.writeReportDictionaryItem(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"2,1,keyedValue,variableName [m3/s] !TimeStep"}, "\n"))); @@ -1593,7 +1568,7 @@ namespace OutputProcessor { rVar.ReportID = 3; rVar.storeType = StoreType::Average; rVar.SchedPtr = 1; - + rVar.writeReportDictionaryItem(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"3,1,keyedValue,variableName [m3/s] !TimeStep,scheduleName"}, "\n"))); @@ -1607,28 +1582,28 @@ namespace OutputProcessor { rVar.ReportID = 6; rVar.freq = ReportFreq::EachCall; rVar.timeStepType = TimeStepType::Zone; - + rVar.writeReportDictionaryItem(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"6,1,keyedValue,variableName [m3/s] !Each Call"}, "\n"))); rVar.ReportID = 7; rVar.storeType = StoreType::Sum; rVar.indexGroup = "indexGroup"; - + rVar.writeReportDictionaryItem(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"7,1,keyedValue,variableName [m3/s] !Each Call"}, "\n"))); rVar.ReportID = 8; rVar.storeType = StoreType::Average; rVar.SchedPtr = 1; - + rVar.writeReportDictionaryItem(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"8,1,keyedValue,variableName [m3/s] !Each Call,scheduleName"}, "\n"))); rVar.ReportID = 9; rVar.SchedPtr = 0; rVar.timeStepType = TimeStepType::System; - + rVar.writeReportDictionaryItem(*state); EXPECT_TRUE(compare_eso_stream(delimited_string({"9,1,keyedValue,variableName [m3/s] !Each Call"}, "\n"))); @@ -1701,7 +1676,6 @@ namespace OutputProcessor { EXPECT_TRUE( compare_eso_stream(delimited_string({"19,7,keyedValue,variableName [m3/s] !Daily [Value,Min,Hour,Minute,Max,Hour,Minute]"}, "\n"))); - rVar.ReportID = 21; rVar.freq = ReportFreq::Month; rVar.timeStepType = TimeStepType::Zone; @@ -2810,12 +2784,8 @@ namespace OutputProcessor { AddDDOutVar(*state, "Site Outdoor Air Drybulb Temperature", TimeStepType::Zone, StoreType::Average, VariableType::Real, Constant::Units::C); AddDDOutVar(*state, "Site Outdoor Air Wetbulb Temperature", TimeStepType::Zone, StoreType::Average, VariableType::Real, Constant::Units::C); - AddDDOutVar(*state, - "Site Outdoor Air Humidity Ratio", - TimeStepType::Zone, - StoreType::Average, - VariableType::Real, - Constant::Units::kgWater_kgDryAir); + AddDDOutVar( + *state, "Site Outdoor Air Humidity Ratio", TimeStepType::Zone, StoreType::Average, VariableType::Real, Constant::Units::kgWater_kgDryAir); AddDDOutVar(*state, "Site Outdoor Air Relative Humidity", TimeStepType::Zone, StoreType::Average, VariableType::Real, Constant::Units::Perc); EXPECT_EQ((int)TimeStepType::Zone, (int)op->ddOutVars[0]->timeStepType); @@ -2930,7 +2900,7 @@ namespace OutputProcessor { Group::Building, EndUseCat::InteriorLights, "RailroadCrossing", // EndUseSubKey - "SPACE1-1", // Zone + "SPACE1-1", // Zone 1, 1); @@ -3000,12 +2970,9 @@ namespace OutputProcessor { GetReportVariableInput(*state); Real64 fuel_used = 999; - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler2"); - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler3"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler2"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler3"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -3035,12 +3002,9 @@ namespace OutputProcessor { GetReportVariableInput(*state); Real64 fuel_used = 999; - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler2"); - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler3"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler2"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler3"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -3068,12 +3032,9 @@ namespace OutputProcessor { GetReportVariableInput(*state); Real64 fuel_used = 999; - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler2"); - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler3"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler2"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler3"); auto reportDataDictionaryResults = queryResult("SELECT * FROM ReportDataDictionary;", "ReportDataDictionary"); @@ -3487,161 +3448,156 @@ namespace OutputProcessor { ASSERT_EQ(22, op->meters.size()); - std::vector> - meter_result = {std::make_tuple(MeterType::Normal, - "Electricity:Facility", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Invalid, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:Building", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Building, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:Zone:SPACE1-1", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::Invalid, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity:Zone:SPACE1-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::Invalid, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity:Zone:SPACE1-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:Zone:SPACE2-1", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity:Zone:SPACE2-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity:Zone:SPACE2-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:Zone:SPACE3-1", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity:Zone:SPACE3-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity:Zone:SPACE3-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:Zone:SPACE4-1", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity:Zone:SPACE4-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity:Zone:SPACE4-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:Zone:SPACE5-1", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity:Zone:SPACE5-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity:Zone:SPACE5-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Custom, - "MYGENERALLIGHTS", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Invalid, - Constant::Units::J), - std::make_tuple(MeterType::Custom, - "BUILDING INFILTRATION HEAT LOSS", - Constant::eResource::Generic, - EndUseCat::Invalid, - "", - Group::Invalid, - Constant::Units::J), - std::make_tuple(MeterType::CustomDec, - "MYBUILDINGOTHER", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Invalid, - Constant::Units::J)}; + std::vector> meter_result = + {std::make_tuple(MeterType::Normal, + "Electricity:Facility", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Building", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Building, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE2-1", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE2-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE2-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE3-1", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE3-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE3-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE4-1", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE4-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE4-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE5-1", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE5-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE5-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::Zone, + Constant::Units::J), + std::make_tuple( + MeterType::Custom, "MYGENERALLIGHTS", Constant::eResource::Electricity, EndUseCat::Invalid, "", Group::Invalid, Constant::Units::J), + std::make_tuple(MeterType::Custom, + "BUILDING INFILTRATION HEAT LOSS", + Constant::eResource::Generic, + EndUseCat::Invalid, + "", + Group::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::CustomDec, + "MYBUILDINGOTHER", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Invalid, + Constant::Units::J)}; for (int i = 0; i < (int)meter_result.size(); ++i) { @@ -3681,77 +3637,77 @@ namespace OutputProcessor { ASSERT_EQ(10, op->meters.size()); - std::vector> - meter_result = {std::make_tuple(MeterType::Normal, - "Electricity:Facility", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Invalid, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:Building", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Building, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:Zone:SPACE1-1", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "Electricity:SpaceType:OFFICE", - Constant::eResource::Electricity, - EndUseCat::Invalid, - "", - Group::SpaceType, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::Invalid, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity:Zone:SPACE1-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "InteriorLights:Electricity:SpaceType:OFFICE", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "", - Group::SpaceType, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::Invalid, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity:Zone:SPACE1-1", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::Zone, - Constant::Units::J), - std::make_tuple(MeterType::Normal, - "GeneralLights:InteriorLights:Electricity:SpaceType:OFFICE", - Constant::eResource::Electricity, - EndUseCat::InteriorLights, - "GeneralLights", - Group::SpaceType, - Constant::Units::J)}; + std::vector> meter_result = + {std::make_tuple(MeterType::Normal, + "Electricity:Facility", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Building", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Building, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "Electricity:SpaceType:OFFICE", + Constant::eResource::Electricity, + EndUseCat::Invalid, + "", + Group::SpaceType, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "InteriorLights:Electricity:SpaceType:OFFICE", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "", + Group::SpaceType, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::Invalid, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:Zone:SPACE1-1", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::Zone, + Constant::Units::J), + std::make_tuple(MeterType::Normal, + "GeneralLights:InteriorLights:Electricity:SpaceType:OFFICE", + Constant::eResource::Electricity, + EndUseCat::InteriorLights, + "GeneralLights", + Group::SpaceType, + Constant::Units::J)}; for (int i = 0; i < (int)meter_result.size(); ++i) { EXPECT_EQ((int)std::get<0>(meter_result[i]), (int)op->meters[i]->type); @@ -4223,10 +4179,8 @@ namespace OutputProcessor { "SPACE5-1"); Real64 fuel_used = 999; Real64 boiler_load = 999; - SetupOutputVariable( - *state, "Boiler Heating Rate", Constant::Units::W, boiler_load, TimeStepType::System, StoreType::Average, "Boiler1"); - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); + SetupOutputVariable(*state, "Boiler Heating Rate", Constant::Units::W, boiler_load, TimeStepType::System, StoreType::Average, "Boiler1"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); UpdateMeterReporting(*state); @@ -4526,10 +4480,8 @@ namespace OutputProcessor { "SPACE5-1"); Real64 fuel_used = 999; Real64 boiler_load = 999; - SetupOutputVariable( - *state, "Boiler Heating Rate", Constant::Units::W, boiler_load, TimeStepType::System, StoreType::Average, "Boiler1"); - SetupOutputVariable( - *state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); + SetupOutputVariable(*state, "Boiler Heating Rate", Constant::Units::W, boiler_load, TimeStepType::System, StoreType::Average, "Boiler1"); + SetupOutputVariable(*state, "Boiler NaturalGas Rate", Constant::Units::W, fuel_used, TimeStepType::System, StoreType::Average, "Boiler1"); UpdateMeterReporting(*state); @@ -5048,45 +5000,19 @@ namespace OutputProcessor { *state, "Zone Windows Total Heat Gain Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); SetupOutputVariable( *state, "Surface Window Heat Gain Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); - SetupOutputVariable(*state, - "Zone Ventilation Total Heat Gain Energy", - Constant::Units::J, - transferredenergy, - TimeStepType::Zone, - StoreType::Sum, - "*"); - SetupOutputVariable(*state, - "Zone Ventilation Total Heat Loss Energy", - Constant::Units::J, - transferredenergy, - TimeStepType::Zone, - StoreType::Sum, - "*"); - SetupOutputVariable(*state, - "Zone Infiltration Total Heat Gain Energy", - Constant::Units::J, - transferredenergy, - TimeStepType::Zone, - StoreType::Sum, - "*"); - SetupOutputVariable(*state, - "Zone Infiltration Total Heat Loss Energy", - Constant::Units::J, - transferredenergy, - TimeStepType::Zone, - StoreType::Sum, - "*"); - SetupOutputVariable(*state, - "Zone Electric Equipment Total Heating Energy", - Constant::Units::J, - transferredenergy, - TimeStepType::Zone, - StoreType::Sum, - "*"); SetupOutputVariable( - *state, "Zone Lights Total Heating Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); + *state, "Zone Ventilation Total Heat Gain Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); SetupOutputVariable( - *state, "People Total Heating Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); + *state, "Zone Ventilation Total Heat Loss Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); + SetupOutputVariable( + *state, "Zone Infiltration Total Heat Gain Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); + SetupOutputVariable( + *state, "Zone Infiltration Total Heat Loss Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); + SetupOutputVariable( + *state, "Zone Electric Equipment Total Heating Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); + SetupOutputVariable( + *state, "Zone Lights Total Heating Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); + SetupOutputVariable(*state, "People Total Heating Energy", Constant::Units::J, transferredenergy, TimeStepType::Zone, StoreType::Sum, "*"); SystemReports::AllocateAndSetUpVentReports(*state); GetCustomMeterInput(*state, errors_found); EXPECT_FALSE(errors_found); diff --git a/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc b/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc index f657c6c4b25..d76f2ddbcf0 100644 --- a/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc @@ -389,7 +389,7 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_columnHeadersToTitleCase) Constant::eResource::Electricity, OutputProcessor::Group::Invalid, OutputProcessor::EndUseCat::InteriorLights, // Was "Facility" - "General"); // create an electric meter + "General"); // create an electric meter Meter *meter1 = new Meter("Electricity:Facility"); meter1->units = Constant::Units::None; @@ -453,7 +453,7 @@ TEST_F(EnergyPlusFixture, OutputReportTabularAnnual_invalidAggregationOrder) Constant::eResource::Electricity, OutputProcessor::Group::Invalid, OutputProcessor::EndUseCat::InteriorLights, // Was "Facility" - "General"); // create an electric meter + "General"); // create an electric meter Meter *meter1 = new Meter("ELECTRICITY:FACILITY"); meter1->units = Constant::Units::None;