src/model/CoilHeatingDXVariableSpeed.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 "CoilHeatingDXVariableSpeed.hpp" | ||
| 7 | #include "CoilHeatingDXVariableSpeed_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Curve.hpp" | ||
| 10 | #include "Curve_Impl.hpp" | ||
| 11 | #include "CurveQuadratic.hpp" | ||
| 12 | #include "CoilHeatingDXVariableSpeedSpeedData.hpp" | ||
| 13 | #include "CoilHeatingDXVariableSpeedSpeedData_Impl.hpp" | ||
| 14 | #include "ModelObjectList.hpp" | ||
| 15 | #include "ModelObjectList_Impl.hpp" | ||
| 16 | #include "AirLoopHVACUnitarySystem.hpp" | ||
| 17 | #include "AirLoopHVACUnitarySystem_Impl.hpp" | ||
| 18 | #include "AirLoopHVACOutdoorAirSystem.hpp" | ||
| 19 | #include "AirLoopHVACOutdoorAirSystem_Impl.hpp" | ||
| 20 | #include "AirLoopHVACUnitaryHeatPumpAirToAir.hpp" | ||
| 21 | #include "AirLoopHVACUnitaryHeatPumpAirToAir_Impl.hpp" | ||
| 22 | #include "AirflowNetworkEquivalentDuct.hpp" | ||
| 23 | #include "AirflowNetworkEquivalentDuct_Impl.hpp" | ||
| 24 | #include "ZoneHVACPackagedTerminalAirConditioner.hpp" | ||
| 25 | #include "ZoneHVACPackagedTerminalAirConditioner_Impl.hpp" | ||
| 26 | #include "ZoneHVACPackagedTerminalHeatPump.hpp" | ||
| 27 | #include "ZoneHVACPackagedTerminalHeatPump_Impl.hpp" | ||
| 28 | #include "CoilSystemIntegratedHeatPumpAirSource.hpp" | ||
| 29 | #include "CoilSystemIntegratedHeatPumpAirSource_Impl.hpp" | ||
| 30 | #include "Model.hpp" | ||
| 31 | #include "Model_Impl.hpp" | ||
| 32 | #include "Node.hpp" | ||
| 33 | #include "AirLoopHVAC.hpp" | ||
| 34 | #include "Schedule.hpp" | ||
| 35 | #include "Schedule_Impl.hpp" | ||
| 36 | #include "ScheduleTypeRegistry.hpp" | ||
| 37 | |||
| 38 | #include <utilities/idd/IddFactory.hxx> | ||
| 39 | #include <utilities/idd/OS_Coil_Heating_DX_VariableSpeed_FieldEnums.hxx> | ||
| 40 | |||
| 41 | #include <utilities/idd/IddEnums.hxx> | ||
| 42 | #include "../utilities/core/Assert.hpp" | ||
| 43 | #include "../utilities/data/DataEnums.hpp" | ||
| 44 | #include "../utilities/idf/WorkspaceExtensibleGroup.hpp" | ||
| 45 | |||
| 46 | namespace openstudio { | ||
| 47 | namespace model { | ||
| 48 | |||
| 49 | namespace detail { | ||
| 50 | |||
| 51 | 47 | CoilHeatingDXVariableSpeed_Impl::CoilHeatingDXVariableSpeed_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 52 | 47 | : StraightComponent_Impl(idfObject, model, keepHandle) { | |
| 53 |
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() == CoilHeatingDXVariableSpeed::iddObjectType()); |
| 54 | 47 | } | |
| 55 | |||
| 56 | 2 | CoilHeatingDXVariableSpeed_Impl::CoilHeatingDXVariableSpeed_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, | |
| 57 | 2 | bool keepHandle) | |
| 58 | 2 | : StraightComponent_Impl(other, model, keepHandle) { | |
| 59 |
4/6✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 13 not taken.
|
2 | OS_ASSERT(other.iddObject().type() == CoilHeatingDXVariableSpeed::iddObjectType()); |
| 60 | 2 | } | |
| 61 | |||
| 62 | 26 | CoilHeatingDXVariableSpeed_Impl::CoilHeatingDXVariableSpeed_Impl(const CoilHeatingDXVariableSpeed_Impl& other, Model_Impl* model, bool keepHandle) | |
| 63 | 26 | : StraightComponent_Impl(other, model, keepHandle) {} | |
| 64 | |||
| 65 | ✗ | const std::vector<std::string>& CoilHeatingDXVariableSpeed_Impl::outputVariableNames() const { | |
| 66 | static const std::vector<std::string> result{"Heating Coil Electricity Rate", | ||
| 67 | "Heating Coil Heating Rate", | ||
| 68 | "Heating Coil Sensible Heating Rate", | ||
| 69 | "Heating Coil Source Side Heat Transfer Rate", | ||
| 70 | "Heating Coil Part Load Ratio", | ||
| 71 | "Heating Coil Runtime Fraction", | ||
| 72 | "Heating Coil Air Mass Flow Rate", | ||
| 73 | "Heating Coil Air Inlet Temperature", | ||
| 74 | "Heating Coil Air Inlet Humidity Ratio", | ||
| 75 | "Heating Coil Air Outlet Temperature", | ||
| 76 | "Heating Coil Air Outlet Humidity Ratio", | ||
| 77 | "Heating Coil Upper Speed Level", | ||
| 78 | "Heating Coil Neighboring Speed Levels Ratio", | ||
| 79 | "VSAirtoAirHP Recoverable Waste Heat", | ||
| 80 | "Heating Coil Electricity Energy", | ||
| 81 | "Heating Coil Heating Energy", | ||
| 82 | "Heating Coil Source Side Heat Transfer Energy", | ||
| 83 | "Heating Coil Defrost Electricity Rate", | ||
| 84 | "Heating Coil Defrost Electricity Energy", | ||
| 85 | "Heating Coil Crankcase Heater Electricity Rate", | ||
| 86 | ✗ | "Heating Coil Crankcase Heater Electricity Energy"}; | |
| 87 | ✗ | return result; | |
| 88 | ✗ | } | |
| 89 | |||
| 90 | 20 | IddObjectType CoilHeatingDXVariableSpeed_Impl::iddObjectType() const { | |
| 91 | 20 | return CoilHeatingDXVariableSpeed::iddObjectType(); | |
| 92 | } | ||
| 93 | |||
| 94 | ✗ | std::vector<ScheduleTypeKey> CoilHeatingDXVariableSpeed_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 95 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 96 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 97 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 98 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 99 | ✗ | if (std::find(b, e, OS_Coil_Heating_DX_VariableSpeedFields::AvailabilityScheduleName) != e) { | |
| 100 | ✗ | result.push_back(ScheduleTypeKey("CoilHeatingDXVariableSpeed", "Availability Schedule")); | |
| 101 | } | ||
| 102 | ✗ | return result; | |
| 103 | ✗ | } | |
| 104 | |||
| 105 | 81 | unsigned CoilHeatingDXVariableSpeed_Impl::inletPort() const { | |
| 106 | 81 | return OS_Coil_Heating_DX_VariableSpeedFields::IndoorAirInletNodeName; | |
| 107 | } | ||
| 108 | |||
| 109 | 18 | unsigned CoilHeatingDXVariableSpeed_Impl::outletPort() const { | |
| 110 | 18 | return OS_Coil_Heating_DX_VariableSpeedFields::IndoorAirOutletNodeName; | |
| 111 | } | ||
| 112 | |||
| 113 | 10 | boost::optional<Schedule> CoilHeatingDXVariableSpeed_Impl::optionalAvailabilitySchedule() const { | |
| 114 |
2/2✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
|
10 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_Heating_DX_VariableSpeedFields::AvailabilityScheduleName); |
| 115 | } | ||
| 116 | |||
| 117 | 10 | Schedule CoilHeatingDXVariableSpeed_Impl::availabilitySchedule() const { | |
| 118 |
1/1✓ Branch 1 taken 10 times.
|
10 | boost::optional<Schedule> value = optionalAvailabilitySchedule(); |
| 119 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 10 times.
|
10 | if (!value) { |
| 120 | // it is an error if we get here, however we don't want to crash | ||
| 121 | // so we hook up to global always on schedule | ||
| 122 | ✗ | LOG(Error, "Required availability schedule not set, using 'Always On' schedule"); | |
| 123 | ✗ | value = this->model().alwaysOnDiscreteSchedule(); | |
| 124 | ✗ | OS_ASSERT(value); | |
| 125 | ✗ | const_cast<CoilHeatingDXVariableSpeed_Impl*>(this)->setAvailabilitySchedule(*value); | |
| 126 | ✗ | value = optionalAvailabilitySchedule(); | |
| 127 | } | ||
| 128 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 10 times.
✗ Branch 4 not taken.
|
10 | OS_ASSERT(value); |
| 129 |
2/2✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
|
20 | return value.get(); |
| 130 | 10 | } | |
| 131 | |||
| 132 | 10 | int CoilHeatingDXVariableSpeed_Impl::nominalSpeedLevel() const { | |
| 133 |
1/1✓ Branch 1 taken 10 times.
|
10 | boost::optional<int> value = getInt(OS_Coil_Heating_DX_VariableSpeedFields::NominalSpeedLevel, true); |
| 134 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 10 times.
✗ Branch 4 not taken.
|
10 | OS_ASSERT(value); |
| 135 |
1/1✓ Branch 1 taken 10 times.
|
20 | return value.get(); |
| 136 | } | ||
| 137 | |||
| 138 | 3 | boost::optional<double> CoilHeatingDXVariableSpeed_Impl::ratedHeatingCapacityAtSelectedNominalSpeedLevel() const { | |
| 139 | 3 | return getDouble(OS_Coil_Heating_DX_VariableSpeedFields::RatedHeatingCapacityAtSelectedNominalSpeedLevel, true); | |
| 140 | } | ||
| 141 | |||
| 142 | 11 | bool CoilHeatingDXVariableSpeed_Impl::isRatedHeatingCapacityAtSelectedNominalSpeedLevelAutosized() const { | |
| 143 | 11 | bool result = false; | |
| 144 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<std::string> value = getString(OS_Coil_Heating_DX_VariableSpeedFields::RatedHeatingCapacityAtSelectedNominalSpeedLevel, true); |
| 145 |
1/2✓ Branch 0 taken 11 times.
✗ Branch 1 not taken.
|
11 | if (value) { |
| 146 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
|
22 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 147 | } | ||
| 148 | 11 | return result; | |
| 149 | 11 | } | |
| 150 | |||
| 151 | 3 | boost::optional<double> CoilHeatingDXVariableSpeed_Impl::ratedAirFlowRateAtSelectedNominalSpeedLevel() const { | |
| 152 | 3 | return getDouble(OS_Coil_Heating_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, true); | |
| 153 | } | ||
| 154 | |||
| 155 | 10 | bool CoilHeatingDXVariableSpeed_Impl::isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized() const { | |
| 156 | 10 | bool result = false; | |
| 157 |
1/1✓ Branch 1 taken 10 times.
|
10 | boost::optional<std::string> value = getString(OS_Coil_Heating_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, true); |
| 158 |
1/2✓ Branch 0 taken 10 times.
✗ Branch 1 not taken.
|
10 | if (value) { |
| 159 |
3/3✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
|
20 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 160 | } | ||
| 161 | 10 | return result; | |
| 162 | 10 | } | |
| 163 | |||
| 164 | 18 | Curve CoilHeatingDXVariableSpeed_Impl::energyPartLoadFractionCurve() const { | |
| 165 |
1/1✓ Branch 1 taken 18 times.
|
18 | boost::optional<Curve> value = optionalEnergyPartLoadFractionCurve(); |
| 166 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 18 times.
|
18 | if (!value) { |
| 167 | ✗ | LOG_AND_THROW(briefDescription() << " does not have an Energy Part Load Fraction Curve attached."); | |
| 168 | } | ||
| 169 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
36 | return value.get(); |
| 170 | 18 | } | |
| 171 | |||
| 172 | 18 | boost::optional<Curve> CoilHeatingDXVariableSpeed_Impl::defrostEnergyInputRatioFunctionofTemperatureCurve() const { | |
| 173 |
1/1✓ Branch 1 taken 18 times.
|
36 | return getObject<ModelObject>().getModelObjectTarget<Curve>( |
| 174 |
1/1✓ Branch 1 taken 18 times.
|
36 | OS_Coil_Heating_DX_VariableSpeedFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName); |
| 175 | } | ||
| 176 | |||
| 177 | 11 | double CoilHeatingDXVariableSpeed_Impl::minimumOutdoorDryBulbTemperatureforCompressorOperation() const { | |
| 178 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<double> value = getDouble(OS_Coil_Heating_DX_VariableSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, true); |
| 179 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
|
11 | OS_ASSERT(value); |
| 180 |
1/1✓ Branch 1 taken 11 times.
|
22 | return value.get(); |
| 181 | } | ||
| 182 | |||
| 183 | 12 | boost::optional<double> CoilHeatingDXVariableSpeed_Impl::outdoorDryBulbTemperaturetoTurnOnCompressor() const { | |
| 184 | 12 | return getDouble(OS_Coil_Heating_DX_VariableSpeedFields::OutdoorDryBulbTemperaturetoTurnOnCompressor, true); | |
| 185 | } | ||
| 186 | |||
| 187 | 11 | double CoilHeatingDXVariableSpeed_Impl::maximumOutdoorDryBulbTemperatureforDefrostOperation() const { | |
| 188 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<double> value = getDouble(OS_Coil_Heating_DX_VariableSpeedFields::MaximumOutdoorDryBulbTemperatureforDefrostOperation, true); |
| 189 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
|
11 | OS_ASSERT(value); |
| 190 |
1/1✓ Branch 1 taken 11 times.
|
22 | return value.get(); |
| 191 | } | ||
| 192 | |||
| 193 | 11 | double CoilHeatingDXVariableSpeed_Impl::crankcaseHeaterCapacity() const { | |
| 194 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<double> value = getDouble(OS_Coil_Heating_DX_VariableSpeedFields::CrankcaseHeaterCapacity, true); |
| 195 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
|
11 | OS_ASSERT(value); |
| 196 |
1/1✓ Branch 1 taken 11 times.
|
22 | return value.get(); |
| 197 | } | ||
| 198 | |||
| 199 | 11 | double CoilHeatingDXVariableSpeed_Impl::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const { | |
| 200 | boost::optional<double> value = | ||
| 201 |
1/1✓ Branch 1 taken 11 times.
|
11 | getDouble(OS_Coil_Heating_DX_VariableSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, true); |
| 202 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
|
11 | OS_ASSERT(value); |
| 203 |
1/1✓ Branch 1 taken 11 times.
|
22 | return value.get(); |
| 204 | } | ||
| 205 | |||
| 206 | 11 | std::string CoilHeatingDXVariableSpeed_Impl::defrostStrategy() const { | |
| 207 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<std::string> value = getString(OS_Coil_Heating_DX_VariableSpeedFields::DefrostStrategy, true); |
| 208 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
|
11 | OS_ASSERT(value); |
| 209 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
22 | return value.get(); |
| 210 | 11 | } | |
| 211 | |||
| 212 | 11 | std::string CoilHeatingDXVariableSpeed_Impl::defrostControl() const { | |
| 213 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<std::string> value = getString(OS_Coil_Heating_DX_VariableSpeedFields::DefrostControl, true); |
| 214 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
|
11 | OS_ASSERT(value); |
| 215 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
22 | return value.get(); |
| 216 | 11 | } | |
| 217 | |||
| 218 | 11 | double CoilHeatingDXVariableSpeed_Impl::defrostTimePeriodFraction() const { | |
| 219 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<double> value = getDouble(OS_Coil_Heating_DX_VariableSpeedFields::DefrostTimePeriodFraction, true); |
| 220 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
|
11 | OS_ASSERT(value); |
| 221 |
1/1✓ Branch 1 taken 11 times.
|
22 | return value.get(); |
| 222 | } | ||
| 223 | |||
| 224 | 5 | boost::optional<double> CoilHeatingDXVariableSpeed_Impl::resistiveDefrostHeaterCapacity() const { | |
| 225 | 5 | return getDouble(OS_Coil_Heating_DX_VariableSpeedFields::ResistiveDefrostHeaterCapacity, true); | |
| 226 | } | ||
| 227 | |||
| 228 | 11 | bool CoilHeatingDXVariableSpeed_Impl::isResistiveDefrostHeaterCapacityAutosized() const { | |
| 229 | 11 | bool result = false; | |
| 230 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<std::string> value = getString(OS_Coil_Heating_DX_VariableSpeedFields::ResistiveDefrostHeaterCapacity, true); |
| 231 |
1/2✓ Branch 0 taken 11 times.
✗ Branch 1 not taken.
|
11 | if (value) { |
| 232 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
|
22 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 233 | } | ||
| 234 | 11 | return result; | |
| 235 | 11 | } | |
| 236 | |||
| 237 | 46 | bool CoilHeatingDXVariableSpeed_Impl::setAvailabilitySchedule(Schedule& schedule) { | |
| 238 |
3/3✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
✓ Branch 7 taken 46 times.
|
184 | bool result = setSchedule(OS_Coil_Heating_DX_VariableSpeedFields::AvailabilityScheduleName, "CoilHeatingDXVariableSpeed", |
| 239 | "Availability Schedule", schedule); | ||
| 240 | 46 | return result; | |
| 241 | } | ||
| 242 | |||
| 243 | 47 | bool CoilHeatingDXVariableSpeed_Impl::setNominalSpeedLevel(int nominalSpeedLevel) { | |
| 244 | 47 | bool result = setInt(OS_Coil_Heating_DX_VariableSpeedFields::NominalSpeedLevel, nominalSpeedLevel); | |
| 245 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
|
47 | OS_ASSERT(result); |
| 246 | 47 | return result; | |
| 247 | } | ||
| 248 | |||
| 249 | 2 | bool CoilHeatingDXVariableSpeed_Impl::setRatedHeatingCapacityAtSelectedNominalSpeedLevel( | |
| 250 | boost::optional<double> ratedHeatingCapacityAtSelectedNominalSpeedLevel) { | ||
| 251 | 2 | bool result(false); | |
| 252 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (ratedHeatingCapacityAtSelectedNominalSpeedLevel) { |
| 253 | 2 | result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::RatedHeatingCapacityAtSelectedNominalSpeedLevel, | |
| 254 | 2 | ratedHeatingCapacityAtSelectedNominalSpeedLevel.get()); | |
| 255 | } | ||
| 256 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 257 | 2 | return result; | |
| 258 | } | ||
| 259 | |||
| 260 | 46 | void CoilHeatingDXVariableSpeed_Impl::autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel() { | |
| 261 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
92 | bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::RatedHeatingCapacityAtSelectedNominalSpeedLevel, "autosize"); |
| 262 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 46 times.
|
46 | OS_ASSERT(result); |
| 263 | 46 | } | |
| 264 | |||
| 265 | 2 | bool CoilHeatingDXVariableSpeed_Impl::setRatedAirFlowRateAtSelectedNominalSpeedLevel( | |
| 266 | boost::optional<double> ratedAirFlowRateAtSelectedNominalSpeedLevel) { | ||
| 267 | 2 | bool result(false); | |
| 268 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (ratedAirFlowRateAtSelectedNominalSpeedLevel) { |
| 269 | 2 | result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, | |
| 270 | 2 | ratedAirFlowRateAtSelectedNominalSpeedLevel.get()); | |
| 271 | } | ||
| 272 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 273 | 2 | return result; | |
| 274 | } | ||
| 275 | |||
| 276 | 46 | void CoilHeatingDXVariableSpeed_Impl::autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel() { | |
| 277 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
92 | bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, "autosize"); |
| 278 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 46 times.
|
46 | OS_ASSERT(result); |
| 279 | 46 | } | |
| 280 | |||
| 281 | 46 | bool CoilHeatingDXVariableSpeed_Impl::setEnergyPartLoadFractionCurve(const Curve& curve) { | |
| 282 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
46 | bool result = setPointer(OS_Coil_Heating_DX_VariableSpeedFields::EnergyPartLoadFractionCurveName, curve.handle()); |
| 283 | 46 | return result; | |
| 284 | } | ||
| 285 | |||
| 286 | 2 | bool CoilHeatingDXVariableSpeed_Impl::setDefrostEnergyInputRatioFunctionofTemperatureCurve(const boost::optional<Curve>& curve) { | |
| 287 | 2 | bool result(false); | |
| 288 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (curve) { |
| 289 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | result = setPointer(OS_Coil_Heating_DX_VariableSpeedFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName, curve.get().handle()); |
| 290 | } else { | ||
| 291 | ✗ | resetDefrostEnergyInputRatioFunctionofTemperatureCurve(); | |
| 292 | ✗ | result = true; | |
| 293 | } | ||
| 294 | 2 | return result; | |
| 295 | } | ||
| 296 | |||
| 297 | ✗ | void CoilHeatingDXVariableSpeed_Impl::resetDefrostEnergyInputRatioFunctionofTemperatureCurve() { | |
| 298 | ✗ | bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName, ""); | |
| 299 | ✗ | OS_ASSERT(result); | |
| 300 | ✗ | } | |
| 301 | |||
| 302 | 48 | bool CoilHeatingDXVariableSpeed_Impl::setMinimumOutdoorDryBulbTemperatureforCompressorOperation( | |
| 303 | double minimumOutdoorDryBulbTemperatureforCompressorOperation) { | ||
| 304 | 48 | bool result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, | |
| 305 | minimumOutdoorDryBulbTemperatureforCompressorOperation); | ||
| 306 | 48 | return result; | |
| 307 | } | ||
| 308 | |||
| 309 | 2 | bool CoilHeatingDXVariableSpeed_Impl::setOutdoorDryBulbTemperaturetoTurnOnCompressor( | |
| 310 | boost::optional<double> outdoorDryBulbTemperaturetoTurnOnCompressor) { | ||
| 311 | 2 | bool result(false); | |
| 312 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (outdoorDryBulbTemperaturetoTurnOnCompressor) { |
| 313 | 2 | result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::OutdoorDryBulbTemperaturetoTurnOnCompressor, | |
| 314 | 2 | outdoorDryBulbTemperaturetoTurnOnCompressor.get()); | |
| 315 | } else { | ||
| 316 | ✗ | resetOutdoorDryBulbTemperaturetoTurnOnCompressor(); | |
| 317 | ✗ | result = true; | |
| 318 | } | ||
| 319 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 320 | 2 | return result; | |
| 321 | } | ||
| 322 | |||
| 323 | 1 | void CoilHeatingDXVariableSpeed_Impl::resetOutdoorDryBulbTemperaturetoTurnOnCompressor() { | |
| 324 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::OutdoorDryBulbTemperaturetoTurnOnCompressor, ""); |
| 325 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 326 | 1 | } | |
| 327 | |||
| 328 | 47 | bool CoilHeatingDXVariableSpeed_Impl::setMaximumOutdoorDryBulbTemperatureforDefrostOperation( | |
| 329 | double maximumOutdoorDryBulbTemperatureforDefrostOperation) { | ||
| 330 | 47 | bool result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::MaximumOutdoorDryBulbTemperatureforDefrostOperation, | |
| 331 | maximumOutdoorDryBulbTemperatureforDefrostOperation); | ||
| 332 | 47 | return result; | |
| 333 | } | ||
| 334 | |||
| 335 | 48 | bool CoilHeatingDXVariableSpeed_Impl::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) { | |
| 336 | 48 | bool result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::CrankcaseHeaterCapacity, crankcaseHeaterCapacity); | |
| 337 | 48 | return result; | |
| 338 | } | ||
| 339 | |||
| 340 | 48 | bool CoilHeatingDXVariableSpeed_Impl::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation( | |
| 341 | double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) { | ||
| 342 | 48 | bool result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, | |
| 343 | maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation); | ||
| 344 | 48 | return result; | |
| 345 | } | ||
| 346 | |||
| 347 | 48 | bool CoilHeatingDXVariableSpeed_Impl::setDefrostStrategy(const std::string& defrostStrategy) { | |
| 348 | 48 | bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::DefrostStrategy, defrostStrategy); | |
| 349 | 48 | return result; | |
| 350 | } | ||
| 351 | |||
| 352 | 48 | bool CoilHeatingDXVariableSpeed_Impl::setDefrostControl(const std::string& defrostControl) { | |
| 353 | 48 | bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::DefrostControl, defrostControl); | |
| 354 | 48 | return result; | |
| 355 | } | ||
| 356 | |||
| 357 | 48 | bool CoilHeatingDXVariableSpeed_Impl::setDefrostTimePeriodFraction(double defrostTimePeriodFraction) { | |
| 358 | 48 | bool result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::DefrostTimePeriodFraction, defrostTimePeriodFraction); | |
| 359 | 48 | return result; | |
| 360 | } | ||
| 361 | |||
| 362 | 3 | bool CoilHeatingDXVariableSpeed_Impl::setResistiveDefrostHeaterCapacity(boost::optional<double> resistiveDefrostHeaterCapacity) { | |
| 363 | 3 | bool result(false); | |
| 364 |
1/2✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
|
3 | if (resistiveDefrostHeaterCapacity) { |
| 365 | 3 | result = setDouble(OS_Coil_Heating_DX_VariableSpeedFields::ResistiveDefrostHeaterCapacity, resistiveDefrostHeaterCapacity.get()); | |
| 366 | } | ||
| 367 | 3 | return result; | |
| 368 | } | ||
| 369 | |||
| 370 | 46 | void CoilHeatingDXVariableSpeed_Impl::autosizeResistiveDefrostHeaterCapacity() { | |
| 371 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
92 | bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::ResistiveDefrostHeaterCapacity, "autosize"); |
| 372 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 46 times.
|
46 | OS_ASSERT(result); |
| 373 | 46 | } | |
| 374 | |||
| 375 | 18 | boost::optional<Curve> CoilHeatingDXVariableSpeed_Impl::optionalEnergyPartLoadFractionCurve() const { | |
| 376 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
18 | return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Coil_Heating_DX_VariableSpeedFields::EnergyPartLoadFractionCurveName); |
| 377 | } | ||
| 378 | |||
| 379 | 19 | boost::optional<Curve> CoilHeatingDXVariableSpeed_Impl::crankcaseHeaterCapacityFunctionofTemperatureCurve() const { | |
| 380 |
1/1✓ Branch 1 taken 19 times.
|
38 | return getObject<ModelObject>().getModelObjectTarget<Curve>( |
| 381 |
1/1✓ Branch 1 taken 19 times.
|
38 | OS_Coil_Heating_DX_VariableSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName); |
| 382 | } | ||
| 383 | |||
| 384 | 2 | bool CoilHeatingDXVariableSpeed_Impl::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) { | |
| 385 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | const bool result = setPointer(OS_Coil_Heating_DX_VariableSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, curve.handle()); |
| 386 | 2 | return result; | |
| 387 | } | ||
| 388 | |||
| 389 | 1 | void CoilHeatingDXVariableSpeed_Impl::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() { | |
| 390 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | const bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, ""); |
| 391 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 392 | 1 | } | |
| 393 | |||
| 394 | 9 | ModelObject CoilHeatingDXVariableSpeed_Impl::clone(Model model) const { | |
| 395 |
3/3✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
|
9 | auto t_clone = StraightComponent_Impl::clone(model).cast<CoilHeatingDXVariableSpeed>(); |
| 396 | |||
| 397 |
2/3✓ Branch 1 taken 9 times.
✓ Branch 3 taken 9 times.
✗ Branch 4 not taken.
|
18 | if (auto speedDataList = this->speedDataList()) { |
| 398 |
4/4✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
✓ Branch 10 taken 9 times.
|
9 | auto speedDataListClone = speedDataList->clone(model).cast<ModelObjectList>(); |
| 399 |
2/2✓ Branch 3 taken 9 times.
✓ Branch 6 taken 9 times.
|
9 | t_clone.getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setSpeedDataList(speedDataListClone); |
| 400 | 18 | } | |
| 401 | |||
| 402 | 18 | return std::move(t_clone); | |
| 403 | 9 | } | |
| 404 | |||
| 405 | 7 | std::vector<ModelObject> CoilHeatingDXVariableSpeed_Impl::children() const { | |
| 406 | 7 | std::vector<ModelObject> children; | |
| 407 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 7 times.
✗ Branch 4 not taken.
|
14 | if (auto const _stageDataList = speedDataList()) { |
| 408 |
4/4✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 11 taken 3 times.
✓ Branch 12 taken 7 times.
|
10 | for (const auto& mo : _stageDataList->modelObjects()) { |
| 409 |
1/1✓ Branch 1 taken 3 times.
|
3 | children.push_back(mo); |
| 410 | 7 | } | |
| 411 | 7 | } | |
| 412 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
7 | children.push_back(energyPartLoadFractionCurve()); |
| 413 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 6 times.
|
14 | if (auto curve = defrostEnergyInputRatioFunctionofTemperatureCurve()) { |
| 414 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | children.push_back(curve.get()); |
| 415 | 7 | } | |
| 416 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 6 times.
|
14 | if (auto c_ = crankcaseHeaterCapacityFunctionofTemperatureCurve()) { |
| 417 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 5 taken 1 time.
|
1 | children.emplace_back(std::move(*c_)); |
| 418 | 7 | } | |
| 419 | std::vector<AirflowNetworkEquivalentDuct> myAFNItems = | ||
| 420 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType()); |
| 421 |
1/1✓ Branch 5 taken 7 times.
|
7 | children.insert(children.end(), myAFNItems.begin(), myAFNItems.end()); |
| 422 | 14 | return children; | |
| 423 | 7 | } | |
| 424 | |||
| 425 | 37 | boost::optional<ModelObjectList> CoilHeatingDXVariableSpeed_Impl::speedDataList() const { | |
| 426 |
2/2✓ Branch 1 taken 37 times.
✓ Branch 4 taken 37 times.
|
37 | return getObject<ModelObject>().getModelObjectTarget<ModelObjectList>(OS_Coil_Heating_DX_VariableSpeedFields::SpeedDataList); |
| 427 | } | ||
| 428 | |||
| 429 | 5 | bool CoilHeatingDXVariableSpeed_Impl::addSpeed(const CoilHeatingDXVariableSpeedSpeedData& speed) { | |
| 430 |
1/1✓ Branch 1 taken 5 times.
|
5 | auto modelObjectList = speedDataList(); |
| 431 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | if (modelObjectList) { |
| 432 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | return modelObjectList->addModelObject(speed); |
| 433 | } | ||
| 434 | ✗ | return false; | |
| 435 | 5 | } | |
| 436 | |||
| 437 | ✗ | void CoilHeatingDXVariableSpeed_Impl::removeSpeed(const CoilHeatingDXVariableSpeedSpeedData& speed) { | |
| 438 | ✗ | auto modelObjectList = speedDataList(); | |
| 439 | ✗ | if (modelObjectList) { | |
| 440 | ✗ | modelObjectList->removeModelObject(speed); | |
| 441 | } | ||
| 442 | ✗ | } | |
| 443 | |||
| 444 | ✗ | void CoilHeatingDXVariableSpeed_Impl::removeAllSpeeds() { | |
| 445 | ✗ | auto modelObjectList = speedDataList(); | |
| 446 | ✗ | if (modelObjectList) { | |
| 447 | ✗ | auto const modelObjects = modelObjectList->modelObjects(); | |
| 448 | |||
| 449 | ✗ | for (const auto& elem : modelObjects) { | |
| 450 | ✗ | auto const modelObject = elem.optionalCast<CoilHeatingDXVariableSpeedSpeedData>(); | |
| 451 | ✗ | if (modelObject) { | |
| 452 | ✗ | modelObjectList->removeModelObject(elem); | |
| 453 | } | ||
| 454 | ✗ | } | |
| 455 | ✗ | } | |
| 456 | ✗ | } | |
| 457 | |||
| 458 | 15 | std::vector<CoilHeatingDXVariableSpeedSpeedData> CoilHeatingDXVariableSpeed_Impl::speeds() const { | |
| 459 | 15 | std::vector<CoilHeatingDXVariableSpeedSpeedData> result; | |
| 460 |
1/1✓ Branch 1 taken 15 times.
|
15 | auto const modelObjectList = speedDataList(); |
| 461 |
1/2✓ Branch 0 taken 15 times.
✗ Branch 1 not taken.
|
15 | if (modelObjectList) { |
| 462 |
2/2✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
|
15 | auto const modelObjects = modelObjectList->modelObjects(); |
| 463 | |||
| 464 |
2/2✓ Branch 5 taken 12 times.
✓ Branch 6 taken 15 times.
|
27 | for (const auto& elem : modelObjects) { |
| 465 |
1/1✓ Branch 1 taken 12 times.
|
12 | auto const modelObject = elem.optionalCast<CoilHeatingDXVariableSpeedSpeedData>(); |
| 466 |
1/2✓ Branch 0 taken 12 times.
✗ Branch 1 not taken.
|
12 | if (modelObject) { |
| 467 |
2/2✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
|
12 | result.push_back(modelObject.get()); |
| 468 | } | ||
| 469 | 12 | } | |
| 470 | 15 | } | |
| 471 | 30 | return result; | |
| 472 | 15 | } | |
| 473 | |||
| 474 | 12 | boost::optional<HVACComponent> CoilHeatingDXVariableSpeed_Impl::containingHVACComponent() const { | |
| 475 | // AirLoopHVACUnitarySystem | ||
| 476 | { | ||
| 477 |
2/2✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
|
12 | auto systems = this->model().getConcreteModelObjects<AirLoopHVACUnitarySystem>(); |
| 478 | |||
| 479 |
2/2✓ Branch 5 taken 2 times.
✓ Branch 6 taken 10 times.
|
12 | for (auto const& system : systems) { |
| 480 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (auto heatingCoil = system.heatingCoil()) { |
| 481 |
5/6✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
|
2 | if (heatingCoil->handle() == this->handle()) { |
| 482 |
1/1✓ Branch 1 taken 2 times.
|
2 | return system; |
| 483 | } | ||
| 484 | 2 | } | |
| 485 | } | ||
| 486 | 12 | } | |
| 487 | |||
| 488 | // AirLoopHVACUnitaryHeatPumpAirToAir | ||
| 489 | { | ||
| 490 |
2/2✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
|
10 | auto systems = this->model().getConcreteModelObjects<AirLoopHVACUnitaryHeatPumpAirToAir>(); |
| 491 | |||
| 492 |
2/2✓ Branch 5 taken 2 times.
✓ Branch 6 taken 10 times.
|
12 | for (auto const& system : systems) { |
| 493 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto heatingCoil = system.heatingCoil(); |
| 494 |
4/5✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 2 times.
|
2 | if (heatingCoil.handle() == this->handle()) { |
| 495 | ✗ | return system; | |
| 496 | } | ||
| 497 | 2 | } | |
| 498 | 10 | } | |
| 499 | |||
| 500 | // CoilSystemIntegratedHeatPumpAirSource | ||
| 501 | { | ||
| 502 |
2/2✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
|
10 | auto coilSystems = this->model().getConcreteModelObjects<CoilSystemIntegratedHeatPumpAirSource>(); |
| 503 |
2/2✓ Branch 5 taken 8 times.
✓ Branch 6 taken 2 times.
|
10 | for (const auto& coilSystem : coilSystems) { |
| 504 |
6/6✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✓ Branch 10 taken 8 times.
✓ Branch 13 taken 4 times.
✓ Branch 14 taken 4 times.
|
8 | if (coilSystem.spaceHeatingCoil().handle() == this->handle()) { |
| 505 |
1/1✓ Branch 1 taken 4 times.
|
12 | return coilSystem; |
| 506 | } | ||
| 507 |
5/6✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
|
4 | if (coilSystem.shdwhHeatingCoil().handle() == this->handle()) { |
| 508 |
1/1✓ Branch 1 taken 4 times.
|
4 | return coilSystem; |
| 509 | } | ||
| 510 | } | ||
| 511 | 10 | } | |
| 512 | |||
| 513 | 2 | return boost::none; | |
| 514 | } | ||
| 515 | |||
| 516 | 1 | boost::optional<ZoneHVACComponent> CoilHeatingDXVariableSpeed_Impl::containingZoneHVACComponent() const { | |
| 517 | // ZoneHVACPackagedTerminalHeatPump | ||
| 518 | { | ||
| 519 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | auto systems = this->model().getConcreteModelObjects<ZoneHVACPackagedTerminalHeatPump>(); |
| 520 | |||
| 521 |
1/2✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
|
1 | for (auto const& system : systems) { |
| 522 | ✗ | auto heatingCoil = system.heatingCoil(); | |
| 523 | ✗ | if (heatingCoil.handle() == this->handle()) { | |
| 524 | ✗ | return system; | |
| 525 | } | ||
| 526 | ✗ | } | |
| 527 | 1 | } | |
| 528 | |||
| 529 | 1 | return boost::none; | |
| 530 | } | ||
| 531 | |||
| 532 | 1 | bool CoilHeatingDXVariableSpeed_Impl::addToNode(Node& node) { | |
| 533 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto t_containingHVACComponent = containingHVACComponent(); |
| 534 |
3/12✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 1 time.
✗ Branch 15 not taken.
✓ Branch 16 taken 1 time.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
|
2 | if (t_containingHVACComponent && t_containingHVACComponent->optionalCast<CoilSystemIntegratedHeatPumpAirSource>()) { |
| 535 | ✗ | LOG(Warn, this->briefDescription() << " cannot be connected directly when it's part of a parent CoilSystemIntegratedHeatPumpAirSource. " | |
| 536 | "Please call CoilSystemIntegratedHeatPumpAirSource::addToNode instead"); | ||
| 537 | } else { | ||
| 538 | |||
| 539 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
2 | if (boost::optional<AirLoopHVAC> airLoop = node.airLoopHVAC()) { |
| 540 | ✗ | if (!airLoop->demandComponent(node.handle())) { | |
| 541 | ✗ | return StraightComponent_Impl::addToNode(node); | |
| 542 | } | ||
| 543 | 1 | } | |
| 544 | |||
| 545 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (auto oa = node.airLoopHVACOutdoorAirSystem()) { |
| 546 |
1/1✓ Branch 1 taken 1 time.
|
1 | return StraightComponent_Impl::addToNode(node); |
| 547 | 1 | } | |
| 548 | } | ||
| 549 | |||
| 550 | ✗ | return false; | |
| 551 | 1 | } | |
| 552 | |||
| 553 | 54 | bool CoilHeatingDXVariableSpeed_Impl::setSpeedDataList(const boost::optional<ModelObjectList>& modelObjectList) { | |
| 554 | 54 | bool result(false); | |
| 555 |
1/2✓ Branch 0 taken 54 times.
✗ Branch 1 not taken.
|
54 | if (modelObjectList) { |
| 556 |
3/3✓ Branch 1 taken 54 times.
✓ Branch 4 taken 54 times.
✓ Branch 7 taken 54 times.
|
54 | result = setPointer(OS_Coil_Heating_DX_VariableSpeedFields::SpeedDataList, modelObjectList.get().handle()); |
| 557 | } else { | ||
| 558 | ✗ | resetSpeedDataList(); | |
| 559 | ✗ | result = true; | |
| 560 | } | ||
| 561 | 54 | return result; | |
| 562 | } | ||
| 563 | |||
| 564 | ✗ | void CoilHeatingDXVariableSpeed_Impl::resetSpeedDataList() { | |
| 565 | ✗ | bool result = setString(OS_Coil_Heating_DX_VariableSpeedFields::SpeedDataList, ""); | |
| 566 | ✗ | OS_ASSERT(result); | |
| 567 | ✗ | } | |
| 568 | |||
| 569 | 1 | std::vector<IdfObject> CoilHeatingDXVariableSpeed_Impl::remove() { | |
| 570 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto _stageDataList = speedDataList(); |
| 571 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto result = StraightComponent_Impl::remove(); |
| 572 |
3/6✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
|
2 | if ((!result.empty()) && _stageDataList) { |
| 573 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _stageDataList->remove(); |
| 574 | } | ||
| 575 | |||
| 576 | 2 | return result; | |
| 577 | 1 | } | |
| 578 | |||
| 579 | ✗ | AirflowNetworkEquivalentDuct CoilHeatingDXVariableSpeed_Impl::getAirflowNetworkEquivalentDuct(double length, double diameter) { | |
| 580 | ✗ | boost::optional<AirflowNetworkEquivalentDuct> opt = airflowNetworkEquivalentDuct(); | |
| 581 | ✗ | if (opt) { | |
| 582 | ✗ | if (opt->airPathLength() != length) { | |
| 583 | ✗ | opt->setAirPathLength(length); | |
| 584 | } | ||
| 585 | ✗ | if (opt->airPathHydraulicDiameter() != diameter) { | |
| 586 | ✗ | opt->setAirPathHydraulicDiameter(diameter); | |
| 587 | } | ||
| 588 | } | ||
| 589 | ✗ | return AirflowNetworkEquivalentDuct(model(), length, diameter, handle()); | |
| 590 | ✗ | } | |
| 591 | |||
| 592 | ✗ | boost::optional<AirflowNetworkEquivalentDuct> CoilHeatingDXVariableSpeed_Impl::airflowNetworkEquivalentDuct() const { | |
| 593 | std::vector<AirflowNetworkEquivalentDuct> myAFN = | ||
| 594 | ✗ | getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType()); | |
| 595 | ✗ | auto count = myAFN.size(); | |
| 596 | ✗ | if (count == 1) { | |
| 597 | ✗ | return myAFN[0]; | |
| 598 | ✗ | } else if (count > 1) { | |
| 599 | ✗ | LOG(Warn, briefDescription() << " has more than one AirflowNetwork EquivalentDuct attached, returning first."); | |
| 600 | ✗ | return myAFN[0]; | |
| 601 | } | ||
| 602 | ✗ | return boost::none; | |
| 603 | ✗ | } | |
| 604 | |||
| 605 | ✗ | boost::optional<double> CoilHeatingDXVariableSpeed_Impl::autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel() const { | |
| 606 | // EPLUS-SQL-INCONSISTENCY | ||
| 607 | ✗ | return getAutosizedValue("Design Size Nominal Heating Capacity", "W", "COIL:HEATING:DX:VARIABLESPEED"); | |
| 608 | } | ||
| 609 | |||
| 610 | ✗ | boost::optional<double> CoilHeatingDXVariableSpeed_Impl::autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel() const { | |
| 611 | // EPLUS-SQL-INCONSISTENCY | ||
| 612 | ✗ | return getAutosizedValue("Design Size Rated Air Flow Rate", "m3/s", "COIL:HEATING:DX:VARIABLESPEED"); | |
| 613 | } | ||
| 614 | |||
| 615 | ✗ | boost::optional<double> CoilHeatingDXVariableSpeed_Impl::autosizedResistiveDefrostHeaterCapacity() const { | |
| 616 | // EPLUS-SQL-INCONSISTENCY | ||
| 617 | ✗ | return getAutosizedValue("Design Size Resistive Defrost Heater Capacity", "W", "AS VS HEATING COIL"); | |
| 618 | } | ||
| 619 | |||
| 620 | ✗ | void CoilHeatingDXVariableSpeed_Impl::autosize() { | |
| 621 | ✗ | autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel(); | |
| 622 | ✗ | autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel(); | |
| 623 | ✗ | autosizeResistiveDefrostHeaterCapacity(); | |
| 624 | ✗ | } | |
| 625 | |||
| 626 | ✗ | void CoilHeatingDXVariableSpeed_Impl::applySizingValues() { | |
| 627 | ✗ | boost::optional<double> val; | |
| 628 | ✗ | val = autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel(); | |
| 629 | ✗ | if (val) { | |
| 630 | ✗ | setRatedHeatingCapacityAtSelectedNominalSpeedLevel(val.get()); | |
| 631 | } | ||
| 632 | |||
| 633 | ✗ | val = autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel(); | |
| 634 | ✗ | if (val) { | |
| 635 | ✗ | setRatedAirFlowRateAtSelectedNominalSpeedLevel(val.get()); | |
| 636 | } | ||
| 637 | |||
| 638 | ✗ | val = autosizedResistiveDefrostHeaterCapacity(); | |
| 639 | ✗ | if (val) { | |
| 640 | ✗ | setResistiveDefrostHeaterCapacity(val.get()); | |
| 641 | } | ||
| 642 | ✗ | } | |
| 643 | |||
| 644 | 2 | ComponentType CoilHeatingDXVariableSpeed_Impl::componentType() const { | |
| 645 |
1/1✓ Branch 1 taken 2 times.
|
2 | return ComponentType::Heating; |
| 646 | } | ||
| 647 | |||
| 648 | 2 | std::vector<FuelType> CoilHeatingDXVariableSpeed_Impl::coolingFuelTypes() const { | |
| 649 | 2 | return {}; | |
| 650 | } | ||
| 651 | |||
| 652 | 5 | std::vector<FuelType> CoilHeatingDXVariableSpeed_Impl::heatingFuelTypes() const { | |
| 653 |
1/1✓ Branch 1 taken 5 times.
|
15 | return {FuelType::Electricity}; |
| 654 | } | ||
| 655 | |||
| 656 | 5 | std::vector<AppGFuelType> CoilHeatingDXVariableSpeed_Impl::appGHeatingFuelTypes() const { | |
| 657 |
1/1✓ Branch 1 taken 5 times.
|
15 | return {AppGFuelType::HeatPump}; |
| 658 | } | ||
| 659 | |||
| 660 | } // namespace detail | ||
| 661 | |||
| 662 | 45 | CoilHeatingDXVariableSpeed::CoilHeatingDXVariableSpeed(const Model& model) : StraightComponent(CoilHeatingDXVariableSpeed::iddObjectType(), model) { | |
| 663 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 45 times.
✗ Branch 5 not taken.
|
45 | OS_ASSERT(getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()); |
| 664 | |||
| 665 |
1/1✓ Branch 1 taken 45 times.
|
45 | auto partLoadFraction = CurveQuadratic(model); |
| 666 |
1/1✓ Branch 1 taken 45 times.
|
45 | partLoadFraction.setCoefficient1Constant(0.85); |
| 667 |
1/1✓ Branch 1 taken 45 times.
|
45 | partLoadFraction.setCoefficient2x(0.15); |
| 668 |
1/1✓ Branch 1 taken 45 times.
|
45 | partLoadFraction.setCoefficient3xPOW2(0.0); |
| 669 |
1/1✓ Branch 1 taken 45 times.
|
45 | partLoadFraction.setMinimumValueofx(0.0); |
| 670 |
1/1✓ Branch 1 taken 45 times.
|
45 | partLoadFraction.setMaximumValueofx(1.0); |
| 671 | |||
| 672 |
1/1✓ Branch 1 taken 45 times.
|
45 | auto always_on = model.alwaysOnDiscreteSchedule(); |
| 673 |
1/1✓ Branch 1 taken 45 times.
|
45 | bool ok = setAvailabilitySchedule(always_on); |
| 674 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 675 |
1/1✓ Branch 1 taken 45 times.
|
45 | ok = setNominalSpeedLevel(1); |
| 676 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 677 |
1/1✓ Branch 1 taken 45 times.
|
45 | autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel(); |
| 678 |
1/1✓ Branch 1 taken 45 times.
|
45 | autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel(); |
| 679 |
1/1✓ Branch 1 taken 45 times.
|
45 | ok = setEnergyPartLoadFractionCurve(partLoadFraction); |
| 680 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 681 |
1/1✓ Branch 1 taken 45 times.
|
45 | ok = setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-5.0); |
| 682 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 683 |
1/1✓ Branch 1 taken 45 times.
|
45 | ok = setMaximumOutdoorDryBulbTemperatureforDefrostOperation(5.0); |
| 684 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 685 |
1/1✓ Branch 1 taken 45 times.
|
45 | ok = setCrankcaseHeaterCapacity(200.0); |
| 686 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 687 |
1/1✓ Branch 1 taken 45 times.
|
45 | ok = setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(10.0); |
| 688 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 689 |
2/2✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
|
45 | ok = setDefrostStrategy("Resistive"); |
| 690 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 691 |
2/2✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
|
45 | ok = setDefrostControl("OnDemand"); |
| 692 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 693 |
1/1✓ Branch 1 taken 45 times.
|
45 | ok = setDefrostTimePeriodFraction(0.166667); |
| 694 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 695 |
1/1✓ Branch 1 taken 45 times.
|
45 | autosizeResistiveDefrostHeaterCapacity(); |
| 696 | |||
| 697 |
1/1✓ Branch 1 taken 45 times.
|
45 | auto speedDataList = ModelObjectList(model); |
| 698 |
4/4✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
✓ Branch 7 taken 45 times.
✓ Branch 10 taken 45 times.
|
45 | speedDataList.setName(this->name().get() + " Speed Data List"); |
| 699 |
2/2✓ Branch 3 taken 45 times.
✓ Branch 6 taken 45 times.
|
45 | ok = getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setSpeedDataList(speedDataList); |
| 700 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
|
45 | OS_ASSERT(ok); |
| 701 | 45 | } | |
| 702 | |||
| 703 | ✗ | CoilHeatingDXVariableSpeed::CoilHeatingDXVariableSpeed(const Model& model, const Curve& partLoadFraction) | |
| 704 | ✗ | : StraightComponent(CoilHeatingDXVariableSpeed::iddObjectType(), model) { | |
| 705 | ✗ | OS_ASSERT(getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()); | |
| 706 | |||
| 707 | ✗ | auto always_on = model.alwaysOnDiscreteSchedule(); | |
| 708 | ✗ | bool ok = setAvailabilitySchedule(always_on); | |
| 709 | ✗ | OS_ASSERT(ok); | |
| 710 | ✗ | ok = setNominalSpeedLevel(1); | |
| 711 | ✗ | OS_ASSERT(ok); | |
| 712 | ✗ | autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel(); | |
| 713 | ✗ | autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel(); | |
| 714 | ✗ | ok = setEnergyPartLoadFractionCurve(partLoadFraction); | |
| 715 | ✗ | OS_ASSERT(ok); | |
| 716 | ✗ | ok = setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-5.0); | |
| 717 | ✗ | OS_ASSERT(ok); | |
| 718 | ✗ | ok = setMaximumOutdoorDryBulbTemperatureforDefrostOperation(5.0); | |
| 719 | ✗ | OS_ASSERT(ok); | |
| 720 | ✗ | ok = setCrankcaseHeaterCapacity(200.0); | |
| 721 | ✗ | OS_ASSERT(ok); | |
| 722 | ✗ | ok = setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(10.0); | |
| 723 | ✗ | OS_ASSERT(ok); | |
| 724 | ✗ | ok = setDefrostStrategy("Resistive"); | |
| 725 | ✗ | OS_ASSERT(ok); | |
| 726 | ✗ | ok = setDefrostControl("OnDemand"); | |
| 727 | ✗ | OS_ASSERT(ok); | |
| 728 | ✗ | ok = setDefrostTimePeriodFraction(0.166667); | |
| 729 | ✗ | OS_ASSERT(ok); | |
| 730 | ✗ | autosizeResistiveDefrostHeaterCapacity(); | |
| 731 | |||
| 732 | ✗ | auto speedDataList = ModelObjectList(model); | |
| 733 | ✗ | speedDataList.setName(this->name().get() + " Speed Data List"); | |
| 734 | ✗ | ok = getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setSpeedDataList(speedDataList); | |
| 735 | ✗ | OS_ASSERT(ok); | |
| 736 | ✗ | } | |
| 737 | |||
| 738 | 7741 | IddObjectType CoilHeatingDXVariableSpeed::iddObjectType() { | |
| 739 |
1/1✓ Branch 1 taken 7741 times.
|
7741 | return {IddObjectType::OS_Coil_Heating_DX_VariableSpeed}; |
| 740 | } | ||
| 741 | |||
| 742 | ✗ | std::vector<std::string> CoilHeatingDXVariableSpeed::defrostStrategyValues() { | |
| 743 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Heating_DX_VariableSpeedFields::DefrostStrategy); | |
| 744 | } | ||
| 745 | |||
| 746 | ✗ | std::vector<std::string> CoilHeatingDXVariableSpeed::defrostControlValues() { | |
| 747 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Heating_DX_VariableSpeedFields::DefrostControl); | |
| 748 | } | ||
| 749 | |||
| 750 | 10 | Schedule CoilHeatingDXVariableSpeed::availabilitySchedule() const { | |
| 751 |
1/1✓ Branch 3 taken 10 times.
|
10 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->availabilitySchedule(); |
| 752 | } | ||
| 753 | |||
| 754 | 10 | int CoilHeatingDXVariableSpeed::nominalSpeedLevel() const { | |
| 755 |
1/1✓ Branch 3 taken 10 times.
|
10 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->nominalSpeedLevel(); |
| 756 | } | ||
| 757 | |||
| 758 | 3 | boost::optional<double> CoilHeatingDXVariableSpeed::ratedHeatingCapacityAtSelectedNominalSpeedLevel() const { | |
| 759 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->ratedHeatingCapacityAtSelectedNominalSpeedLevel(); |
| 760 | } | ||
| 761 | |||
| 762 | 11 | bool CoilHeatingDXVariableSpeed::isRatedHeatingCapacityAtSelectedNominalSpeedLevelAutosized() const { | |
| 763 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->isRatedHeatingCapacityAtSelectedNominalSpeedLevelAutosized(); |
| 764 | } | ||
| 765 | |||
| 766 | 3 | boost::optional<double> CoilHeatingDXVariableSpeed::ratedAirFlowRateAtSelectedNominalSpeedLevel() const { | |
| 767 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->ratedAirFlowRateAtSelectedNominalSpeedLevel(); |
| 768 | } | ||
| 769 | |||
| 770 | 10 | bool CoilHeatingDXVariableSpeed::isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized() const { | |
| 771 |
1/1✓ Branch 3 taken 10 times.
|
10 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized(); |
| 772 | } | ||
| 773 | |||
| 774 | 11 | Curve CoilHeatingDXVariableSpeed::energyPartLoadFractionCurve() const { | |
| 775 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->energyPartLoadFractionCurve(); |
| 776 | } | ||
| 777 | |||
| 778 | 11 | boost::optional<Curve> CoilHeatingDXVariableSpeed::defrostEnergyInputRatioFunctionofTemperatureCurve() const { | |
| 779 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->defrostEnergyInputRatioFunctionofTemperatureCurve(); |
| 780 | } | ||
| 781 | |||
| 782 | 11 | double CoilHeatingDXVariableSpeed::minimumOutdoorDryBulbTemperatureforCompressorOperation() const { | |
| 783 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->minimumOutdoorDryBulbTemperatureforCompressorOperation(); |
| 784 | } | ||
| 785 | |||
| 786 | 12 | boost::optional<double> CoilHeatingDXVariableSpeed::outdoorDryBulbTemperaturetoTurnOnCompressor() const { | |
| 787 |
1/1✓ Branch 3 taken 12 times.
|
12 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->outdoorDryBulbTemperaturetoTurnOnCompressor(); |
| 788 | } | ||
| 789 | |||
| 790 | 11 | double CoilHeatingDXVariableSpeed::maximumOutdoorDryBulbTemperatureforDefrostOperation() const { | |
| 791 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->maximumOutdoorDryBulbTemperatureforDefrostOperation(); |
| 792 | } | ||
| 793 | |||
| 794 | 11 | double CoilHeatingDXVariableSpeed::crankcaseHeaterCapacity() const { | |
| 795 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->crankcaseHeaterCapacity(); |
| 796 | } | ||
| 797 | |||
| 798 | 11 | double CoilHeatingDXVariableSpeed::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const { | |
| 799 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(); |
| 800 | } | ||
| 801 | |||
| 802 | 11 | std::string CoilHeatingDXVariableSpeed::defrostStrategy() const { | |
| 803 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->defrostStrategy(); |
| 804 | } | ||
| 805 | |||
| 806 | 11 | std::string CoilHeatingDXVariableSpeed::defrostControl() const { | |
| 807 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->defrostControl(); |
| 808 | } | ||
| 809 | |||
| 810 | 11 | double CoilHeatingDXVariableSpeed::defrostTimePeriodFraction() const { | |
| 811 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->defrostTimePeriodFraction(); |
| 812 | } | ||
| 813 | |||
| 814 | 5 | boost::optional<double> CoilHeatingDXVariableSpeed::resistiveDefrostHeaterCapacity() const { | |
| 815 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->resistiveDefrostHeaterCapacity(); |
| 816 | } | ||
| 817 | |||
| 818 | 11 | bool CoilHeatingDXVariableSpeed::isResistiveDefrostHeaterCapacityAutosized() const { | |
| 819 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->isResistiveDefrostHeaterCapacityAutosized(); |
| 820 | } | ||
| 821 | |||
| 822 | 46 | bool CoilHeatingDXVariableSpeed::setAvailabilitySchedule(Schedule& schedule) { | |
| 823 |
1/1✓ Branch 3 taken 46 times.
|
46 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setAvailabilitySchedule(schedule); |
| 824 | } | ||
| 825 | |||
| 826 | 47 | bool CoilHeatingDXVariableSpeed::setNominalSpeedLevel(int nominalSpeedLevel) { | |
| 827 |
1/1✓ Branch 3 taken 47 times.
|
47 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setNominalSpeedLevel(nominalSpeedLevel); |
| 828 | } | ||
| 829 | |||
| 830 | 2 | bool CoilHeatingDXVariableSpeed::setRatedHeatingCapacityAtSelectedNominalSpeedLevel(double ratedHeatingCapacityAtSelectedNominalSpeedLevel) { | |
| 831 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
4 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setRatedHeatingCapacityAtSelectedNominalSpeedLevel( |
| 832 | 4 | ratedHeatingCapacityAtSelectedNominalSpeedLevel); | |
| 833 | } | ||
| 834 | |||
| 835 | 46 | void CoilHeatingDXVariableSpeed::autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel() { | |
| 836 |
1/1✓ Branch 3 taken 46 times.
|
46 | getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel(); |
| 837 | 46 | } | |
| 838 | |||
| 839 | 2 | bool CoilHeatingDXVariableSpeed::setRatedAirFlowRateAtSelectedNominalSpeedLevel(double ratedAirFlowRateAtSelectedNominalSpeedLevel) { | |
| 840 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
4 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setRatedAirFlowRateAtSelectedNominalSpeedLevel( |
| 841 | 4 | ratedAirFlowRateAtSelectedNominalSpeedLevel); | |
| 842 | } | ||
| 843 | |||
| 844 | 46 | void CoilHeatingDXVariableSpeed::autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel() { | |
| 845 |
1/1✓ Branch 3 taken 46 times.
|
46 | getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel(); |
| 846 | 46 | } | |
| 847 | |||
| 848 | 46 | bool CoilHeatingDXVariableSpeed::setEnergyPartLoadFractionCurve(const Curve& curve) { | |
| 849 |
1/1✓ Branch 3 taken 46 times.
|
46 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setEnergyPartLoadFractionCurve(curve); |
| 850 | } | ||
| 851 | |||
| 852 | 2 | bool CoilHeatingDXVariableSpeed::setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve) { | |
| 853 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
2 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setDefrostEnergyInputRatioFunctionofTemperatureCurve(curve); |
| 854 | } | ||
| 855 | |||
| 856 | ✗ | void CoilHeatingDXVariableSpeed::resetDefrostEnergyInputRatioFunctionofTemperatureCurve() { | |
| 857 | ✗ | getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->resetDefrostEnergyInputRatioFunctionofTemperatureCurve(); | |
| 858 | ✗ | } | |
| 859 | |||
| 860 | 48 | bool CoilHeatingDXVariableSpeed::setMinimumOutdoorDryBulbTemperatureforCompressorOperation( | |
| 861 | double minimumOutdoorDryBulbTemperatureforCompressorOperation) { | ||
| 862 |
1/1✓ Branch 3 taken 48 times.
|
96 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setMinimumOutdoorDryBulbTemperatureforCompressorOperation( |
| 863 | 96 | minimumOutdoorDryBulbTemperatureforCompressorOperation); | |
| 864 | } | ||
| 865 | |||
| 866 | 2 | bool CoilHeatingDXVariableSpeed::setOutdoorDryBulbTemperaturetoTurnOnCompressor(double outdoorDryBulbTemperaturetoTurnOnCompressor) { | |
| 867 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
4 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setOutdoorDryBulbTemperaturetoTurnOnCompressor( |
| 868 | 4 | outdoorDryBulbTemperaturetoTurnOnCompressor); | |
| 869 | } | ||
| 870 | |||
| 871 | 1 | void CoilHeatingDXVariableSpeed::resetOutdoorDryBulbTemperaturetoTurnOnCompressor() { | |
| 872 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->resetOutdoorDryBulbTemperaturetoTurnOnCompressor(); |
| 873 | 1 | } | |
| 874 | |||
| 875 | bool | ||
| 876 | 47 | CoilHeatingDXVariableSpeed::setMaximumOutdoorDryBulbTemperatureforDefrostOperation(double maximumOutdoorDryBulbTemperatureforDefrostOperation) { | |
| 877 |
1/1✓ Branch 3 taken 47 times.
|
94 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setMaximumOutdoorDryBulbTemperatureforDefrostOperation( |
| 878 | 94 | maximumOutdoorDryBulbTemperatureforDefrostOperation); | |
| 879 | } | ||
| 880 | |||
| 881 | 48 | bool CoilHeatingDXVariableSpeed::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) { | |
| 882 |
1/1✓ Branch 3 taken 48 times.
|
48 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setCrankcaseHeaterCapacity(crankcaseHeaterCapacity); |
| 883 | } | ||
| 884 | |||
| 885 | 48 | bool CoilHeatingDXVariableSpeed::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation( | |
| 886 | double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) { | ||
| 887 |
1/1✓ Branch 3 taken 48 times.
|
96 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation( |
| 888 | 96 | maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation); | |
| 889 | } | ||
| 890 | |||
| 891 | 48 | bool CoilHeatingDXVariableSpeed::setDefrostStrategy(const std::string& defrostStrategy) { | |
| 892 |
1/1✓ Branch 3 taken 48 times.
|
48 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setDefrostStrategy(defrostStrategy); |
| 893 | } | ||
| 894 | |||
| 895 | 48 | bool CoilHeatingDXVariableSpeed::setDefrostControl(const std::string& defrostControl) { | |
| 896 |
1/1✓ Branch 3 taken 48 times.
|
48 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setDefrostControl(defrostControl); |
| 897 | } | ||
| 898 | |||
| 899 | 48 | bool CoilHeatingDXVariableSpeed::setDefrostTimePeriodFraction(double defrostTimePeriodFraction) { | |
| 900 |
1/1✓ Branch 3 taken 48 times.
|
48 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setDefrostTimePeriodFraction(defrostTimePeriodFraction); |
| 901 | } | ||
| 902 | |||
| 903 | 3 | bool CoilHeatingDXVariableSpeed::setResistiveDefrostHeaterCapacity(double resistiveDefrostHeaterCapacity) { | |
| 904 |
2/2✓ Branch 3 taken 3 times.
✓ Branch 6 taken 3 times.
|
3 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setResistiveDefrostHeaterCapacity(resistiveDefrostHeaterCapacity); |
| 905 | } | ||
| 906 | |||
| 907 | 46 | void CoilHeatingDXVariableSpeed::autosizeResistiveDefrostHeaterCapacity() { | |
| 908 |
1/1✓ Branch 3 taken 46 times.
|
46 | getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->autosizeResistiveDefrostHeaterCapacity(); |
| 909 | 46 | } | |
| 910 | |||
| 911 | 12 | boost::optional<Curve> CoilHeatingDXVariableSpeed::crankcaseHeaterCapacityFunctionofTemperatureCurve() const { | |
| 912 |
1/1✓ Branch 3 taken 12 times.
|
12 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->crankcaseHeaterCapacityFunctionofTemperatureCurve(); |
| 913 | } | ||
| 914 | |||
| 915 | 2 | bool CoilHeatingDXVariableSpeed::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) { | |
| 916 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->setCrankcaseHeaterCapacityFunctionofTemperatureCurve(curve); |
| 917 | } | ||
| 918 | |||
| 919 | 1 | void CoilHeatingDXVariableSpeed::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() { | |
| 920 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->resetCrankcaseHeaterCapacityFunctionofTemperatureCurve(); |
| 921 | 1 | } | |
| 922 | |||
| 923 | 15 | std::vector<CoilHeatingDXVariableSpeedSpeedData> CoilHeatingDXVariableSpeed::speeds() const { | |
| 924 |
1/1✓ Branch 3 taken 15 times.
|
15 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->speeds(); |
| 925 | } | ||
| 926 | |||
| 927 | 5 | bool CoilHeatingDXVariableSpeed::addSpeed(const CoilHeatingDXVariableSpeedSpeedData& speed) { | |
| 928 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->addSpeed(speed); |
| 929 | } | ||
| 930 | |||
| 931 | ✗ | void CoilHeatingDXVariableSpeed::removeSpeed(const CoilHeatingDXVariableSpeedSpeedData& speed) { | |
| 932 | ✗ | getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->removeSpeed(speed); | |
| 933 | ✗ | } | |
| 934 | |||
| 935 | ✗ | void CoilHeatingDXVariableSpeed::removeAllSpeeds() { | |
| 936 | ✗ | getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->removeAllSpeeds(); | |
| 937 | ✗ | } | |
| 938 | |||
| 939 | ✗ | AirflowNetworkEquivalentDuct CoilHeatingDXVariableSpeed::getAirflowNetworkEquivalentDuct(double length, double diameter) { | |
| 940 | ✗ | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->getAirflowNetworkEquivalentDuct(length, diameter); | |
| 941 | } | ||
| 942 | |||
| 943 | ✗ | boost::optional<AirflowNetworkEquivalentDuct> CoilHeatingDXVariableSpeed::airflowNetworkEquivalentDuct() const { | |
| 944 | ✗ | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->airflowNetworkEquivalentDuct(); | |
| 945 | } | ||
| 946 | |||
| 947 | /// @cond | ||
| 948 | 32 | CoilHeatingDXVariableSpeed::CoilHeatingDXVariableSpeed(std::shared_ptr<detail::CoilHeatingDXVariableSpeed_Impl> impl) | |
| 949 |
1/1✓ Branch 3 taken 32 times.
|
32 | : StraightComponent(std::move(impl)) {} |
| 950 | /// @endcond | ||
| 951 | |||
| 952 | ✗ | boost::optional<double> CoilHeatingDXVariableSpeed::autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel() const { | |
| 953 | ✗ | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel(); | |
| 954 | } | ||
| 955 | |||
| 956 | ✗ | boost::optional<double> CoilHeatingDXVariableSpeed::autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel() const { | |
| 957 | ✗ | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel(); | |
| 958 | } | ||
| 959 | |||
| 960 | ✗ | boost::optional<double> CoilHeatingDXVariableSpeed::autosizedResistiveDefrostHeaterCapacity() const { | |
| 961 | ✗ | return getImpl<detail::CoilHeatingDXVariableSpeed_Impl>()->autosizedResistiveDefrostHeaterCapacity(); | |
| 962 | } | ||
| 963 | |||
| 964 | } // namespace model | ||
| 965 | } // namespace openstudio | ||
| 966 |