Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion to enum class - DataPlant::PlantEquipmentType #9053

Merged
merged 141 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
03bfbec
[won't compile] Checkpoint commit
jmythms Aug 19, 2021
e4126db
E+ compiles
jmythms Aug 20, 2021
4a8617d
Compiling + clangFormatted + fixed EnergyPlusTest
jmythms Aug 20, 2021
9ec87a5
Change function arguments to enums
jmythms Aug 23, 2021
a9703a4
clangFormat tests
jmythms Aug 23, 2021
102019f
merge develop + clangFormat
jmythms Aug 23, 2021
f4a4f8d
removed PlantEquipmentType::Other
jmythms Aug 23, 2021
4de7fbb
PlantEquipmentType start from 0, ccSimPlantEquipTypes to string_view …
jmythms Aug 23, 2021
413f409
fixed EnergyPlus_tests
jmythms Aug 24, 2021
566bf33
removed unused variable
jmythms Aug 24, 2021
2181f61
enum: Added num to PlantEquipmentType
jmythms Aug 26, 2021
f22f9ce
TypeOf_enum to Type
jmythms Aug 26, 2021
dce2bcf
ThisTypeOfNum to ThisType
jmythms Aug 26, 2021
13452de
Merge branch 'develop' into enumsDataPlant
jmythms Aug 26, 2021
db3fde3
CoilTypeNum to CoilType
jmythms Aug 26, 2021
2d1a2f7
removed NumSimPlantEquipTypes
jmythms Aug 26, 2021
a6187a0
actually removed NumSimPlantEquipTypes
jmythms Aug 26, 2021
cd6335d
clangFormat tests
jmythms Aug 26, 2021
42cb504
fix arrays
jmythms Aug 27, 2021
82f4f34
fixed findItem
jmythms Aug 27, 2021
4fb4cbc
int to uint
jmythms Aug 29, 2021
6887fe7
[decent_ci_skip] merged develop + fixed conflicts
jmythms Aug 29, 2021
a829baa
fix array names SimPlantEquipTypes
jmythms Aug 30, 2021
c2ecc11
FindItemInStdArray
jmythms Aug 31, 2021
2df032b
Merge branch 'develop' into enumsDataPlant
jmythms Aug 31, 2021
63d6b60
constexpr ValidLoopEquipTypes
jmythms Sep 1, 2021
90711c0
Merge branch 'develop' into enumsDataPlant
jmythms Sep 1, 2021
aee8afd
u_int to size_t to fix VS problems
jmythms Sep 1, 2021
7985c0f
Merge branch 'develop' into enumsDataPlant
jmythms Sep 1, 2021
c7a35a4
merge develop and fix conflicts
jmythms Sep 8, 2021
55e40c2
Merge branch 'enumsDataPlant' of https://github.com/NREL/EnergyPlus i…
jmythms Sep 8, 2021
50e3685
Merge branch 'develop' into enumsDataPlant
jmythms Sep 8, 2021
2b0eb7c
Fix CurOpSchemeType bug
jmythms Sep 8, 2021
967d76f
convert EXPECT_EQ to EXPECT_TRUE(compare_enums)
jmythms Sep 9, 2021
afe9b4e
[decent_ci_skip] rename WAHPPlantType
jmythms Sep 9, 2021
32cc521
merge develop and fix conflicts
jmythms Sep 9, 2021
e868ee8
rename nCondenserType to CondenserType
jmythms Sep 11, 2021
9eb2ada
TowerType_Num to switch/case
jmythms Sep 11, 2021
bfb6f70
checkpoint - removed TowerType_Num
jmythms Sep 11, 2021
6ae2395
fix CoolingTower calculate function call
jmythms Sep 12, 2021
83113f0
fix error message
jmythms Sep 12, 2021
9d53015
Merge branch 'develop' into enumsDataPlant
jmythms Sep 12, 2021
b5d0343
compPlantTypeOf to compPlantType
jmythms Sep 14, 2021
618866a
TypeOf_enum to Type, removed static_cast
jmythms Sep 14, 2021
cb38c46
CCoilPlantTypeOf to CCoilPlantType
jmythms Sep 14, 2021
12af802
FouledCoiled to FouledCoilType
jmythms Sep 15, 2021
ed20149
FluidCoolerType_enum to FluidCoolerType
jmythms Sep 15, 2021
eab7367
WWHPPlantTypeOfNum to WWHPPlantType
jmythms Sep 15, 2021
fc25a13
removed most of static_cast<DataPlant::PlantEquipment>
jmythms Sep 15, 2021
0b11314
removed WatertoWaterHPType
jmythms Sep 15, 2021
0bc104f
OES.* string to string_view
jmythms Sep 15, 2021
9058e6d
typenum -> type
jmythms Sep 15, 2021
879a40d
TypeNum to Type, ComponentTypeOfNum to ComponentType, ThisType to Type
jmythms Sep 16, 2021
ae581a7
PHT.* TypeOf to to Type
jmythms Sep 16, 2021
fc163c9
Pipes.* TypeOf to to Type
jmythms Sep 16, 2021
cd67f8c
FCEG.* TypeOf to to Type
jmythms Sep 16, 2021
fae2151
Merge branch 'develop' into enumsDataPlant
jmythms Sep 16, 2021
ac8ef5e
PLP.* TypeNum to Type
jmythms Sep 16, 2021
657c2a4
Boilers.* TypeNum to Type
jmythms Sep 16, 2021
a3eaad9
SolarCollectors.* TypeNum to Type
jmythms Sep 16, 2021
c8113bf
SetPointManager.* TypeNum to Type
jmythms Sep 16, 2021
e9871bb
SetPointManager.* TypeNum to Type-2
jmythms Sep 16, 2021
c818641
SetPointManager.* TypeNum to Type-3
jmythms Sep 16, 2021
06c1f09
[unfinished] WTT.* TypeNum to Type conversion
jmythms Sep 16, 2021
caa8a5f
Revert "[unfinished] WTT.* TypeNum to Type conversion"
jmythms Sep 16, 2021
f56fc11
IHP.* switch case tanktype
jmythms Sep 19, 2021
48ce6ac
OAU.* switch case coiltype
jmythms Sep 19, 2021
85043ff
LS.* ComponentType to switch case
jmythms Sep 19, 2021
a042f78
SPM.* ifelse to switchCase
jmythms Sep 20, 2021
ccd6e0d
removed isPump()
jmythms Sep 20, 2021
dbbf26b
fix SPM unit test
jmythms Sep 20, 2021
35f11e5
merge develop + fix conflicts
jmythms Sep 20, 2021
9075093
removed unnecessary default errors
jmythms Sep 21, 2021
5e45e8b
PlantEquipmentType starts at -1
jmythms Sep 21, 2021
b52429f
Merge branch 'develop' into enumsDataPlant
jmythms Sep 21, 2021
73bc58e
Rename enum classes + start at -1
jmythms Sep 21, 2021
6336f95
Fix CompType limits
jmythms Sep 21, 2021
b82197e
EPSM.* array+getEnumValue
jmythms Sep 22, 2021
1568586
combine compGenTypeOf_Num and generatorType
jmythms Sep 22, 2021
38fd163
EPSM.* removed typeOfName
jmythms Sep 22, 2021
2cd065e
Merge branch 'develop' into enumsDataPlant
jmythms Sep 22, 2021
b9c2bf2
fix enum starting values
jmythms Sep 27, 2021
82cdead
Merge branch 'develop' into enumsDataPlant
jmythms Sep 27, 2021
58bf0ab
fixed OpSchemeType order
jmythms Sep 27, 2021
585c0a2
preserve comments
jmythms Sep 27, 2021
222e393
fix OpSchemeType enums
jmythms Sep 28, 2021
e91ac33
removed extra brackets
jmythms Sep 28, 2021
12f2141
fix generatorType switch + unitTest
jmythms Sep 28, 2021
287ccc7
getEnumeration OAU.*
jmythms Sep 30, 2021
c735686
OpSchemeType enum to enum class
jmythms Sep 30, 2021
4df145e
OpSchemeType to OpScheme
jmythms Sep 30, 2021
6ca36dd
switch case CurSchemeType
jmythms Sep 30, 2021
f384c36
switch case this_comp_type
jmythms Sep 30, 2021
ab9e2c1
PCLO.cc using getEnumerationValue
jmythms Sep 30, 2021
5ebcc1a
clangformat
jmythms Sep 30, 2021
33f0755
PIU.* getEnumerationValue
jmythms Oct 1, 2021
410a9d4
proof of concept - case sensitive Enums
jmythms Oct 4, 2021
3b1ac52
fix getEnumerationValue generatorType
jmythms Oct 4, 2021
c6218c7
PC.* getEnumertionValue
jmythms Oct 4, 2021
81e0585
PC.* rename plantTypeOfNum to ChillerType
jmythms Oct 4, 2021
48ea59c
UH.* enum class HCoilType
jmythms Oct 4, 2021
1de70c1
UH.* if-else to switch
jmythms Oct 4, 2021
8249b3c
LoopSide.cc clean up SELECT_CASE_var
jmythms Oct 4, 2021
f736ca6
merge develop + fix conflicts
jmythms Oct 5, 2021
c8e006d
fix HCoilTypeNamesUC
jmythms Oct 7, 2021
a0ad048
rename HCoilType, HCoil_PlantType
jmythms Oct 7, 2021
04cc9ad
initialized SchemeType
jmythms Oct 7, 2021
d048b27
removed cPressureSimType
jmythms Oct 7, 2021
c56f48b
Enums.* add Num + removed specific numbers
jmythms Oct 7, 2021
42636ac
EAO.hh removed unused var + CtrlTypeNum to CtrlType
jmythms Oct 7, 2021
9adbe4a
changed if condition to use PlantEquipmentType enum class
jmythms Oct 7, 2021
a6f2218
Rename GeneratorTypeNames, GeneratorTypeNamesUC
jmythms Oct 8, 2021
b01004d
PLHPEIR.cc processInputForEIRPLHP remove thisType, unnecessary static…
jmythms Oct 8, 2021
fb0e1eb
PU.cc rename TypeOfNum to Type
jmythms Oct 8, 2021
ca86434
BS.cc SELECT_CASE_var to switch/case
jmythms Oct 8, 2021
b9cf905
OAU.cc remove static_cast + change CoilType usage to Type
jmythms Oct 8, 2021
8d1efb7
WaterToAirHeatPump.hh rename WAHPType
jmythms Oct 8, 2021
03bc961
WaterCoils.hh rename WaterCoilType
jmythms Oct 8, 2021
615f4e7
VS.hh rename HeatingCoilType and CoolingCoilType
jmythms Oct 8, 2021
5266038
VS.cc rename HeatingCoilType and CoolingCoilType
jmythms Oct 8, 2021
c37952b
VSC.cc rename CoilVSWAHPType
jmythms Oct 8, 2021
b7e1abc
UV.hh rename HeatingCoilType and CoolingCoilType
jmythms Oct 9, 2021
2359f9f
UH.hh rename HeatingCoilType
jmythms Oct 9, 2021
df480d2
SC.hh rename CoilType
jmythms Oct 9, 2021
236b113
SBR.hh rename BaseboardType
jmythms Oct 9, 2021
bade78a
PU.hh rename variables
jmythms Oct 9, 2021
a610dc1
PHEFTF.hh ComponentTypeOfNum to ComponentType
jmythms Oct 9, 2021
87afdd4
OES.hh rename typeOf
jmythms Oct 9, 2021
08f6071
HVACVRF.hh rename VRFPlantTypeOfNum
jmythms Oct 9, 2021
a9f0ed5
HVACSDI.hh rename HCoil_PlantTypeNum and CCoil_PlantTypeNum
jmythms Oct 9, 2021
bcb310b
PlantUtilities.cc fix error(help) string
jmythms Oct 9, 2021
ff38def
clangFormat
jmythms Oct 9, 2021
73d36ae
WTT.cc removed SELECT_CASE_var1
jmythms Oct 9, 2021
5af8cab
WTT.* implement switch/case:setupZoneInternalGains
jmythms Oct 9, 2021
3719483
added default for switch in WaterThermalTankData::setupZoneInternalGa…
jmythms Oct 9, 2021
ed36c88
WTT.hh rename TypeNum to WaterThermalTankType
jmythms Oct 9, 2021
6ec48fd
Revert "WTT.hh rename TypeNum to WaterThermalTankType": Need more inf…
jmythms Oct 9, 2021
b5e8409
rename WaterThermalTankType HPWHTankType HPWHType, add array HCoilNames
jmythms Oct 9, 2021
48f2c30
clangFormat
jmythms Oct 9, 2021
cd3acdc
revert changes in documents
jmythms Oct 9, 2021
7ca2499
rename PlantEquipTypeNames and PlantEquipTypeNamesUC
jmythms Oct 9, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ \subsection{Central Routine Modifications}\label{central-routine-modifications}

a.~~~~Parameter NumSimPlantEquipTypes. Increment up to include new component.

b.~~~Array SimPlantEquipTypes.~ Add array element with new object's class name in upper case.
b.~~~Array PlantEquipTypeNamesUC.~ Add array element with new object's class name in upper case.

c.~~~~Array ccSimPlantEquipTypes.Add array element with new object's class name in camel case.
c.~~~~Array PlantEquipTypeNames.Add array element with new object's class name in camel case.

d.~~~Array ValidLoopEquipTypes.~ Add array element with classification for what type of loop this component is intended for, primarily with respect to the type of loop it is intended to meet loads.

Expand Down
6 changes: 3 additions & 3 deletions src/EnergyPlus/AirLoopHVACDOAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ namespace AirLoopHVACDOAS {
}
PlantUtilities::ScanPlantLoopsForObject(state,
CompName,
DataPlant::TypeOf_CoilWaterCooling,
DataPlant::PlantEquipmentType::CoilWaterCooling,
thisDOAS.CWLoopNum,
thisDOAS.CWLoopSide,
thisDOAS.CWBranchNum,
Expand Down Expand Up @@ -536,7 +536,7 @@ namespace AirLoopHVACDOAS {
}
PlantUtilities::ScanPlantLoopsForObject(state,
CompName,
DataPlant::TypeOf_CoilWaterSimpleHeating,
DataPlant::PlantEquipmentType::CoilWaterSimpleHeating,
thisDOAS.HWLoopNum,
thisDOAS.HWLoopSide,
thisDOAS.HWBranchNum,
Expand Down Expand Up @@ -576,7 +576,7 @@ namespace AirLoopHVACDOAS {
}
PlantUtilities::ScanPlantLoopsForObject(state,
CompName,
DataPlant::TypeOf_CoilWaterDetailedFlatCooling,
DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling,
thisDOAS.CWLoopNum,
thisDOAS.CWLoopSide,
thisDOAS.CWBranchNum,
Expand Down
3 changes: 1 addition & 2 deletions src/EnergyPlus/BaseboardRadiator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ namespace BaseboardRadiator {

// Using/Aliasing
using DataHVACGlobals::SmallLoad;
using DataPlant::TypeOf_Baseboard_Conv_Water;

// Use statements for access to subroutines in other modules
using namespace ScheduleManager;
Expand Down Expand Up @@ -322,7 +321,7 @@ namespace BaseboardRadiator {

++BaseboardNum;
baseboard->Baseboard(BaseboardNum).EquipID = state.dataIPShortCut->cAlphaArgs(1); // name of this baseboard
baseboard->Baseboard(BaseboardNum).EquipType = TypeOf_Baseboard_Conv_Water;
baseboard->Baseboard(BaseboardNum).EquipType = DataPlant::PlantEquipmentType::Baseboard_Conv_Water;
baseboard->Baseboard(BaseboardNum).Schedule = state.dataIPShortCut->cAlphaArgs(2);
if (state.dataIPShortCut->lAlphaFieldBlanks(2)) {
baseboard->Baseboard(BaseboardNum).SchedPtr = DataGlobalConstants::ScheduleAlwaysOn;
Expand Down
15 changes: 8 additions & 7 deletions src/EnergyPlus/BaseboardRadiator.hh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include <EnergyPlus/Data/BaseData.hh>
#include <EnergyPlus/DataGlobals.hh>
#include <EnergyPlus/EnergyPlus.hh>
#include <EnergyPlus/Plant/DataPlant.hh>

namespace EnergyPlus {

Expand All @@ -69,7 +70,7 @@ namespace BaseboardRadiator {
std::string EquipID;
std::string Schedule;
int SchedPtr;
int EquipType;
DataPlant::PlantEquipmentType EquipType;
int ZonePtr;
int WaterInletNode;
int WaterOutletNode;
Expand Down Expand Up @@ -110,12 +111,12 @@ namespace BaseboardRadiator {

// Default Constructor
BaseboardParams()
: SchedPtr(0), EquipType(0), ZonePtr(0), WaterInletNode(0), WaterOutletNode(0), ControlCompTypeNum(0), CompErrIndex(0), UA(0.0),
WaterMassFlowRate(0.0), WaterVolFlowRateMax(0.0), WaterMassFlowRateMax(0.0), Offset(0.0), AirMassFlowRate(0.0), DesAirMassFlowRate(0.0),
WaterInletTemp(0.0), WaterOutletTemp(0.0), WaterInletEnthalpy(0.0), WaterOutletEnthalpy(0.0), AirInletTemp(0.0), AirInletHumRat(0.0),
AirOutletTemp(0.0), Power(0.0), Energy(0.0), LoopNum(0), LoopSideNum(0), BranchNum(0), CompNum(0), BBLoadReSimIndex(0),
BBMassFlowReSimIndex(0), BBInletTempFlowReSimIndex(0), HeatingCapMethod(0), ScaledHeatingCapacity(0.0), MySizeFlag(true),
CheckEquipName(true), SetLoopIndexFlag(true), MyEnvrnFlag(true)
: SchedPtr(0), EquipType(DataPlant::PlantEquipmentType::Invalid), ZonePtr(0), WaterInletNode(0), WaterOutletNode(0),
ControlCompTypeNum(0), CompErrIndex(0), UA(0.0), WaterMassFlowRate(0.0), WaterVolFlowRateMax(0.0), WaterMassFlowRateMax(0.0),
Offset(0.0), AirMassFlowRate(0.0), DesAirMassFlowRate(0.0), WaterInletTemp(0.0), WaterOutletTemp(0.0), WaterInletEnthalpy(0.0),
WaterOutletEnthalpy(0.0), AirInletTemp(0.0), AirInletHumRat(0.0), AirOutletTemp(0.0), Power(0.0), Energy(0.0), LoopNum(0),
LoopSideNum(0), BranchNum(0), CompNum(0), BBLoadReSimIndex(0), BBMassFlowReSimIndex(0), BBInletTempFlowReSimIndex(0),
HeatingCapMethod(0), ScaledHeatingCapacity(0.0), MySizeFlag(true), CheckEquipName(true), SetLoopIndexFlag(true), MyEnvrnFlag(true)
{
}
};
Expand Down
49 changes: 26 additions & 23 deletions src/EnergyPlus/BoilerSteam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ namespace BoilerSteam {
bool errFlag = false;
PlantUtilities::ScanPlantLoopsForObject(state,
this->Name,
DataPlant::TypeOf_Boiler_Steam,
DataPlant::PlantEquipmentType::Boiler_Steam,
this->LoopNum,
this->LoopSideNum,
this->BranchNum,
Expand Down Expand Up @@ -429,15 +429,18 @@ namespace BoilerSteam {
// fix for clumsy old input that worked because loop setpoint was spread.
// could be removed with transition, testing , model change, period of being obsolete.
int BoilerOutletNode = this->BoilerOutletNodeNum;
{
auto const SELECT_CASE_var(state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme);
if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
state.dataLoopNodes->Node(BoilerOutletNode).TempSetPoint =
state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(this->LoopNum).TempSetPointNodeNum).TempSetPoint;
} else if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand) {
state.dataLoopNodes->Node(BoilerOutletNode).TempSetPointLo =
state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(this->LoopNum).TempSetPointNodeNum).TempSetPointLo;
}
switch (state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme) {

case (DataPlant::LoopDemandCalcScheme::SingleSetPoint):
state.dataLoopNodes->Node(BoilerOutletNode).TempSetPoint =
state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(this->LoopNum).TempSetPointNodeNum).TempSetPoint;
break;
case (DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand):
state.dataLoopNodes->Node(BoilerOutletNode).TempSetPointLo =
state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(this->LoopNum).TempSetPointNodeNum).TempSetPointLo;
break;
default:
break;
}
}
}
Expand Down Expand Up @@ -641,9 +644,9 @@ namespace BoilerSteam {

{
auto const SELECT_CASE_var(state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme);
if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::SingleSetPoint) {
this->BoilerOutletTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPoint;
} else if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand) {
} else if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand) {
this->BoilerOutletTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo;
}
}
Expand Down Expand Up @@ -683,15 +686,15 @@ namespace BoilerSteam {
state, fluidNameSteam, state.dataLoopNodes->Node(this->BoilerInletNodeNum).Temp, 0.0, this->FluidIndex, RoutineName);

if (state.dataPlnt->PlantLoop(this->LoopNum).LoopSide(this->LoopSideNum).FlowLock ==
DataPlant::iFlowLock::Unlocked) { // TODO: Components shouldn't check FlowLock
DataPlant::FlowLock::Unlocked) { // TODO: Components shouldn't check FlowLock
// Calculate the flow for the boiler

{
auto const SELECT_CASE_var(state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme);
if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::SingleSetPoint) {
BoilerDeltaTemp =
state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPoint - state.dataLoopNodes->Node(this->BoilerInletNodeNum).Temp;
} else { // DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand
} else { // DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand
BoilerDeltaTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo -
state.dataLoopNodes->Node(this->BoilerInletNodeNum).Temp;
}
Expand Down Expand Up @@ -720,10 +723,10 @@ namespace BoilerSteam {
// Assume that it can meet the setpoint
{
auto const SELECT_CASE_var(state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme);
if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::SingleSetPoint) {
BoilerDeltaTemp =
state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPoint - state.dataLoopNodes->Node(this->BoilerInletNodeNum).Temp;
} else if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand) {
} else if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand) {
BoilerDeltaTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo -
state.dataLoopNodes->Node(this->BoilerInletNodeNum).Temp;
}
Expand All @@ -732,9 +735,9 @@ namespace BoilerSteam {
if (BoilerDeltaTemp < 0.0) {
{
auto const SELECT_CASE_var(state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme);
if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::SingleSetPoint) {
this->BoilerOutletTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPoint;
} else if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand) {
} else if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand) {
this->BoilerOutletTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo;
}
}
Expand All @@ -749,9 +752,9 @@ namespace BoilerSteam {

{
auto const SELECT_CASE_var(state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme);
if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::SingleSetPoint) {
this->BoilerOutletTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPoint;
} else if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand) {
} else if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand) {
this->BoilerOutletTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo;
}
}
Expand All @@ -772,9 +775,9 @@ namespace BoilerSteam {
// Reset later , here just for calculating latent heat
{
auto const SELECT_CASE_var(state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme);
if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::SingleSetPoint) {
this->BoilerOutletTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPoint;
} else if (SELECT_CASE_var == DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand) {
} else if (SELECT_CASE_var == DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand) {
this->BoilerOutletTemp = state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo;
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/EnergyPlus/Boilers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void GetBoilerInput(EnergyPlusData &state)
state.dataIPShortCut->cCurrentModuleObject + " Name");
auto &thisBoiler = state.dataBoilers->Boiler(BoilerNum);
thisBoiler.Name = state.dataIPShortCut->cAlphaArgs(1);
thisBoiler.TypeNum = DataPlant::TypeOf_Boiler_Simple;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed variables that were not ints anymore.

thisBoiler.Type = DataPlant::PlantEquipmentType::Boiler_Simple;

// Validate fuel type input
bool FuelTypeError(false);
Expand Down Expand Up @@ -474,7 +474,7 @@ void BoilerSpecs::oneTimeInit(EnergyPlusData &state)
bool errFlag = false;
PlantUtilities::ScanPlantLoopsForObject(state,
this->Name,
DataPlant::TypeOf_Boiler_Simple,
DataPlant::PlantEquipmentType::Boiler_Simple,
this->LoopNum,
this->LoopSideNum,
this->BranchNum,
Expand Down Expand Up @@ -585,10 +585,10 @@ void BoilerSpecs::InitBoiler(EnergyPlusData &state) // number of the current boi
if ((this->FlowMode == DataPlant::FlowMode::LeavingSetpointModulated) && this->ModulatedFlowSetToLoop) {
// fix for clumsy old input that worked because loop setpoint was spread.
// could be removed with transition, testing , model change, period of being obsolete.
if (state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
if (state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme == DataPlant::LoopDemandCalcScheme::SingleSetPoint) {
state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPoint =
state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(this->LoopNum).TempSetPointNodeNum).TempSetPoint;
} else { // DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand
} else { // DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand
state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo =
state.dataLoopNodes->Node(state.dataPlnt->PlantLoop(this->LoopNum).TempSetPointNodeNum).TempSetPointLo;
}
Expand Down Expand Up @@ -833,7 +833,7 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state,
// Initialize the delta temperature to zero
Real64 BoilerDeltaTemp; // C - boiler inlet to outlet temperature difference, set in all necessary code paths so no initialization required

if (state.dataPlnt->PlantLoop(this->LoopNum).LoopSide(this->LoopSideNum).FlowLock == DataPlant::iFlowLock::Unlocked) {
if (state.dataPlnt->PlantLoop(this->LoopNum).LoopSide(this->LoopSideNum).FlowLock == DataPlant::FlowLock::Unlocked) {
// Either set the flow to the Constant value or calculate the flow for the variable volume
if ((this->FlowMode == DataPlant::FlowMode::Constant) || (this->FlowMode == DataPlant::FlowMode::NotModulated)) {
// Then find the flow rate and outlet temp
Expand All @@ -852,9 +852,9 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state,
// Calculate the Delta Temp from the inlet temp to the boiler outlet setpoint
// Then find the flow rate and outlet temp

if (state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme == DataPlant::iLoopDemandCalcScheme::SingleSetPoint) {
if (state.dataPlnt->PlantLoop(this->LoopNum).LoopDemandCalcScheme == DataPlant::LoopDemandCalcScheme::SingleSetPoint) {
BoilerDeltaTemp = state.dataLoopNodes->Node(BoilerOutletNode).TempSetPoint - state.dataLoopNodes->Node(BoilerInletNode).Temp;
} else { // DataPlant::iLoopDemandCalcScheme::DualSetPointDeadBand
} else { // DataPlant::LoopDemandCalcScheme::DualSetPointDeadBand
BoilerDeltaTemp = state.dataLoopNodes->Node(BoilerOutletNode).TempSetPointLo - state.dataLoopNodes->Node(BoilerInletNode).Temp;
}

Expand Down
Loading