Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:

- name: Install Regression Tool
if: always() && matrix.run_regressions && steps.branch_build.outcome != 'failure' # always run this step as long as we actually built
run: pip install energyplus-regressions>=2.1.3
run: pip install energyplus-regressions>=2.1.4

- name: Run Regressions
if: always() && matrix.run_regressions && steps.branch_build.outcome != 'failure' # always run this step as long as we actually built
Expand Down
92 changes: 76 additions & 16 deletions src/EnergyPlus/SingleDuct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ void GetSysInput(EnergyPlusData &state)
airTerm.SysName = Alphas(1);
airTerm.sysType = CurrentModuleObject;
airTerm.SysType_Num = SysType::SingleDuctVAVReheat;

airTerm.ReheatComp = Alphas(7);
if (Util::SameString(airTerm.ReheatComp, "Coil:Heating:Fuel")) {
airTerm.ReheatComp_Num = HeatingCoilType::Gas;
Expand All @@ -380,12 +381,28 @@ void GetSysInput(EnergyPlusData &state)
ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName));
ErrorsFound = true;
}

airTerm.ReheatName = Alphas(8);
ValidateComponent(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK, airTerm.sysType);
if (IsNotOK) {
ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName));
ErrorsFound = true;
if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are the changes. They occur in about four different places.

HeatingCoils::GetCoilIndex(state, airTerm.ReheatName, airTerm.ReheatComp_Index, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(8), Alphas(8));
ErrorsFound = true;
}
} else if (airTerm.ReheatComp_Num == HeatingCoilType::SimpleHeating) {
airTerm.ReheatComp_Index = WaterCoils::GetWaterCoilIndex(state, airTerm.ReheatComp, airTerm.ReheatName, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(8), Alphas(8));
ErrorsFound = true;
}
} else if (airTerm.ReheatComp_Num == HeatingCoilType::SteamAirHeating) {
airTerm.ReheatComp_Index = SteamCoils::GetSteamCoilIndex(state, airTerm.ReheatComp, airTerm.ReheatName, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(8), Alphas(8));
ErrorsFound = true;
}
}

if (lAlphaBlanks(2)) {
airTerm.availSched = Sched::GetScheduleAlwaysOn(state);
} else if ((airTerm.availSched = Sched::GetSchedule(state, Alphas(2))) == nullptr) {
Expand Down Expand Up @@ -692,10 +709,24 @@ void GetSysInput(EnergyPlusData &state)
ErrorsFound = true;
}
airTerm.ReheatName = Alphas(6);
ValidateComponent(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK, airTerm.sysType);
if (IsNotOK) {
ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName));
ErrorsFound = true;
if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here they are again.

HeatingCoils::GetCoilIndex(state, airTerm.ReheatName, airTerm.ReheatComp_Index, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(6), Alphas(6));
ErrorsFound = true;
}
} else if (airTerm.ReheatComp_Num == HeatingCoilType::SimpleHeating) {
airTerm.ReheatComp_Index = WaterCoils::GetWaterCoilIndex(state, airTerm.ReheatComp, airTerm.ReheatName, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(6), Alphas(6));
ErrorsFound = true;
}
} else if (airTerm.ReheatComp_Num == HeatingCoilType::SteamAirHeating) {
airTerm.ReheatComp_Index = SteamCoils::GetSteamCoilIndex(state, airTerm.ReheatComp, airTerm.ReheatName, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(6), Alphas(6));
ErrorsFound = true;
}
}

if (lAlphaBlanks(2)) {
Expand Down Expand Up @@ -919,10 +950,24 @@ void GetSysInput(EnergyPlusData &state)
ErrorsFound = true;
}
airTerm.ReheatName = Alphas(6);
ValidateComponent(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK, airTerm.sysType);
if (IsNotOK) {
ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName));
ErrorsFound = true;
if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
HeatingCoils::GetCoilIndex(state, airTerm.ReheatName, airTerm.ReheatComp_Index, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(6), Alphas(6));
ErrorsFound = true;
}
} else if (airTerm.ReheatComp_Num == HeatingCoilType::SimpleHeating) {
airTerm.ReheatComp_Index = WaterCoils::GetWaterCoilIndex(state, airTerm.ReheatComp, airTerm.ReheatName, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(6), Alphas(6));
ErrorsFound = true;
}
} else if (airTerm.ReheatComp_Num == HeatingCoilType::SteamAirHeating) {
airTerm.ReheatComp_Index = SteamCoils::GetSteamCoilIndex(state, airTerm.ReheatComp, airTerm.ReheatName, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(6), Alphas(6));
ErrorsFound = true;
}
}

if (lAlphaBlanks(2)) {
Expand Down Expand Up @@ -1654,10 +1699,25 @@ void GetSysInput(EnergyPlusData &state)
ShowContinueError(state, format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName));
ErrorsFound = true;
}
ValidateComponent(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK, airTerm.sysType);
if (IsNotOK) {
ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName));
ErrorsFound = true;

if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
HeatingCoils::GetCoilIndex(state, airTerm.ReheatName, airTerm.ReheatComp_Index, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(8), Alphas(8));
ErrorsFound = true;
}
} else if (airTerm.ReheatComp_Num == HeatingCoilType::SimpleHeating) {
airTerm.ReheatComp_Index = WaterCoils::GetWaterCoilIndex(state, airTerm.ReheatComp, airTerm.ReheatName, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(8), Alphas(8));
ErrorsFound = true;
}
} else if (airTerm.ReheatComp_Num == HeatingCoilType::SteamAirHeating) {
airTerm.ReheatComp_Index = SteamCoils::GetSteamCoilIndex(state, airTerm.ReheatComp, airTerm.ReheatName, ErrorsFound);
if (airTerm.ReheatComp_Index == 0) {
ShowSevereItemNotFound(state, eoh, cAlphaFields(8), Alphas(8));
ErrorsFound = true;
}
}

airTerm.fanType = static_cast<HVAC::FanType>(getEnumValue(HVAC::fanTypeNamesUC, Alphas(5)));
Expand Down
4 changes: 4 additions & 0 deletions tst/EnergyPlus/unit/EconomicTariff.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -420,25 +420,29 @@ TEST_F(EnergyPlusFixture, EconomicTariff_LEEDtariffReporting_Test)
state->dataEconTariff->tariff(1).totalAnnualEnergy = 4855.21;
state->dataEconTariff->tariff(1).kindMtr = EconomicTariff::MeterType::ElecPurchased;
state->dataEconTariff->tariff(1).reportMeterIndx = GetMeterIndex(*state, "ELECTRICITY:FACILITY");
state->dataEconTariff->tariff(1).demandWindow = DemandWindow::Day;

state->dataEconTariff->tariff(2).tariffName = "SmallCGUnit";
state->dataEconTariff->tariff(2).isSelected = true;
state->dataEconTariff->tariff(2).totalAnnualCost = 415.56;
state->dataEconTariff->tariff(2).totalAnnualEnergy = 0.00;
state->dataEconTariff->tariff(2).kindMtr = EconomicTariff::MeterType::Gas;
state->dataEconTariff->tariff(2).reportMeterIndx = GetMeterIndex(*state, "NATURALGAS:FACILITY");
state->dataEconTariff->tariff(2).demandWindow = DemandWindow::Day;

state->dataEconTariff->tariff(3).tariffName = "DistrictCoolingUnit";
state->dataEconTariff->tariff(3).isSelected = true;
state->dataEconTariff->tariff(3).totalAnnualCost = 55.22;
state->dataEconTariff->tariff(3).totalAnnualEnergy = 8.64;
state->dataEconTariff->tariff(3).reportMeterIndx = GetMeterIndex(*state, "DISTRICTCOOLING:FACILITY");
state->dataEconTariff->tariff(3).demandWindow = DemandWindow::Day;

state->dataEconTariff->tariff(4).tariffName = "DistrictHeatingUnit";
state->dataEconTariff->tariff(4).isSelected = true;
state->dataEconTariff->tariff(4).totalAnnualCost = 15.98;
state->dataEconTariff->tariff(4).totalAnnualEnergy = 1.47;
state->dataEconTariff->tariff(4).reportMeterIndx = GetMeterIndex(*state, "DISTRICTHEATINGWATER:FACILITY");
state->dataEconTariff->tariff(4).demandWindow = DemandWindow::Day;

SetPredefinedTables(*state); // need to setup the predefined table entry numbers

Expand Down
Loading