src/model/ZoneHVACUnitVentilator.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 "ZoneHVACUnitVentilator.hpp" | ||
| 7 | #include "ZoneHVACUnitVentilator_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Schedule.hpp" | ||
| 10 | #include "Schedule_Impl.hpp" | ||
| 11 | #include "HVACComponent.hpp" | ||
| 12 | #include "HVACComponent_Impl.hpp" | ||
| 13 | #include "Model.hpp" | ||
| 14 | #include "FanConstantVolume.hpp" | ||
| 15 | #include "WaterToAirComponent.hpp" | ||
| 16 | #include "WaterToAirComponent_Impl.hpp" | ||
| 17 | #include "ScheduleTypeLimits.hpp" | ||
| 18 | #include "ScheduleTypeRegistry.hpp" | ||
| 19 | |||
| 20 | #include <utilities/idd/IddFactory.hxx> | ||
| 21 | #include <utilities/idd/OS_ZoneHVAC_UnitVentilator_FieldEnums.hxx> | ||
| 22 | |||
| 23 | #include "../utilities/core/Assert.hpp" | ||
| 24 | #include "../utilities/data/DataEnums.hpp" | ||
| 25 | |||
| 26 | namespace openstudio { | ||
| 27 | namespace model { | ||
| 28 | |||
| 29 | namespace detail { | ||
| 30 | |||
| 31 | 9 | ZoneHVACUnitVentilator_Impl::ZoneHVACUnitVentilator_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 32 | 9 | : ZoneHVACComponent_Impl(idfObject, model, keepHandle) { | |
| 33 |
4/6✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 9 times.
✗ Branch 13 not taken.
|
9 | OS_ASSERT(idfObject.iddObject().type() == ZoneHVACUnitVentilator::iddObjectType()); |
| 34 | 9 | } | |
| 35 | |||
| 36 | ✗ | ZoneHVACUnitVentilator_Impl::ZoneHVACUnitVentilator_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, | |
| 37 | ✗ | bool keepHandle) | |
| 38 | ✗ | : ZoneHVACComponent_Impl(other, model, keepHandle) { | |
| 39 | ✗ | OS_ASSERT(other.iddObject().type() == ZoneHVACUnitVentilator::iddObjectType()); | |
| 40 | ✗ | } | |
| 41 | |||
| 42 | 12 | ZoneHVACUnitVentilator_Impl::ZoneHVACUnitVentilator_Impl(const ZoneHVACUnitVentilator_Impl& other, Model_Impl* model, bool keepHandle) | |
| 43 | 12 | : ZoneHVACComponent_Impl(other, model, keepHandle) {} | |
| 44 | |||
| 45 | ✗ | const std::vector<std::string>& ZoneHVACUnitVentilator_Impl::outputVariableNames() const { | |
| 46 | static const std::vector<std::string> result{ | ||
| 47 | "Zone Unit Ventilator Heating Rate", "Zone Unit Ventilator Heating Energy", "Zone Unit Ventilator Total Cooling Rate", | ||
| 48 | "Zone Unit Ventilator Total Cooling Energy", "Zone Unit Ventilator Sensible Cooling Rate", "Zone Unit Ventilator Sensible Cooling Energy", | ||
| 49 | "Zone Unit Ventilator Fan Electricity Rate", "Zone Unit Ventilator Fan Electricity Energy", "Zone Unit Ventilator Fan Availability Status", | ||
| 50 | ✗ | "Zone Unit Ventilator Fan Part Load Ratio"}; | |
| 51 | ✗ | return result; | |
| 52 | ✗ | } | |
| 53 | |||
| 54 | ✗ | IddObjectType ZoneHVACUnitVentilator_Impl::iddObjectType() const { | |
| 55 | ✗ | return ZoneHVACUnitVentilator::iddObjectType(); | |
| 56 | } | ||
| 57 | |||
| 58 | ✗ | std::vector<ScheduleTypeKey> ZoneHVACUnitVentilator_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 59 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 60 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 61 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 62 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 63 | ✗ | if (std::find(b, e, OS_ZoneHVAC_UnitVentilatorFields::AvailabilityScheduleName) != e) { | |
| 64 | ✗ | result.push_back(ScheduleTypeKey("ZoneHVACUnitVentilator", "Availability")); | |
| 65 | } | ||
| 66 | ✗ | if (std::find(b, e, OS_ZoneHVAC_UnitVentilatorFields::MinimumOutdoorAirScheduleName) != e) { | |
| 67 | ✗ | result.push_back(ScheduleTypeKey("ZoneHVACUnitVentilator", "Minimum Outdoor Air")); | |
| 68 | } | ||
| 69 | ✗ | if (std::find(b, e, OS_ZoneHVAC_UnitVentilatorFields::MaximumOutdoorAirFractionorTemperatureScheduleName) != e) { | |
| 70 | ✗ | result.push_back(ScheduleTypeKey("ZoneHVACUnitVentilator", "Maximum Outdoor Air Fraction or Temperature")); | |
| 71 | } | ||
| 72 | ✗ | if (std::find(b, e, OS_ZoneHVAC_UnitVentilatorFields::SupplyAirFanOperatingModeScheduleName) != e) { | |
| 73 | ✗ | result.push_back(ScheduleTypeKey("ZoneHVACUnitVentilator", "Supply Air Fan Operating Mode")); | |
| 74 | } | ||
| 75 | ✗ | return result; | |
| 76 | ✗ | } | |
| 77 | |||
| 78 | ✗ | Schedule ZoneHVACUnitVentilator_Impl::availabilitySchedule() const { | |
| 79 | ✗ | boost::optional<Schedule> value = optionalAvailabilitySchedule(); | |
| 80 | ✗ | if (!value) { | |
| 81 | ✗ | LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached."); | |
| 82 | } | ||
| 83 | ✗ | return value.get(); | |
| 84 | ✗ | } | |
| 85 | |||
| 86 | 6 | ModelObject ZoneHVACUnitVentilator_Impl::clone(Model model) const { | |
| 87 |
3/3✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
|
6 | auto objectClone = ZoneHVACComponent_Impl::clone(model).cast<ZoneHVACUnitVentilator>(); |
| 88 | |||
| 89 |
4/4✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 6 times.
|
6 | auto const supplyFanClone = this->supplyAirFan().clone(model).cast<HVACComponent>(); |
| 90 | |||
| 91 |
1/1✓ Branch 1 taken 6 times.
|
6 | objectClone.setSupplyAirFan(supplyFanClone); |
| 92 | |||
| 93 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | bool sameModel = model == this->model(); |
| 94 | |||
| 95 |
3/3✓ Branch 1 taken 6 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 3 times.
|
12 | if (auto const t_coolingCoil = coolingCoil()) { |
| 96 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | auto const coolingCoilClone = t_coolingCoil->clone(model).cast<HVACComponent>(); |
| 97 |
1/1✓ Branch 1 taken 3 times.
|
3 | objectClone.setCoolingCoil(coolingCoilClone); |
| 98 | |||
| 99 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
|
3 | if (sameModel) { |
| 100 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (auto waterToAirComponent = t_coolingCoil->optionalCast<WaterToAirComponent>()) { |
| 101 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 2 times.
|
4 | if (auto plant = waterToAirComponent->plantLoop()) { |
| 102 | ✗ | plant->addDemandBranchForComponent(coolingCoilClone); | |
| 103 | 2 | } | |
| 104 | 2 | } | |
| 105 | } | ||
| 106 | 9 | } | |
| 107 | |||
| 108 |
3/3✓ Branch 1 taken 6 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 3 times.
|
12 | if (auto const t_heatingCoil = heatingCoil()) { |
| 109 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | auto const heatingCoilClone = t_heatingCoil->clone(model).cast<HVACComponent>(); |
| 110 |
1/1✓ Branch 1 taken 3 times.
|
3 | objectClone.setHeatingCoil(heatingCoilClone); |
| 111 | |||
| 112 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
|
3 | if (sameModel) { |
| 113 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (auto waterToAirComponent = t_heatingCoil->optionalCast<WaterToAirComponent>()) { |
| 114 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 2 times.
|
4 | if (auto plant = waterToAirComponent->plantLoop()) { |
| 115 | ✗ | plant->addDemandBranchForComponent(heatingCoilClone); | |
| 116 | 2 | } | |
| 117 | 2 | } | |
| 118 | } | ||
| 119 | 9 | } | |
| 120 | |||
| 121 | 12 | return std::move(objectClone); | |
| 122 | 6 | } | |
| 123 | |||
| 124 | 1 | std::vector<IdfObject> ZoneHVACUnitVentilator_Impl::remove() { | |
| 125 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
2 | if (auto const waterHeatingCoil = heatingCoil()) { |
| 126 | ✗ | if (auto waterToAirComponent = waterHeatingCoil->optionalCast<WaterToAirComponent>()) { | |
| 127 | ✗ | if (auto plant = waterToAirComponent->plantLoop()) { | |
| 128 | ✗ | plant->removeDemandBranchWithComponent(waterHeatingCoil.get()); | |
| 129 | ✗ | } | |
| 130 | ✗ | } | |
| 131 | 1 | } | |
| 132 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
2 | if (auto const waterCoolingCoil = coolingCoil()) { |
| 133 | ✗ | if (auto waterToAirComponent = waterCoolingCoil->optionalCast<WaterToAirComponent>()) { | |
| 134 | ✗ | if (auto plant = waterToAirComponent->plantLoop()) { | |
| 135 | ✗ | plant->removeDemandBranchWithComponent(waterCoolingCoil.get()); | |
| 136 | ✗ | } | |
| 137 | ✗ | } | |
| 138 | 1 | } | |
| 139 | 1 | return ZoneHVACComponent_Impl::remove(); | |
| 140 | } | ||
| 141 | |||
| 142 | 1 | std::vector<ModelObject> ZoneHVACUnitVentilator_Impl::children() const { | |
| 143 | 1 | std::vector<ModelObject> result; | |
| 144 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (auto const intermediate = optionalSupplyAirFan()) { |
| 145 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | result.push_back(intermediate.get()); |
| 146 | 1 | } | |
| 147 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
2 | if (auto const intermediate = heatingCoil()) { |
| 148 | ✗ | result.push_back(intermediate.get()); | |
| 149 | 1 | } | |
| 150 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
2 | if (auto const intermediate = coolingCoil()) { |
| 151 | ✗ | result.push_back(intermediate.get()); | |
| 152 | 1 | } | |
| 153 | 1 | return result; | |
| 154 | ✗ | } | |
| 155 | |||
| 156 | 24 | unsigned ZoneHVACUnitVentilator_Impl::inletPort() const { | |
| 157 | 24 | return OS_ZoneHVAC_UnitVentilatorFields::AirInletNodeName; | |
| 158 | } | ||
| 159 | |||
| 160 | 18 | unsigned ZoneHVACUnitVentilator_Impl::outletPort() const { | |
| 161 | 18 | return OS_ZoneHVAC_UnitVentilatorFields::AirOutletNodeName; | |
| 162 | } | ||
| 163 | |||
| 164 | 2 | boost::optional<double> ZoneHVACUnitVentilator_Impl::maximumSupplyAirFlowRate() const { | |
| 165 | 2 | return getDouble(OS_ZoneHVAC_UnitVentilatorFields::MaximumSupplyAirFlowRate, true); | |
| 166 | } | ||
| 167 | |||
| 168 | 4 | bool ZoneHVACUnitVentilator_Impl::isMaximumSupplyAirFlowRateAutosized() const { | |
| 169 | 4 | bool result = false; | |
| 170 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_ZoneHVAC_UnitVentilatorFields::MaximumSupplyAirFlowRate, true); |
| 171 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (value) { |
| 172 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
8 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 173 | } | ||
| 174 | 4 | return result; | |
| 175 | 4 | } | |
| 176 | |||
| 177 | 4 | std::string ZoneHVACUnitVentilator_Impl::outdoorAirControlType() const { | |
| 178 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_ZoneHVAC_UnitVentilatorFields::OutdoorAirControlType, true); |
| 179 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 180 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | return value.get(); |
| 181 | 4 | } | |
| 182 | |||
| 183 | 2 | boost::optional<double> ZoneHVACUnitVentilator_Impl::minimumOutdoorAirFlowRate() const { | |
| 184 | 2 | return getDouble(OS_ZoneHVAC_UnitVentilatorFields::MinimumOutdoorAirFlowRate, true); | |
| 185 | } | ||
| 186 | |||
| 187 | 4 | bool ZoneHVACUnitVentilator_Impl::isMinimumOutdoorAirFlowRateAutosized() const { | |
| 188 | 4 | bool result = false; | |
| 189 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_ZoneHVAC_UnitVentilatorFields::MinimumOutdoorAirFlowRate, true); |
| 190 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (value) { |
| 191 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
8 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 192 | } | ||
| 193 | 4 | return result; | |
| 194 | 4 | } | |
| 195 | |||
| 196 | ✗ | Schedule ZoneHVACUnitVentilator_Impl::minimumOutdoorAirSchedule() const { | |
| 197 | ✗ | boost::optional<Schedule> value = optionalMinimumOutdoorAirSchedule(); | |
| 198 | ✗ | if (!value) { | |
| 199 | ✗ | LOG_AND_THROW(briefDescription() << " does not have an Minimum Outdoor Air Schedule attached."); | |
| 200 | } | ||
| 201 | ✗ | return value.get(); | |
| 202 | ✗ | } | |
| 203 | |||
| 204 | 2 | boost::optional<double> ZoneHVACUnitVentilator_Impl::maximumOutdoorAirFlowRate() const { | |
| 205 | 2 | return getDouble(OS_ZoneHVAC_UnitVentilatorFields::MaximumOutdoorAirFlowRate, true); | |
| 206 | } | ||
| 207 | |||
| 208 | 4 | bool ZoneHVACUnitVentilator_Impl::isMaximumOutdoorAirFlowRateAutosized() const { | |
| 209 | 4 | bool result = false; | |
| 210 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_ZoneHVAC_UnitVentilatorFields::MaximumOutdoorAirFlowRate, true); |
| 211 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (value) { |
| 212 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
8 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 213 | } | ||
| 214 | 4 | return result; | |
| 215 | 4 | } | |
| 216 | |||
| 217 | ✗ | Schedule ZoneHVACUnitVentilator_Impl::maximumOutdoorAirFractionorTemperatureSchedule() const { | |
| 218 | ✗ | boost::optional<Schedule> value = optionalMaximumOutdoorAirFractionorTemperatureSchedule(); | |
| 219 | ✗ | if (!value) { | |
| 220 | ✗ | LOG_AND_THROW(briefDescription() << " does not have an Maximum Outdoor Air Fractionor Temperature Schedule attached."); | |
| 221 | } | ||
| 222 | ✗ | return value.get(); | |
| 223 | ✗ | } | |
| 224 | |||
| 225 | 19 | HVACComponent ZoneHVACUnitVentilator_Impl::supplyAirFan() const { | |
| 226 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<HVACComponent> value = optionalSupplyAirFan(); |
| 227 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
|
19 | if (!value) { |
| 228 | ✗ | LOG_AND_THROW(briefDescription() << " does not have an Supply Air Fan attached."); | |
| 229 | } | ||
| 230 |
2/2✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
|
38 | return value.get(); |
| 231 | 19 | } | |
| 232 | |||
| 233 | ✗ | boost::optional<Schedule> ZoneHVACUnitVentilator_Impl::supplyAirFanOperatingModeSchedule() const { | |
| 234 | ✗ | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneHVAC_UnitVentilatorFields::SupplyAirFanOperatingModeScheduleName); | |
| 235 | } | ||
| 236 | |||
| 237 | 16 | boost::optional<HVACComponent> ZoneHVACUnitVentilator_Impl::heatingCoil() const { | |
| 238 |
2/2✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
|
16 | return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_ZoneHVAC_UnitVentilatorFields::HeatingCoilName); |
| 239 | } | ||
| 240 | |||
| 241 | 4 | double ZoneHVACUnitVentilator_Impl::heatingConvergenceTolerance() const { | |
| 242 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ZoneHVAC_UnitVentilatorFields::HeatingConvergenceTolerance, true); |
| 243 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 244 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 245 | } | ||
| 246 | |||
| 247 | 17 | boost::optional<HVACComponent> ZoneHVACUnitVentilator_Impl::coolingCoil() const { | |
| 248 |
2/2✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
|
17 | return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_ZoneHVAC_UnitVentilatorFields::CoolingCoilName); |
| 249 | } | ||
| 250 | |||
| 251 | 4 | double ZoneHVACUnitVentilator_Impl::coolingConvergenceTolerance() const { | |
| 252 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ZoneHVAC_UnitVentilatorFields::CoolingConvergenceTolerance, true); |
| 253 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 254 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 255 | } | ||
| 256 | |||
| 257 | // boost::optional<ModelObject> ZoneHVACUnitVentilator_Impl::availabilityManagerList() const { | ||
| 258 | // return getObject<ModelObject>().getModelObjectTarget<ModelObject>(OS_ZoneHVAC_UnitVentilatorFields::AvailabilityManagerListName); | ||
| 259 | // } | ||
| 260 | |||
| 261 | // boost::optional<ModelObject> ZoneHVACUnitVentilator_Impl::designSpecificationZoneHVACSizingObject() const { | ||
| 262 | // return getObject<ModelObject>().getModelObjectTarget<ModelObject>(OS_ZoneHVAC_UnitVentilatorFields::DesignSpecificationZoneHVACSizingObjectName); | ||
| 263 | // } | ||
| 264 | |||
| 265 | 9 | bool ZoneHVACUnitVentilator_Impl::setAvailabilitySchedule(Schedule& schedule) { | |
| 266 |
3/3✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
|
36 | bool result = setSchedule(OS_ZoneHVAC_UnitVentilatorFields::AvailabilityScheduleName, "ZoneHVACUnitVentilator", "Availability", schedule); |
| 267 | 9 | return result; | |
| 268 | } | ||
| 269 | |||
| 270 | 2 | bool ZoneHVACUnitVentilator_Impl::setMaximumSupplyAirFlowRate(boost::optional<double> maximumSupplyAirFlowRate) { | |
| 271 | 2 | bool result(false); | |
| 272 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (maximumSupplyAirFlowRate) { |
| 273 | 2 | result = setDouble(OS_ZoneHVAC_UnitVentilatorFields::MaximumSupplyAirFlowRate, maximumSupplyAirFlowRate.get()); | |
| 274 | } | ||
| 275 | 2 | return result; | |
| 276 | } | ||
| 277 | |||
| 278 | 9 | void ZoneHVACUnitVentilator_Impl::autosizeMaximumSupplyAirFlowRate() { | |
| 279 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
18 | bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::MaximumSupplyAirFlowRate, "autosize"); |
| 280 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
|
9 | OS_ASSERT(result); |
| 281 | 9 | } | |
| 282 | |||
| 283 | 11 | bool ZoneHVACUnitVentilator_Impl::setOutdoorAirControlType(const std::string& outdoorAirControlType) { | |
| 284 | 11 | bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::OutdoorAirControlType, outdoorAirControlType); | |
| 285 | 11 | return result; | |
| 286 | } | ||
| 287 | |||
| 288 | 2 | bool ZoneHVACUnitVentilator_Impl::setMinimumOutdoorAirFlowRate(boost::optional<double> minimumOutdoorAirFlowRate) { | |
| 289 | 2 | bool result(false); | |
| 290 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (minimumOutdoorAirFlowRate) { |
| 291 | 2 | result = setDouble(OS_ZoneHVAC_UnitVentilatorFields::MinimumOutdoorAirFlowRate, minimumOutdoorAirFlowRate.get()); | |
| 292 | } | ||
| 293 | 2 | return result; | |
| 294 | } | ||
| 295 | |||
| 296 | 9 | void ZoneHVACUnitVentilator_Impl::autosizeMinimumOutdoorAirFlowRate() { | |
| 297 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
18 | bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::MinimumOutdoorAirFlowRate, "autosize"); |
| 298 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
|
9 | OS_ASSERT(result); |
| 299 | 9 | } | |
| 300 | |||
| 301 | 9 | bool ZoneHVACUnitVentilator_Impl::setMinimumOutdoorAirSchedule(Schedule& schedule) { | |
| 302 | bool result = | ||
| 303 |
3/3✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
|
36 | setSchedule(OS_ZoneHVAC_UnitVentilatorFields::MinimumOutdoorAirScheduleName, "ZoneHVACUnitVentilator", "Minimum Outdoor Air", schedule); |
| 304 | 9 | return result; | |
| 305 | } | ||
| 306 | |||
| 307 | 2 | bool ZoneHVACUnitVentilator_Impl::setMaximumOutdoorAirFlowRate(boost::optional<double> maximumOutdoorAirFlowRate) { | |
| 308 | 2 | bool result(false); | |
| 309 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (maximumOutdoorAirFlowRate) { |
| 310 | 2 | result = setDouble(OS_ZoneHVAC_UnitVentilatorFields::MaximumOutdoorAirFlowRate, maximumOutdoorAirFlowRate.get()); | |
| 311 | } | ||
| 312 | 2 | return result; | |
| 313 | } | ||
| 314 | |||
| 315 | 9 | void ZoneHVACUnitVentilator_Impl::autosizeMaximumOutdoorAirFlowRate() { | |
| 316 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
18 | bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::MaximumOutdoorAirFlowRate, "autosize"); |
| 317 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
|
9 | OS_ASSERT(result); |
| 318 | 9 | } | |
| 319 | |||
| 320 | 9 | bool ZoneHVACUnitVentilator_Impl::setMaximumOutdoorAirFractionorTemperatureSchedule(Schedule& schedule) { | |
| 321 |
3/3✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
|
36 | bool result = setSchedule(OS_ZoneHVAC_UnitVentilatorFields::MaximumOutdoorAirFractionorTemperatureScheduleName, "ZoneHVACUnitVentilator", |
| 322 | "Maximum Outdoor Air Fraction or Temperature", schedule); | ||
| 323 | 9 | return result; | |
| 324 | } | ||
| 325 | |||
| 326 | 15 | bool ZoneHVACUnitVentilator_Impl::setSupplyAirFan(const HVACComponent& supplyAirFan) { | |
| 327 |
2/2✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
|
15 | bool result = setPointer(OS_ZoneHVAC_UnitVentilatorFields::SupplyAirFanName, supplyAirFan.handle()); |
| 328 | 15 | return result; | |
| 329 | } | ||
| 330 | |||
| 331 | ✗ | bool ZoneHVACUnitVentilator_Impl::setSupplyAirFanOperatingModeSchedule(Schedule& schedule) { | |
| 332 | ✗ | bool result = setSchedule(OS_ZoneHVAC_UnitVentilatorFields::SupplyAirFanOperatingModeScheduleName, "ZoneHVACUnitVentilator", | |
| 333 | "Supply Air Fan Operating Mode", schedule); | ||
| 334 | ✗ | return result; | |
| 335 | } | ||
| 336 | |||
| 337 | ✗ | void ZoneHVACUnitVentilator_Impl::resetSupplyAirFanOperatingModeSchedule() { | |
| 338 | ✗ | bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::SupplyAirFanOperatingModeScheduleName, ""); | |
| 339 | ✗ | OS_ASSERT(result); | |
| 340 | ✗ | } | |
| 341 | |||
| 342 | 5 | bool ZoneHVACUnitVentilator_Impl::setHeatingCoil(const boost::optional<HVACComponent>& heatingCoil) { | |
| 343 | 5 | bool result(false); | |
| 344 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | if (heatingCoil) { |
| 345 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | result = setPointer(OS_ZoneHVAC_UnitVentilatorFields::HeatingCoilName, heatingCoil.get().handle()); |
| 346 | } else { | ||
| 347 | ✗ | resetHeatingCoil(); | |
| 348 | ✗ | result = true; | |
| 349 | } | ||
| 350 | 5 | return result; | |
| 351 | } | ||
| 352 | |||
| 353 | ✗ | void ZoneHVACUnitVentilator_Impl::resetHeatingCoil() { | |
| 354 | ✗ | bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::HeatingCoilName, ""); | |
| 355 | ✗ | OS_ASSERT(result); | |
| 356 | ✗ | } | |
| 357 | |||
| 358 | 11 | bool ZoneHVACUnitVentilator_Impl::setHeatingConvergenceTolerance(double heatingConvergenceTolerance) { | |
| 359 | 11 | bool result = setDouble(OS_ZoneHVAC_UnitVentilatorFields::HeatingConvergenceTolerance, heatingConvergenceTolerance); | |
| 360 | 11 | return result; | |
| 361 | } | ||
| 362 | |||
| 363 | 6 | bool ZoneHVACUnitVentilator_Impl::setCoolingCoil(const boost::optional<HVACComponent>& coolingCoil) { | |
| 364 | 6 | bool result(false); | |
| 365 |
1/2✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
|
6 | if (coolingCoil) { |
| 366 |
3/3✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
|
6 | result = setPointer(OS_ZoneHVAC_UnitVentilatorFields::CoolingCoilName, coolingCoil.get().handle()); |
| 367 | } else { | ||
| 368 | ✗ | resetCoolingCoil(); | |
| 369 | ✗ | result = true; | |
| 370 | } | ||
| 371 | 6 | return result; | |
| 372 | } | ||
| 373 | |||
| 374 | ✗ | void ZoneHVACUnitVentilator_Impl::resetCoolingCoil() { | |
| 375 | ✗ | bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::CoolingCoilName, ""); | |
| 376 | ✗ | OS_ASSERT(result); | |
| 377 | ✗ | } | |
| 378 | |||
| 379 | 11 | bool ZoneHVACUnitVentilator_Impl::setCoolingConvergenceTolerance(double coolingConvergenceTolerance) { | |
| 380 | 11 | bool result = setDouble(OS_ZoneHVAC_UnitVentilatorFields::CoolingConvergenceTolerance, coolingConvergenceTolerance); | |
| 381 | 11 | return result; | |
| 382 | } | ||
| 383 | |||
| 384 | // bool ZoneHVACUnitVentilator_Impl::setAvailabilityManagerList(const boost::optional<ModelObject>& systemAvailabilityManagerLists) { | ||
| 385 | // bool result(false); | ||
| 386 | // if (systemAvailabilityManagerLists) { | ||
| 387 | // result = setPointer(OS_ZoneHVAC_UnitVentilatorFields::AvailabilityManagerListName, systemAvailabilityManagerLists.get().handle()); | ||
| 388 | // } | ||
| 389 | // else { | ||
| 390 | // resetAvailabilityManagerList(); | ||
| 391 | // result = true; | ||
| 392 | // } | ||
| 393 | // return result; | ||
| 394 | // } | ||
| 395 | |||
| 396 | // void ZoneHVACUnitVentilator_Impl::resetAvailabilityManagerList() { | ||
| 397 | // bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::AvailabilityManagerListName, ""); | ||
| 398 | // OS_ASSERT(result); | ||
| 399 | // } | ||
| 400 | |||
| 401 | // bool ZoneHVACUnitVentilator_Impl::setDesignSpecificationZoneHVACSizingObject(const boost::optional<ModelObject>& designSpecificationZoneHVACSizingName) { | ||
| 402 | // bool result(false); | ||
| 403 | // if (designSpecificationZoneHVACSizingName) { | ||
| 404 | // result = setPointer(OS_ZoneHVAC_UnitVentilatorFields::DesignSpecificationZoneHVACSizingObjectName, designSpecificationZoneHVACSizingName.get().handle()); | ||
| 405 | // } | ||
| 406 | // else { | ||
| 407 | // resetDesignSpecificationZoneHVACSizingObject(); | ||
| 408 | // result = true; | ||
| 409 | // } | ||
| 410 | // return result; | ||
| 411 | // } | ||
| 412 | |||
| 413 | // void ZoneHVACUnitVentilator_Impl::resetDesignSpecificationZoneHVACSizingObject() { | ||
| 414 | // bool result = setString(OS_ZoneHVAC_UnitVentilatorFields::DesignSpecificationZoneHVACSizingObjectName, ""); | ||
| 415 | // OS_ASSERT(result); | ||
| 416 | // } | ||
| 417 | |||
| 418 | ✗ | boost::optional<Schedule> ZoneHVACUnitVentilator_Impl::optionalAvailabilitySchedule() const { | |
| 419 | ✗ | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneHVAC_UnitVentilatorFields::AvailabilityScheduleName); | |
| 420 | } | ||
| 421 | |||
| 422 | ✗ | boost::optional<Schedule> ZoneHVACUnitVentilator_Impl::optionalMinimumOutdoorAirSchedule() const { | |
| 423 | ✗ | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneHVAC_UnitVentilatorFields::MinimumOutdoorAirScheduleName); | |
| 424 | } | ||
| 425 | |||
| 426 | ✗ | boost::optional<Schedule> ZoneHVACUnitVentilator_Impl::optionalMaximumOutdoorAirFractionorTemperatureSchedule() const { | |
| 427 | ✗ | return getObject<ModelObject>().getModelObjectTarget<Schedule>( | |
| 428 | ✗ | OS_ZoneHVAC_UnitVentilatorFields::MaximumOutdoorAirFractionorTemperatureScheduleName); | |
| 429 | } | ||
| 430 | |||
| 431 | 20 | boost::optional<HVACComponent> ZoneHVACUnitVentilator_Impl::optionalSupplyAirFan() const { | |
| 432 |
2/2✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
|
20 | return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_ZoneHVAC_UnitVentilatorFields::SupplyAirFanName); |
| 433 | } | ||
| 434 | |||
| 435 | ✗ | boost::optional<double> ZoneHVACUnitVentilator_Impl::autosizedMaximumSupplyAirFlowRate() const { | |
| 436 | ✗ | return getAutosizedValue("Design Size Maximum Supply Air Flow Rate", "m3/s"); | |
| 437 | } | ||
| 438 | |||
| 439 | ✗ | boost::optional<double> ZoneHVACUnitVentilator_Impl::autosizedMinimumOutdoorAirFlowRate() const { | |
| 440 | ✗ | return getAutosizedValue("Design Size Minimum Outdoor Air Flow Rate", "m3/s"); | |
| 441 | } | ||
| 442 | |||
| 443 | ✗ | boost::optional<double> ZoneHVACUnitVentilator_Impl::autosizedMaximumOutdoorAirFlowRate() const { | |
| 444 | ✗ | return getAutosizedValue("Design Size Maximum Outdoor Air Flow Rate", "m3/s"); | |
| 445 | } | ||
| 446 | |||
| 447 | ✗ | void ZoneHVACUnitVentilator_Impl::autosize() { | |
| 448 | ✗ | autosizeMaximumSupplyAirFlowRate(); | |
| 449 | ✗ | autosizeMinimumOutdoorAirFlowRate(); | |
| 450 | ✗ | autosizeMaximumOutdoorAirFlowRate(); | |
| 451 | ✗ | } | |
| 452 | |||
| 453 | ✗ | void ZoneHVACUnitVentilator_Impl::applySizingValues() { | |
| 454 | ✗ | boost::optional<double> val; | |
| 455 | ✗ | val = autosizedMaximumSupplyAirFlowRate(); | |
| 456 | ✗ | if (val) { | |
| 457 | ✗ | setMaximumSupplyAirFlowRate(val.get()); | |
| 458 | } | ||
| 459 | |||
| 460 | ✗ | val = autosizedMinimumOutdoorAirFlowRate(); | |
| 461 | ✗ | if (val) { | |
| 462 | ✗ | setMinimumOutdoorAirFlowRate(val.get()); | |
| 463 | } | ||
| 464 | |||
| 465 | ✗ | val = autosizedMaximumOutdoorAirFlowRate(); | |
| 466 | ✗ | if (val) { | |
| 467 | ✗ | setMaximumOutdoorAirFlowRate(val.get()); | |
| 468 | } | ||
| 469 | ✗ | } | |
| 470 | |||
| 471 | ✗ | ComponentType ZoneHVACUnitVentilator_Impl::componentType() const { | |
| 472 | ✗ | const bool has_cooling = coolingCoil().is_initialized(); | |
| 473 | ✗ | const bool has_heating = heatingCoil().is_initialized(); | |
| 474 | |||
| 475 | ✗ | if (has_cooling && has_heating) { | |
| 476 | ✗ | return ComponentType::Both; | |
| 477 | ✗ | } else if (has_cooling) { | |
| 478 | ✗ | return ComponentType::Cooling; | |
| 479 | ✗ | } else if (has_heating) { | |
| 480 | ✗ | return ComponentType::Heating; | |
| 481 | } | ||
| 482 | ✗ | return ComponentType::None; | |
| 483 | } | ||
| 484 | |||
| 485 | ✗ | std::vector<FuelType> ZoneHVACUnitVentilator_Impl::coolingFuelTypes() const { | |
| 486 | ✗ | std::set<FuelType> result; | |
| 487 | ✗ | if (auto cc_ = coolingCoil()) { | |
| 488 | ✗ | for (auto ft : cc_->coolingFuelTypes()) { | |
| 489 | ✗ | result.insert(ft); | |
| 490 | ✗ | } | |
| 491 | ✗ | } | |
| 492 | ✗ | return {result.begin(), result.end()}; | |
| 493 | ✗ | } | |
| 494 | |||
| 495 | ✗ | std::vector<FuelType> ZoneHVACUnitVentilator_Impl::heatingFuelTypes() const { | |
| 496 | ✗ | std::set<FuelType> result; | |
| 497 | ✗ | if (auto hc_ = heatingCoil()) { | |
| 498 | ✗ | for (auto ft : hc_->heatingFuelTypes()) { | |
| 499 | ✗ | result.insert(ft); | |
| 500 | ✗ | } | |
| 501 | ✗ | } | |
| 502 | ✗ | return {result.begin(), result.end()}; | |
| 503 | ✗ | } | |
| 504 | |||
| 505 | ✗ | std::vector<AppGFuelType> ZoneHVACUnitVentilator_Impl::appGHeatingFuelTypes() const { | |
| 506 | ✗ | std::set<AppGFuelType> result; | |
| 507 | ✗ | if (auto hc_ = heatingCoil()) { | |
| 508 | ✗ | for (auto ft : hc_->appGHeatingFuelTypes()) { | |
| 509 | ✗ | result.insert(ft); | |
| 510 | ✗ | } | |
| 511 | ✗ | } | |
| 512 | ✗ | return {result.begin(), result.end()}; | |
| 513 | ✗ | } | |
| 514 | |||
| 515 | } // namespace detail | ||
| 516 | |||
| 517 | 6 | ZoneHVACUnitVentilator::ZoneHVACUnitVentilator(const Model& model) : ZoneHVACComponent(ZoneHVACUnitVentilator::iddObjectType(), model) { | |
| 518 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 6 times.
✗ Branch 5 not taken.
|
6 | OS_ASSERT(getImpl<detail::ZoneHVACUnitVentilator_Impl>()); |
| 519 | |||
| 520 |
1/1✓ Branch 1 taken 6 times.
|
6 | auto always_on = model.alwaysOnDiscreteSchedule(); |
| 521 |
1/1✓ Branch 1 taken 6 times.
|
6 | auto always_off = model.alwaysOffDiscreteSchedule(); |
| 522 |
1/1✓ Branch 1 taken 6 times.
|
6 | auto supplyAirFan = FanConstantVolume(model); |
| 523 | |||
| 524 | 6 | bool ok = true; | |
| 525 |
1/1✓ Branch 1 taken 6 times.
|
6 | ok = setAvailabilitySchedule(always_on); |
| 526 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
|
6 | OS_ASSERT(ok); |
| 527 |
1/1✓ Branch 1 taken 6 times.
|
6 | autosizeMaximumSupplyAirFlowRate(); |
| 528 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | ok = setOutdoorAirControlType("VariablePercent"); |
| 529 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
|
6 | OS_ASSERT(ok); |
| 530 |
1/1✓ Branch 1 taken 6 times.
|
6 | autosizeMinimumOutdoorAirFlowRate(); |
| 531 |
1/1✓ Branch 1 taken 6 times.
|
6 | ok = setMinimumOutdoorAirSchedule(always_off); |
| 532 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
|
6 | OS_ASSERT(ok); |
| 533 |
1/1✓ Branch 1 taken 6 times.
|
6 | autosizeMaximumOutdoorAirFlowRate(); |
| 534 |
1/1✓ Branch 1 taken 6 times.
|
6 | ok = setMaximumOutdoorAirFractionorTemperatureSchedule(always_on); |
| 535 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
|
6 | OS_ASSERT(ok); |
| 536 |
1/1✓ Branch 1 taken 6 times.
|
6 | ok = setSupplyAirFan(supplyAirFan); |
| 537 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
|
6 | OS_ASSERT(ok); |
| 538 |
1/1✓ Branch 1 taken 6 times.
|
6 | ok = setHeatingConvergenceTolerance(0.001); |
| 539 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
|
6 | OS_ASSERT(ok); |
| 540 |
1/1✓ Branch 1 taken 6 times.
|
6 | ok = setCoolingConvergenceTolerance(0.001); |
| 541 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
|
6 | OS_ASSERT(ok); |
| 542 | 6 | } | |
| 543 | |||
| 544 | 3 | ZoneHVACUnitVentilator::ZoneHVACUnitVentilator(const Model& model, const HVACComponent& supplyAirFan) | |
| 545 | 3 | : ZoneHVACComponent(ZoneHVACUnitVentilator::iddObjectType(), model) { | |
| 546 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 3 times.
✗ Branch 5 not taken.
|
3 | OS_ASSERT(getImpl<detail::ZoneHVACUnitVentilator_Impl>()); |
| 547 | |||
| 548 |
1/1✓ Branch 1 taken 3 times.
|
3 | auto always_on = model.alwaysOnDiscreteSchedule(); |
| 549 |
1/1✓ Branch 1 taken 3 times.
|
3 | auto always_off = model.alwaysOffDiscreteSchedule(); |
| 550 | |||
| 551 | 3 | bool ok = true; | |
| 552 |
1/1✓ Branch 1 taken 3 times.
|
3 | ok = setAvailabilitySchedule(always_on); |
| 553 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
|
3 | OS_ASSERT(ok); |
| 554 |
1/1✓ Branch 1 taken 3 times.
|
3 | autosizeMaximumSupplyAirFlowRate(); |
| 555 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | ok = setOutdoorAirControlType("VariablePercent"); |
| 556 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
|
3 | OS_ASSERT(ok); |
| 557 |
1/1✓ Branch 1 taken 3 times.
|
3 | autosizeMinimumOutdoorAirFlowRate(); |
| 558 |
1/1✓ Branch 1 taken 3 times.
|
3 | ok = setMinimumOutdoorAirSchedule(always_off); |
| 559 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
|
3 | OS_ASSERT(ok); |
| 560 |
1/1✓ Branch 1 taken 3 times.
|
3 | autosizeMaximumOutdoorAirFlowRate(); |
| 561 |
1/1✓ Branch 1 taken 3 times.
|
3 | ok = setMaximumOutdoorAirFractionorTemperatureSchedule(always_on); |
| 562 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
|
3 | OS_ASSERT(ok); |
| 563 |
1/1✓ Branch 1 taken 3 times.
|
3 | ok = setSupplyAirFan(supplyAirFan); |
| 564 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
|
3 | OS_ASSERT(ok); |
| 565 |
1/1✓ Branch 1 taken 3 times.
|
3 | ok = setHeatingConvergenceTolerance(0.001); |
| 566 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
|
3 | OS_ASSERT(ok); |
| 567 |
1/1✓ Branch 1 taken 3 times.
|
3 | ok = setCoolingConvergenceTolerance(0.001); |
| 568 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
|
3 | OS_ASSERT(ok); |
| 569 | 3 | } | |
| 570 | |||
| 571 | 7847 | IddObjectType ZoneHVACUnitVentilator::iddObjectType() { | |
| 572 |
1/1✓ Branch 1 taken 7847 times.
|
7847 | return {IddObjectType::OS_ZoneHVAC_UnitVentilator}; |
| 573 | } | ||
| 574 | |||
| 575 | ✗ | std::vector<std::string> ZoneHVACUnitVentilator::outdoorAirControlTypeValues() { | |
| 576 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_ZoneHVAC_UnitVentilatorFields::OutdoorAirControlType); | |
| 577 | } | ||
| 578 | |||
| 579 | ✗ | Schedule ZoneHVACUnitVentilator::availabilitySchedule() const { | |
| 580 | ✗ | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->availabilitySchedule(); | |
| 581 | } | ||
| 582 | |||
| 583 | 2 | boost::optional<double> ZoneHVACUnitVentilator::maximumSupplyAirFlowRate() const { | |
| 584 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->maximumSupplyAirFlowRate(); |
| 585 | } | ||
| 586 | |||
| 587 | 4 | bool ZoneHVACUnitVentilator::isMaximumSupplyAirFlowRateAutosized() const { | |
| 588 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->isMaximumSupplyAirFlowRateAutosized(); |
| 589 | } | ||
| 590 | |||
| 591 | 4 | std::string ZoneHVACUnitVentilator::outdoorAirControlType() const { | |
| 592 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->outdoorAirControlType(); |
| 593 | } | ||
| 594 | |||
| 595 | 2 | boost::optional<double> ZoneHVACUnitVentilator::minimumOutdoorAirFlowRate() const { | |
| 596 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->minimumOutdoorAirFlowRate(); |
| 597 | } | ||
| 598 | |||
| 599 | 4 | bool ZoneHVACUnitVentilator::isMinimumOutdoorAirFlowRateAutosized() const { | |
| 600 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->isMinimumOutdoorAirFlowRateAutosized(); |
| 601 | } | ||
| 602 | |||
| 603 | ✗ | Schedule ZoneHVACUnitVentilator::minimumOutdoorAirSchedule() const { | |
| 604 | ✗ | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->minimumOutdoorAirSchedule(); | |
| 605 | } | ||
| 606 | |||
| 607 | 2 | boost::optional<double> ZoneHVACUnitVentilator::maximumOutdoorAirFlowRate() const { | |
| 608 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->maximumOutdoorAirFlowRate(); |
| 609 | } | ||
| 610 | |||
| 611 | 4 | bool ZoneHVACUnitVentilator::isMaximumOutdoorAirFlowRateAutosized() const { | |
| 612 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->isMaximumOutdoorAirFlowRateAutosized(); |
| 613 | } | ||
| 614 | |||
| 615 | ✗ | Schedule ZoneHVACUnitVentilator::maximumOutdoorAirFractionorTemperatureSchedule() const { | |
| 616 | ✗ | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->maximumOutdoorAirFractionorTemperatureSchedule(); | |
| 617 | } | ||
| 618 | |||
| 619 | 13 | HVACComponent ZoneHVACUnitVentilator::supplyAirFan() const { | |
| 620 |
1/1✓ Branch 3 taken 13 times.
|
13 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->supplyAirFan(); |
| 621 | } | ||
| 622 | |||
| 623 | ✗ | boost::optional<Schedule> ZoneHVACUnitVentilator::supplyAirFanOperatingModeSchedule() const { | |
| 624 | ✗ | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->supplyAirFanOperatingModeSchedule(); | |
| 625 | } | ||
| 626 | |||
| 627 | 8 | boost::optional<HVACComponent> ZoneHVACUnitVentilator::heatingCoil() const { | |
| 628 |
1/1✓ Branch 3 taken 8 times.
|
8 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->heatingCoil(); |
| 629 | } | ||
| 630 | |||
| 631 | 4 | double ZoneHVACUnitVentilator::heatingConvergenceTolerance() const { | |
| 632 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->heatingConvergenceTolerance(); |
| 633 | } | ||
| 634 | |||
| 635 | 9 | boost::optional<HVACComponent> ZoneHVACUnitVentilator::coolingCoil() const { | |
| 636 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->coolingCoil(); |
| 637 | } | ||
| 638 | |||
| 639 | 4 | double ZoneHVACUnitVentilator::coolingConvergenceTolerance() const { | |
| 640 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->coolingConvergenceTolerance(); |
| 641 | } | ||
| 642 | |||
| 643 | // boost::optional<ModelObject> ZoneHVACUnitVentilator::availabilityManagerList() const { | ||
| 644 | // return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->availabilityManagerList(); | ||
| 645 | // } | ||
| 646 | |||
| 647 | // boost::optional<ModelObject> ZoneHVACUnitVentilator::designSpecificationZoneHVACSizingObject() const { | ||
| 648 | // return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->designSpecificationZoneHVACSizingObject(); | ||
| 649 | // } | ||
| 650 | |||
| 651 | 9 | bool ZoneHVACUnitVentilator::setAvailabilitySchedule(Schedule& schedule) { | |
| 652 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setAvailabilitySchedule(schedule); |
| 653 | } | ||
| 654 | |||
| 655 | 2 | bool ZoneHVACUnitVentilator::setMaximumSupplyAirFlowRate(double maximumSupplyAirFlowRate) { | |
| 656 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
2 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setMaximumSupplyAirFlowRate(maximumSupplyAirFlowRate); |
| 657 | } | ||
| 658 | |||
| 659 | 9 | void ZoneHVACUnitVentilator::autosizeMaximumSupplyAirFlowRate() { | |
| 660 |
1/1✓ Branch 3 taken 9 times.
|
9 | getImpl<detail::ZoneHVACUnitVentilator_Impl>()->autosizeMaximumSupplyAirFlowRate(); |
| 661 | 9 | } | |
| 662 | |||
| 663 | 11 | bool ZoneHVACUnitVentilator::setOutdoorAirControlType(const std::string& outdoorAirControlType) { | |
| 664 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setOutdoorAirControlType(outdoorAirControlType); |
| 665 | } | ||
| 666 | |||
| 667 | 2 | bool ZoneHVACUnitVentilator::setMinimumOutdoorAirFlowRate(double minimumOutdoorAirFlowRate) { | |
| 668 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
2 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setMinimumOutdoorAirFlowRate(minimumOutdoorAirFlowRate); |
| 669 | } | ||
| 670 | |||
| 671 | 9 | void ZoneHVACUnitVentilator::autosizeMinimumOutdoorAirFlowRate() { | |
| 672 |
1/1✓ Branch 3 taken 9 times.
|
9 | getImpl<detail::ZoneHVACUnitVentilator_Impl>()->autosizeMinimumOutdoorAirFlowRate(); |
| 673 | 9 | } | |
| 674 | |||
| 675 | 9 | bool ZoneHVACUnitVentilator::setMinimumOutdoorAirSchedule(Schedule& schedule) { | |
| 676 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setMinimumOutdoorAirSchedule(schedule); |
| 677 | } | ||
| 678 | |||
| 679 | 2 | bool ZoneHVACUnitVentilator::setMaximumOutdoorAirFlowRate(double maximumOutdoorAirFlowRate) { | |
| 680 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
2 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setMaximumOutdoorAirFlowRate(maximumOutdoorAirFlowRate); |
| 681 | } | ||
| 682 | |||
| 683 | 9 | void ZoneHVACUnitVentilator::autosizeMaximumOutdoorAirFlowRate() { | |
| 684 |
1/1✓ Branch 3 taken 9 times.
|
9 | getImpl<detail::ZoneHVACUnitVentilator_Impl>()->autosizeMaximumOutdoorAirFlowRate(); |
| 685 | 9 | } | |
| 686 | |||
| 687 | 9 | bool ZoneHVACUnitVentilator::setMaximumOutdoorAirFractionorTemperatureSchedule(Schedule& schedule) { | |
| 688 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setMaximumOutdoorAirFractionorTemperatureSchedule(schedule); |
| 689 | } | ||
| 690 | |||
| 691 | 15 | bool ZoneHVACUnitVentilator::setSupplyAirFan(const HVACComponent& supplyAirFan) { | |
| 692 |
1/1✓ Branch 3 taken 15 times.
|
15 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setSupplyAirFan(supplyAirFan); |
| 693 | } | ||
| 694 | |||
| 695 | ✗ | bool ZoneHVACUnitVentilator::setSupplyAirFanOperatingModeSchedule(Schedule& schedule) { | |
| 696 | ✗ | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setSupplyAirFanOperatingModeSchedule(schedule); | |
| 697 | } | ||
| 698 | |||
| 699 | ✗ | void ZoneHVACUnitVentilator::resetSupplyAirFanOperatingModeSchedule() { | |
| 700 | ✗ | getImpl<detail::ZoneHVACUnitVentilator_Impl>()->resetSupplyAirFanOperatingModeSchedule(); | |
| 701 | ✗ | } | |
| 702 | |||
| 703 | 5 | bool ZoneHVACUnitVentilator::setHeatingCoil(const HVACComponent& heatingCoil) { | |
| 704 |
2/2✓ Branch 3 taken 5 times.
✓ Branch 6 taken 5 times.
|
5 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setHeatingCoil(heatingCoil); |
| 705 | } | ||
| 706 | |||
| 707 | ✗ | void ZoneHVACUnitVentilator::resetHeatingCoil() { | |
| 708 | ✗ | getImpl<detail::ZoneHVACUnitVentilator_Impl>()->resetHeatingCoil(); | |
| 709 | ✗ | } | |
| 710 | |||
| 711 | 11 | bool ZoneHVACUnitVentilator::setHeatingConvergenceTolerance(double heatingConvergenceTolerance) { | |
| 712 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setHeatingConvergenceTolerance(heatingConvergenceTolerance); |
| 713 | } | ||
| 714 | |||
| 715 | 6 | bool ZoneHVACUnitVentilator::setCoolingCoil(const HVACComponent& coolingCoil) { | |
| 716 |
2/2✓ Branch 3 taken 6 times.
✓ Branch 6 taken 6 times.
|
6 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setCoolingCoil(coolingCoil); |
| 717 | } | ||
| 718 | |||
| 719 | ✗ | void ZoneHVACUnitVentilator::resetCoolingCoil() { | |
| 720 | ✗ | getImpl<detail::ZoneHVACUnitVentilator_Impl>()->resetCoolingCoil(); | |
| 721 | ✗ | } | |
| 722 | |||
| 723 | 11 | bool ZoneHVACUnitVentilator::setCoolingConvergenceTolerance(double coolingConvergenceTolerance) { | |
| 724 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setCoolingConvergenceTolerance(coolingConvergenceTolerance); |
| 725 | } | ||
| 726 | |||
| 727 | // bool ZoneHVACUnitVentilator::setAvailabilityManagerList(const ModelObject& systemAvailabilityManagerLists) { | ||
| 728 | // return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setAvailabilityManagerList(systemAvailabilityManagerLists); | ||
| 729 | // } | ||
| 730 | |||
| 731 | // void ZoneHVACUnitVentilator::resetAvailabilityManagerList() { | ||
| 732 | // getImpl<detail::ZoneHVACUnitVentilator_Impl>()->resetAvailabilityManagerList(); | ||
| 733 | // } | ||
| 734 | |||
| 735 | // bool ZoneHVACUnitVentilator::setDesignSpecificationZoneHVACSizingObject(const ModelObject& designSpecificationZoneHVACSizingName) { | ||
| 736 | // return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->setDesignSpecificationZoneHVACSizingObject(designSpecificationZoneHVACSizingName); | ||
| 737 | // } | ||
| 738 | |||
| 739 | // void ZoneHVACUnitVentilator::resetDesignSpecificationZoneHVACSizingObject() { | ||
| 740 | // getImpl<detail::ZoneHVACUnitVentilator_Impl>()->resetDesignSpecificationZoneHVACSizingObject(); | ||
| 741 | // } | ||
| 742 | |||
| 743 | /// @cond | ||
| 744 |
1/1✓ Branch 3 taken 14 times.
|
14 | ZoneHVACUnitVentilator::ZoneHVACUnitVentilator(std::shared_ptr<detail::ZoneHVACUnitVentilator_Impl> impl) : ZoneHVACComponent(std::move(impl)) {} |
| 745 | /// @endcond | ||
| 746 | |||
| 747 | ✗ | boost::optional<double> ZoneHVACUnitVentilator::autosizedMaximumSupplyAirFlowRate() const { | |
| 748 | ✗ | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->autosizedMaximumSupplyAirFlowRate(); | |
| 749 | } | ||
| 750 | |||
| 751 | ✗ | boost::optional<double> ZoneHVACUnitVentilator::autosizedMinimumOutdoorAirFlowRate() const { | |
| 752 | ✗ | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->autosizedMinimumOutdoorAirFlowRate(); | |
| 753 | } | ||
| 754 | |||
| 755 | ✗ | boost::optional<double> ZoneHVACUnitVentilator::autosizedMaximumOutdoorAirFlowRate() const { | |
| 756 | ✗ | return getImpl<detail::ZoneHVACUnitVentilator_Impl>()->autosizedMaximumOutdoorAirFlowRate(); | |
| 757 | } | ||
| 758 | |||
| 759 | } // namespace model | ||
| 760 | } // namespace openstudio | ||
| 761 |