Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into rem…
Browse files Browse the repository at this point in the history
…ovestatics
  • Loading branch information
dareumnam committed Mar 26, 2021
2 parents 078dd0c + 686d7e2 commit 73f787a
Show file tree
Hide file tree
Showing 18 changed files with 318 additions and 290 deletions.
2 changes: 2 additions & 0 deletions src/EnergyPlus/Data/CommonIncludes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
#include <EnergyPlus/OutputReportPredefined.hh>
#include <EnergyPlus/OutputReportTabular.hh>
#include <EnergyPlus/OutputReportTabularAnnual.hh>
#include <EnergyPlus/OutputReports.hh>
#include <EnergyPlus/OutsideEnergySources.hh>
#include <EnergyPlus/PVWatts.hh>
#include <EnergyPlus/PackagedTerminalHeatPump.hh>
Expand Down Expand Up @@ -266,6 +267,7 @@
#include <EnergyPlus/SwimmingPool.hh>
#include <EnergyPlus/SystemAvailabilityManager.hh>
#include <EnergyPlus/SystemReports.hh>
#include <EnergyPlus/TARCOGCommon.hh>
#include <EnergyPlus/TARCOGGasses90.hh>
#include <EnergyPlus/TARCOGMain.hh>
#include <EnergyPlus/TARCOGOutput.hh>
Expand Down
12 changes: 8 additions & 4 deletions src/EnergyPlus/Data/EnergyPlusData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ namespace EnergyPlus {
this->dataAirLoop = std::make_unique<DataAirLoopData>();
this->dataAirLoopHVACDOAS = std::make_unique<AirLoopHVACDOASData>();
this->dataAirSystemsData = std::make_unique<AirSystemsData>();
this->dataAirflowNetworkBalanceManager = std::make_unique<AirflowNetworkBalanceManagerData>();
this->dataAirflowNetwork = std::make_unique<AirflowNetworkData>();
this->dataAirflowNetworkBalanceManager = std::make_unique<AirflowNetworkBalanceManagerData>();
this->dataAutoSizingBase = std::make_unique<AutoSizingBaseData>();
this->dataBSDFWindow = std::make_unique<BSDFWindowData>();
this->dataBaseSizerFanHeatInputs = std::make_unique<BaseSizerWithFanHeatInputsData>();
Expand Down Expand Up @@ -186,11 +186,12 @@ namespace EnergyPlus {
this->dataNodeInputMgr = std::make_unique<NodeInputManagerData>();
this->dataOutAirNodeMgr = std::make_unique<OutAirNodeManagerData>();
this->dataOutRptPredefined = std::make_unique<OutputReportPredefinedData>();
this->dataOutRptTab = std::make_unique<OutputReportTabularData>();
this->dataOutdoorAirUnit = std::make_unique<OutdoorAirUnitData>();
this->dataOutput = std::make_unique<OutputsData>();
this->dataOutputProcessor = std::make_unique<OutputProcessorData>();
this->dataOutRptTab = std::make_unique<OutputReportTabularData>();
this->dataOutputReportTabularAnnual = std::make_unique<OutputReportTabularAnnualData>();
this->dataOutputReports = std::make_unique<OutputReportsData>();
this->dataOutsideEnergySrcs = std::make_unique<OutsideEnergySourcesData>();
this->dataPTHP = std::make_unique<PackagedTerminalHeatPumpData>();
this->dataPVWatts = std::make_unique<PVWattsData>();
Expand Down Expand Up @@ -256,6 +257,7 @@ namespace EnergyPlus {
this->dataSysRpts = std::make_unique<SystemReportsData>();
this->dataSysVars = std::make_unique<SystemVarsData>();
this->dataSystemAvailabilityManager = std::make_unique<SystemAvailabilityManagerData>();
this->dataTARCOGCommon = std::make_unique<TARCOGCommonData>();
this->dataTARCOGOutputs = std::make_unique<TARCOGOutputData>();
this->dataThermalChimneys = std::make_unique<ThermalChimneysData>();
this->dataThermalComforts = std::make_unique<ThermalComfortsData>();
Expand Down Expand Up @@ -305,8 +307,8 @@ namespace EnergyPlus {
this->dataAirLoop->clear_state();
this->dataAirLoopHVACDOAS->clear_state();
this->dataAirSystemsData->clear_state();
this->dataAirflowNetworkBalanceManager->clear_state();
this->dataAirflowNetwork->clear_state();
this->dataAirflowNetworkBalanceManager->clear_state();
this->dataAutoSizingBase->clear_state();
this->dataBSDFWindow->clear_state();
this->dataBaseSizerFanHeatInputs->clear_state();
Expand Down Expand Up @@ -435,11 +437,12 @@ namespace EnergyPlus {
this->dataNodeInputMgr->clear_state();
this->dataOutAirNodeMgr->clear_state();
this->dataOutRptPredefined->clear_state();
this->dataOutRptTab->clear_state();
this->dataOutdoorAirUnit->clear_state();
this->dataOutput->clear_state();
this->dataOutputProcessor->clear_state();
this->dataOutRptTab->clear_state();
this->dataOutputReportTabularAnnual->clear_state();
this->dataOutputReports->clear_state();
this->dataOutsideEnergySrcs->clear_state();
this->dataPTHP->clear_state();
this->dataPVWatts->clear_state();
Expand Down Expand Up @@ -505,6 +508,7 @@ namespace EnergyPlus {
this->dataSysRpts->clear_state();
this->dataSysVars->clear_state();
this->dataSystemAvailabilityManager->clear_state();
this->dataTARCOGCommon->clear_state();
this->dataTARCOGOutputs->clear_state();
this->dataThermalChimneys->clear_state();
this->dataThermalComforts->clear_state();
Expand Down
4 changes: 4 additions & 0 deletions src/EnergyPlus/Data/EnergyPlusData.hh
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ struct OutputProcessorData;
struct OutputReportPredefinedData;
struct OutputReportTabularAnnualData;
struct OutputReportTabularData;
struct OutputReportsData;
struct OutputsData;
struct OutsideEnergySourcesData;
struct PVWattsData;
Expand Down Expand Up @@ -269,6 +270,7 @@ struct SystemAirFlowSizerData;
struct SystemAvailabilityManagerData;
struct SystemReportsData;
struct SystemVarsData;
struct TARCOGCommonData;
struct TARCOGOutputData;
struct ThermalChimneysData;
struct ThermalComfortsData;
Expand Down Expand Up @@ -457,6 +459,7 @@ struct EnergyPlusData : BaseGlobalStruct {
std::unique_ptr<OutputReportPredefinedData> dataOutRptPredefined;
std::unique_ptr<OutputReportTabularAnnualData> dataOutputReportTabularAnnual;
std::unique_ptr<OutputReportTabularData> dataOutRptTab;
std::unique_ptr<OutputReportsData> dataOutputReports;
std::unique_ptr<OutputsData> dataOutput;
std::unique_ptr<OutsideEnergySourcesData> dataOutsideEnergySrcs;
std::unique_ptr<PVWattsData> dataPVWatts;
Expand Down Expand Up @@ -521,6 +524,7 @@ struct EnergyPlusData : BaseGlobalStruct {
std::unique_ptr<SystemAvailabilityManagerData> dataSystemAvailabilityManager;
std::unique_ptr<SystemReportsData> dataSysRpts;
std::unique_ptr<SystemVarsData> dataSysVars;
std::unique_ptr<TARCOGCommonData> dataTARCOGCommon;
std::unique_ptr<TARCOGOutputData> dataTARCOGOutputs;
std::unique_ptr<ThermalChimneysData> dataThermalChimneys;
std::unique_ptr<ThermalComfortsData> dataThermalComforts;
Expand Down
23 changes: 11 additions & 12 deletions src/EnergyPlus/ExteriorEnergyUse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,17 @@ namespace ExteriorEnergyUse {
auto constexpr RoutineName("GetExteriorEnergyUseInput: ");

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
int Item; // Item to be "gotten"
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int IOStatus; // Used in GetObjectItem
int Item; // Item to be "gotten"
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int IOStatus; // Used in GetObjectItem
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int NumFuelEq; // Temporary -- number of ExteriorFuelEquipment statements
int NumWtrEq; // Temporary -- number of ExteriorWaterEquipment statements
std::string TypeString; // Fuel Type string (returned from Validation)
int NumFuelEq; // Temporary -- number of ExteriorFuelEquipment statements
int NumWtrEq; // Temporary -- number of ExteriorWaterEquipment statements
std::string TypeString; // Fuel Type string (returned from Validation)
std::string EndUseSubcategoryName;
Real64 SchMax; // Max value of schedule for item
Real64 SchMin; // Min value of schedule for item
static Real64 sumDesignLevel(0.0); // for predefined report of design level total
Real64 SchMax; // Max value of schedule for item
Real64 SchMin; // Min value of schedule for item

state.dataExteriorEnergyUse->NumExteriorLights = inputProcessor->getNumObjectsFound(state, "Exterior:Lights");
state.dataExteriorEnergyUse->ExteriorLights.allocate(state.dataExteriorEnergyUse->NumExteriorLights);
Expand Down Expand Up @@ -230,7 +229,7 @@ namespace ExteriorEnergyUse {

// entries for predefined tables
PreDefTableEntry(state, state.dataOutRptPredefined->pdchExLtPower, state.dataExteriorEnergyUse->ExteriorLights(Item).Name, state.dataExteriorEnergyUse->ExteriorLights(Item).DesignLevel);
sumDesignLevel += state.dataExteriorEnergyUse->ExteriorLights(Item).DesignLevel;
state.dataExteriorEnergyUse->sumDesignLevel += state.dataExteriorEnergyUse->ExteriorLights(Item).DesignLevel;
if (state.dataExteriorEnergyUse->ExteriorLights(Item).ControlMode == ExteriorEnergyUse::LightControlType::AstroClockOverride) { // photocell/schedule
PreDefTableEntry(state, state.dataOutRptPredefined->pdchExLtClock, state.dataExteriorEnergyUse->ExteriorLights(Item).Name, "AstronomicalClock");
PreDefTableEntry(state, state.dataOutRptPredefined->pdchExLtSchd, state.dataExteriorEnergyUse->ExteriorLights(Item).Name, "-");
Expand All @@ -239,7 +238,7 @@ namespace ExteriorEnergyUse {
PreDefTableEntry(state, state.dataOutRptPredefined->pdchExLtSchd, state.dataExteriorEnergyUse->ExteriorLights(Item).Name, GetScheduleName(state, state.dataExteriorEnergyUse->ExteriorLights(Item).SchedPtr));
}
}
PreDefTableEntry(state, state.dataOutRptPredefined->pdchExLtPower, "Exterior Lighting Total", sumDesignLevel);
PreDefTableEntry(state, state.dataOutRptPredefined->pdchExLtPower, "Exterior Lighting Total", state.dataExteriorEnergyUse->sumDesignLevel);

// ================================= Get Exterior Fuel Equipment

Expand Down
42 changes: 22 additions & 20 deletions src/EnergyPlus/ExteriorEnergyUse.hh
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,28 @@ namespace ExteriorEnergyUse {

} // namespace ExteriorEnergyUse

struct ExteriorEnergyUseData : BaseGlobalStruct {

int NumExteriorLights; // Number of Exterior Light Inputs
int NumExteriorEqs; // Number of Exterior Equipment Inputs
Array1D<ExteriorEnergyUse::ExteriorLightUsage> ExteriorLights; // Structure for Exterior Light reporting
Array1D<ExteriorEnergyUse::ExteriorEquipmentUsage> ExteriorEquipment; // Structure for Exterior Equipment Reporting
std::unordered_map<std::string, std::string> UniqueExteriorEquipNames;
bool GetExteriorEnergyInputFlag; // First time, input is "gotten"

void clear_state() override {
NumExteriorLights = 0;
NumExteriorEqs = 0;
ExteriorLights.deallocate();
ExteriorEquipment.deallocate();
UniqueExteriorEquipNames.clear();
GetExteriorEnergyInputFlag = true;
}
// Default Constructor
ExteriorEnergyUseData() : NumExteriorLights(0), NumExteriorEqs(0), GetExteriorEnergyInputFlag(true){}
};
struct ExteriorEnergyUseData : BaseGlobalStruct
{

int NumExteriorLights = 0; // Number of Exterior Light Inputs
int NumExteriorEqs = 0; // Number of Exterior Equipment Inputs
Array1D<ExteriorEnergyUse::ExteriorLightUsage> ExteriorLights; // Structure for Exterior Light reporting
Array1D<ExteriorEnergyUse::ExteriorEquipmentUsage> ExteriorEquipment; // Structure for Exterior Equipment Reporting
std::unordered_map<std::string, std::string> UniqueExteriorEquipNames;
bool GetExteriorEnergyInputFlag = true; // First time, input is "gotten"
Real64 sumDesignLevel = 0.0; // for predefined report of design level total

void clear_state() override
{
this->NumExteriorLights = 0;
this->NumExteriorEqs = 0;
this->ExteriorLights.deallocate();
this->ExteriorEquipment.deallocate();
this->UniqueExteriorEquipNames.clear();
this->GetExteriorEnergyInputFlag = true;
this->sumDesignLevel = 0.0;
}
};

} // namespace EnergyPlus

Expand Down
Loading

3 comments on commit 73f787a

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

removestatics (dareumnam) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: Tests Failed (0 of 0 tests passed, 0 test warnings)

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

removestatics (dareumnam) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: Tests Failed (0 of 0 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.

removestatics (dareumnam) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.