src/model/ElectricEquipmentITEAirCooled.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 "ElectricEquipmentITEAirCooled.hpp" | ||
| 7 | #include "ElectricEquipmentITEAirCooled_Impl.hpp" | ||
| 8 | |||
| 9 | #include "ElectricEquipmentITEAirCooledDefinition.hpp" | ||
| 10 | #include "ElectricEquipmentITEAirCooledDefinition_Impl.hpp" | ||
| 11 | #include "Schedule.hpp" | ||
| 12 | #include "Schedule_Impl.hpp" | ||
| 13 | #include "Space.hpp" | ||
| 14 | #include "Space_Impl.hpp" | ||
| 15 | #include "SpaceType.hpp" | ||
| 16 | #include "SpaceType_Impl.hpp" | ||
| 17 | #include "DefaultScheduleSet.hpp" | ||
| 18 | #include "DefaultScheduleSet_Impl.hpp" | ||
| 19 | #include "LifeCycleCost.hpp" | ||
| 20 | #include "Model.hpp" | ||
| 21 | #include "ScheduleTypeLimits.hpp" | ||
| 22 | #include "ScheduleTypeRegistry.hpp" | ||
| 23 | |||
| 24 | #include <utilities/idd/IddEnums.hxx> | ||
| 25 | #include <utilities/idd/OS_ElectricEquipment_ITE_AirCooled_FieldEnums.hxx> | ||
| 26 | |||
| 27 | #include "../utilities/units/Unit.hpp" | ||
| 28 | |||
| 29 | #include "../utilities/core/Assert.hpp" | ||
| 30 | #include "../utilities/core/DeprecatedHelpers.hpp" | ||
| 31 | |||
| 32 | namespace openstudio { | ||
| 33 | namespace model { | ||
| 34 | |||
| 35 | namespace detail { | ||
| 36 | |||
| 37 | 24 | ElectricEquipmentITEAirCooled_Impl::ElectricEquipmentITEAirCooled_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 38 | 24 | : SpaceLoadInstance_Impl(idfObject, model, keepHandle) { | |
| 39 |
4/6✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 24 times.
✗ Branch 13 not taken.
|
24 | OS_ASSERT(idfObject.iddObject().type() == ElectricEquipmentITEAirCooled::iddObjectType()); |
| 40 | 24 | } | |
| 41 | |||
| 42 | ✗ | ElectricEquipmentITEAirCooled_Impl::ElectricEquipmentITEAirCooled_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, | |
| 43 | ✗ | bool keepHandle) | |
| 44 | ✗ | : SpaceLoadInstance_Impl(other, model, keepHandle) { | |
| 45 | ✗ | OS_ASSERT(other.iddObject().type() == ElectricEquipmentITEAirCooled::iddObjectType()); | |
| 46 | ✗ | } | |
| 47 | |||
| 48 | 53 | ElectricEquipmentITEAirCooled_Impl::ElectricEquipmentITEAirCooled_Impl(const ElectricEquipmentITEAirCooled_Impl& other, Model_Impl* model, | |
| 49 | 53 | bool keepHandle) | |
| 50 | 53 | : SpaceLoadInstance_Impl(other, model, keepHandle) {} | |
| 51 | |||
| 52 | ✗ | const std::vector<std::string>& ElectricEquipmentITEAirCooled_Impl::outputVariableNames() const { | |
| 53 | static const std::vector<std::string> result{ | ||
| 54 | // IT Equipment | ||
| 55 | "ITE CPU Electricity Rate ", | ||
| 56 | "ITE Fan Electricity Rate ", | ||
| 57 | "ITE UPS Electricity Rate ", | ||
| 58 | "ITE CPU Electricity Rate at Design Inlet Conditions ", | ||
| 59 | "ITE Fan Electricity Rate at Design Inlet Conditions ", | ||
| 60 | "ITE UPS Heat Gain to Zone Rate ", | ||
| 61 | "ITE Total Heat Gain to Zone Rate ", | ||
| 62 | "ITE CPU Electricity Energy ", | ||
| 63 | "ITE Fan Electricity Energy ", | ||
| 64 | "ITE UPS Electricity Energy ", | ||
| 65 | "ITE CPU Electricity Energy at Design Inlet Conditions ", | ||
| 66 | "ITE Fan Electricity Energy at Design Inlet Conditions ", | ||
| 67 | "ITE UPS Heat Gain to Zone Energy ", | ||
| 68 | "ITE Total Heat Gain to Zone Energy ", | ||
| 69 | "ITE Standard Density Air Volume Flow Rate ", | ||
| 70 | "ITE Current Density Air Volume Flow Rate ", | ||
| 71 | "ITE Air Mass Flow Rate ", | ||
| 72 | "ITE Air Inlet Dry-Bulb Temperature ", | ||
| 73 | "ITE Air Inlet Dewpoint Temperature ", | ||
| 74 | "ITE Air Inlet Relative Humidity ", | ||
| 75 | "ITE Air Outlet Dry-Bulb Temperature ", | ||
| 76 | "ITE Supply Heat Index ", | ||
| 77 | "ITE Air Inlet Operating Range Exceeded Time ", | ||
| 78 | "ITE Air Inlet Dry-Bulb Temperature Above Operating Range Time ", | ||
| 79 | "ITE Air Inlet Dry-Bulb Temperature Below Operating Range Time ", | ||
| 80 | "ITE Air Inlet Dewpoint Temperature Above Operating Range Time ", | ||
| 81 | "ITE Air Inlet Dewpoint Temperature Below Operating Range Time ", | ||
| 82 | "ITE Air Inlet Relative Humidity Above Operating Range Time ", | ||
| 83 | "ITE Air Inlet Relative Humidity Below Operating Range Time ", | ||
| 84 | "ITE Air Inlet Dry-Bulb Temperature Difference Above Operating Range ", | ||
| 85 | "ITE Air Inlet Dry-Bulb Temperature Difference Below Operating Range ", | ||
| 86 | "ITE Air Inlet Dewpoint Temperature Difference Above Operating Range ", | ||
| 87 | "ITE Air Inlet Dewpoint Temperature Difference Below Operating Range ", | ||
| 88 | "ITE Air Inlet Relative Humidity Difference Above Operating Range ", | ||
| 89 | "ITE Air Inlet Relative Humidity Difference Below Operating Range " | ||
| 90 | |||
| 91 | // Reported in ThermalZone | ||
| 92 | //"Zone ITE Adjusted Return Air Temperature ", | ||
| 93 | //"Zone ITE CPU Electricity Rate ", | ||
| 94 | //"Zone ITE Fan Electricity Rate ", | ||
| 95 | //"Zone ITE UPS Electricity Rate ", | ||
| 96 | //"Zone ITE CPU Electricity Rate at Design Inlet Conditions ", | ||
| 97 | //"Zone ITE Fan Electricity Rate at Design Inlet Conditions ", | ||
| 98 | //"Zone ITE UPS Heat Gain to Zone Rate ", | ||
| 99 | //"Zone ITE Total Heat Gain to Zone Rate ", | ||
| 100 | //"Zone ITE CPU Electricity Energy ", | ||
| 101 | //"Zone ITE Fan Electricity Energy ", | ||
| 102 | //"Zone ITE UPS Electricity Energy ", | ||
| 103 | //"Zone ITE CPU Electricity Energy at Design Inlet Conditions ", | ||
| 104 | //"Zone ITE Fan Electricity Energy at Design Inlet Conditions ", | ||
| 105 | //"Zone ITE UPS Heat Gain to Zone Energy ", | ||
| 106 | //"Zone ITE Total Heat Gain to Zone Energy ", | ||
| 107 | //"Zone ITE Standard Density Air Volume Flow Rate ", | ||
| 108 | //"Zone ITE Air Mass Flow Rate ", | ||
| 109 | //"Zone ITE Average Supply Heat Index ", | ||
| 110 | //"Zone ITE Any Air Inlet Operating Range Exceeded Time ", | ||
| 111 | //"Zone ITE Any Air Inlet Dry-Bulb Temperature Above Operating Range Time ", | ||
| 112 | //"Zone ITE Any Air Inlet Dry-Bulb Temperature Below Operating Range Time ", | ||
| 113 | //"Zone ITE Any Air Inlet Dewpoint Temperature Above Operating Range Time ", | ||
| 114 | //"Zone ITE Any Air Inlet Dewpoint Temperature Below Operating Range Time ", | ||
| 115 | //"Zone ITE Any Air Inlet Relative Humidity Above Operating Range Time ", | ||
| 116 | //"Zone ITE Any Air Inlet Relative Humidity Below Operating Range Time " | ||
| 117 | ✗ | }; | |
| 118 | ✗ | return result; | |
| 119 | ✗ | } | |
| 120 | |||
| 121 | ✗ | IddObjectType ElectricEquipmentITEAirCooled_Impl::iddObjectType() const { | |
| 122 | ✗ | return ElectricEquipmentITEAirCooled::iddObjectType(); | |
| 123 | } | ||
| 124 | |||
| 125 | ✗ | std::vector<ScheduleTypeKey> ElectricEquipmentITEAirCooled_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 126 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 127 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 128 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 129 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 130 | ✗ | if (std::find(b, e, OS_ElectricEquipment_ITE_AirCooledFields::DesignPowerInputScheduleName) != e) { | |
| 131 | ✗ | result.push_back(ScheduleTypeKey("ElectricEquipmentITEAirCooled", "Design Power Input")); | |
| 132 | } | ||
| 133 | ✗ | if (std::find(b, e, OS_ElectricEquipment_ITE_AirCooledFields::CPULoadingScheduleName) != e) { | |
| 134 | ✗ | result.push_back(ScheduleTypeKey("ElectricEquipmentITEAirCooled", "CPU Loading")); | |
| 135 | } | ||
| 136 | ✗ | return result; | |
| 137 | ✗ | } | |
| 138 | |||
| 139 | 16 | bool ElectricEquipmentITEAirCooled_Impl::hardSize() { | |
| 140 |
1/1✓ Branch 1 taken 16 times.
|
16 | boost::optional<Space> space = this->space(); |
| 141 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 16 times.
|
16 | if (!space) { |
| 142 | ✗ | return false; | |
| 143 | } | ||
| 144 | |||
| 145 |
1/1✓ Branch 1 taken 16 times.
|
16 | this->makeUnique(); |
| 146 | |||
| 147 |
1/1✓ Branch 1 taken 16 times.
|
16 | ElectricEquipmentITEAirCooledDefinition electricEquipmentITEAirCooledDefinition = this->electricEquipmentITEAirCooledDefinition(); |
| 148 |
2/3✓ Branch 1 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 16 times.
|
16 | for (LifeCycleCost& cost : electricEquipmentITEAirCooledDefinition.lifeCycleCosts()) { |
| 149 | ✗ | cost.convertToCostPerEach(); | |
| 150 | 16 | } | |
| 151 | |||
| 152 |
1/1✓ Branch 1 taken 16 times.
|
16 | boost::optional<double> designLevel = electricEquipmentITEAirCooledDefinition.designLevel(); |
| 153 |
2/2✓ Branch 0 taken 11 times.
✓ Branch 1 taken 5 times.
|
16 | if (designLevel) { |
| 154 | 11 | return true; | |
| 155 | } | ||
| 156 | |||
| 157 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<double> wattsperSpaceFloorArea = electricEquipmentITEAirCooledDefinition.wattsperSpaceFloorArea(); |
| 158 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | if (wattsperSpaceFloorArea) { |
| 159 |
4/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
|
5 | return electricEquipmentITEAirCooledDefinition.setDesignLevel(*wattsperSpaceFloorArea * space->floorArea()); |
| 160 | } | ||
| 161 | |||
| 162 | ✗ | return false; | |
| 163 | 16 | } | |
| 164 | |||
| 165 | 20 | bool ElectricEquipmentITEAirCooled_Impl::hardApplySchedules() { | |
| 166 | 20 | bool result = true; | |
| 167 | |||
| 168 | // optional in EnergyPlus | ||
| 169 |
1/1✓ Branch 1 taken 20 times.
|
20 | boost::optional<Schedule> designPowerInputSchedule = this->designPowerInputSchedule(); |
| 170 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 20 times.
|
20 | if (designPowerInputSchedule) { |
| 171 | ✗ | result = result && this->setDesignPowerInputSchedule(*designPowerInputSchedule); | |
| 172 | } | ||
| 173 | |||
| 174 | // optional in EnergyPlus | ||
| 175 |
1/1✓ Branch 1 taken 20 times.
|
20 | boost::optional<Schedule> cPULoadingSchedule = this->cPULoadingSchedule(); |
| 176 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 20 times.
|
20 | if (cPULoadingSchedule) { |
| 177 | ✗ | result = result && this->setCPULoadingSchedule(*cPULoadingSchedule); | |
| 178 | } | ||
| 179 | |||
| 180 | 20 | return result; | |
| 181 | 20 | } | |
| 182 | |||
| 183 | 48 | double ElectricEquipmentITEAirCooled_Impl::multiplier() const { | |
| 184 |
1/1✓ Branch 1 taken 48 times.
|
48 | boost::optional<double> value = getDouble(OS_ElectricEquipment_ITE_AirCooledFields::Multiplier, true); |
| 185 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 48 times.
✗ Branch 4 not taken.
|
48 | OS_ASSERT(value); |
| 186 |
1/1✓ Branch 1 taken 48 times.
|
96 | return value.get(); |
| 187 | } | ||
| 188 | |||
| 189 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::isMultiplierDefaulted() const { | |
| 190 | ✗ | return isEmpty(OS_ElectricEquipment_ITE_AirCooledFields::Multiplier); | |
| 191 | } | ||
| 192 | |||
| 193 | 1 | bool ElectricEquipmentITEAirCooled_Impl::isAbsolute() const { | |
| 194 |
1/1✓ Branch 1 taken 1 time.
|
1 | ElectricEquipmentITEAirCooledDefinition definition = electricEquipmentITEAirCooledDefinition(); |
| 195 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
2 | if (definition.designLevel()) { |
| 196 | ✗ | return true; | |
| 197 | } | ||
| 198 | 1 | return false; | |
| 199 | 1 | } | |
| 200 | |||
| 201 | 171 | ElectricEquipmentITEAirCooledDefinition ElectricEquipmentITEAirCooled_Impl::electricEquipmentITEAirCooledDefinition() const { | |
| 202 |
2/2✓ Branch 1 taken 171 times.
✓ Branch 4 taken 171 times.
|
171 | return this->definition().cast<ElectricEquipmentITEAirCooledDefinition>(); |
| 203 | } | ||
| 204 | |||
| 205 | 47 | boost::optional<Schedule> ElectricEquipmentITEAirCooled_Impl::designPowerInputSchedule() const { | |
| 206 | boost::optional<Schedule> result = | ||
| 207 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
47 | getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ElectricEquipment_ITE_AirCooledFields::DesignPowerInputScheduleName); |
| 208 |
1/2✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
|
47 | if (!result) { |
| 209 | // search upwards | ||
| 210 |
1/1✓ Branch 1 taken 47 times.
|
47 | OptionalSpace space = this->space(); |
| 211 |
1/1✓ Branch 1 taken 47 times.
|
47 | OptionalSpaceType spaceType = this->spaceType(); |
| 212 |
2/2✓ Branch 0 taken 43 times.
✓ Branch 1 taken 4 times.
|
47 | if (space) { |
| 213 |
3/3✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
✓ Branch 7 taken 43 times.
|
43 | result = space->getDefaultSchedule(DefaultScheduleType::DesignPowerInputScheduleName); |
| 214 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | } else if (spaceType) { |
| 215 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
4 | result = spaceType->getDefaultSchedule(DefaultScheduleType::DesignPowerInputScheduleName); |
| 216 | } | ||
| 217 | 47 | } | |
| 218 | 47 | return result; | |
| 219 | ✗ | } | |
| 220 | |||
| 221 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::isDesignPowerInputScheduleDefaulted() const { | |
| 222 | ✗ | return isEmpty(OS_ElectricEquipment_ITE_AirCooledFields::DesignPowerInputScheduleName); | |
| 223 | } | ||
| 224 | |||
| 225 | 47 | boost::optional<Schedule> ElectricEquipmentITEAirCooled_Impl::cPULoadingSchedule() const { | |
| 226 | boost::optional<Schedule> result = | ||
| 227 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
47 | getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ElectricEquipment_ITE_AirCooledFields::CPULoadingScheduleName); |
| 228 |
1/2✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
|
47 | if (!result) { |
| 229 | // search upwards | ||
| 230 |
1/1✓ Branch 1 taken 47 times.
|
47 | OptionalSpace space = this->space(); |
| 231 |
1/1✓ Branch 1 taken 47 times.
|
47 | OptionalSpaceType spaceType = this->spaceType(); |
| 232 |
2/2✓ Branch 0 taken 43 times.
✓ Branch 1 taken 4 times.
|
47 | if (space) { |
| 233 |
3/3✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
✓ Branch 7 taken 43 times.
|
43 | result = space->getDefaultSchedule(DefaultScheduleType::CPULoadingScheduleName); |
| 234 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | } else if (spaceType) { |
| 235 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
4 | result = spaceType->getDefaultSchedule(DefaultScheduleType::CPULoadingScheduleName); |
| 236 | } | ||
| 237 | 47 | } | |
| 238 | 47 | return result; | |
| 239 | ✗ | } | |
| 240 | |||
| 241 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::isCPULoadingScheduleDefaulted() const { | |
| 242 | ✗ | return isEmpty(OS_ElectricEquipment_ITE_AirCooledFields::CPULoadingScheduleName); | |
| 243 | } | ||
| 244 | |||
| 245 | 54 | std::string ElectricEquipmentITEAirCooled_Impl::cPUEndUseSubcategory() const { | |
| 246 |
1/1✓ Branch 1 taken 54 times.
|
54 | boost::optional<std::string> value = getString(OS_ElectricEquipment_ITE_AirCooledFields::CPUEndUseSubcategory, true); |
| 247 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 54 times.
✗ Branch 4 not taken.
|
54 | OS_ASSERT(value); |
| 248 |
2/2✓ Branch 1 taken 54 times.
✓ Branch 4 taken 54 times.
|
108 | return value.get(); |
| 249 | 54 | } | |
| 250 | |||
| 251 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::isCPUEndUseSubcategoryDefaulted() const { | |
| 252 | ✗ | return isEmpty(OS_ElectricEquipment_ITE_AirCooledFields::CPUEndUseSubcategory); | |
| 253 | } | ||
| 254 | |||
| 255 | 54 | std::string ElectricEquipmentITEAirCooled_Impl::fanEndUseSubcategory() const { | |
| 256 |
1/1✓ Branch 1 taken 54 times.
|
54 | boost::optional<std::string> value = getString(OS_ElectricEquipment_ITE_AirCooledFields::FanEndUseSubcategory, true); |
| 257 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 54 times.
✗ Branch 4 not taken.
|
54 | OS_ASSERT(value); |
| 258 |
2/2✓ Branch 1 taken 54 times.
✓ Branch 4 taken 54 times.
|
108 | return value.get(); |
| 259 | 54 | } | |
| 260 | |||
| 261 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::isFanEndUseSubcategoryDefaulted() const { | |
| 262 | ✗ | return isEmpty(OS_ElectricEquipment_ITE_AirCooledFields::FanEndUseSubcategory); | |
| 263 | } | ||
| 264 | |||
| 265 | 54 | std::string ElectricEquipmentITEAirCooled_Impl::electricPowerSupplyEndUseSubcategory() const { | |
| 266 |
1/1✓ Branch 1 taken 54 times.
|
54 | boost::optional<std::string> value = getString(OS_ElectricEquipment_ITE_AirCooledFields::ElectricPowerSupplyEndUseSubcategory, true); |
| 267 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 54 times.
✗ Branch 4 not taken.
|
54 | OS_ASSERT(value); |
| 268 |
2/2✓ Branch 1 taken 54 times.
✓ Branch 4 taken 54 times.
|
108 | return value.get(); |
| 269 | 54 | } | |
| 270 | |||
| 271 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::isElectricPowerSupplyEndUseSubcategoryDefaulted() const { | |
| 272 | ✗ | return isEmpty(OS_ElectricEquipment_ITE_AirCooledFields::ElectricPowerSupplyEndUseSubcategory); | |
| 273 | } | ||
| 274 | |||
| 275 | 24 | bool ElectricEquipmentITEAirCooled_Impl::setElectricEquipmentITEAirCooledDefinition( | |
| 276 | const ElectricEquipmentITEAirCooledDefinition& electricEquipmentITEAirCooledDefinition) { | ||
| 277 |
3/3✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
|
24 | return this->setPointer(this->definitionIndex(), electricEquipmentITEAirCooledDefinition.handle()); |
| 278 | } | ||
| 279 | |||
| 280 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::setDefinition(const SpaceLoadDefinition& definition) { | |
| 281 | ✗ | bool result = false; | |
| 282 | boost::optional<ElectricEquipmentITEAirCooledDefinition> electricEquipmentITEAirCooledDefinition = | ||
| 283 | ✗ | definition.optionalCast<ElectricEquipmentITEAirCooledDefinition>(); | |
| 284 | ✗ | if (electricEquipmentITEAirCooledDefinition) { | |
| 285 | ✗ | result = setElectricEquipmentITEAirCooledDefinition(*electricEquipmentITEAirCooledDefinition); | |
| 286 | } | ||
| 287 | ✗ | return result; | |
| 288 | ✗ | } | |
| 289 | |||
| 290 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::setDesignPowerInputSchedule(Schedule& schedule) { | |
| 291 | ✗ | bool result = setSchedule(OS_ElectricEquipment_ITE_AirCooledFields::DesignPowerInputScheduleName, "ElectricEquipmentITEAirCooled", | |
| 292 | "Design Power Input", schedule); | ||
| 293 | ✗ | return result; | |
| 294 | } | ||
| 295 | |||
| 296 | ✗ | void ElectricEquipmentITEAirCooled_Impl::resetDesignPowerInputSchedule() { | |
| 297 | ✗ | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::DesignPowerInputScheduleName, ""); | |
| 298 | ✗ | OS_ASSERT(result); | |
| 299 | ✗ | } | |
| 300 | |||
| 301 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::setCPULoadingSchedule(Schedule& schedule) { | |
| 302 | bool result = | ||
| 303 | ✗ | setSchedule(OS_ElectricEquipment_ITE_AirCooledFields::CPULoadingScheduleName, "ElectricEquipmentITEAirCooled", "CPU Loading", schedule); | |
| 304 | ✗ | return result; | |
| 305 | } | ||
| 306 | |||
| 307 | ✗ | void ElectricEquipmentITEAirCooled_Impl::resetCPULoadingSchedule() { | |
| 308 | ✗ | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::CPULoadingScheduleName, ""); | |
| 309 | ✗ | OS_ASSERT(result); | |
| 310 | ✗ | } | |
| 311 | |||
| 312 | 1 | bool ElectricEquipmentITEAirCooled_Impl::setMultiplier(double multiplier) { | |
| 313 | 1 | bool result = setDouble(OS_ElectricEquipment_ITE_AirCooledFields::Multiplier, multiplier); | |
| 314 | 1 | return result; | |
| 315 | } | ||
| 316 | |||
| 317 | ✗ | void ElectricEquipmentITEAirCooled_Impl::resetMultiplier() { | |
| 318 | ✗ | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::Multiplier, ""); | |
| 319 | ✗ | OS_ASSERT(result); | |
| 320 | ✗ | } | |
| 321 | |||
| 322 | 1 | bool ElectricEquipmentITEAirCooled_Impl::setCPUEndUseSubcategory(const std::string& cPUEndUseSubcategory) { | |
| 323 | 1 | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::CPUEndUseSubcategory, cPUEndUseSubcategory); | |
| 324 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 325 | 1 | return result; | |
| 326 | } | ||
| 327 | |||
| 328 | ✗ | void ElectricEquipmentITEAirCooled_Impl::resetCPUEndUseSubcategory() { | |
| 329 | ✗ | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::CPUEndUseSubcategory, ""); | |
| 330 | ✗ | OS_ASSERT(result); | |
| 331 | ✗ | } | |
| 332 | |||
| 333 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::setFanEndUseSubcategory(const std::string& fanEndUseSubcategory) { | |
| 334 | ✗ | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::FanEndUseSubcategory, fanEndUseSubcategory); | |
| 335 | ✗ | OS_ASSERT(result); | |
| 336 | ✗ | return result; | |
| 337 | } | ||
| 338 | |||
| 339 | ✗ | void ElectricEquipmentITEAirCooled_Impl::resetFanEndUseSubcategory() { | |
| 340 | ✗ | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::FanEndUseSubcategory, ""); | |
| 341 | ✗ | OS_ASSERT(result); | |
| 342 | ✗ | } | |
| 343 | |||
| 344 | ✗ | bool ElectricEquipmentITEAirCooled_Impl::setElectricPowerSupplyEndUseSubcategory(const std::string& electricPowerSupplyEndUseSubcategory) { | |
| 345 | ✗ | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::ElectricPowerSupplyEndUseSubcategory, electricPowerSupplyEndUseSubcategory); | |
| 346 | ✗ | OS_ASSERT(result); | |
| 347 | ✗ | return result; | |
| 348 | } | ||
| 349 | |||
| 350 | ✗ | void ElectricEquipmentITEAirCooled_Impl::resetElectricPowerSupplyEndUseSubcategory() { | |
| 351 | ✗ | bool result = setString(OS_ElectricEquipment_ITE_AirCooledFields::ElectricPowerSupplyEndUseSubcategory, ""); | |
| 352 | ✗ | OS_ASSERT(result); | |
| 353 | ✗ | } | |
| 354 | |||
| 355 | 410 | int ElectricEquipmentITEAirCooled_Impl::spaceIndex() const { | |
| 356 | 410 | return OS_ElectricEquipment_ITE_AirCooledFields::SpaceorSpaceTypeName; | |
| 357 | } | ||
| 358 | |||
| 359 | 242 | int ElectricEquipmentITEAirCooled_Impl::definitionIndex() const { | |
| 360 | 242 | return OS_ElectricEquipment_ITE_AirCooledFields::ElectricEquipmentITEAirCooledDefinitionName; | |
| 361 | } | ||
| 362 | |||
| 363 | // Other functions | ||
| 364 | |||
| 365 | ✗ | boost::optional<double> ElectricEquipmentITEAirCooled_Impl::designLevel() const { | |
| 366 | ✗ | OptionalDouble result = electricEquipmentITEAirCooledDefinition().designLevel(); | |
| 367 | ✗ | if (result) { | |
| 368 | ✗ | return result.get() * multiplier(); | |
| 369 | } | ||
| 370 | ✗ | return result; | |
| 371 | } | ||
| 372 | |||
| 373 | 3 | boost::optional<double> ElectricEquipmentITEAirCooled_Impl::powerPerFloorArea() const { | |
| 374 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | OptionalDouble result = electricEquipmentITEAirCooledDefinition().wattsperSpaceFloorArea(); |
| 375 |
1/2✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
|
3 | if (result) { |
| 376 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | return result.get() * multiplier(); |
| 377 | } | ||
| 378 | ✗ | return result; | |
| 379 | } | ||
| 380 | |||
| 381 | 13 | double ElectricEquipmentITEAirCooled_Impl::getDesignLevel(double floorArea) const { | |
| 382 |
3/3✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
✓ Branch 7 taken 13 times.
|
13 | return electricEquipmentITEAirCooledDefinition().getDesignLevel(floorArea) * multiplier(); |
| 383 | } | ||
| 384 | |||
| 385 | 4 | double ElectricEquipmentITEAirCooled_Impl::getPowerPerFloorArea(double floorArea) const { | |
| 386 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
4 | return electricEquipmentITEAirCooledDefinition().getPowerPerFloorArea(floorArea) * multiplier(); |
| 387 | } | ||
| 388 | |||
| 389 | } // namespace detail | ||
| 390 | |||
| 391 | 24 | ElectricEquipmentITEAirCooled::ElectricEquipmentITEAirCooled(const ElectricEquipmentITEAirCooledDefinition& electricEquipmentITEAirCooledDefinition) | |
| 392 | 24 | : SpaceLoadInstance(ElectricEquipmentITEAirCooled::iddObjectType(), electricEquipmentITEAirCooledDefinition) { | |
| 393 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 24 times.
✗ Branch 5 not taken.
|
24 | OS_ASSERT(getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()); |
| 394 | |||
| 395 | // OS_ElectricEquipment_ITE_AirCooledFields::ElectricEquipmentITEAirCooledDefinitionName | ||
| 396 |
1/1✓ Branch 1 taken 24 times.
|
24 | bool ok = this->setElectricEquipmentITEAirCooledDefinition(electricEquipmentITEAirCooledDefinition); |
| 397 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 24 times.
✗ Branch 3 not taken.
|
24 | OS_ASSERT(ok); |
| 398 | 24 | } | |
| 399 | |||
| 400 | 11788 | IddObjectType ElectricEquipmentITEAirCooled::iddObjectType() { | |
| 401 |
1/1✓ Branch 1 taken 11788 times.
|
11788 | return {IddObjectType::OS_ElectricEquipment_ITE_AirCooled}; |
| 402 | } | ||
| 403 | |||
| 404 | 134 | ElectricEquipmentITEAirCooledDefinition ElectricEquipmentITEAirCooled::electricEquipmentITEAirCooledDefinition() const { | |
| 405 |
1/1✓ Branch 3 taken 134 times.
|
134 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->electricEquipmentITEAirCooledDefinition(); |
| 406 | } | ||
| 407 | |||
| 408 | 27 | boost::optional<Schedule> ElectricEquipmentITEAirCooled::designPowerInputSchedule() const { | |
| 409 |
1/1✓ Branch 3 taken 27 times.
|
27 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->designPowerInputSchedule(); |
| 410 | } | ||
| 411 | |||
| 412 | ✗ | bool ElectricEquipmentITEAirCooled::isDesignPowerInputScheduleDefaulted() const { | |
| 413 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->isDesignPowerInputScheduleDefaulted(); | |
| 414 | } | ||
| 415 | |||
| 416 | 27 | boost::optional<Schedule> ElectricEquipmentITEAirCooled::cPULoadingSchedule() const { | |
| 417 |
1/1✓ Branch 3 taken 27 times.
|
27 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->cPULoadingSchedule(); |
| 418 | } | ||
| 419 | |||
| 420 | ✗ | bool ElectricEquipmentITEAirCooled::isCPULoadingScheduleDefaulted() const { | |
| 421 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->isCPULoadingScheduleDefaulted(); | |
| 422 | } | ||
| 423 | |||
| 424 | 54 | std::string ElectricEquipmentITEAirCooled::cPUEndUseSubcategory() const { | |
| 425 |
1/1✓ Branch 3 taken 54 times.
|
54 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->cPUEndUseSubcategory(); |
| 426 | } | ||
| 427 | |||
| 428 | ✗ | bool ElectricEquipmentITEAirCooled::isCPUEndUseSubcategoryDefaulted() const { | |
| 429 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->isCPUEndUseSubcategoryDefaulted(); | |
| 430 | } | ||
| 431 | |||
| 432 | 54 | std::string ElectricEquipmentITEAirCooled::fanEndUseSubcategory() const { | |
| 433 |
1/1✓ Branch 3 taken 54 times.
|
54 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->fanEndUseSubcategory(); |
| 434 | } | ||
| 435 | |||
| 436 | ✗ | bool ElectricEquipmentITEAirCooled::isFanEndUseSubcategoryDefaulted() const { | |
| 437 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->isFanEndUseSubcategoryDefaulted(); | |
| 438 | } | ||
| 439 | |||
| 440 | 54 | std::string ElectricEquipmentITEAirCooled::electricPowerSupplyEndUseSubcategory() const { | |
| 441 |
1/1✓ Branch 3 taken 54 times.
|
54 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->electricPowerSupplyEndUseSubcategory(); |
| 442 | } | ||
| 443 | |||
| 444 | ✗ | bool ElectricEquipmentITEAirCooled::isElectricPowerSupplyEndUseSubcategoryDefaulted() const { | |
| 445 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->isElectricPowerSupplyEndUseSubcategoryDefaulted(); | |
| 446 | } | ||
| 447 | |||
| 448 | 24 | bool ElectricEquipmentITEAirCooled::setElectricEquipmentITEAirCooledDefinition( | |
| 449 | const ElectricEquipmentITEAirCooledDefinition& electricEquipmentITEAirCooledDefinition) { | ||
| 450 |
1/1✓ Branch 3 taken 24 times.
|
24 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->setElectricEquipmentITEAirCooledDefinition(electricEquipmentITEAirCooledDefinition); |
| 451 | } | ||
| 452 | |||
| 453 | ✗ | bool ElectricEquipmentITEAirCooled::setDesignPowerInputSchedule(Schedule& schedule) { | |
| 454 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->setDesignPowerInputSchedule(schedule); | |
| 455 | } | ||
| 456 | |||
| 457 | ✗ | void ElectricEquipmentITEAirCooled::resetDesignPowerInputSchedule() { | |
| 458 | ✗ | getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->resetDesignPowerInputSchedule(); | |
| 459 | ✗ | } | |
| 460 | |||
| 461 | ✗ | bool ElectricEquipmentITEAirCooled::setCPULoadingSchedule(Schedule& schedule) { | |
| 462 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->setCPULoadingSchedule(schedule); | |
| 463 | } | ||
| 464 | |||
| 465 | ✗ | void ElectricEquipmentITEAirCooled::resetCPULoadingSchedule() { | |
| 466 | ✗ | getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->resetCPULoadingSchedule(); | |
| 467 | ✗ | } | |
| 468 | |||
| 469 | 1 | bool ElectricEquipmentITEAirCooled::setMultiplier(double multiplier) { | |
| 470 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->setMultiplier(multiplier); |
| 471 | } | ||
| 472 | |||
| 473 | ✗ | void ElectricEquipmentITEAirCooled::resetMultiplier() { | |
| 474 | ✗ | getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->resetMultiplier(); | |
| 475 | ✗ | } | |
| 476 | |||
| 477 | 1 | bool ElectricEquipmentITEAirCooled::setCPUEndUseSubcategory(const std::string& cPUEndUseSubcategory) { | |
| 478 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->setCPUEndUseSubcategory(cPUEndUseSubcategory); |
| 479 | } | ||
| 480 | |||
| 481 | ✗ | void ElectricEquipmentITEAirCooled::resetCPUEndUseSubcategory() { | |
| 482 | ✗ | getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->resetCPUEndUseSubcategory(); | |
| 483 | ✗ | } | |
| 484 | |||
| 485 | ✗ | bool ElectricEquipmentITEAirCooled::setFanEndUseSubcategory(const std::string& fanEndUseSubcategory) { | |
| 486 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->setFanEndUseSubcategory(fanEndUseSubcategory); | |
| 487 | } | ||
| 488 | |||
| 489 | ✗ | void ElectricEquipmentITEAirCooled::resetFanEndUseSubcategory() { | |
| 490 | ✗ | getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->resetFanEndUseSubcategory(); | |
| 491 | ✗ | } | |
| 492 | |||
| 493 | ✗ | bool ElectricEquipmentITEAirCooled::setElectricPowerSupplyEndUseSubcategory(const std::string& electricPowerSupplyEndUseSubcategory) { | |
| 494 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->setElectricPowerSupplyEndUseSubcategory(electricPowerSupplyEndUseSubcategory); | |
| 495 | } | ||
| 496 | |||
| 497 | ✗ | void ElectricEquipmentITEAirCooled::resetElectricPowerSupplyEndUseSubcategory() { | |
| 498 | ✗ | getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->resetElectricPowerSupplyEndUseSubcategory(); | |
| 499 | ✗ | } | |
| 500 | |||
| 501 | ✗ | boost::optional<double> ElectricEquipmentITEAirCooled::designLevel() const { | |
| 502 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->designLevel(); | |
| 503 | } | ||
| 504 | |||
| 505 | 3 | boost::optional<double> ElectricEquipmentITEAirCooled::powerPerFloorArea() const { | |
| 506 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->powerPerFloorArea(); |
| 507 | } | ||
| 508 | |||
| 509 | 13 | double ElectricEquipmentITEAirCooled::getDesignLevel(double floorArea) const { | |
| 510 |
1/1✓ Branch 3 taken 13 times.
|
13 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->getDesignLevel(floorArea); |
| 511 | } | ||
| 512 | |||
| 513 | 4 | double ElectricEquipmentITEAirCooled::getPowerPerFloorArea(double floorArea) const { | |
| 514 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->getPowerPerFloorArea(floorArea); |
| 515 | } | ||
| 516 | |||
| 517 | // DEPRECATED | ||
| 518 | |||
| 519 | ✗ | boost::optional<double> ElectricEquipmentITEAirCooled::wattsperUnit() const { | |
| 520 | ✗ | DEPRECATED_AT_MSG(3, 8, 0, "Use designLevel instead."); | |
| 521 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->designLevel(); | |
| 522 | } | ||
| 523 | |||
| 524 | ✗ | double ElectricEquipmentITEAirCooled::getWattsperUnit(double floorArea) const { | |
| 525 | ✗ | DEPRECATED_AT_MSG(3, 8, 0, "Use getDesignLevel instead."); | |
| 526 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->getDesignLevel(floorArea); | |
| 527 | } | ||
| 528 | |||
| 529 | ✗ | boost::optional<double> ElectricEquipmentITEAirCooled::wattsperZoneFloorArea() const { | |
| 530 | ✗ | DEPRECATED_AT_MSG(3, 8, 0, "Use powerPerFloorArea instead."); | |
| 531 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->powerPerFloorArea(); | |
| 532 | } | ||
| 533 | |||
| 534 | ✗ | double ElectricEquipmentITEAirCooled::getWattsperZoneFloorArea(double floorArea) const { | |
| 535 | ✗ | DEPRECATED_AT_MSG(3, 8, 0, "Use getPowerPerFloorArea instead."); | |
| 536 | ✗ | return getImpl<detail::ElectricEquipmentITEAirCooled_Impl>()->getPowerPerFloorArea(floorArea); | |
| 537 | } | ||
| 538 | |||
| 539 | /// @cond | ||
| 540 | 296 | ElectricEquipmentITEAirCooled::ElectricEquipmentITEAirCooled(std::shared_ptr<detail::ElectricEquipmentITEAirCooled_Impl> impl) | |
| 541 |
1/1✓ Branch 2 taken 296 times.
|
296 | : SpaceLoadInstance(impl) {} |
| 542 | /// @endcond | ||
| 543 | |||
| 544 | } // namespace model | ||
| 545 | } // namespace openstudio | ||
| 546 |