Skip to content

Commit

Permalink
New approach setting endusesub key only for the normal ABUPS end uses.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGlazer committed Jan 28, 2020
1 parent ba1a93b commit 8388029
Showing 1 changed file with 62 additions and 41 deletions.
103 changes: 62 additions & 41 deletions src/EnergyPlus/OutputProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,22 @@ namespace OutputProcessor {
"WinterDesignDay",
"CustomDay1",
"CustomDay2"});

std::vector<std::string> const endUseCategoryNames = {"HEATING",
"COOLING",
"INTERIORLIGHTS",
"EXTERIORLIGHTS",
"INTERIOREQUIPMENT",
"EXTERIOREQUIPMENT",
"FANS",
"PUMPS",
"HEATREJECTION",
"HUMIDIFIER",
"HEATRECOVERY",
"WATERSYSTEMS",
"REFRIGERATION",
"COGENERATION"};

static std::string const BlankString;
int const UnitsStringLength(16);

Expand Down Expand Up @@ -3968,46 +3984,46 @@ namespace OutputProcessor {
}

// resolve use of EndUseNames that are not in standard list but widely used to define output variables.
if (!Found) {
if (EndUseSubName == "General") {
if (EndUseName == "Baseboard" ||
EndUseName == "Boilers" ||
EndUseName == "CarbonEquivalentEmissions" ||
EndUseName == "Chillers" ||
EndUseName == "CoalEmissions" ||
EndUseName == "ColdStorageCharge" ||
EndUseName == "ColdStorageDischarge" ||
EndUseName == "Condensate" ||
EndUseName == "CoolingCoils" ||
EndUseName == "CoolingPanel" ||
EndUseName == "DieselEmissions" ||
EndUseName == "ElectricEmissions" ||
EndUseName == "ElectricStorage" ||
EndUseName == "Freecooling" ||
EndUseName == "FuelOil#1Emissions" ||
EndUseName == "FuelOil#2Emissions" ||
EndUseName == "GasolineEmissions" ||
EndUseName == "HeatProduced" ||
EndUseName == "HeatRecoveryForCooling" ||
EndUseName == "HeatRecoveryForHeating" ||
EndUseName == "HeatingCoils" ||
EndUseName == "LoopToLoop" ||
EndUseName == "MainsWater" ||
EndUseName == "NaturalGasEmissions" ||
EndUseName == "OtherFuel1Emissions" ||
EndUseName == "OtherFuel2Emissions" ||
EndUseName == "Photovoltaic" ||
EndUseName == "PowerConversion" ||
EndUseName == "PropaneEmissions" ||
EndUseName == "PurchasedElectricEmissions" ||
EndUseName == "Rainwater" ||
EndUseName == "SoldElectricEmissions" ||
EndUseName == "Wellwater" ||
EndUseName == "WindTurbine" ) {
Found = true;
}
}
}
//if (!Found) {
// if (EndUseSubName == "General") {
// if (EndUseName == "Baseboard" ||
// EndUseName == "Boilers" ||
// EndUseName == "CarbonEquivalentEmissions" ||
// EndUseName == "Chillers" ||
// EndUseName == "CoalEmissions" ||
// EndUseName == "ColdStorageCharge" ||
// EndUseName == "ColdStorageDischarge" ||
// EndUseName == "Condensate" ||
// EndUseName == "CoolingCoils" ||
// EndUseName == "CoolingPanel" ||
// EndUseName == "DieselEmissions" ||
// EndUseName == "ElectricEmissions" ||
// EndUseName == "ElectricStorage" ||
// EndUseName == "Freecooling" ||
// EndUseName == "FuelOil#1Emissions" ||
// EndUseName == "FuelOil#2Emissions" ||
// EndUseName == "GasolineEmissions" ||
// EndUseName == "HeatProduced" ||
// EndUseName == "HeatRecoveryForCooling" ||
// EndUseName == "HeatRecoveryForHeating" ||
// EndUseName == "HeatingCoils" ||
// EndUseName == "LoopToLoop" ||
// EndUseName == "MainsWater" ||
// EndUseName == "NaturalGasEmissions" ||
// EndUseName == "OtherFuel1Emissions" ||
// EndUseName == "OtherFuel2Emissions" ||
// EndUseName == "Photovoltaic" ||
// EndUseName == "PowerConversion" ||
// EndUseName == "PropaneEmissions" ||
// EndUseName == "PurchasedElectricEmissions" ||
// EndUseName == "Rainwater" ||
// EndUseName == "SoldElectricEmissions" ||
// EndUseName == "Wellwater" ||
// EndUseName == "WindTurbine" ) {
// Found = true;
// }
// }
//}

if (!Found) {
ShowSevereError("Nonexistent end use passed to AddEndUseSubcategory=" + EndUseName);
Expand Down Expand Up @@ -5686,7 +5702,12 @@ void SetupOutputVariable(std::string const &VariableName, // String Na
EndUseSub = EndUseSubKey;
OnMeter = true;
} else {
EndUseSub = "General";
EndUseSub = "";
if (present(EndUseKey)) {
if (std::find(endUseCategoryNames.begin(), endUseCategoryNames.end(), UtilityRoutines::MakeUPPERCase(EndUseKey)) != endUseCategoryNames.end()) {
EndUseSub = "General";
}
}
}
if (present(GroupKey)) {
Group = GroupKey;
Expand Down

7 comments on commit 8388029

@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.

7556b-other-end-use-subcat-try2 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2654 of 2657 tests passed, 672 test warnings)

Messages:\n

  • 675 tests had: AUD diffs.
  • 661 tests had: MDD diffs.
  • 675 tests had: MTD diffs.
  • 1 test had: Table big diffs.
  • 2 tests had: JSON big diffs.

Failures:\n

regression Test Summary

  • Passed: 690
  • Failed: 3

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.

7556b-other-end-use-subcat-try2 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build 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.

7556b-other-end-use-subcat-try2 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (11 of 11 tests passed, 0 test warnings)

Build 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.

7556b-other-end-use-subcat-try2 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1269 of 1269 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@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.

7556b-other-end-use-subcat-try2 (JasonGlazer) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (677 of 678 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 677
  • Timeout: 1

Build Badge Test Badge Coverage Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

7556b-other-end-use-subcat-try2 (JasonGlazer) - x86_64-MacOS-10.13-clang: OK (2614 of 2617 tests passed, 668 test warnings)

Messages:\n

  • 671 tests had: AUD diffs.
  • 657 tests had: MDD diffs.
  • 671 tests had: MTD diffs.
  • 2 tests had: EIO diffs.
  • 1 test had: Table small diffs.
  • 1 test had: Table big diffs.
  • 2 tests had: JSON big diffs.

Failures:\n

regression Test Summary

  • Passed: 670
  • Failed: 3

Build Badge Test 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.

7556b-other-end-use-subcat-try2 (JasonGlazer) - Win64-Windows-10-VisualStudio-16: OK (2614 of 2617 tests passed, 668 test warnings)

Messages:\n

  • 671 tests had: AUD diffs.
  • 657 tests had: MDD diffs.
  • 671 tests had: MTD diffs.
  • 2 tests had: EIO diffs.
  • 1 test had: Table big diffs.
  • 2 tests had: JSON big diffs.
  • 1 test had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 670
  • Failed: 3

Build Badge Test Badge

Please sign in to comment.