src/model/CoilCoolingDXCurveFitOperatingMode.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "CoilCoolingDXCurveFitOperatingMode.hpp" | ||
| 7 | #include "CoilCoolingDXCurveFitOperatingMode_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Model.hpp" | ||
| 10 | #include "Model_Impl.hpp" | ||
| 11 | #include "CoilCoolingDXCurveFitPerformance.hpp" | ||
| 12 | #include "CoilCoolingDXCurveFitPerformance_Impl.hpp" | ||
| 13 | #include "CoilCoolingDXCurveFitSpeed.hpp" | ||
| 14 | #include "CoilCoolingDXCurveFitSpeed_Impl.hpp" | ||
| 15 | |||
| 16 | #include <utilities/idd/IddFactory.hxx> | ||
| 17 | #include <utilities/idd/IddEnums.hxx> | ||
| 18 | #include <utilities/idd/OS_Coil_Cooling_DX_CurveFit_OperatingMode_FieldEnums.hxx> | ||
| 19 | #include "../utilities/units/Unit.hpp" | ||
| 20 | #include "../utilities/core/Assert.hpp" | ||
| 21 | #include "../utilities/idf/WorkspaceExtensibleGroup.hpp" | ||
| 22 | |||
| 23 | #include <algorithm> | ||
| 24 | |||
| 25 | namespace openstudio { | ||
| 26 | namespace model { | ||
| 27 | |||
| 28 | namespace detail { | ||
| 29 | |||
| 30 | 47 | CoilCoolingDXCurveFitOperatingMode_Impl::CoilCoolingDXCurveFitOperatingMode_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 31 | 47 | : ResourceObject_Impl(idfObject, model, keepHandle) { | |
| 32 |
4/6✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
✓ Branch 7 taken 47 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 47 times.
✗ Branch 13 not taken.
|
47 | OS_ASSERT(idfObject.iddObject().type() == CoilCoolingDXCurveFitOperatingMode::iddObjectType()); |
| 33 | 47 | } | |
| 34 | |||
| 35 | 3 | CoilCoolingDXCurveFitOperatingMode_Impl::CoilCoolingDXCurveFitOperatingMode_Impl(const openstudio::detail::WorkspaceObject_Impl& other, | |
| 36 | 3 | Model_Impl* model, bool keepHandle) | |
| 37 | 3 | : ResourceObject_Impl(other, model, keepHandle) { | |
| 38 |
4/6✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 3 times.
✗ Branch 13 not taken.
|
3 | OS_ASSERT(other.iddObject().type() == CoilCoolingDXCurveFitOperatingMode::iddObjectType()); |
| 39 | 3 | } | |
| 40 | |||
| 41 | 26 | CoilCoolingDXCurveFitOperatingMode_Impl::CoilCoolingDXCurveFitOperatingMode_Impl(const CoilCoolingDXCurveFitOperatingMode_Impl& other, | |
| 42 | 26 | Model_Impl* model, bool keepHandle) | |
| 43 | 26 | : ResourceObject_Impl(other, model, keepHandle) {} | |
| 44 | |||
| 45 | ✗ | const std::vector<std::string>& CoilCoolingDXCurveFitOperatingMode_Impl::outputVariableNames() const { | |
| 46 | ✗ | static std::vector<std::string> result; | |
| 47 | ✗ | if (result.empty()) { | |
| 48 | } | ||
| 49 | ✗ | return result; | |
| 50 | } | ||
| 51 | |||
| 52 | ✗ | IddObjectType CoilCoolingDXCurveFitOperatingMode_Impl::iddObjectType() const { | |
| 53 | ✗ | return CoilCoolingDXCurveFitOperatingMode::iddObjectType(); | |
| 54 | } | ||
| 55 | |||
| 56 | 1 | ModelObject CoilCoolingDXCurveFitOperatingMode_Impl::clone(Model model) const { | |
| 57 | // clone the operating modes is already handle in ModelObject_Impl::clone since they are ResourceObjects | ||
| 58 | // We don't do ParentObject_Impl::clone since it'll also CLONE the children... | ||
| 59 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | return ModelObject_Impl::clone(model); |
| 60 | } | ||
| 61 | |||
| 62 | 22 | std::vector<ModelObject> CoilCoolingDXCurveFitOperatingMode_Impl::children() const { | |
| 63 | // These are ResourceObjects, so they shouldn't really be children except for OS App / IG | ||
| 64 |
2/2✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
|
22 | std::vector<ModelObject> result = subsetCastVector<ModelObject>(speeds()); |
| 65 | |||
| 66 | 22 | return result; | |
| 67 | } | ||
| 68 | |||
| 69 | 3 | std::vector<IdfObject> CoilCoolingDXCurveFitOperatingMode_Impl::remove() { | |
| 70 |
1/1✓ Branch 1 taken 3 times.
|
3 | auto perfs = coilCoolingDXCurveFitPerformances(); |
| 71 |
1/1✓ Branch 3 taken 3 times.
|
3 | auto it = std::find_if(perfs.begin(), perfs.end(), |
| 72 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | [this](const CoilCoolingDXCurveFitPerformance& perf) { return (perf.baseOperatingMode().handle() == this->handle()); }); |
| 73 |
2/2✓ Branch 2 taken 1 time.
✓ Branch 3 taken 2 times.
|
3 | if (it != perfs.end()) { |
| 74 |
5/5✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
|
1 | LOG(Warn, "Cannot remove object because it is used by at least one CoilCoolingDXCurveFitPerformance as a required field"); |
| 75 | 1 | return {}; | |
| 76 | } | ||
| 77 |
1/1✓ Branch 1 taken 2 times.
|
2 | return ResourceObject_Impl::remove(); |
| 78 | 3 | } | |
| 79 | |||
| 80 | 21 | boost::optional<double> CoilCoolingDXCurveFitOperatingMode_Impl::ratedGrossTotalCoolingCapacity() const { | |
| 81 | 21 | return getDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedGrossTotalCoolingCapacity, true); | |
| 82 | } | ||
| 83 | |||
| 84 | 4 | bool CoilCoolingDXCurveFitOperatingMode_Impl::isRatedGrossTotalCoolingCapacityAutosized() const { | |
| 85 | 4 | bool result = false; | |
| 86 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedGrossTotalCoolingCapacity, true); |
| 87 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (value) { |
| 88 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
8 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 89 | } | ||
| 90 | 4 | return result; | |
| 91 | 4 | } | |
| 92 | |||
| 93 | 21 | boost::optional<double> CoilCoolingDXCurveFitOperatingMode_Impl::ratedEvaporatorAirFlowRate() const { | |
| 94 | 21 | return getDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedEvaporatorAirFlowRate, true); | |
| 95 | } | ||
| 96 | |||
| 97 | 4 | bool CoilCoolingDXCurveFitOperatingMode_Impl::isRatedEvaporatorAirFlowRateAutosized() const { | |
| 98 | 4 | bool result = false; | |
| 99 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedEvaporatorAirFlowRate, true); |
| 100 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (value) { |
| 101 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
8 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 102 | } | ||
| 103 | 4 | return result; | |
| 104 | 4 | } | |
| 105 | |||
| 106 | 21 | boost::optional<double> CoilCoolingDXCurveFitOperatingMode_Impl::ratedCondenserAirFlowRate() const { | |
| 107 | 21 | return getDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedCondenserAirFlowRate, true); | |
| 108 | } | ||
| 109 | |||
| 110 | 4 | bool CoilCoolingDXCurveFitOperatingMode_Impl::isRatedCondenserAirFlowRateAutosized() const { | |
| 111 | 4 | bool result = false; | |
| 112 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedCondenserAirFlowRate, true); |
| 113 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (value) { |
| 114 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
8 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 115 | } | ||
| 116 | 4 | return result; | |
| 117 | 4 | } | |
| 118 | |||
| 119 | 19 | double CoilCoolingDXCurveFitOperatingMode_Impl::maximumCyclingRate() const { | |
| 120 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::MaximumCyclingRate, true); |
| 121 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 122 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 123 | } | ||
| 124 | |||
| 125 | 19 | double CoilCoolingDXCurveFitOperatingMode_Impl::ratioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity() const { | |
| 126 | boost::optional<double> value = | ||
| 127 |
1/1✓ Branch 1 taken 19 times.
|
19 | getDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity, true); |
| 128 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 129 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 130 | } | ||
| 131 | |||
| 132 | 19 | double CoilCoolingDXCurveFitOperatingMode_Impl::latentCapacityTimeConstant() const { | |
| 133 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::LatentCapacityTimeConstant, true); |
| 134 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 135 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 136 | } | ||
| 137 | |||
| 138 | 19 | double CoilCoolingDXCurveFitOperatingMode_Impl::nominalTimeforCondensateRemovaltoBegin() const { | |
| 139 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalTimeforCondensateRemovaltoBegin, true); |
| 140 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 141 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 142 | } | ||
| 143 | |||
| 144 | 19 | bool CoilCoolingDXCurveFitOperatingMode_Impl::applyPartLoadFractiontoSpeedsGreaterthan1() const { | |
| 145 | boost::optional<std::string> value = | ||
| 146 |
1/1✓ Branch 1 taken 19 times.
|
19 | getString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::ApplyPartLoadFractiontoSpeedsGreaterthan1, true); |
| 147 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 148 |
3/3✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
✓ Branch 7 taken 19 times.
|
38 | return openstudio::istringEqual(value.get(), "Yes"); |
| 149 | 19 | } | |
| 150 | |||
| 151 | 19 | bool CoilCoolingDXCurveFitOperatingMode_Impl::applyLatentDegradationtoSpeedsGreaterthan1() const { | |
| 152 | boost::optional<std::string> value = | ||
| 153 |
1/1✓ Branch 1 taken 19 times.
|
19 | getString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::ApplyLatentDegradationtoSpeedsGreaterthan1, true); |
| 154 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 155 |
3/3✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
✓ Branch 7 taken 19 times.
|
38 | return openstudio::istringEqual(value.get(), "Yes"); |
| 156 | 19 | } | |
| 157 | |||
| 158 | 19 | std::string CoilCoolingDXCurveFitOperatingMode_Impl::condenserType() const { | |
| 159 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::CondenserType, true); |
| 160 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 161 |
2/2✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
|
38 | return value.get(); |
| 162 | 19 | } | |
| 163 | |||
| 164 | 19 | boost::optional<double> CoilCoolingDXCurveFitOperatingMode_Impl::nominalEvaporativeCondenserPumpPower() const { | |
| 165 | 19 | return getDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalEvaporativeCondenserPumpPower, true); | |
| 166 | } | ||
| 167 | |||
| 168 | 2 | bool CoilCoolingDXCurveFitOperatingMode_Impl::isNominalEvaporativeCondenserPumpPowerAutosized() const { | |
| 169 | 2 | bool result = false; | |
| 170 |
1/1✓ Branch 1 taken 2 times.
|
2 | boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalEvaporativeCondenserPumpPower, true); |
| 171 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (value) { |
| 172 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
4 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 173 | } | ||
| 174 | 2 | return result; | |
| 175 | 2 | } | |
| 176 | |||
| 177 | 67 | unsigned CoilCoolingDXCurveFitOperatingMode_Impl::numberOfSpeeds() const { | |
| 178 | 67 | return numExtensibleGroups(); | |
| 179 | } | ||
| 180 | |||
| 181 | 22 | bool CoilCoolingDXCurveFitOperatingMode_Impl::isNominalSpeedNumberDefaulted() const { | |
| 182 | 22 | return isEmpty(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalSpeedNumber); | |
| 183 | } | ||
| 184 | |||
| 185 | 19 | unsigned CoilCoolingDXCurveFitOperatingMode_Impl::nominalSpeedNumber() const { | |
| 186 |
1/2✓ Branch 1 taken 19 times.
✗ Branch 2 not taken.
|
19 | if (isNominalSpeedNumberDefaulted()) { |
| 187 | 19 | return numberOfSpeeds(); | |
| 188 | } else { | ||
| 189 | ✗ | boost::optional<int> nominalSpeedNumber = getInt(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalSpeedNumber, false); | |
| 190 | ✗ | OS_ASSERT(nominalSpeedNumber); | |
| 191 | ✗ | return static_cast<unsigned>(nominalSpeedNumber.get()); | |
| 192 | } | ||
| 193 | } | ||
| 194 | |||
| 195 | 10 | std::vector<CoilCoolingDXCurveFitPerformance> CoilCoolingDXCurveFitOperatingMode_Impl::coilCoolingDXCurveFitPerformances() const { | |
| 196 |
3/3✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
|
10 | return getObject<ModelObject>().getModelObjectSources<CoilCoolingDXCurveFitPerformance>(CoilCoolingDXCurveFitPerformance::iddObjectType()); |
| 197 | } | ||
| 198 | |||
| 199 | 81 | std::vector<CoilCoolingDXCurveFitSpeed> CoilCoolingDXCurveFitOperatingMode_Impl::speeds() const { | |
| 200 | 81 | std::vector<CoilCoolingDXCurveFitSpeed> result; | |
| 201 |
1/1✓ Branch 1 taken 81 times.
|
81 | auto groups = extensibleGroups(); |
| 202 |
2/2✓ Branch 5 taken 306 times.
✓ Branch 6 taken 81 times.
|
387 | for (const auto& group : groups) { |
| 203 |
2/2✓ Branch 1 taken 306 times.
✓ Branch 4 taken 306 times.
|
306 | auto target = group.cast<WorkspaceExtensibleGroup>().getTarget(OS_Coil_Cooling_DX_CurveFit_OperatingModeExtensibleFields::Speed); |
| 204 |
1/2✓ Branch 0 taken 306 times.
✗ Branch 1 not taken.
|
306 | if (target) { |
| 205 |
3/4✓ Branch 1 taken 306 times.
✓ Branch 4 taken 306 times.
✓ Branch 6 taken 306 times.
✗ Branch 7 not taken.
|
612 | if (auto speed = target->optionalCast<CoilCoolingDXCurveFitSpeed>()) { |
| 206 |
2/2✓ Branch 1 taken 306 times.
✓ Branch 4 taken 306 times.
|
306 | result.push_back(speed.get()); |
| 207 | 306 | } | |
| 208 | } | ||
| 209 | 306 | } | |
| 210 | 162 | return result; | |
| 211 | 81 | } | |
| 212 | |||
| 213 | 1 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setRatedGrossTotalCoolingCapacity(double ratedGrossTotalCoolingCapacity) { | |
| 214 | 1 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedGrossTotalCoolingCapacity, ratedGrossTotalCoolingCapacity); | |
| 215 | 1 | return result; | |
| 216 | } | ||
| 217 | |||
| 218 | 47 | void CoilCoolingDXCurveFitOperatingMode_Impl::autosizeRatedGrossTotalCoolingCapacity() { | |
| 219 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
94 | bool result = setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedGrossTotalCoolingCapacity, "autosize"); |
| 220 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
|
47 | OS_ASSERT(result); |
| 221 | 47 | } | |
| 222 | |||
| 223 | 1 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setRatedEvaporatorAirFlowRate(double ratedEvaporatorAirFlowRate) { | |
| 224 | 1 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedEvaporatorAirFlowRate, ratedEvaporatorAirFlowRate); | |
| 225 | 1 | return result; | |
| 226 | } | ||
| 227 | |||
| 228 | 47 | void CoilCoolingDXCurveFitOperatingMode_Impl::autosizeRatedEvaporatorAirFlowRate() { | |
| 229 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
94 | bool result = setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedEvaporatorAirFlowRate, "autosize"); |
| 230 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
|
47 | OS_ASSERT(result); |
| 231 | 47 | } | |
| 232 | |||
| 233 | 1 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setRatedCondenserAirFlowRate(double ratedCondenserAirFlowRate) { | |
| 234 | 1 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedCondenserAirFlowRate, ratedCondenserAirFlowRate); | |
| 235 | 1 | return result; | |
| 236 | } | ||
| 237 | |||
| 238 | 47 | void CoilCoolingDXCurveFitOperatingMode_Impl::autosizeRatedCondenserAirFlowRate() { | |
| 239 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
94 | bool result = setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatedCondenserAirFlowRate, "autosize"); |
| 240 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
|
47 | OS_ASSERT(result); |
| 241 | 47 | } | |
| 242 | |||
| 243 | 47 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setMaximumCyclingRate(double maximumCyclingRate) { | |
| 244 | 47 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::MaximumCyclingRate, maximumCyclingRate); | |
| 245 | 47 | return result; | |
| 246 | } | ||
| 247 | |||
| 248 | 47 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity( | |
| 249 | double ratioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity) { | ||
| 250 | 47 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::RatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity, | |
| 251 | ratioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity); | ||
| 252 | 47 | return result; | |
| 253 | } | ||
| 254 | |||
| 255 | 47 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setLatentCapacityTimeConstant(double latentCapacityTimeConstant) { | |
| 256 | 47 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::LatentCapacityTimeConstant, latentCapacityTimeConstant); | |
| 257 | 47 | return result; | |
| 258 | } | ||
| 259 | |||
| 260 | 47 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setNominalTimeforCondensateRemovaltoBegin(double nominalTimeforCondensateRemovaltoBegin) { | |
| 261 | bool result = | ||
| 262 | 47 | setDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalTimeforCondensateRemovaltoBegin, nominalTimeforCondensateRemovaltoBegin); | |
| 263 | 47 | return result; | |
| 264 | } | ||
| 265 | |||
| 266 | 47 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setApplyPartLoadFractiontoSpeedsGreaterthan1(bool applyPartLoadFractiontoSpeedsGreaterthan1) { | |
| 267 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 46 times.
|
47 | if (applyPartLoadFractiontoSpeedsGreaterthan1) { |
| 268 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
3 | return setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::ApplyPartLoadFractiontoSpeedsGreaterthan1, "Yes"); |
| 269 | } else { | ||
| 270 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
138 | return setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::ApplyPartLoadFractiontoSpeedsGreaterthan1, "No"); |
| 271 | } | ||
| 272 | } | ||
| 273 | |||
| 274 | 47 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setApplyLatentDegradationtoSpeedsGreaterthan1(bool applyLatentDegradationtoSpeedsGreaterthan1) { | |
| 275 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 46 times.
|
47 | if (applyLatentDegradationtoSpeedsGreaterthan1) { |
| 276 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
3 | return setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::ApplyLatentDegradationtoSpeedsGreaterthan1, "Yes"); |
| 277 | } else { | ||
| 278 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
138 | return setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::ApplyLatentDegradationtoSpeedsGreaterthan1, "No"); |
| 279 | } | ||
| 280 | } | ||
| 281 | |||
| 282 | 47 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setCondenserType(const std::string& condenserType) { | |
| 283 | 47 | bool result = setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::CondenserType, condenserType); | |
| 284 | 47 | return result; | |
| 285 | } | ||
| 286 | |||
| 287 | 1 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setNominalEvaporativeCondenserPumpPower(double nominalEvaporativeCondenserPumpPower) { | |
| 288 | bool result = | ||
| 289 | 1 | setDouble(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalEvaporativeCondenserPumpPower, nominalEvaporativeCondenserPumpPower); | |
| 290 | 1 | return result; | |
| 291 | } | ||
| 292 | |||
| 293 | 47 | void CoilCoolingDXCurveFitOperatingMode_Impl::autosizeNominalEvaporativeCondenserPumpPower() { | |
| 294 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
94 | bool result = setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalEvaporativeCondenserPumpPower, "autosize"); |
| 295 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
|
47 | OS_ASSERT(result); |
| 296 | 47 | } | |
| 297 | |||
| 298 | 3 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setNominalSpeedNumber(unsigned nominalSpeedNumber) { | |
| 299 | 3 | unsigned nSpeeds = numberOfSpeeds(); | |
| 300 |
1/2✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
|
3 | if (nominalSpeedNumber > nSpeeds) { |
| 301 |
12/12✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 13 taken 3 times.
✓ Branch 16 taken 3 times.
✓ Branch 19 taken 3 times.
✓ Branch 22 taken 3 times.
✓ Branch 25 taken 3 times.
✓ Branch 29 taken 3 times.
✓ Branch 32 taken 3 times.
✓ Branch 35 taken 3 times.
|
3 | LOG(Warn, "For " << briefDescription() << ", cannot set a nominalSpeedNumber (=" << nominalSpeedNumber |
| 302 | << ") greater than the number of speeds (=" << nSpeeds << ")."); | ||
| 303 | 3 | return false; | |
| 304 | } | ||
| 305 | |||
| 306 | ✗ | bool result = setInt(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalSpeedNumber, nominalSpeedNumber); | |
| 307 | ✗ | return result; | |
| 308 | } | ||
| 309 | |||
| 310 | 1 | void CoilCoolingDXCurveFitOperatingMode_Impl::resetNominalSpeedNumber() { | |
| 311 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::NominalSpeedNumber, ""); |
| 312 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 313 | 1 | } | |
| 314 | |||
| 315 | 9 | boost::optional<unsigned> CoilCoolingDXCurveFitOperatingMode_Impl::speedIndex(const CoilCoolingDXCurveFitSpeed& speed) const { | |
| 316 | |||
| 317 | 9 | boost::optional<unsigned> result; | |
| 318 | |||
| 319 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | auto egs = castVector<WorkspaceExtensibleGroup>(extensibleGroups()); |
| 320 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | auto h = openstudio::toString(speed.handle()); |
| 321 |
1/1✓ Branch 3 taken 9 times.
|
9 | auto it = std::find_if(egs.begin(), egs.end(), [&](const WorkspaceExtensibleGroup& eg) { |
| 322 |
2/2✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
|
44 | return (eg.getField(OS_Coil_Cooling_DX_CurveFit_OperatingModeExtensibleFields::Speed).get() == h); |
| 323 | }); | ||
| 324 | |||
| 325 | // If found, we compute the index by using std::distance between the start of vector and the iterator returned by std::find_if | ||
| 326 |
2/2✓ Branch 2 taken 8 times.
✓ Branch 3 taken 1 time.
|
9 | if (it != egs.end()) { |
| 327 |
1/1✓ Branch 2 taken 8 times.
|
16 | result = std::distance(egs.begin(), it) + 1; |
| 328 | } | ||
| 329 | |||
| 330 | 9 | return result; | |
| 331 | 9 | } | |
| 332 | |||
| 333 | 60 | bool CoilCoolingDXCurveFitOperatingMode_Impl::addSpeed(const CoilCoolingDXCurveFitSpeed& speed) { | |
| 334 |
3/3✓ Branch 1 taken 60 times.
✓ Branch 4 taken 60 times.
✓ Branch 7 taken 60 times.
|
60 | auto group = getObject<ModelObject>().pushExtensibleGroup().cast<WorkspaceExtensibleGroup>(); |
| 335 |
3/3✓ Branch 1 taken 60 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 58 times.
|
60 | if (group.empty()) { |
| 336 |
11/11✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
✓ Branch 16 taken 2 times.
✓ Branch 19 taken 2 times.
✓ Branch 22 taken 2 times.
✓ Branch 26 taken 2 times.
✓ Branch 29 taken 2 times.
✓ Branch 32 taken 2 times.
|
2 | LOG(Error, "You have reached the maximum number of speeds (=" << numberOfSpeeds() << "), occurred for " << briefDescription() << "."); |
| 337 | 2 | return false; | |
| 338 | } | ||
| 339 |
2/2✓ Branch 1 taken 58 times.
✓ Branch 4 taken 58 times.
|
58 | bool result = group.setPointer(OS_Coil_Cooling_DX_CurveFit_OperatingModeExtensibleFields::Speed, speed.handle()); |
| 340 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 57 times.
|
58 | if (!result) { |
| 341 | // Something went wrong | ||
| 342 | // So erase the new extensible group | ||
| 343 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | getObject<ModelObject>().eraseExtensibleGroup(group.groupIndex()); |
| 344 | } | ||
| 345 | 58 | return result; | |
| 346 | 60 | } | |
| 347 | |||
| 348 | 1 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setSpeedIndex(const CoilCoolingDXCurveFitSpeed& speed, unsigned index) { | |
| 349 |
1/1✓ Branch 1 taken 1 time.
|
1 | boost::optional<unsigned> idx = speedIndex(speed); |
| 350 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
|
1 | if (!idx) { |
| 351 | ✗ | LOG(Warn, "For " << briefDescription() << " cannot set the index of speed " << speed.briefDescription() << " since it is not part of it."); | |
| 352 | ✗ | return false; | |
| 353 | } | ||
| 354 | |||
| 355 | // TODO: we could just set via string instead of doing a ton of typechecking below... | ||
| 356 | |||
| 357 |
1/1✓ Branch 1 taken 1 time.
|
1 | std::vector<CoilCoolingDXCurveFitSpeed> speedVector = speeds(); |
| 358 | |||
| 359 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
|
1 | if (index > speedVector.size()) { |
| 360 | ✗ | LOG(Warn, "Requested a speed index of " << index << " to be assigned to " << speed.briefDescription() << ", but " << briefDescription() | |
| 361 | << " only has " << speedVector.size() << " speeds, resetting to that."); | ||
| 362 | ✗ | index = speedVector.size(); | |
| 363 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | } else if (index < 1) { |
| 364 | ✗ | LOG(Warn, "Requested a speed index of " << index << " < 1 to be assigned to " << speed.briefDescription() << ", resetting to 1"); | |
| 365 | ✗ | index = 1; | |
| 366 | } | ||
| 367 | |||
| 368 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 8 taken 1 time.
|
1 | speedVector.erase(speedVector.begin() + idx.get() - 1); // speedIndex is 1-indexed, and vector is 0-indexed |
| 369 | |||
| 370 |
1/1✓ Branch 4 taken 1 time.
|
1 | speedVector.insert(speedVector.begin() + (index - 1), speed); |
| 371 | |||
| 372 |
1/1✓ Branch 1 taken 1 time.
|
1 | return setSpeeds(speedVector); |
| 373 | 1 | } | |
| 374 | |||
| 375 | ✗ | bool CoilCoolingDXCurveFitOperatingMode_Impl::addSpeed(const CoilCoolingDXCurveFitSpeed& speed, unsigned index) { | |
| 376 | ✗ | bool ok = addSpeed(speed); | |
| 377 | ✗ | if (!ok) { | |
| 378 | ✗ | return false; | |
| 379 | } | ||
| 380 | ✗ | ok = setSpeedIndex(speed, index); | |
| 381 | ✗ | return ok; | |
| 382 | } | ||
| 383 | 3 | bool CoilCoolingDXCurveFitOperatingMode_Impl::setSpeeds(const std::vector<CoilCoolingDXCurveFitSpeed>& speeds) { | |
| 384 | // Clear the extensible groups, and redo them | ||
| 385 | 3 | bool ok = true; | |
| 386 |
1/1✓ Branch 1 taken 3 times.
|
3 | clearExtensibleGroups(); |
| 387 |
2/2✓ Branch 4 taken 27 times.
✓ Branch 5 taken 3 times.
|
30 | for (const CoilCoolingDXCurveFitSpeed& s : speeds) { |
| 388 |
1/1✓ Branch 1 taken 27 times.
|
27 | ok &= addSpeed(s); |
| 389 | } | ||
| 390 | 3 | return ok; | |
| 391 | } | ||
| 392 | |||
| 393 | 3 | void CoilCoolingDXCurveFitOperatingMode_Impl::removeAllSpeeds() { | |
| 394 |
1/1✓ Branch 1 taken 3 times.
|
3 | clearExtensibleGroups(); |
| 395 | 3 | } | |
| 396 | |||
| 397 | 4 | bool CoilCoolingDXCurveFitOperatingMode_Impl::removeSpeed(const CoilCoolingDXCurveFitSpeed& speed) { | |
| 398 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<unsigned> idx = speedIndex(speed); |
| 399 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 2 taken 3 times.
|
4 | if (!idx) { |
| 400 |
11/11✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 27 taken 1 time.
✓ Branch 30 taken 1 time.
✓ Branch 33 taken 1 time.
|
1 | LOG(Warn, "For " << briefDescription() << " cannot remove speed " << speed.briefDescription() << " since it is not part of it."); |
| 401 | 1 | return false; | |
| 402 | } | ||
| 403 | |||
| 404 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | return removeSpeed(idx.get()); |
| 405 | } | ||
| 406 | |||
| 407 | 4 | bool CoilCoolingDXCurveFitOperatingMode_Impl::removeSpeed(unsigned index) { | |
| 408 | 4 | bool result = false; | |
| 409 |
3/6✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 4 times.
✗ Branch 6 not taken.
|
4 | if ((index > 0) && (index <= numberOfSpeeds())) { |
| 410 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | getObject<ModelObject>().eraseExtensibleGroup(index - 1); |
| 411 | 4 | result = true; | |
| 412 | } | ||
| 413 | 4 | return result; | |
| 414 | } | ||
| 415 | |||
| 416 | ✗ | boost::optional<double> CoilCoolingDXCurveFitOperatingMode_Impl::autosizedRatedGrossTotalCoolingCapacity() { | |
| 417 | ✗ | return getAutosizedValue("Design Size Rated Gross Total Cooling Capacity", "W"); | |
| 418 | } | ||
| 419 | |||
| 420 | ✗ | boost::optional<double> CoilCoolingDXCurveFitOperatingMode_Impl::autosizedRatedEvaporatorAirFlowRate() { | |
| 421 | ✗ | return getAutosizedValue("Design Size Rated Evaporator Air Flow Rate", "m3/s"); | |
| 422 | } | ||
| 423 | |||
| 424 | ✗ | boost::optional<double> CoilCoolingDXCurveFitOperatingMode_Impl::autosizedRatedCondenserAirFlowRate() { | |
| 425 | ✗ | return getAutosizedValue("Design Size Rated Condenser Air Flow Rate", "m3/s"); | |
| 426 | } | ||
| 427 | |||
| 428 | // Pending https://github.com/NREL/EnergyPlus/issues/8066 the SQL won't have this field. | ||
| 429 | ✗ | boost::optional<double> CoilCoolingDXCurveFitOperatingMode_Impl::autosizedNominalEvaporativeCondenserPumpPower() { | |
| 430 | ✗ | return getAutosizedValue("Design Size Nominal Evaporative Condenser Pump Power", "W"); | |
| 431 | } | ||
| 432 | |||
| 433 | ✗ | void CoilCoolingDXCurveFitOperatingMode_Impl::autosize() { | |
| 434 | ✗ | autosizeRatedGrossTotalCoolingCapacity(); | |
| 435 | ✗ | autosizeRatedEvaporatorAirFlowRate(); | |
| 436 | ✗ | autosizeRatedCondenserAirFlowRate(); | |
| 437 | ✗ | autosizeNominalEvaporativeCondenserPumpPower(); | |
| 438 | ✗ | } | |
| 439 | |||
| 440 | ✗ | void CoilCoolingDXCurveFitOperatingMode_Impl::applySizingValues() { | |
| 441 | ✗ | boost::optional<double> val; | |
| 442 | ✗ | val = autosizedRatedGrossTotalCoolingCapacity(); | |
| 443 | ✗ | if (val) { | |
| 444 | ✗ | setRatedGrossTotalCoolingCapacity(val.get()); | |
| 445 | } | ||
| 446 | |||
| 447 | ✗ | val = autosizedRatedEvaporatorAirFlowRate(); | |
| 448 | ✗ | if (val) { | |
| 449 | ✗ | setRatedEvaporatorAirFlowRate(val.get()); | |
| 450 | } | ||
| 451 | |||
| 452 | ✗ | val = autosizedRatedCondenserAirFlowRate(); | |
| 453 | ✗ | if (val) { | |
| 454 | ✗ | setRatedCondenserAirFlowRate(val.get()); | |
| 455 | } | ||
| 456 | |||
| 457 | ✗ | val = autosizedNominalEvaporativeCondenserPumpPower(); | |
| 458 | ✗ | if (val) { | |
| 459 | ✗ | setNominalEvaporativeCondenserPumpPower(val.get()); | |
| 460 | } | ||
| 461 | ✗ | } | |
| 462 | |||
| 463 | } // namespace detail | ||
| 464 | |||
| 465 | 44 | CoilCoolingDXCurveFitOperatingMode::CoilCoolingDXCurveFitOperatingMode(const Model& model) | |
| 466 | 44 | : ResourceObject(CoilCoolingDXCurveFitOperatingMode::iddObjectType(), model) { | |
| 467 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 44 times.
✗ Branch 5 not taken.
|
44 | OS_ASSERT(getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()); |
| 468 | |||
| 469 |
1/1✓ Branch 1 taken 44 times.
|
44 | autosizeRatedGrossTotalCoolingCapacity(); |
| 470 |
1/1✓ Branch 1 taken 44 times.
|
44 | autosizeRatedEvaporatorAirFlowRate(); |
| 471 |
1/1✓ Branch 1 taken 44 times.
|
44 | autosizeRatedCondenserAirFlowRate(); |
| 472 |
1/1✓ Branch 1 taken 44 times.
|
44 | setMaximumCyclingRate(0.0); |
| 473 |
1/1✓ Branch 1 taken 44 times.
|
44 | setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity(0.0); |
| 474 |
1/1✓ Branch 1 taken 44 times.
|
44 | setLatentCapacityTimeConstant(0.0); |
| 475 |
1/1✓ Branch 1 taken 44 times.
|
44 | setNominalTimeforCondensateRemovaltoBegin(0.0); |
| 476 |
1/1✓ Branch 1 taken 44 times.
|
44 | setApplyPartLoadFractiontoSpeedsGreaterthan1(false); |
| 477 |
1/1✓ Branch 1 taken 44 times.
|
44 | setApplyLatentDegradationtoSpeedsGreaterthan1(false); |
| 478 |
2/2✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
|
44 | setCondenserType("AirCooled"); |
| 479 |
1/1✓ Branch 1 taken 44 times.
|
44 | autosizeNominalEvaporativeCondenserPumpPower(); |
| 480 | 44 | } | |
| 481 | |||
| 482 | 7845 | IddObjectType CoilCoolingDXCurveFitOperatingMode::iddObjectType() { | |
| 483 |
1/1✓ Branch 1 taken 7845 times.
|
7845 | return {IddObjectType::OS_Coil_Cooling_DX_CurveFit_OperatingMode}; |
| 484 | } | ||
| 485 | |||
| 486 | ✗ | std::vector<std::string> CoilCoolingDXCurveFitOperatingMode::condenserTypeValues() { | |
| 487 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Cooling_DX_CurveFit_OperatingModeFields::CondenserType); | |
| 488 | } | ||
| 489 | |||
| 490 | 21 | boost::optional<double> CoilCoolingDXCurveFitOperatingMode::ratedGrossTotalCoolingCapacity() const { | |
| 491 |
1/1✓ Branch 3 taken 21 times.
|
21 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->ratedGrossTotalCoolingCapacity(); |
| 492 | } | ||
| 493 | |||
| 494 | 4 | bool CoilCoolingDXCurveFitOperatingMode::isRatedGrossTotalCoolingCapacityAutosized() const { | |
| 495 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->isRatedGrossTotalCoolingCapacityAutosized(); |
| 496 | } | ||
| 497 | |||
| 498 | 21 | boost::optional<double> CoilCoolingDXCurveFitOperatingMode::ratedEvaporatorAirFlowRate() const { | |
| 499 |
1/1✓ Branch 3 taken 21 times.
|
21 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->ratedEvaporatorAirFlowRate(); |
| 500 | } | ||
| 501 | |||
| 502 | 4 | bool CoilCoolingDXCurveFitOperatingMode::isRatedEvaporatorAirFlowRateAutosized() const { | |
| 503 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->isRatedEvaporatorAirFlowRateAutosized(); |
| 504 | } | ||
| 505 | |||
| 506 | 21 | boost::optional<double> CoilCoolingDXCurveFitOperatingMode::ratedCondenserAirFlowRate() const { | |
| 507 |
1/1✓ Branch 3 taken 21 times.
|
21 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->ratedCondenserAirFlowRate(); |
| 508 | } | ||
| 509 | |||
| 510 | 4 | bool CoilCoolingDXCurveFitOperatingMode::isRatedCondenserAirFlowRateAutosized() const { | |
| 511 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->isRatedCondenserAirFlowRateAutosized(); |
| 512 | } | ||
| 513 | |||
| 514 | 19 | double CoilCoolingDXCurveFitOperatingMode::maximumCyclingRate() const { | |
| 515 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->maximumCyclingRate(); |
| 516 | } | ||
| 517 | |||
| 518 | 19 | double CoilCoolingDXCurveFitOperatingMode::ratioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity() const { | |
| 519 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->ratioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity(); |
| 520 | } | ||
| 521 | |||
| 522 | 19 | double CoilCoolingDXCurveFitOperatingMode::latentCapacityTimeConstant() const { | |
| 523 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->latentCapacityTimeConstant(); |
| 524 | } | ||
| 525 | |||
| 526 | 19 | double CoilCoolingDXCurveFitOperatingMode::nominalTimeforCondensateRemovaltoBegin() const { | |
| 527 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->nominalTimeforCondensateRemovaltoBegin(); |
| 528 | } | ||
| 529 | |||
| 530 | 19 | bool CoilCoolingDXCurveFitOperatingMode::applyPartLoadFractiontoSpeedsGreaterthan1() const { | |
| 531 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->applyPartLoadFractiontoSpeedsGreaterthan1(); |
| 532 | } | ||
| 533 | |||
| 534 | 19 | bool CoilCoolingDXCurveFitOperatingMode::applyLatentDegradationtoSpeedsGreaterthan1() const { | |
| 535 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->applyLatentDegradationtoSpeedsGreaterthan1(); |
| 536 | } | ||
| 537 | |||
| 538 | 19 | std::string CoilCoolingDXCurveFitOperatingMode::condenserType() const { | |
| 539 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->condenserType(); |
| 540 | } | ||
| 541 | |||
| 542 | 19 | boost::optional<double> CoilCoolingDXCurveFitOperatingMode::nominalEvaporativeCondenserPumpPower() const { | |
| 543 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->nominalEvaporativeCondenserPumpPower(); |
| 544 | } | ||
| 545 | |||
| 546 | 2 | bool CoilCoolingDXCurveFitOperatingMode::isNominalEvaporativeCondenserPumpPowerAutosized() const { | |
| 547 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->isNominalEvaporativeCondenserPumpPowerAutosized(); |
| 548 | } | ||
| 549 | |||
| 550 | 3 | bool CoilCoolingDXCurveFitOperatingMode::isNominalSpeedNumberDefaulted() const { | |
| 551 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->isNominalSpeedNumberDefaulted(); |
| 552 | } | ||
| 553 | |||
| 554 | 19 | unsigned CoilCoolingDXCurveFitOperatingMode::nominalSpeedNumber() const { | |
| 555 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->nominalSpeedNumber(); |
| 556 | } | ||
| 557 | |||
| 558 | 7 | std::vector<CoilCoolingDXCurveFitPerformance> CoilCoolingDXCurveFitOperatingMode::coilCoolingDXCurveFitPerformances() const { | |
| 559 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->coilCoolingDXCurveFitPerformances(); |
| 560 | } | ||
| 561 | |||
| 562 | 1 | bool CoilCoolingDXCurveFitOperatingMode::setRatedGrossTotalCoolingCapacity(double ratedGrossTotalCoolingCapacity) { | |
| 563 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setRatedGrossTotalCoolingCapacity(ratedGrossTotalCoolingCapacity); |
| 564 | } | ||
| 565 | |||
| 566 | 47 | void CoilCoolingDXCurveFitOperatingMode::autosizeRatedGrossTotalCoolingCapacity() { | |
| 567 |
1/1✓ Branch 3 taken 47 times.
|
47 | getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosizeRatedGrossTotalCoolingCapacity(); |
| 568 | 47 | } | |
| 569 | |||
| 570 | 1 | bool CoilCoolingDXCurveFitOperatingMode::setRatedEvaporatorAirFlowRate(double ratedEvaporatorAirFlowRate) { | |
| 571 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setRatedEvaporatorAirFlowRate(ratedEvaporatorAirFlowRate); |
| 572 | } | ||
| 573 | |||
| 574 | 47 | void CoilCoolingDXCurveFitOperatingMode::autosizeRatedEvaporatorAirFlowRate() { | |
| 575 |
1/1✓ Branch 3 taken 47 times.
|
47 | getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosizeRatedEvaporatorAirFlowRate(); |
| 576 | 47 | } | |
| 577 | |||
| 578 | 1 | bool CoilCoolingDXCurveFitOperatingMode::setRatedCondenserAirFlowRate(double ratedCondenserAirFlowRate) { | |
| 579 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setRatedCondenserAirFlowRate(ratedCondenserAirFlowRate); |
| 580 | } | ||
| 581 | |||
| 582 | 47 | void CoilCoolingDXCurveFitOperatingMode::autosizeRatedCondenserAirFlowRate() { | |
| 583 |
1/1✓ Branch 3 taken 47 times.
|
47 | getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosizeRatedCondenserAirFlowRate(); |
| 584 | 47 | } | |
| 585 | |||
| 586 | 47 | bool CoilCoolingDXCurveFitOperatingMode::setMaximumCyclingRate(double maximumCyclingRate) { | |
| 587 |
1/1✓ Branch 3 taken 47 times.
|
47 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setMaximumCyclingRate(maximumCyclingRate); |
| 588 | } | ||
| 589 | |||
| 590 | 47 | bool CoilCoolingDXCurveFitOperatingMode::setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity( | |
| 591 | double ratioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity) { | ||
| 592 |
1/1✓ Branch 3 taken 47 times.
|
94 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity( |
| 593 | 94 | ratioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity); | |
| 594 | } | ||
| 595 | |||
| 596 | 47 | bool CoilCoolingDXCurveFitOperatingMode::setLatentCapacityTimeConstant(double latentCapacityTimeConstant) { | |
| 597 |
1/1✓ Branch 3 taken 47 times.
|
47 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setLatentCapacityTimeConstant(latentCapacityTimeConstant); |
| 598 | } | ||
| 599 | |||
| 600 | 47 | bool CoilCoolingDXCurveFitOperatingMode::setNominalTimeforCondensateRemovaltoBegin(double nominalTimeforCondensateRemovaltoBegin) { | |
| 601 |
1/1✓ Branch 3 taken 47 times.
|
94 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setNominalTimeforCondensateRemovaltoBegin( |
| 602 | 94 | nominalTimeforCondensateRemovaltoBegin); | |
| 603 | } | ||
| 604 | |||
| 605 | 47 | bool CoilCoolingDXCurveFitOperatingMode::setApplyPartLoadFractiontoSpeedsGreaterthan1(bool applyPartLoadFractiontoSpeedsGreaterthan1) { | |
| 606 |
1/1✓ Branch 3 taken 47 times.
|
94 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setApplyPartLoadFractiontoSpeedsGreaterthan1( |
| 607 | 94 | applyPartLoadFractiontoSpeedsGreaterthan1); | |
| 608 | } | ||
| 609 | |||
| 610 | 47 | bool CoilCoolingDXCurveFitOperatingMode::setApplyLatentDegradationtoSpeedsGreaterthan1(bool applyLatentDegradationtoSpeedsGreaterthan1) { | |
| 611 |
1/1✓ Branch 3 taken 47 times.
|
94 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setApplyLatentDegradationtoSpeedsGreaterthan1( |
| 612 | 94 | applyLatentDegradationtoSpeedsGreaterthan1); | |
| 613 | } | ||
| 614 | |||
| 615 | 47 | bool CoilCoolingDXCurveFitOperatingMode::setCondenserType(const std::string& condenserType) { | |
| 616 |
1/1✓ Branch 3 taken 47 times.
|
47 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setCondenserType(condenserType); |
| 617 | } | ||
| 618 | |||
| 619 | 1 | bool CoilCoolingDXCurveFitOperatingMode::setNominalEvaporativeCondenserPumpPower(double nominalEvaporativeCondenserPumpPower) { | |
| 620 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setNominalEvaporativeCondenserPumpPower(nominalEvaporativeCondenserPumpPower); |
| 621 | } | ||
| 622 | |||
| 623 | 47 | void CoilCoolingDXCurveFitOperatingMode::autosizeNominalEvaporativeCondenserPumpPower() { | |
| 624 |
1/1✓ Branch 3 taken 47 times.
|
47 | getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosizeNominalEvaporativeCondenserPumpPower(); |
| 625 | 47 | } | |
| 626 | |||
| 627 | 3 | bool CoilCoolingDXCurveFitOperatingMode::setNominalSpeedNumber(unsigned nominalSpeedNumber) { | |
| 628 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setNominalSpeedNumber(nominalSpeedNumber); |
| 629 | } | ||
| 630 | |||
| 631 | 1 | void CoilCoolingDXCurveFitOperatingMode::resetNominalSpeedNumber() { | |
| 632 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->resetNominalSpeedNumber(); |
| 633 | 1 | } | |
| 634 | |||
| 635 | 39 | unsigned CoilCoolingDXCurveFitOperatingMode::numberOfSpeeds() const { | |
| 636 |
1/1✓ Branch 3 taken 39 times.
|
39 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->numberOfSpeeds(); |
| 637 | } | ||
| 638 | |||
| 639 | 4 | boost::optional<unsigned> CoilCoolingDXCurveFitOperatingMode::speedIndex(const CoilCoolingDXCurveFitSpeed& speed) const { | |
| 640 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->speedIndex(speed); |
| 641 | } | ||
| 642 | |||
| 643 | 58 | std::vector<CoilCoolingDXCurveFitSpeed> CoilCoolingDXCurveFitOperatingMode::speeds() const { | |
| 644 |
1/1✓ Branch 3 taken 58 times.
|
58 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->speeds(); |
| 645 | } | ||
| 646 | |||
| 647 | 33 | bool CoilCoolingDXCurveFitOperatingMode::addSpeed(const CoilCoolingDXCurveFitSpeed& speed) { | |
| 648 |
1/1✓ Branch 3 taken 33 times.
|
33 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->addSpeed(speed); |
| 649 | } | ||
| 650 | |||
| 651 | ✗ | bool CoilCoolingDXCurveFitOperatingMode::addSpeed(const CoilCoolingDXCurveFitSpeed& speed, unsigned index) { | |
| 652 | ✗ | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->addSpeed(speed, index); | |
| 653 | } | ||
| 654 | |||
| 655 | 1 | bool CoilCoolingDXCurveFitOperatingMode::setSpeedIndex(const CoilCoolingDXCurveFitSpeed& speed, unsigned index) { | |
| 656 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setSpeedIndex(speed, index); |
| 657 | } | ||
| 658 | |||
| 659 | 2 | bool CoilCoolingDXCurveFitOperatingMode::setSpeeds(const std::vector<CoilCoolingDXCurveFitSpeed>& speeds) { | |
| 660 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->setSpeeds(speeds); |
| 661 | } | ||
| 662 | |||
| 663 | 3 | void CoilCoolingDXCurveFitOperatingMode::removeAllSpeeds() { | |
| 664 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->removeAllSpeeds(); |
| 665 | 3 | } | |
| 666 | |||
| 667 | 4 | bool CoilCoolingDXCurveFitOperatingMode::removeSpeed(const CoilCoolingDXCurveFitSpeed& speed) { | |
| 668 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->removeSpeed(speed); |
| 669 | } | ||
| 670 | |||
| 671 | 1 | bool CoilCoolingDXCurveFitOperatingMode::removeSpeed(unsigned index) { | |
| 672 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->removeSpeed(index); |
| 673 | } | ||
| 674 | |||
| 675 | ✗ | boost::optional<double> CoilCoolingDXCurveFitOperatingMode::autosizedRatedGrossTotalCoolingCapacity() { | |
| 676 | ✗ | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosizedRatedGrossTotalCoolingCapacity(); | |
| 677 | } | ||
| 678 | |||
| 679 | ✗ | boost::optional<double> CoilCoolingDXCurveFitOperatingMode::autosizedRatedEvaporatorAirFlowRate() { | |
| 680 | ✗ | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosizedRatedEvaporatorAirFlowRate(); | |
| 681 | } | ||
| 682 | |||
| 683 | ✗ | boost::optional<double> CoilCoolingDXCurveFitOperatingMode::autosizedRatedCondenserAirFlowRate() { | |
| 684 | ✗ | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosizedRatedCondenserAirFlowRate(); | |
| 685 | } | ||
| 686 | |||
| 687 | ✗ | boost::optional<double> CoilCoolingDXCurveFitOperatingMode::autosizedNominalEvaporativeCondenserPumpPower() { | |
| 688 | ✗ | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosizedNominalEvaporativeCondenserPumpPower(); | |
| 689 | } | ||
| 690 | |||
| 691 | ✗ | void CoilCoolingDXCurveFitOperatingMode::autosize() { | |
| 692 | ✗ | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->autosize(); | |
| 693 | } | ||
| 694 | |||
| 695 | ✗ | void CoilCoolingDXCurveFitOperatingMode::applySizingValues() { | |
| 696 | ✗ | return getImpl<detail::CoilCoolingDXCurveFitOperatingMode_Impl>()->applySizingValues(); | |
| 697 | } | ||
| 698 | |||
| 699 | /// @cond | ||
| 700 | 123 | CoilCoolingDXCurveFitOperatingMode::CoilCoolingDXCurveFitOperatingMode(std::shared_ptr<detail::CoilCoolingDXCurveFitOperatingMode_Impl> impl) | |
| 701 |
1/1✓ Branch 2 taken 123 times.
|
123 | : ResourceObject(impl) {} |
| 702 | /// @endcond | ||
| 703 | |||
| 704 | } // namespace model | ||
| 705 | } // namespace openstudio | ||
| 706 |