Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into 9377MRTPart2
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Nov 8, 2023
2 parents 3c59848 + ffff616 commit 935bffb
Show file tree
Hide file tree
Showing 24 changed files with 3,602 additions and 7,859 deletions.
6 changes: 5 additions & 1 deletion scripts/dev/check_for_malformed_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def process_enum_str(input_str: str, file_name: str, line_no: int, print_errors:
"CsvParser.hh:Token",
"IdfParser.hh:Token",
"OutputProcessor.hh:ReportingFrequency",
"OutputProcessor.hh:ReportFreqSOV",
"HVACInterfaceManager.cc:UpdateType",
"DataHeatBalance.hh:PERptVars",
]
Expand Down Expand Up @@ -149,7 +150,10 @@ def process_enum_str(input_str: str, file_name: str, line_no: int, print_errors:
# check for proper casing
if str(name[0]).islower():
# exceptions listed by <FILE>:<ENUM NAME>
exceptions = ["DataGlobalConstants.hh:eResource", "DataGlobalConstants.hh:eFuel", "DataGlobalConstants.hh:ePollutant"]
exceptions = [
"DataGlobalConstants.hh:eResource", "DataGlobalConstants.hh:eFuel",
"DataGlobalConstants.hh:ePollutant", "OutputProcessor.hh:eResourceSOV"
]
if f"{file_name}:{name}" not in exceptions:
error_str += "\tenum name must begin with upper case letter\n"

Expand Down
12 changes: 6 additions & 6 deletions src/EnergyPlus/BaseboardElectric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ namespace BaseboardElectric {
OutputProcessor::SOVStoreType::Summed,
thisBaseboard.EquipName,
{},
"ENERGYTRANSFER",
"BASEBOARD",
eResourceSOV::EnergyTransfer,
EndUseCatSOV::Baseboard,
{},
"System");
GroupSOV::HVAC); // "System");

SetupOutputVariable(state,
"Baseboard Total Heating Rate",
Expand All @@ -373,10 +373,10 @@ namespace BaseboardElectric {
OutputProcessor::SOVStoreType::Summed,
thisBaseboard.EquipName,
{},
"Electricity",
"HEATING",
eResourceSOV::Electricity,
EndUseCatSOV::Heating,
{},
"System");
GroupSOV::HVAC); // "System");

SetupOutputVariable(state,
"Baseboard Electricity Rate",
Expand Down
12 changes: 6 additions & 6 deletions src/EnergyPlus/BaseboardRadiator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ namespace BaseboardRadiator {
OutputProcessor::SOVStoreType::Summed,
thisBaseboard.EquipID,
{},
"ENERGYTRANSFER",
"BASEBOARD",
eResourceSOV::EnergyTransfer,
EndUseCatSOV::Baseboard,
{},
"System");
GroupSOV::HVAC); // "System");

SetupOutputVariable(state,
"Baseboard Hot Water Energy",
Expand All @@ -451,10 +451,10 @@ namespace BaseboardRadiator {
OutputProcessor::SOVStoreType::Summed,
thisBaseboard.EquipID,
{},
"PLANTLOOPHEATINGDEMAND",
"BASEBOARD",
eResourceSOV::PlantLoopHeatingDemand,
EndUseCatSOV::Baseboard,
{},
"System");
GroupSOV::HVAC); // "System");

SetupOutputVariable(state,
"Baseboard Total Heating Rate",
Expand Down
12 changes: 6 additions & 6 deletions src/EnergyPlus/Boilers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state)
OutputProcessor::SOVStoreType::Summed,
this->Name,
{},
"ENERGYTRANSFER",
"BOILERS",
eResourceSOV::EnergyTransfer,
EndUseCatSOV::Boilers,
{},
"Plant");
GroupSOV::Plant);
SetupOutputVariable(state,
format("Boiler {} Rate", sFuelType),
OutputProcessor::Unit::W,
Expand Down Expand Up @@ -442,10 +442,10 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state)
OutputProcessor::SOVStoreType::Summed,
this->Name,
{},
"ELECTRICITY",
"Heating",
eResourceSOV::Electricity,
EndUseCatSOV::Heating,
"Boiler Parasitic",
"Plant");
GroupSOV::Plant);
if (this->FuelType != Constant::eFuel::Electricity) {
SetupOutputVariable(state,
format("Boiler Ancillary {} Rate", sFuelType),
Expand Down
18 changes: 9 additions & 9 deletions src/EnergyPlus/CoolTower.cc
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,10 @@ namespace CoolTower {
OutputProcessor::SOVStoreType::Summed,
Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name,
{},
"Electricity",
"Cooling",
eResourceSOV::Electricity,
EndUseCatSOV::Cooling,
{},
"System");
GroupSOV::HVAC); //"System");
if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterSupplyMode == WaterSupplyMode::FromMains) {
SetupOutputVariable(state,
"Zone Cooltower Water Volume",
Expand All @@ -560,10 +560,10 @@ namespace CoolTower {
OutputProcessor::SOVStoreType::Summed,
Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name,
{},
"MainsWater",
"Cooling",
eResourceSOV::MainsWater,
EndUseCatSOV::Cooling,
{},
"System");
GroupSOV::HVAC); // "System");
} else if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterSupplyMode == WaterSupplyMode::FromTank) {
SetupOutputVariable(state,
"Zone Cooltower Water Volume",
Expand All @@ -587,10 +587,10 @@ namespace CoolTower {
OutputProcessor::SOVStoreType::Summed,
Zone(state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr).Name,
{},
"MainsWater",
"Cooling",
eResourceSOV::MainsWater,
EndUseCatSOV::Cooling,
{},
"System");
GroupSOV::HVAC); // "System");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/Data/EnergyPlusData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ EnergyPlusData::EnergyPlusData()
this->dataPlantValves = std::make_unique<PlantValvesData>();
this->dataPlnt = std::make_unique<DataPlantData>();
this->dataPluginManager = std::make_unique<PluginManagerData>();
this->dataPollutionModule = std::make_unique<PollutionModuleData>();
this->dataPollution = std::make_unique<PollutionData>();
this->dataPondGHE = std::make_unique<PondGroundHeatExchangerData>();
this->dataPowerInductionUnits = std::make_unique<PoweredInductionUnitsData>();
this->dataPsychrometrics = std::make_unique<PsychrometricsData>();
Expand Down Expand Up @@ -469,7 +469,7 @@ void EnergyPlusData::clear_state()
this->dataPlantValves->clear_state();
this->dataPlnt->clear_state();
this->dataPluginManager->clear_state();
this->dataPollutionModule->clear_state();
this->dataPollution->clear_state();
this->dataPondGHE->clear_state();
this->dataPowerInductionUnits->clear_state();
this->dataPsychrometrics->clear_state();
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/Data/EnergyPlusData.hh
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ struct PlantPressureSysData;
struct PlantUtilitiesData;
struct PlantValvesData;
struct PluginManagerData;
struct PollutionModuleData;
struct PollutionData;
struct PondGroundHeatExchangerData;
struct PoweredInductionUnitsData;
struct PsychrometricsData;
Expand Down Expand Up @@ -485,7 +485,7 @@ struct EnergyPlusData : BaseGlobalStruct
std::unique_ptr<PlantUtilitiesData> dataPlantUtilities;
std::unique_ptr<PlantValvesData> dataPlantValves;
std::unique_ptr<PluginManagerData> dataPluginManager;
std::unique_ptr<PollutionModuleData> dataPollutionModule;
std::unique_ptr<PollutionData> dataPollution;
std::unique_ptr<PondGroundHeatExchangerData> dataPondGHE;
std::unique_ptr<PoweredInductionUnitsData> dataPowerInductionUnits;
std::unique_ptr<PsychrometricsData> dataPsychrometrics;
Expand Down
81 changes: 0 additions & 81 deletions src/EnergyPlus/DataGlobalConstants.hh
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,6 @@ namespace Constant {
Num
};

enum class ePollutant
{
Invalid = -1,
SO2,
NOx,
N2O,
PM,
PM2_5,
PM10,
CO,
CO2,
CH4,
NH3,
NMVOC,
Hg,
Pb,
NuclearHigh,
NuclearLow,
Num
};

constexpr std::array<eFuel, static_cast<int>(eResource::Num)> eResource2eFuel = {eFuel::Electricity,
eFuel::NaturalGas,
eFuel::Gasoline,
Expand Down Expand Up @@ -237,32 +216,6 @@ namespace Constant {
eResource::Water,
eResource::None};

constexpr std::array<ePollutant, static_cast<int>(eResource::Num)> eResource2ePollutant = {
ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid,
ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid,
ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid,
ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid,
ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid,
ePollutant::Invalid, ePollutant::Invalid, ePollutant::Invalid, ePollutant::SO2, ePollutant::NOx, ePollutant::N2O,
ePollutant::PM, ePollutant::PM2_5, ePollutant::PM10, ePollutant::CO, ePollutant::CO2, ePollutant::CH4,
ePollutant::NH3, ePollutant::NMVOC, ePollutant::Hg, ePollutant::Pb, ePollutant::NuclearHigh, ePollutant::NuclearLow};

constexpr std::array<eResource, static_cast<int>(ePollutant::Num)> ePollutant2eResource = {eResource::SO2,
eResource::NOx,
eResource::N2O,
eResource::PM,
eResource::PM2_5,
eResource::PM10,
eResource::CO,
eResource::CO2,
eResource::CH4,
eResource::NH3,
eResource::NMVOC,
eResource::Hg,
eResource::Pb,
eResource::NuclearHigh,
eResource::NuclearLow};

static constexpr std::array<std::string_view, static_cast<int>(eResource::Num)> eResourceNamesUC = {"ELECTRICITY",
"NATURALGAS",
"GASOLINE",
Expand Down Expand Up @@ -395,40 +348,6 @@ namespace Constant {
eResourceNames[static_cast<int>(eFuel2eResource[static_cast<int>(eFuel::Water)])],
eResourceNames[static_cast<int>(eFuel2eResource[static_cast<int>(eFuel::None)])]};

static constexpr std::array<std::string_view, static_cast<int>(ePollutant::Num)> ePollutantNamesUC = {
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::SO2)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NOx)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::N2O)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::PM)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::PM2_5)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::PM10)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::CO)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::CO2)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::CH4)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NH3)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NMVOC)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::Hg)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::Pb)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NuclearHigh)])],
eResourceNamesUC[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NuclearLow)])]};

static constexpr std::array<std::string_view, static_cast<int>(ePollutant::Num)> ePollutantNames = {
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::SO2)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NOx)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::N2O)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::PM)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::PM2_5)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::PM10)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::CO)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::CO2)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::CH4)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NH3)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NMVOC)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::Hg)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::Pb)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NuclearHigh)])],
eResourceNames[static_cast<int>(ePollutant2eResource[static_cast<int>(ePollutant::NuclearLow)])]};

enum class CallIndicator
{
Invalid = -1,
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/EarthTube.cc
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ void GetEarthTube(EnergyPlusData &state, bool &ErrorsFound) // If errors found i
OutputProcessor::SOVStoreType::NonState,
zone.Name,
{},
"Electricity",
eResourceSOV::Electricity,
{},
{},
"Building");
GroupSOV::Building);
SetupOutputVariable(state,
"Earth Tube Fan Electricity Rate",
OutputProcessor::Unit::W,
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ void ManageHVAC(EnergyPlusData &state)
if (!state.dataGlobal->WarmupFlag) {
if (state.dataGlobal->DoOutputReporting && !state.dataGlobal->ZoneSizingCalc) {
NodeInputManager::CalcMoreNodeInfo(state);
PollutionModule::CalculatePollution(state);
Pollution::CalculatePollution(state);
SystemReports::InitEnergyReports(state);
SystemReports::ReportSystemEnergyUse(state);
}
Expand Down
Loading

4 comments on commit 935bffb

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9377MRTPart2 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1966 of 1966 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9377MRTPart2 (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2752 of 2753 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 788
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9377MRTPart2 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3579 of 3581 tests passed, 755 test warnings)

Messages:\n

  • 756 tests had: AUD diffs.
  • 742 tests had: RDD diffs.
  • 26 tests had: EIO diffs.
  • 116 tests had: MTD diffs.
  • 10 tests had: ESO small diffs.
  • 3 tests had: IDF diffs.
  • 2 tests had: ERR diffs.
  • 1 test had: Table big diffs.

Failures:\n

integration Test Summary

  • Passed: 791
  • Failed: 1

regression Test Summary

  • Passed: 805
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9377MRTPart2 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (789 of 790 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 789
  • Failed: 1

Build Badge Test Badge Coverage Badge

Please sign in to comment.