Skip to content

Commit

Permalink
Merge pull request #4548 from NREL/issue-4531
Browse files Browse the repository at this point in the history
Addresses #4531, breaking changes
  • Loading branch information
jmarrec committed Mar 16, 2022
2 parents 18c0272 + 591f144 commit 313107d
Show file tree
Hide file tree
Showing 16 changed files with 130 additions and 68 deletions.
16 changes: 10 additions & 6 deletions src/model/CoolingTowerSingleSpeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ namespace model {
return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_CoolingTower_SingleSpeedFields::BasinHeaterOperatingScheduleName);
}

boost::optional<std::string> CoolingTowerSingleSpeed_Impl::evaporationLossMode() const {
return getString(OS_CoolingTower_SingleSpeedFields::EvaporationLossMode, true);
std::string CoolingTowerSingleSpeed_Impl::evaporationLossMode() const {
boost::optional<std::string> value = getString(OS_CoolingTower_SingleSpeedFields::EvaporationLossMode, true);
OS_ASSERT(value);
return value.get();
}

bool CoolingTowerSingleSpeed_Impl::isEvaporationLossModeDefaulted() const {
Expand All @@ -280,8 +282,10 @@ namespace model {
return isEmpty(OS_CoolingTower_SingleSpeedFields::DriftLossPercent);
}

boost::optional<std::string> CoolingTowerSingleSpeed_Impl::blowdownCalculationMode() const {
return getString(OS_CoolingTower_SingleSpeedFields::BlowdownCalculationMode, true);
std::string CoolingTowerSingleSpeed_Impl::blowdownCalculationMode() const {
boost::optional<std::string> value = getString(OS_CoolingTower_SingleSpeedFields::BlowdownCalculationMode, true);
OS_ASSERT(value);
return value.get();
}

bool CoolingTowerSingleSpeed_Impl::isBlowdownCalculationModeDefaulted() const {
Expand Down Expand Up @@ -1126,7 +1130,7 @@ namespace model {
return getImpl<detail::CoolingTowerSingleSpeed_Impl>()->basinHeaterOperatingSchedule();
}

boost::optional<std::string> CoolingTowerSingleSpeed::evaporationLossMode() const {
std::string CoolingTowerSingleSpeed::evaporationLossMode() const {
return getImpl<detail::CoolingTowerSingleSpeed_Impl>()->evaporationLossMode();
}

Expand All @@ -1150,7 +1154,7 @@ namespace model {
return getImpl<detail::CoolingTowerSingleSpeed_Impl>()->isDriftLossPercentDefaulted();
}

boost::optional<std::string> CoolingTowerSingleSpeed::blowdownCalculationMode() const {
std::string CoolingTowerSingleSpeed::blowdownCalculationMode() const {
return getImpl<detail::CoolingTowerSingleSpeed_Impl>()->blowdownCalculationMode();
}

Expand Down
4 changes: 2 additions & 2 deletions src/model/CoolingTowerSingleSpeed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ namespace model {

boost::optional<Schedule> basinHeaterOperatingSchedule() const;

boost::optional<std::string> evaporationLossMode() const;
std::string evaporationLossMode() const;

bool isEvaporationLossModeDefaulted() const;

Expand All @@ -132,7 +132,7 @@ namespace model {

bool isDriftLossPercentDefaulted() const;

boost::optional<std::string> blowdownCalculationMode() const;
std::string blowdownCalculationMode() const;

bool isBlowdownCalculationModeDefaulted() const;

Expand Down
4 changes: 2 additions & 2 deletions src/model/CoolingTowerSingleSpeed_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace model {

boost::optional<Schedule> basinHeaterOperatingSchedule() const;

boost::optional<std::string> evaporationLossMode() const;
std::string evaporationLossMode() const;

bool isEvaporationLossModeDefaulted() const;

Expand All @@ -135,7 +135,7 @@ namespace model {

bool isDriftLossPercentDefaulted() const;

boost::optional<std::string> blowdownCalculationMode() const;
std::string blowdownCalculationMode() const;

bool isBlowdownCalculationModeDefaulted() const;

Expand Down
16 changes: 10 additions & 6 deletions src/model/CoolingTowerTwoSpeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,10 @@ namespace model {
return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_CoolingTower_TwoSpeedFields::BasinHeaterOperatingScheduleName);
}

boost::optional<std::string> CoolingTowerTwoSpeed_Impl::evaporationLossMode() const {
return getString(OS_CoolingTower_TwoSpeedFields::EvaporationLossMode, true);
std::string CoolingTowerTwoSpeed_Impl::evaporationLossMode() const {
boost::optional<std::string> value = getString(OS_CoolingTower_TwoSpeedFields::EvaporationLossMode, true);
OS_ASSERT(value);
return value.get();
}

bool CoolingTowerTwoSpeed_Impl::isEvaporationLossModeDefaulted() const {
Expand All @@ -432,8 +434,10 @@ namespace model {
return isEmpty(OS_CoolingTower_TwoSpeedFields::DriftLossPercent);
}

boost::optional<std::string> CoolingTowerTwoSpeed_Impl::blowdownCalculationMode() const {
return getString(OS_CoolingTower_TwoSpeedFields::BlowdownCalculationMode, true);
std::string CoolingTowerTwoSpeed_Impl::blowdownCalculationMode() const {
boost::optional<std::string> value = getString(OS_CoolingTower_TwoSpeedFields::BlowdownCalculationMode, true);
OS_ASSERT(value);
return value.get();
}

bool CoolingTowerTwoSpeed_Impl::isBlowdownCalculationModeDefaulted() const {
Expand Down Expand Up @@ -1446,7 +1450,7 @@ namespace model {
return getImpl<detail::CoolingTowerTwoSpeed_Impl>()->basinHeaterOperatingSchedule();
}

boost::optional<std::string> CoolingTowerTwoSpeed::evaporationLossMode() const {
std::string CoolingTowerTwoSpeed::evaporationLossMode() const {
return getImpl<detail::CoolingTowerTwoSpeed_Impl>()->evaporationLossMode();
}

Expand All @@ -1470,7 +1474,7 @@ namespace model {
return getImpl<detail::CoolingTowerTwoSpeed_Impl>()->isDriftLossPercentDefaulted();
}

boost::optional<std::string> CoolingTowerTwoSpeed::blowdownCalculationMode() const {
std::string CoolingTowerTwoSpeed::blowdownCalculationMode() const {
return getImpl<detail::CoolingTowerTwoSpeed_Impl>()->blowdownCalculationMode();
}

Expand Down
4 changes: 2 additions & 2 deletions src/model/CoolingTowerTwoSpeed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ namespace model {

boost::optional<Schedule> basinHeaterOperatingSchedule() const;

boost::optional<std::string> evaporationLossMode() const;
std::string evaporationLossMode() const;

bool isEvaporationLossModeDefaulted() const;

Expand All @@ -179,7 +179,7 @@ namespace model {

bool isDriftLossPercentDefaulted() const;

boost::optional<std::string> blowdownCalculationMode() const;
std::string blowdownCalculationMode() const;

bool isBlowdownCalculationModeDefaulted() const;

Expand Down
4 changes: 2 additions & 2 deletions src/model/CoolingTowerTwoSpeed_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ namespace model {

boost::optional<Schedule> basinHeaterOperatingSchedule() const;

boost::optional<std::string> evaporationLossMode() const;
std::string evaporationLossMode() const;

bool isEvaporationLossModeDefaulted() const;

Expand All @@ -187,7 +187,7 @@ namespace model {

bool isDriftLossPercentDefaulted() const;

boost::optional<std::string> blowdownCalculationMode() const;
std::string blowdownCalculationMode() const;

bool isBlowdownCalculationModeDefaulted() const;

Expand Down
24 changes: 15 additions & 9 deletions src/model/CoolingTowerVariableSpeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ namespace model {
return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_CoolingTower_VariableSpeedFields::BasinHeaterOperatingSchedule);
}

boost::optional<std::string> CoolingTowerVariableSpeed_Impl::evaporationLossMode() const {
return getString(OS_CoolingTower_VariableSpeedFields::EvaporationLossMode, true);
std::string CoolingTowerVariableSpeed_Impl::evaporationLossMode() const {
boost::optional<std::string> value = getString(OS_CoolingTower_VariableSpeedFields::EvaporationLossMode, true);
OS_ASSERT(value);
return value.get();
}

bool CoolingTowerVariableSpeed_Impl::isEvaporationLossModeDefaulted() const {
Expand All @@ -258,8 +260,10 @@ namespace model {
return getDouble(OS_CoolingTower_VariableSpeedFields::DriftLossPercent, true);
}

boost::optional<std::string> CoolingTowerVariableSpeed_Impl::blowdownCalculationMode() const {
return getString(OS_CoolingTower_VariableSpeedFields::BlowdownCalculationMode, true);
std::string CoolingTowerVariableSpeed_Impl::blowdownCalculationMode() const {
boost::optional<std::string> value = getString(OS_CoolingTower_VariableSpeedFields::BlowdownCalculationMode, true);
OS_ASSERT(value);
return value.get();
}

bool CoolingTowerVariableSpeed_Impl::isBlowdownCalculationModeDefaulted() const {
Expand All @@ -278,8 +282,10 @@ namespace model {
return getInt(OS_CoolingTower_VariableSpeedFields::NumberofCells, true);
}

boost::optional<std::string> CoolingTowerVariableSpeed_Impl::cellControl() const {
return getString(OS_CoolingTower_VariableSpeedFields::CellControl, true);
std::string CoolingTowerVariableSpeed_Impl::cellControl() const {
boost::optional<std::string> value = getString(OS_CoolingTower_VariableSpeedFields::CellControl, true);
OS_ASSERT(value);
return value.get();
}

bool CoolingTowerVariableSpeed_Impl::isCellControlDefaulted() const {
Expand Down Expand Up @@ -865,7 +871,7 @@ namespace model {
return getImpl<detail::CoolingTowerVariableSpeed_Impl>()->basinHeaterOperatingSchedule();
}

boost::optional<std::string> CoolingTowerVariableSpeed::evaporationLossMode() const {
std::string CoolingTowerVariableSpeed::evaporationLossMode() const {
return getImpl<detail::CoolingTowerVariableSpeed_Impl>()->evaporationLossMode();
}

Expand All @@ -885,7 +891,7 @@ namespace model {
return getImpl<detail::CoolingTowerVariableSpeed_Impl>()->driftLossPercent();
}

boost::optional<std::string> CoolingTowerVariableSpeed::blowdownCalculationMode() const {
std::string CoolingTowerVariableSpeed::blowdownCalculationMode() const {
return getImpl<detail::CoolingTowerVariableSpeed_Impl>()->blowdownCalculationMode();
}

Expand All @@ -905,7 +911,7 @@ namespace model {
return getImpl<detail::CoolingTowerVariableSpeed_Impl>()->numberofCells();
}

boost::optional<std::string> CoolingTowerVariableSpeed::cellControl() const {
std::string CoolingTowerVariableSpeed::cellControl() const {
return getImpl<detail::CoolingTowerVariableSpeed_Impl>()->cellControl();
}

Expand Down
6 changes: 3 additions & 3 deletions src/model/CoolingTowerVariableSpeed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace model {

void resetBasinHeaterOperatingSchedule();

boost::optional<std::string> evaporationLossMode() const;
std::string evaporationLossMode() const;

bool isEvaporationLossModeDefaulted() const;

Expand All @@ -180,7 +180,7 @@ namespace model {

void resetDriftLossPercent();

boost::optional<std::string> blowdownCalculationMode() const;
std::string blowdownCalculationMode() const;

bool isBlowdownCalculationModeDefaulted() const;

Expand All @@ -206,7 +206,7 @@ namespace model {

void resetNumberofCells();

boost::optional<std::string> cellControl() const;
std::string cellControl() const;

bool isCellControlDefaulted() const;

Expand Down
6 changes: 3 additions & 3 deletions src/model/CoolingTowerVariableSpeed_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace model {

boost::optional<Schedule> basinHeaterOperatingSchedule() const;

boost::optional<std::string> evaporationLossMode() const;
std::string evaporationLossMode() const;

bool isEvaporationLossModeDefaulted() const;

Expand All @@ -119,7 +119,7 @@ namespace model {

boost::optional<double> driftLossPercent() const;

boost::optional<std::string> blowdownCalculationMode() const;
std::string blowdownCalculationMode() const;

bool isBlowdownCalculationModeDefaulted() const;

Expand All @@ -129,7 +129,7 @@ namespace model {

boost::optional<int> numberofCells() const;

boost::optional<std::string> cellControl() const;
std::string cellControl() const;

bool isCellControlDefaulted() const;

Expand Down

0 comments on commit 313107d

Please sign in to comment.