src/model/CoilCoolingDXCurveFitPerformance.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 "CoilCoolingDXCurveFitPerformance.hpp" | ||
| 7 | #include "CoilCoolingDXCurveFitPerformance_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Model.hpp" | ||
| 10 | #include "Model_Impl.hpp" | ||
| 11 | #include "Schedule.hpp" | ||
| 12 | #include "Schedule_Impl.hpp" | ||
| 13 | #include "ScheduleTypeLimits.hpp" | ||
| 14 | #include "ScheduleTypeRegistry.hpp" | ||
| 15 | #include "CoilCoolingDX.hpp" | ||
| 16 | #include "CoilCoolingDX_Impl.hpp" | ||
| 17 | #include "CoilCoolingDXCurveFitOperatingMode.hpp" | ||
| 18 | #include "CoilCoolingDXCurveFitOperatingMode_Impl.hpp" | ||
| 19 | #include "Curve.hpp" | ||
| 20 | #include "Curve_Impl.hpp" | ||
| 21 | |||
| 22 | #include <utilities/idd/IddFactory.hxx> | ||
| 23 | #include <utilities/idd/IddEnums.hxx> | ||
| 24 | #include <utilities/idd/OS_Coil_Cooling_DX_CurveFit_Performance_FieldEnums.hxx> | ||
| 25 | #include "../utilities/units/Unit.hpp" | ||
| 26 | #include "../utilities/core/Assert.hpp" | ||
| 27 | |||
| 28 | namespace openstudio { | ||
| 29 | namespace model { | ||
| 30 | |||
| 31 | namespace detail { | ||
| 32 | |||
| 33 | 34 | CoilCoolingDXCurveFitPerformance_Impl::CoilCoolingDXCurveFitPerformance_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 34 | 34 | : ResourceObject_Impl(idfObject, model, keepHandle) { | |
| 35 |
4/6✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
✓ Branch 7 taken 34 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 34 times.
✗ Branch 13 not taken.
|
34 | OS_ASSERT(idfObject.iddObject().type() == CoilCoolingDXCurveFitPerformance::iddObjectType()); |
| 36 | 34 | } | |
| 37 | |||
| 38 | 1 | CoilCoolingDXCurveFitPerformance_Impl::CoilCoolingDXCurveFitPerformance_Impl(const openstudio::detail::WorkspaceObject_Impl& other, | |
| 39 | 1 | Model_Impl* model, bool keepHandle) | |
| 40 | 1 | : ResourceObject_Impl(other, model, keepHandle) { | |
| 41 |
4/6✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 time.
✗ Branch 13 not taken.
|
1 | OS_ASSERT(other.iddObject().type() == CoilCoolingDXCurveFitPerformance::iddObjectType()); |
| 42 | 1 | } | |
| 43 | |||
| 44 | 25 | CoilCoolingDXCurveFitPerformance_Impl::CoilCoolingDXCurveFitPerformance_Impl(const CoilCoolingDXCurveFitPerformance_Impl& other, | |
| 45 | 25 | Model_Impl* model, bool keepHandle) | |
| 46 | 25 | : ResourceObject_Impl(other, model, keepHandle) {} | |
| 47 | |||
| 48 | ✗ | const std::vector<std::string>& CoilCoolingDXCurveFitPerformance_Impl::outputVariableNames() const { | |
| 49 | ✗ | static std::vector<std::string> result; | |
| 50 | ✗ | if (result.empty()) { | |
| 51 | } | ||
| 52 | ✗ | return result; | |
| 53 | } | ||
| 54 | |||
| 55 | ✗ | IddObjectType CoilCoolingDXCurveFitPerformance_Impl::iddObjectType() const { | |
| 56 | ✗ | return CoilCoolingDXCurveFitPerformance::iddObjectType(); | |
| 57 | } | ||
| 58 | |||
| 59 | ✗ | std::vector<ScheduleTypeKey> CoilCoolingDXCurveFitPerformance_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 60 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 61 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 62 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 63 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 64 | ✗ | if (std::find(b, e, OS_Coil_Cooling_DX_CurveFit_PerformanceFields::EvaporativeCondenserBasinHeaterOperatingSchedule) != e) { | |
| 65 | ✗ | result.push_back(ScheduleTypeKey("CoilCoolingDXCurveFitPerformance", "Evaporative Condenser Basin Heater Operating Schedule")); | |
| 66 | } | ||
| 67 | ✗ | return result; | |
| 68 | ✗ | } | |
| 69 | |||
| 70 | 1 | ModelObject CoilCoolingDXCurveFitPerformance_Impl::clone(Model model) const { | |
| 71 | // clone the operating modes is already handle in ModelObject_Impl::clone since they are ResourceObjects | ||
| 72 | // We don't do ParentObject_Impl::clone since it'll also CLONE the children... | ||
| 73 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | return ModelObject_Impl::clone(model); |
| 74 | } | ||
| 75 | |||
| 76 | 19 | std::vector<ModelObject> CoilCoolingDXCurveFitPerformance_Impl::children() const { | |
| 77 | 19 | std::vector<ModelObject> result; | |
| 78 | |||
| 79 | // These are ResourceObjects, so they shouldn't really be children except for OS App / IG | ||
| 80 |
2/2✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
|
19 | result.push_back(baseOperatingMode()); |
| 81 |
3/3✓ Branch 1 taken 19 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 17 times.
|
38 | if (auto _mode = alternativeOperatingMode1()) { |
| 82 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | result.push_back(_mode.get()); |
| 83 | 19 | } | |
| 84 |
3/3✓ Branch 1 taken 19 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 17 times.
|
38 | if (auto _mode = alternativeOperatingMode2()) { |
| 85 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | result.push_back(_mode.get()); |
| 86 | 19 | } | |
| 87 |
3/3✓ Branch 1 taken 19 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 18 times.
|
38 | if (auto c_ = crankcaseHeaterCapacityFunctionofTemperatureCurve()) { |
| 88 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 5 taken 1 time.
|
1 | result.emplace_back(std::move(*c_)); |
| 89 | 19 | } | |
| 90 | |||
| 91 | 19 | return result; | |
| 92 | ✗ | } | |
| 93 | |||
| 94 | 3 | std::vector<IdfObject> CoilCoolingDXCurveFitPerformance_Impl::remove() { | |
| 95 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 5 taken 1 time.
✓ Branch 6 taken 2 times.
|
3 | if (!coilCoolingDXs().empty()) { |
| 96 |
5/5✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
|
1 | LOG(Warn, "Cannot remove object because it is used by at least one CoilCoolingDX as a required field"); |
| 97 | 1 | return {}; | |
| 98 | } | ||
| 99 | 2 | return ResourceObject_Impl::remove(); | |
| 100 | } | ||
| 101 | |||
| 102 | 19 | double CoilCoolingDXCurveFitPerformance_Impl::crankcaseHeaterCapacity() const { | |
| 103 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CrankcaseHeaterCapacity, true); |
| 104 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 105 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 106 | } | ||
| 107 | |||
| 108 | 19 | double CoilCoolingDXCurveFitPerformance_Impl::minimumOutdoorDryBulbTemperatureforCompressorOperation() const { | |
| 109 | boost::optional<double> value = | ||
| 110 |
1/1✓ Branch 1 taken 19 times.
|
19 | getDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, true); |
| 111 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 112 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 113 | } | ||
| 114 | |||
| 115 | 19 | double CoilCoolingDXCurveFitPerformance_Impl::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const { | |
| 116 | boost::optional<double> value = | ||
| 117 |
1/1✓ Branch 1 taken 19 times.
|
19 | getDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, true); |
| 118 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 119 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 120 | } | ||
| 121 | |||
| 122 | 19 | double CoilCoolingDXCurveFitPerformance_Impl::unitInternalStaticAirPressure() const { | |
| 123 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::UnitInternalStaticAirPressure, true); |
| 124 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 125 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 126 | } | ||
| 127 | |||
| 128 | 19 | std::string CoilCoolingDXCurveFitPerformance_Impl::capacityControlMethod() const { | |
| 129 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CapacityControlMethod, true); |
| 130 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 131 |
2/2✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
|
38 | return value.get(); |
| 132 | 19 | } | |
| 133 | |||
| 134 | 19 | double CoilCoolingDXCurveFitPerformance_Impl::evaporativeCondenserBasinHeaterCapacity() const { | |
| 135 |
1/1✓ Branch 1 taken 19 times.
|
19 | boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::EvaporativeCondenserBasinHeaterCapacity, true); |
| 136 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 137 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 138 | } | ||
| 139 | |||
| 140 | 19 | double CoilCoolingDXCurveFitPerformance_Impl::evaporativeCondenserBasinHeaterSetpointTemperature() const { | |
| 141 | boost::optional<double> value = | ||
| 142 |
1/1✓ Branch 1 taken 19 times.
|
19 | getDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::EvaporativeCondenserBasinHeaterSetpointTemperature, true); |
| 143 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 19 times.
✗ Branch 4 not taken.
|
19 | OS_ASSERT(value); |
| 144 |
1/1✓ Branch 1 taken 19 times.
|
38 | return value.get(); |
| 145 | } | ||
| 146 | |||
| 147 | 21 | Schedule CoilCoolingDXCurveFitPerformance_Impl::evaporativeCondenserBasinHeaterOperatingSchedule() const { | |
| 148 |
1/1✓ Branch 1 taken 21 times.
|
42 | boost::optional<Schedule> schedule = getObject<ModelObject>().getModelObjectTarget<Schedule>( |
| 149 |
1/1✓ Branch 1 taken 21 times.
|
21 | OS_Coil_Cooling_DX_CurveFit_PerformanceFields::EvaporativeCondenserBasinHeaterOperatingSchedule); |
| 150 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 21 times.
✗ Branch 4 not taken.
|
21 | OS_ASSERT(schedule); |
| 151 |
2/2✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
|
42 | return schedule.get(); |
| 152 | 21 | } | |
| 153 | |||
| 154 | 18 | std::string CoilCoolingDXCurveFitPerformance_Impl::compressorFuelType() const { | |
| 155 |
1/1✓ Branch 1 taken 18 times.
|
18 | boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CompressorFuelType, true); |
| 156 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 18 times.
✗ Branch 4 not taken.
|
18 | OS_ASSERT(value); |
| 157 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
36 | return value.get(); |
| 158 | 18 | } | |
| 159 | |||
| 160 | 47 | boost::optional<CoilCoolingDXCurveFitOperatingMode> CoilCoolingDXCurveFitPerformance_Impl::optionalBaseOperatingMode() const { | |
| 161 |
1/1✓ Branch 1 taken 47 times.
|
94 | return getObject<ModelObject>().getModelObjectTarget<CoilCoolingDXCurveFitOperatingMode>( |
| 162 |
1/1✓ Branch 1 taken 47 times.
|
94 | OS_Coil_Cooling_DX_CurveFit_PerformanceFields::BaseOperatingMode); |
| 163 | } | ||
| 164 | |||
| 165 | 47 | CoilCoolingDXCurveFitOperatingMode CoilCoolingDXCurveFitPerformance_Impl::baseOperatingMode() const { | |
| 166 |
1/1✓ Branch 1 taken 47 times.
|
47 | boost::optional<CoilCoolingDXCurveFitOperatingMode> value = optionalBaseOperatingMode(); |
| 167 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 47 times.
|
47 | if (!value) { |
| 168 | ✗ | LOG_AND_THROW(briefDescription() << " does not have an Base Operating Mode attached."); | |
| 169 | } | ||
| 170 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
94 | return value.get(); |
| 171 | 47 | } | |
| 172 | |||
| 173 | 47 | boost::optional<CoilCoolingDXCurveFitOperatingMode> CoilCoolingDXCurveFitPerformance_Impl::alternativeOperatingMode1() const { | |
| 174 |
1/1✓ Branch 1 taken 47 times.
|
94 | return getObject<ModelObject>().getModelObjectTarget<CoilCoolingDXCurveFitOperatingMode>( |
| 175 |
1/1✓ Branch 1 taken 47 times.
|
94 | OS_Coil_Cooling_DX_CurveFit_PerformanceFields::AlternativeOperatingMode1); |
| 176 | } | ||
| 177 | |||
| 178 | 46 | boost::optional<CoilCoolingDXCurveFitOperatingMode> CoilCoolingDXCurveFitPerformance_Impl::alternativeOperatingMode2() const { | |
| 179 |
1/1✓ Branch 1 taken 46 times.
|
92 | return getObject<ModelObject>().getModelObjectTarget<CoilCoolingDXCurveFitOperatingMode>( |
| 180 |
1/1✓ Branch 1 taken 46 times.
|
92 | OS_Coil_Cooling_DX_CurveFit_PerformanceFields::AlternativeOperatingMode2); |
| 181 | } | ||
| 182 | |||
| 183 | 10 | std::vector<CoilCoolingDX> CoilCoolingDXCurveFitPerformance_Impl::coilCoolingDXs() const { | |
| 184 |
3/3✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
|
10 | return getObject<ModelObject>().getModelObjectSources<CoilCoolingDX>(CoilCoolingDX::iddObjectType()); |
| 185 | } | ||
| 186 | |||
| 187 | 37 | bool CoilCoolingDXCurveFitPerformance_Impl::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) { | |
| 188 | 37 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CrankcaseHeaterCapacity, crankcaseHeaterCapacity); | |
| 189 | 37 | return result; | |
| 190 | } | ||
| 191 | |||
| 192 | 36 | bool CoilCoolingDXCurveFitPerformance_Impl::setMinimumOutdoorDryBulbTemperatureforCompressorOperation( | |
| 193 | double minimumOutdoorDryBulbTemperatureforCompressorOperation) { | ||
| 194 | 36 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, | |
| 195 | minimumOutdoorDryBulbTemperatureforCompressorOperation); | ||
| 196 | 36 | return result; | |
| 197 | } | ||
| 198 | |||
| 199 | 38 | bool CoilCoolingDXCurveFitPerformance_Impl::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation( | |
| 200 | double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) { | ||
| 201 | 38 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, | |
| 202 | maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation); | ||
| 203 | 38 | return result; | |
| 204 | } | ||
| 205 | |||
| 206 | 36 | bool CoilCoolingDXCurveFitPerformance_Impl::setUnitInternalStaticAirPressure(double unitInternalStaticAirPressure) { | |
| 207 | 36 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::UnitInternalStaticAirPressure, unitInternalStaticAirPressure); | |
| 208 | 36 | return result; | |
| 209 | } | ||
| 210 | |||
| 211 | 36 | bool CoilCoolingDXCurveFitPerformance_Impl::setCapacityControlMethod(const std::string& capacityControlMethod) { | |
| 212 | 36 | bool result = setString(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CapacityControlMethod, capacityControlMethod); | |
| 213 | 36 | return result; | |
| 214 | } | ||
| 215 | |||
| 216 | 36 | bool CoilCoolingDXCurveFitPerformance_Impl::setEvaporativeCondenserBasinHeaterCapacity(double evaporativeCondenserBasinHeaterCapacity) { | |
| 217 | bool result = | ||
| 218 | 36 | setDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::EvaporativeCondenserBasinHeaterCapacity, evaporativeCondenserBasinHeaterCapacity); | |
| 219 | 36 | return result; | |
| 220 | } | ||
| 221 | |||
| 222 | 36 | bool CoilCoolingDXCurveFitPerformance_Impl::setEvaporativeCondenserBasinHeaterSetpointTemperature( | |
| 223 | double evaporativeCondenserBasinHeaterSetpointTemperature) { | ||
| 224 | 36 | bool result = setDouble(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::EvaporativeCondenserBasinHeaterSetpointTemperature, | |
| 225 | evaporativeCondenserBasinHeaterSetpointTemperature); | ||
| 226 | 36 | return result; | |
| 227 | } | ||
| 228 | |||
| 229 | 34 | bool CoilCoolingDXCurveFitPerformance_Impl::setEvaporativeCondenserBasinHeaterOperatingSchedule(Schedule& schedule) { | |
| 230 |
3/3✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
✓ Branch 7 taken 34 times.
|
136 | bool result = setSchedule(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::EvaporativeCondenserBasinHeaterOperatingSchedule, |
| 231 | "CoilCoolingDXCurveFitPerformance", "Evaporative Condenser Basin Heater Operating Schedule", schedule); | ||
| 232 | 34 | return result; | |
| 233 | } | ||
| 234 | |||
| 235 | 36 | bool CoilCoolingDXCurveFitPerformance_Impl::setCompressorFuelType(const std::string& compressorFuelType) { | |
| 236 | 36 | bool result = setString(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CompressorFuelType, compressorFuelType); | |
| 237 | 36 | return result; | |
| 238 | } | ||
| 239 | |||
| 240 | 36 | bool CoilCoolingDXCurveFitPerformance_Impl::setBaseOperatingMode(const CoilCoolingDXCurveFitOperatingMode& baseOperatingMode) { | |
| 241 |
2/2✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
|
36 | bool result = setPointer(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::BaseOperatingMode, baseOperatingMode.handle()); |
| 242 | 36 | return result; | |
| 243 | } | ||
| 244 | |||
| 245 | 2 | bool CoilCoolingDXCurveFitPerformance_Impl::setAlternativeOperatingMode1(const CoilCoolingDXCurveFitOperatingMode& alternativeOperatingMode1) { | |
| 246 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | bool result = setPointer(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::AlternativeOperatingMode1, alternativeOperatingMode1.handle()); |
| 247 | 2 | return result; | |
| 248 | } | ||
| 249 | |||
| 250 | ✗ | void CoilCoolingDXCurveFitPerformance_Impl::resetAlternativeOperatingMode1() { | |
| 251 | ✗ | bool result = setString(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::AlternativeOperatingMode1, ""); | |
| 252 | ✗ | OS_ASSERT(result); | |
| 253 | ✗ | } | |
| 254 | |||
| 255 | 2 | bool CoilCoolingDXCurveFitPerformance_Impl::setAlternativeOperatingMode2(const CoilCoolingDXCurveFitOperatingMode& alternativeOperatingMode2) { | |
| 256 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | bool result = setPointer(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::AlternativeOperatingMode2, alternativeOperatingMode2.handle()); |
| 257 | 2 | return result; | |
| 258 | } | ||
| 259 | |||
| 260 | ✗ | void CoilCoolingDXCurveFitPerformance_Impl::resetAlternativeOperatingMode2() { | |
| 261 | ✗ | bool result = setString(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::AlternativeOperatingMode2, ""); | |
| 262 | ✗ | OS_ASSERT(result); | |
| 263 | ✗ | } | |
| 264 | |||
| 265 | 35 | boost::optional<Curve> CoilCoolingDXCurveFitPerformance_Impl::crankcaseHeaterCapacityFunctionofTemperatureCurve() const { | |
| 266 |
1/1✓ Branch 1 taken 35 times.
|
70 | return getObject<ModelObject>().getModelObjectTarget<Curve>( |
| 267 |
1/1✓ Branch 1 taken 35 times.
|
70 | OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName); |
| 268 | } | ||
| 269 | |||
| 270 | 1 | bool CoilCoolingDXCurveFitPerformance_Impl::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) { | |
| 271 | const bool result = | ||
| 272 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | setPointer(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, curve.handle()); |
| 273 | 1 | return result; | |
| 274 | } | ||
| 275 | |||
| 276 | ✗ | void CoilCoolingDXCurveFitPerformance_Impl::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() { | |
| 277 | ✗ | const bool result = setString(OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, ""); | |
| 278 | ✗ | OS_ASSERT(result); | |
| 279 | ✗ | } | |
| 280 | |||
| 281 | } // namespace detail | ||
| 282 | |||
| 283 | 33 | CoilCoolingDXCurveFitPerformance::CoilCoolingDXCurveFitPerformance(const Model& model, const CoilCoolingDXCurveFitOperatingMode& baseOperatingMode) | |
| 284 | 33 | : ResourceObject(CoilCoolingDXCurveFitPerformance::iddObjectType(), model) { | |
| 285 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 33 times.
✗ Branch 5 not taken.
|
33 | OS_ASSERT(getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()); |
| 286 | |||
| 287 |
1/1✓ Branch 1 taken 33 times.
|
33 | bool ok = setCrankcaseHeaterCapacity(0.0); |
| 288 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
✗ Branch 3 not taken.
|
33 | OS_ASSERT(ok); |
| 289 |
1/1✓ Branch 1 taken 33 times.
|
33 | ok = setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25.0); |
| 290 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
✗ Branch 3 not taken.
|
33 | OS_ASSERT(ok); |
| 291 |
1/1✓ Branch 1 taken 33 times.
|
33 | ok = setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(10.0); |
| 292 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
✗ Branch 3 not taken.
|
33 | OS_ASSERT(ok); |
| 293 |
1/1✓ Branch 1 taken 33 times.
|
33 | ok = setUnitInternalStaticAirPressure(773.3); |
| 294 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
✗ Branch 3 not taken.
|
33 | OS_ASSERT(ok); |
| 295 |
2/2✓ Branch 1 taken 33 times.
✓ Branch 4 taken 33 times.
|
33 | ok = setCapacityControlMethod("Discrete"); |
| 296 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
✗ Branch 3 not taken.
|
33 | OS_ASSERT(ok); |
| 297 |
1/1✓ Branch 1 taken 33 times.
|
33 | ok = setEvaporativeCondenserBasinHeaterCapacity(0.0); |
| 298 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
✗ Branch 3 not taken.
|
33 | OS_ASSERT(ok); |
| 299 |
1/1✓ Branch 1 taken 33 times.
|
33 | ok = setEvaporativeCondenserBasinHeaterSetpointTemperature(2.0); |
| 300 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
✗ Branch 3 not taken.
|
33 | OS_ASSERT(ok); |
| 301 | { | ||
| 302 |
1/1✓ Branch 1 taken 33 times.
|
33 | auto schedule = model.alwaysOnDiscreteSchedule(); |
| 303 |
1/1✓ Branch 1 taken 33 times.
|
33 | setEvaporativeCondenserBasinHeaterOperatingSchedule(schedule); |
| 304 | 33 | } | |
| 305 |
2/2✓ Branch 1 taken 33 times.
✓ Branch 4 taken 33 times.
|
33 | setCompressorFuelType("Electricity"); |
| 306 | |||
| 307 |
1/1✓ Branch 1 taken 33 times.
|
33 | ok = setBaseOperatingMode(baseOperatingMode); |
| 308 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
|
33 | if (!ok) { |
| 309 | ✗ | remove(); | |
| 310 | ✗ | LOG_AND_THROW("Unable to set " << briefDescription() << "'s baseOperatingMode to " << baseOperatingMode.briefDescription() << "."); | |
| 311 | } | ||
| 312 | 33 | } | |
| 313 | |||
| 314 | 7693 | IddObjectType CoilCoolingDXCurveFitPerformance::iddObjectType() { | |
| 315 |
1/1✓ Branch 1 taken 7693 times.
|
7693 | return {IddObjectType::OS_Coil_Cooling_DX_CurveFit_Performance}; |
| 316 | } | ||
| 317 | |||
| 318 | ✗ | std::vector<std::string> CoilCoolingDXCurveFitPerformance::capacityControlMethodValues() { | |
| 319 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), | |
| 320 | ✗ | OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CapacityControlMethod); | |
| 321 | } | ||
| 322 | |||
| 323 | ✗ | std::vector<std::string> CoilCoolingDXCurveFitPerformance::validCapacityControlMethodValues() { | |
| 324 | ✗ | return capacityControlMethodValues(); | |
| 325 | } | ||
| 326 | |||
| 327 | ✗ | std::vector<std::string> CoilCoolingDXCurveFitPerformance::compressorFuelTypeValues() { | |
| 328 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Cooling_DX_CurveFit_PerformanceFields::CompressorFuelType); | |
| 329 | } | ||
| 330 | |||
| 331 | ✗ | std::vector<std::string> CoilCoolingDXCurveFitPerformance::validCompressorFuelTypeValues() { | |
| 332 | ✗ | return compressorFuelTypeValues(); | |
| 333 | } | ||
| 334 | |||
| 335 | 19 | double CoilCoolingDXCurveFitPerformance::crankcaseHeaterCapacity() const { | |
| 336 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->crankcaseHeaterCapacity(); |
| 337 | } | ||
| 338 | |||
| 339 | 19 | double CoilCoolingDXCurveFitPerformance::minimumOutdoorDryBulbTemperatureforCompressorOperation() const { | |
| 340 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->minimumOutdoorDryBulbTemperatureforCompressorOperation(); |
| 341 | } | ||
| 342 | |||
| 343 | 19 | double CoilCoolingDXCurveFitPerformance::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const { | |
| 344 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(); |
| 345 | } | ||
| 346 | |||
| 347 | 19 | double CoilCoolingDXCurveFitPerformance::unitInternalStaticAirPressure() const { | |
| 348 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->unitInternalStaticAirPressure(); |
| 349 | } | ||
| 350 | |||
| 351 | 19 | std::string CoilCoolingDXCurveFitPerformance::capacityControlMethod() const { | |
| 352 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->capacityControlMethod(); |
| 353 | } | ||
| 354 | |||
| 355 | 19 | double CoilCoolingDXCurveFitPerformance::evaporativeCondenserBasinHeaterCapacity() const { | |
| 356 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->evaporativeCondenserBasinHeaterCapacity(); |
| 357 | } | ||
| 358 | |||
| 359 | 19 | double CoilCoolingDXCurveFitPerformance::evaporativeCondenserBasinHeaterSetpointTemperature() const { | |
| 360 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->evaporativeCondenserBasinHeaterSetpointTemperature(); |
| 361 | } | ||
| 362 | |||
| 363 | 21 | Schedule CoilCoolingDXCurveFitPerformance::evaporativeCondenserBasinHeaterOperatingSchedule() const { | |
| 364 |
1/1✓ Branch 3 taken 21 times.
|
21 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->evaporativeCondenserBasinHeaterOperatingSchedule(); |
| 365 | } | ||
| 366 | |||
| 367 | 18 | std::string CoilCoolingDXCurveFitPerformance::compressorFuelType() const { | |
| 368 |
1/1✓ Branch 3 taken 18 times.
|
18 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->compressorFuelType(); |
| 369 | } | ||
| 370 | |||
| 371 | 28 | CoilCoolingDXCurveFitOperatingMode CoilCoolingDXCurveFitPerformance::baseOperatingMode() const { | |
| 372 |
1/1✓ Branch 3 taken 28 times.
|
28 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->baseOperatingMode(); |
| 373 | } | ||
| 374 | |||
| 375 | 28 | boost::optional<CoilCoolingDXCurveFitOperatingMode> CoilCoolingDXCurveFitPerformance::alternativeOperatingMode1() const { | |
| 376 |
1/1✓ Branch 3 taken 28 times.
|
28 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->alternativeOperatingMode1(); |
| 377 | } | ||
| 378 | |||
| 379 | 27 | boost::optional<CoilCoolingDXCurveFitOperatingMode> CoilCoolingDXCurveFitPerformance::alternativeOperatingMode2() const { | |
| 380 |
1/1✓ Branch 3 taken 27 times.
|
27 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->alternativeOperatingMode2(); |
| 381 | } | ||
| 382 | |||
| 383 | 7 | std::vector<CoilCoolingDX> CoilCoolingDXCurveFitPerformance::coilCoolingDXs() const { | |
| 384 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->coilCoolingDXs(); |
| 385 | } | ||
| 386 | |||
| 387 | 37 | bool CoilCoolingDXCurveFitPerformance::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) { | |
| 388 |
1/1✓ Branch 3 taken 37 times.
|
37 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setCrankcaseHeaterCapacity(crankcaseHeaterCapacity); |
| 389 | } | ||
| 390 | |||
| 391 | 36 | bool CoilCoolingDXCurveFitPerformance::setMinimumOutdoorDryBulbTemperatureforCompressorOperation( | |
| 392 | double minimumOutdoorDryBulbTemperatureforCompressorOperation) { | ||
| 393 |
1/1✓ Branch 3 taken 36 times.
|
72 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setMinimumOutdoorDryBulbTemperatureforCompressorOperation( |
| 394 | 72 | minimumOutdoorDryBulbTemperatureforCompressorOperation); | |
| 395 | } | ||
| 396 | |||
| 397 | 38 | bool CoilCoolingDXCurveFitPerformance::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation( | |
| 398 | double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) { | ||
| 399 |
1/1✓ Branch 3 taken 38 times.
|
76 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation( |
| 400 | 76 | maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation); | |
| 401 | } | ||
| 402 | |||
| 403 | 36 | bool CoilCoolingDXCurveFitPerformance::setUnitInternalStaticAirPressure(double unitInternalStaticAirPressure) { | |
| 404 |
1/1✓ Branch 3 taken 36 times.
|
36 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setUnitInternalStaticAirPressure(unitInternalStaticAirPressure); |
| 405 | } | ||
| 406 | |||
| 407 | 36 | bool CoilCoolingDXCurveFitPerformance::setCapacityControlMethod(const std::string& capacityControlMethod) { | |
| 408 |
1/1✓ Branch 3 taken 36 times.
|
36 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setCapacityControlMethod(capacityControlMethod); |
| 409 | } | ||
| 410 | |||
| 411 | 36 | bool CoilCoolingDXCurveFitPerformance::setEvaporativeCondenserBasinHeaterCapacity(double evaporativeCondenserBasinHeaterCapacity) { | |
| 412 |
1/1✓ Branch 3 taken 36 times.
|
72 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setEvaporativeCondenserBasinHeaterCapacity( |
| 413 | 72 | evaporativeCondenserBasinHeaterCapacity); | |
| 414 | } | ||
| 415 | |||
| 416 | 36 | bool CoilCoolingDXCurveFitPerformance::setEvaporativeCondenserBasinHeaterSetpointTemperature( | |
| 417 | double evaporativeCondenserBasinHeaterSetpointTemperature) { | ||
| 418 |
1/1✓ Branch 3 taken 36 times.
|
72 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setEvaporativeCondenserBasinHeaterSetpointTemperature( |
| 419 | 72 | evaporativeCondenserBasinHeaterSetpointTemperature); | |
| 420 | } | ||
| 421 | |||
| 422 | 34 | bool CoilCoolingDXCurveFitPerformance::setEvaporativeCondenserBasinHeaterOperatingSchedule(Schedule& schedule) { | |
| 423 |
1/1✓ Branch 3 taken 34 times.
|
34 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setEvaporativeCondenserBasinHeaterOperatingSchedule(schedule); |
| 424 | } | ||
| 425 | |||
| 426 | 36 | bool CoilCoolingDXCurveFitPerformance::setCompressorFuelType(const std::string& compressorFuelType) { | |
| 427 |
1/1✓ Branch 3 taken 36 times.
|
36 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setCompressorFuelType(compressorFuelType); |
| 428 | } | ||
| 429 | |||
| 430 | 36 | bool CoilCoolingDXCurveFitPerformance::setBaseOperatingMode(const CoilCoolingDXCurveFitOperatingMode& baseOperatingMode) { | |
| 431 |
1/1✓ Branch 3 taken 36 times.
|
36 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setBaseOperatingMode(baseOperatingMode); |
| 432 | } | ||
| 433 | |||
| 434 | 2 | bool CoilCoolingDXCurveFitPerformance::setAlternativeOperatingMode1(const CoilCoolingDXCurveFitOperatingMode& alternativeOperatingMode1) { | |
| 435 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setAlternativeOperatingMode1(alternativeOperatingMode1); |
| 436 | } | ||
| 437 | |||
| 438 | ✗ | void CoilCoolingDXCurveFitPerformance::resetAlternativeOperatingMode1() { | |
| 439 | ✗ | getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->resetAlternativeOperatingMode1(); | |
| 440 | ✗ | } | |
| 441 | |||
| 442 | 2 | bool CoilCoolingDXCurveFitPerformance::setAlternativeOperatingMode2(const CoilCoolingDXCurveFitOperatingMode& alternativeOperatingMode2) { | |
| 443 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setAlternativeOperatingMode2(alternativeOperatingMode2); |
| 444 | } | ||
| 445 | |||
| 446 | ✗ | void CoilCoolingDXCurveFitPerformance::resetAlternativeOperatingMode2() { | |
| 447 | ✗ | getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->resetAlternativeOperatingMode2(); | |
| 448 | ✗ | } | |
| 449 | |||
| 450 | 16 | boost::optional<Curve> CoilCoolingDXCurveFitPerformance::crankcaseHeaterCapacityFunctionofTemperatureCurve() const { | |
| 451 |
1/1✓ Branch 3 taken 16 times.
|
16 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->crankcaseHeaterCapacityFunctionofTemperatureCurve(); |
| 452 | } | ||
| 453 | |||
| 454 | 1 | bool CoilCoolingDXCurveFitPerformance::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) { | |
| 455 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->setCrankcaseHeaterCapacityFunctionofTemperatureCurve(curve); |
| 456 | } | ||
| 457 | |||
| 458 | ✗ | void CoilCoolingDXCurveFitPerformance::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() { | |
| 459 | ✗ | getImpl<detail::CoilCoolingDXCurveFitPerformance_Impl>()->resetCrankcaseHeaterCapacityFunctionofTemperatureCurve(); | |
| 460 | ✗ | } | |
| 461 | |||
| 462 | /// @cond | ||
| 463 | 97 | CoilCoolingDXCurveFitPerformance::CoilCoolingDXCurveFitPerformance(std::shared_ptr<detail::CoilCoolingDXCurveFitPerformance_Impl> impl) | |
| 464 |
1/1✓ Branch 2 taken 97 times.
|
97 | : ResourceObject(impl) {} |
| 465 | /// @endcond | ||
| 466 | |||
| 467 | } // namespace model | ||
| 468 | } // namespace openstudio | ||
| 469 |