src/model/ChillerElectricASHRAE205.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 "ChillerElectricASHRAE205.hpp" | ||
| 7 | #include "ChillerElectricASHRAE205_Impl.hpp" | ||
| 8 | |||
| 9 | #include "ExternalFile.hpp" | ||
| 10 | #include "ExternalFile_Impl.hpp" | ||
| 11 | #include "Schedule.hpp" | ||
| 12 | #include "Schedule_Impl.hpp" | ||
| 13 | #include "Node.hpp" | ||
| 14 | #include "Node_Impl.hpp" | ||
| 15 | #include "PlantLoop.hpp" | ||
| 16 | #include "ThermalZone.hpp" | ||
| 17 | #include "ThermalZone_Impl.hpp" | ||
| 18 | #include "Model.hpp" | ||
| 19 | #include "Mixer.hpp" | ||
| 20 | #include "Splitter.hpp" | ||
| 21 | |||
| 22 | #include "ScheduleTypeLimits.hpp" | ||
| 23 | #include "ScheduleTypeRegistry.hpp" | ||
| 24 | |||
| 25 | #include <utilities/idd/IddFactory.hxx> | ||
| 26 | #include <utilities/idd/IddEnums.hxx> | ||
| 27 | #include <utilities/idd/OS_Chiller_Electric_ASHRAE205_FieldEnums.hxx> | ||
| 28 | |||
| 29 | #include "../utilities/core/Assert.hpp" | ||
| 30 | #include "../utilities/data/DataEnums.hpp" | ||
| 31 | |||
| 32 | namespace openstudio { | ||
| 33 | namespace model { | ||
| 34 | |||
| 35 | namespace detail { | ||
| 36 | |||
| 37 | 6 | ChillerElectricASHRAE205_Impl::ChillerElectricASHRAE205_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 38 | 6 | : WaterToWaterComponent_Impl(idfObject, model, keepHandle) { | |
| 39 |
4/6✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 6 times.
✗ Branch 13 not taken.
|
6 | OS_ASSERT(idfObject.iddObject().type() == ChillerElectricASHRAE205::iddObjectType()); |
| 40 | 6 | } | |
| 41 | |||
| 42 | ✗ | ChillerElectricASHRAE205_Impl::ChillerElectricASHRAE205_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, | |
| 43 | ✗ | bool keepHandle) | |
| 44 | ✗ | : WaterToWaterComponent_Impl(other, model, keepHandle) { | |
| 45 | ✗ | OS_ASSERT(other.iddObject().type() == ChillerElectricASHRAE205::iddObjectType()); | |
| 46 | ✗ | } | |
| 47 | |||
| 48 | 6 | ChillerElectricASHRAE205_Impl::ChillerElectricASHRAE205_Impl(const ChillerElectricASHRAE205_Impl& other, Model_Impl* model, bool keepHandle) | |
| 49 | 6 | : WaterToWaterComponent_Impl(other, model, keepHandle) {} | |
| 50 | |||
| 51 | ✗ | const std::vector<std::string>& ChillerElectricASHRAE205_Impl::outputVariableNames() const { | |
| 52 | static std::vector<std::string> result{"Chiller Part Load Ratio", | ||
| 53 | "Chiller Cycling Ratio", | ||
| 54 | "Minimum Part Load Ratio", | ||
| 55 | "Chiller Electricity Rate", | ||
| 56 | "Chiller Electricity Energy", | ||
| 57 | "Chiller Evaporator Cooling Rate", | ||
| 58 | "Chiller Evaporator Cooling Energy", | ||
| 59 | "Chiller Evaporator Inlet Temperature", | ||
| 60 | "Chiller Evaporator Outlet Temperature", | ||
| 61 | "Chiller Evaporator Mass Flow Rate", | ||
| 62 | "Chiller Condenser Heat Transfer Rate", | ||
| 63 | "Chiller Condenser Heat Transfer Energy", | ||
| 64 | "Chiller COP", | ||
| 65 | "Chiller Condenser Inlet Temperature", | ||
| 66 | "Chiller Condenser Outlet Temperature", | ||
| 67 | "Chiller Condenser Mass Flow Rate", | ||
| 68 | "Chiller Effective Heat Rejection Temperature", | ||
| 69 | "Chiller Zone Heat Gain Rate", | ||
| 70 | "Chiller Zone Heat Gain Energy", | ||
| 71 | "Oil Cooler Heat Transfer Rate", | ||
| 72 | "Oil Cooler Heat Transfer Energy", | ||
| 73 | "Auxiliary Heat Transfer Rate", | ||
| 74 | ✗ | "Auxiliary Heat Transfer Energy"}; | |
| 75 | ✗ | return result; | |
| 76 | ✗ | } | |
| 77 | |||
| 78 | ✗ | IddObjectType ChillerElectricASHRAE205_Impl::iddObjectType() const { | |
| 79 | ✗ | return ChillerElectricASHRAE205::iddObjectType(); | |
| 80 | } | ||
| 81 | |||
| 82 | ✗ | std::vector<ScheduleTypeKey> ChillerElectricASHRAE205_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 83 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 84 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 85 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 86 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 87 | ✗ | if (std::find(b, e, OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureScheduleName) != e) { | |
| 88 | ✗ | result.emplace_back("ChillerElectricASHRAE205", "Ambient Temperature"); | |
| 89 | } | ||
| 90 | ✗ | return result; | |
| 91 | ✗ | } | |
| 92 | |||
| 93 | 11 | boost::optional<ExternalFile> ChillerElectricASHRAE205_Impl::optionalRepresentationFile() const { | |
| 94 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | return getObject<ModelObject>().getModelObjectTarget<ExternalFile>(OS_Chiller_Electric_ASHRAE205Fields::RepresentationFileName); |
| 95 | } | ||
| 96 | |||
| 97 | 11 | ExternalFile ChillerElectricASHRAE205_Impl::representationFile() const { | |
| 98 |
1/1✓ Branch 1 taken 11 times.
|
11 | boost::optional<ExternalFile> value = optionalRepresentationFile(); |
| 99 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
|
11 | if (!value) { |
| 100 | ✗ | LOG_AND_THROW(briefDescription() << " does not have a Representation File attached."); | |
| 101 | } | ||
| 102 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
22 | return value.get(); |
| 103 | 11 | } | |
| 104 | |||
| 105 | ✗ | bool ChillerElectricASHRAE205_Impl::setRepresentationFile(const ExternalFile& externalFile) { | |
| 106 | ✗ | bool result = setPointer(OS_Chiller_Electric_ASHRAE205Fields::RepresentationFileName, externalFile.handle()); | |
| 107 | ✗ | return result; | |
| 108 | } | ||
| 109 | |||
| 110 | 5 | std::string ChillerElectricASHRAE205_Impl::performanceInterpolationMethod() const { | |
| 111 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<std::string> value = getString(OS_Chiller_Electric_ASHRAE205Fields::PerformanceInterpolationMethod, true); |
| 112 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 113 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
10 | return value.get(); |
| 114 | 5 | } | |
| 115 | |||
| 116 | 9 | bool ChillerElectricASHRAE205_Impl::setPerformanceInterpolationMethod(const std::string& performanceInterpolationMethod) { | |
| 117 | 9 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::PerformanceInterpolationMethod, performanceInterpolationMethod); | |
| 118 | 9 | return result; | |
| 119 | } | ||
| 120 | |||
| 121 | 4 | boost::optional<double> ChillerElectricASHRAE205_Impl::ratedCapacity() const { | |
| 122 | 4 | return getDouble(OS_Chiller_Electric_ASHRAE205Fields::RatedCapacity, true); | |
| 123 | } | ||
| 124 | |||
| 125 | 5 | bool ChillerElectricASHRAE205_Impl::isRatedCapacityAutosized() const { | |
| 126 | 5 | bool result = false; | |
| 127 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<std::string> value = getString(OS_Chiller_Electric_ASHRAE205Fields::RatedCapacity, true); |
| 128 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | if (value) { |
| 129 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
10 | result = openstudio::istringEqual(value.get(), "Autosize"); |
| 130 | } | ||
| 131 | 5 | return result; | |
| 132 | 5 | } | |
| 133 | |||
| 134 | 2 | bool ChillerElectricASHRAE205_Impl::setRatedCapacity(double ratedCapacity) { | |
| 135 | 2 | bool result = setDouble(OS_Chiller_Electric_ASHRAE205Fields::RatedCapacity, ratedCapacity); | |
| 136 | 2 | return result; | |
| 137 | } | ||
| 138 | |||
| 139 | 7 | void ChillerElectricASHRAE205_Impl::autosizeRatedCapacity() { | |
| 140 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
14 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::RatedCapacity, "Autosize"); |
| 141 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
|
7 | OS_ASSERT(result); |
| 142 | 7 | } | |
| 143 | |||
| 144 | 5 | double ChillerElectricASHRAE205_Impl::sizingFactor() const { | |
| 145 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<double> value = getDouble(OS_Chiller_Electric_ASHRAE205Fields::SizingFactor, true); |
| 146 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 147 |
1/1✓ Branch 1 taken 5 times.
|
10 | return value.get(); |
| 148 | } | ||
| 149 | |||
| 150 | 9 | bool ChillerElectricASHRAE205_Impl::setSizingFactor(double sizingFactor) { | |
| 151 | 9 | bool result = setDouble(OS_Chiller_Electric_ASHRAE205Fields::SizingFactor, sizingFactor); | |
| 152 | 9 | return result; | |
| 153 | } | ||
| 154 | |||
| 155 | 15 | std::string ChillerElectricASHRAE205_Impl::ambientTemperatureIndicator() const { | |
| 156 |
1/1✓ Branch 1 taken 15 times.
|
15 | boost::optional<std::string> value = getString(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureIndicator, true); |
| 157 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 15 times.
✗ Branch 4 not taken.
|
15 | OS_ASSERT(value); |
| 158 |
2/2✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
|
30 | return value.get(); |
| 159 | 15 | } | |
| 160 | |||
| 161 | 13 | bool ChillerElectricASHRAE205_Impl::setAmbientTemperatureIndicator(const std::string& ambientTemperatureIndicator) { | |
| 162 | 13 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureIndicator, ambientTemperatureIndicator); | |
| 163 | 13 | return result; | |
| 164 | } | ||
| 165 | |||
| 166 | 3 | boost::optional<Schedule> ChillerElectricASHRAE205_Impl::ambientTemperatureSchedule() const { | |
| 167 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureScheduleName); |
| 168 | } | ||
| 169 | |||
| 170 | 1 | bool ChillerElectricASHRAE205_Impl::setAmbientTemperatureSchedule(Schedule& schedule) { | |
| 171 | bool result = | ||
| 172 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
4 | setSchedule(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureScheduleName, "ChillerElectricASHRAE205", "Ambient Temperature", schedule); |
| 173 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (result) { |
| 174 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | bool ok = setAmbientTemperatureIndicator("Schedule"); |
| 175 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(ok); |
| 176 | } | ||
| 177 | 1 | return result; | |
| 178 | } | ||
| 179 | |||
| 180 | 2 | void ChillerElectricASHRAE205_Impl::resetAmbientTemperatureSchedule() { | |
| 181 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureScheduleName, ""); |
| 182 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 183 |
5/5✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 11 taken 1 time.
✓ Branch 12 taken 1 time.
|
6 | if (openstudio::istringEqual("Schedule", ambientTemperatureIndicator())) { |
| 184 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | result = setAmbientTemperatureIndicator("Outdoors"); |
| 185 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 186 | } | ||
| 187 | 2 | } | |
| 188 | |||
| 189 | 5 | boost::optional<ThermalZone> ChillerElectricASHRAE205_Impl::ambientTemperatureZone() const { | |
| 190 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | return getObject<ModelObject>().getModelObjectTarget<ThermalZone>(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureZoneName); |
| 191 | } | ||
| 192 | |||
| 193 | 4 | bool ChillerElectricASHRAE205_Impl::setAmbientTemperatureZone(const ThermalZone& thermalZone) { | |
| 194 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | bool result = setPointer(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureZoneName, thermalZone.handle()); |
| 195 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (result) { |
| 196 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | bool ok = setAmbientTemperatureIndicator("Zone"); |
| 197 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
|
4 | OS_ASSERT(ok); |
| 198 | } | ||
| 199 | 4 | return result; | |
| 200 | } | ||
| 201 | |||
| 202 | 1 | void ChillerElectricASHRAE205_Impl::resetAmbientTemperatureZone() { | |
| 203 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureZoneName, ""); |
| 204 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 205 |
4/5✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 11 taken 1 time.
✗ Branch 12 not taken.
|
3 | if (openstudio::istringEqual("Zone", ambientTemperatureIndicator())) { |
| 206 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | result = setAmbientTemperatureIndicator("Outdoors"); |
| 207 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 208 | } | ||
| 209 | 1 | } | |
| 210 | |||
| 211 | 3 | boost::optional<std::string> ChillerElectricASHRAE205_Impl::ambientTemperatureOutdoorAirNodeName() const { | |
| 212 | 3 | return getString(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureOutdoorAirNodeName, false, true); | |
| 213 | } | ||
| 214 | |||
| 215 | 1 | bool ChillerElectricASHRAE205_Impl::setAmbientTemperatureOutdoorAirNodeName(const std::string& ambientTemperatureOutdoorAirNodeName) { | |
| 216 | 1 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureOutdoorAirNodeName, ambientTemperatureOutdoorAirNodeName); | |
| 217 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (result) { |
| 218 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | bool ok = setAmbientTemperatureIndicator("Outdoors"); |
| 219 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(ok); |
| 220 | } | ||
| 221 | 1 | return result; | |
| 222 | } | ||
| 223 | |||
| 224 | 2 | void ChillerElectricASHRAE205_Impl::resetAmbientTemperatureOutdoorAirNodeName() { | |
| 225 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureOutdoorAirNodeName, ""); |
| 226 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 227 | 2 | } | |
| 228 | |||
| 229 | 7 | boost::optional<double> ChillerElectricASHRAE205_Impl::chilledWaterMaximumRequestedFlowRate() const { | |
| 230 | 7 | return getDouble(OS_Chiller_Electric_ASHRAE205Fields::ChilledWaterMaximumRequestedFlowRate, true); | |
| 231 | } | ||
| 232 | |||
| 233 | 5 | bool ChillerElectricASHRAE205_Impl::isChilledWaterMaximumRequestedFlowRateAutosized() const { | |
| 234 | 5 | bool result = false; | |
| 235 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<std::string> value = getString(OS_Chiller_Electric_ASHRAE205Fields::ChilledWaterMaximumRequestedFlowRate, true); |
| 236 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | if (value) { |
| 237 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
10 | result = openstudio::istringEqual(value.get(), "Autosize"); |
| 238 | } | ||
| 239 | 5 | return result; | |
| 240 | 5 | } | |
| 241 | |||
| 242 | 4 | bool ChillerElectricASHRAE205_Impl::setChilledWaterMaximumRequestedFlowRate(double chilledWaterMaximumRequestedFlowRate) { | |
| 243 | 4 | bool result = setDouble(OS_Chiller_Electric_ASHRAE205Fields::ChilledWaterMaximumRequestedFlowRate, chilledWaterMaximumRequestedFlowRate); | |
| 244 | 4 | return result; | |
| 245 | } | ||
| 246 | |||
| 247 | 6 | void ChillerElectricASHRAE205_Impl::autosizeChilledWaterMaximumRequestedFlowRate() { | |
| 248 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
12 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::ChilledWaterMaximumRequestedFlowRate, "Autosize"); |
| 249 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 250 | 6 | } | |
| 251 | |||
| 252 | 7 | boost::optional<double> ChillerElectricASHRAE205_Impl::condenserMaximumRequestedFlowRate() const { | |
| 253 | 7 | return getDouble(OS_Chiller_Electric_ASHRAE205Fields::CondenserMaximumRequestedFlowRate, true); | |
| 254 | } | ||
| 255 | |||
| 256 | 5 | bool ChillerElectricASHRAE205_Impl::isCondenserMaximumRequestedFlowRateAutosized() const { | |
| 257 | 5 | bool result = false; | |
| 258 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<std::string> value = getString(OS_Chiller_Electric_ASHRAE205Fields::CondenserMaximumRequestedFlowRate, true); |
| 259 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | if (value) { |
| 260 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
10 | result = openstudio::istringEqual(value.get(), "Autosize"); |
| 261 | } | ||
| 262 | 5 | return result; | |
| 263 | 5 | } | |
| 264 | |||
| 265 | 4 | bool ChillerElectricASHRAE205_Impl::setCondenserMaximumRequestedFlowRate(double condenserMaximumRequestedFlowRate) { | |
| 266 | 4 | bool result = setDouble(OS_Chiller_Electric_ASHRAE205Fields::CondenserMaximumRequestedFlowRate, condenserMaximumRequestedFlowRate); | |
| 267 | 4 | return result; | |
| 268 | } | ||
| 269 | |||
| 270 | 6 | void ChillerElectricASHRAE205_Impl::autosizeCondenserMaximumRequestedFlowRate() { | |
| 271 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
12 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::CondenserMaximumRequestedFlowRate, "Autosize"); |
| 272 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 273 | 6 | } | |
| 274 | |||
| 275 | 4 | std::string ChillerElectricASHRAE205_Impl::chillerFlowMode() const { | |
| 276 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_Chiller_Electric_ASHRAE205Fields::ChillerFlowMode, true); |
| 277 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 278 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | return value.get(); |
| 279 | 4 | } | |
| 280 | |||
| 281 | 9 | bool ChillerElectricASHRAE205_Impl::setChillerFlowMode(const std::string& chillerFlowMode) { | |
| 282 | 9 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::ChillerFlowMode, chillerFlowMode); | |
| 283 | 9 | return result; | |
| 284 | } | ||
| 285 | |||
| 286 | 7 | boost::optional<double> ChillerElectricASHRAE205_Impl::oilCoolerDesignFlowRate() const { | |
| 287 | 7 | return getDouble(OS_Chiller_Electric_ASHRAE205Fields::OilCoolerDesignFlowRate, true); | |
| 288 | } | ||
| 289 | |||
| 290 | 4 | bool ChillerElectricASHRAE205_Impl::setOilCoolerDesignFlowRate(double oilCoolerDesignFlowRate) { | |
| 291 | 4 | bool result = setDouble(OS_Chiller_Electric_ASHRAE205Fields::OilCoolerDesignFlowRate, oilCoolerDesignFlowRate); | |
| 292 | 4 | return result; | |
| 293 | } | ||
| 294 | |||
| 295 | ✗ | void ChillerElectricASHRAE205_Impl::resetOilCoolerDesignFlowRate() { | |
| 296 | ✗ | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::OilCoolerDesignFlowRate, ""); | |
| 297 | ✗ | OS_ASSERT(result); | |
| 298 | ✗ | } | |
| 299 | |||
| 300 | 7 | boost::optional<double> ChillerElectricASHRAE205_Impl::auxiliaryCoolingDesignFlowRate() const { | |
| 301 | 7 | return getDouble(OS_Chiller_Electric_ASHRAE205Fields::AuxiliaryCoolingDesignFlowRate, true); | |
| 302 | } | ||
| 303 | |||
| 304 | 4 | bool ChillerElectricASHRAE205_Impl::setAuxiliaryCoolingDesignFlowRate(double auxiliaryCoolingDesignFlowRate) { | |
| 305 | 4 | bool result = setDouble(OS_Chiller_Electric_ASHRAE205Fields::AuxiliaryCoolingDesignFlowRate, auxiliaryCoolingDesignFlowRate); | |
| 306 | 4 | return result; | |
| 307 | } | ||
| 308 | |||
| 309 | ✗ | void ChillerElectricASHRAE205_Impl::resetAuxiliaryCoolingDesignFlowRate() { | |
| 310 | ✗ | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::AuxiliaryCoolingDesignFlowRate, ""); | |
| 311 | ✗ | OS_ASSERT(result); | |
| 312 | ✗ | } | |
| 313 | |||
| 314 | 5 | std::string ChillerElectricASHRAE205_Impl::endUseSubcategory() const { | |
| 315 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<std::string> value = getString(OS_Chiller_Electric_ASHRAE205Fields::EndUseSubcategory, true); |
| 316 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 317 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
10 | return value.get(); |
| 318 | 5 | } | |
| 319 | |||
| 320 | 3 | bool ChillerElectricASHRAE205_Impl::isEndUseSubcategoryDefaulted() const { | |
| 321 | 3 | return isEmpty(OS_Chiller_Electric_ASHRAE205Fields::EndUseSubcategory); | |
| 322 | } | ||
| 323 | |||
| 324 | 8 | bool ChillerElectricASHRAE205_Impl::setEndUseSubcategory(const std::string& endUseSubcategory) { | |
| 325 | 8 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::EndUseSubcategory, endUseSubcategory); | |
| 326 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 8 times.
|
8 | OS_ASSERT(result); |
| 327 | 8 | return result; | |
| 328 | } | ||
| 329 | |||
| 330 | 1 | void ChillerElectricASHRAE205_Impl::resetEndUseSubcategory() { | |
| 331 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_Chiller_Electric_ASHRAE205Fields::EndUseSubcategory, ""); |
| 332 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 333 | 1 | } | |
| 334 | |||
| 335 | ✗ | boost::optional<double> ChillerElectricASHRAE205_Impl::autosizedRatedCapacity() { | |
| 336 | ✗ | return getAutosizedValue("Design Size Rated Capacity", "W"); | |
| 337 | } | ||
| 338 | |||
| 339 | ✗ | boost::optional<double> ChillerElectricASHRAE205_Impl::autosizedChilledWaterMaximumRequestedFlowRate() { | |
| 340 | ✗ | return getAutosizedValue("Design Size Chilled Water Maximum Requested Flow Rate", "m3/s"); | |
| 341 | } | ||
| 342 | |||
| 343 | ✗ | boost::optional<double> ChillerElectricASHRAE205_Impl::autosizedCondenserMaximumRequestedFlowRate() { | |
| 344 | ✗ | return getAutosizedValue("Design Size Condenser Maximum Requested Flow Rate", "m3/s"); | |
| 345 | } | ||
| 346 | |||
| 347 | ✗ | void ChillerElectricASHRAE205_Impl::autosize() { | |
| 348 | ✗ | autosizeRatedCapacity(); | |
| 349 | ✗ | autosizeChilledWaterMaximumRequestedFlowRate(); | |
| 350 | ✗ | autosizeCondenserMaximumRequestedFlowRate(); | |
| 351 | ✗ | } | |
| 352 | |||
| 353 | ✗ | void ChillerElectricASHRAE205_Impl::applySizingValues() { | |
| 354 | ✗ | boost::optional<double> val; | |
| 355 | ✗ | val = autosizedRatedCapacity(); | |
| 356 | ✗ | if (val) { | |
| 357 | ✗ | setRatedCapacity(val.get()); | |
| 358 | } | ||
| 359 | |||
| 360 | ✗ | val = autosizedChilledWaterMaximumRequestedFlowRate(); | |
| 361 | ✗ | if (val) { | |
| 362 | ✗ | setChilledWaterMaximumRequestedFlowRate(val.get()); | |
| 363 | } | ||
| 364 | |||
| 365 | ✗ | val = autosizedCondenserMaximumRequestedFlowRate(); | |
| 366 | ✗ | if (val) { | |
| 367 | ✗ | setCondenserMaximumRequestedFlowRate(val.get()); | |
| 368 | } | ||
| 369 | ✗ | } | |
| 370 | |||
| 371 | // Primary: Chiller Water | ||
| 372 | 114 | unsigned ChillerElectricASHRAE205_Impl::supplyInletPort() const { | |
| 373 | 114 | return OS_Chiller_Electric_ASHRAE205Fields::ChilledWaterInletNodeName; | |
| 374 | } | ||
| 375 | |||
| 376 | 88 | unsigned ChillerElectricASHRAE205_Impl::supplyOutletPort() const { | |
| 377 | 88 | return OS_Chiller_Electric_ASHRAE205Fields::ChilledWaterOutletNodeName; | |
| 378 | } | ||
| 379 | |||
| 380 | 35 | boost::optional<Node> ChillerElectricASHRAE205_Impl::chilledWaterInletNode() const { | |
| 381 |
3/3✓ Branch 1 taken 35 times.
✓ Branch 3 taken 30 times.
✓ Branch 4 taken 5 times.
|
70 | if (auto mo_ = supplyInletModelObject()) { |
| 382 |
2/2✓ Branch 1 taken 30 times.
✓ Branch 4 taken 30 times.
|
30 | return mo_->optionalCast<Node>(); |
| 383 | 35 | } | |
| 384 | 5 | return boost::none; | |
| 385 | } | ||
| 386 | |||
| 387 | 24 | boost::optional<Node> ChillerElectricASHRAE205_Impl::chilledWaterOutletNode() const { | |
| 388 |
3/3✓ Branch 1 taken 24 times.
✓ Branch 3 taken 22 times.
✓ Branch 4 taken 2 times.
|
48 | if (auto mo_ = supplyOutletModelObject()) { |
| 389 |
2/2✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
|
22 | return mo_->optionalCast<Node>(); |
| 390 | 24 | } | |
| 391 | 2 | return boost::none; | |
| 392 | } | ||
| 393 | |||
| 394 | // Secondary: Condenser Loop | ||
| 395 | |||
| 396 | 101 | unsigned ChillerElectricASHRAE205_Impl::demandInletPort() const { | |
| 397 | 101 | return OS_Chiller_Electric_ASHRAE205Fields::CondenserInletNodeName; | |
| 398 | } | ||
| 399 | |||
| 400 | 86 | unsigned ChillerElectricASHRAE205_Impl::demandOutletPort() const { | |
| 401 | 86 | return OS_Chiller_Electric_ASHRAE205Fields::CondenserOutletNodeName; | |
| 402 | } | ||
| 403 | |||
| 404 | 37 | boost::optional<Node> ChillerElectricASHRAE205_Impl::condenserInletNode() const { | |
| 405 |
3/3✓ Branch 1 taken 37 times.
✓ Branch 3 taken 34 times.
✓ Branch 4 taken 3 times.
|
74 | if (auto mo_ = demandInletModelObject()) { |
| 406 |
2/2✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
|
34 | return mo_->optionalCast<Node>(); |
| 407 | 37 | } | |
| 408 | 3 | return boost::none; | |
| 409 | } | ||
| 410 | |||
| 411 | 25 | boost::optional<Node> ChillerElectricASHRAE205_Impl::condenserOutletNode() const { | |
| 412 |
3/3✓ Branch 1 taken 25 times.
✓ Branch 3 taken 22 times.
✓ Branch 4 taken 3 times.
|
50 | if (auto mo_ = demandOutletModelObject()) { |
| 413 |
2/2✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
|
22 | return mo_->optionalCast<Node>(); |
| 414 | 25 | } | |
| 415 | 3 | return boost::none; | |
| 416 | } | ||
| 417 | |||
| 418 | // Tertiary: Heat Recovery | ||
| 419 | 54 | unsigned ChillerElectricASHRAE205_Impl::tertiaryInletPort() const { | |
| 420 | 54 | return OS_Chiller_Electric_ASHRAE205Fields::HeatRecoveryInletNodeName; | |
| 421 | } | ||
| 422 | |||
| 423 | 30 | unsigned ChillerElectricASHRAE205_Impl::tertiaryOutletPort() const { | |
| 424 | 30 | return OS_Chiller_Electric_ASHRAE205Fields::HeatRecoveryOutletNodeName; | |
| 425 | } | ||
| 426 | |||
| 427 | 16 | boost::optional<Node> ChillerElectricASHRAE205_Impl::heatRecoveryInletNode() const { | |
| 428 |
2/3✓ Branch 1 taken 16 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 16 times.
|
32 | if (auto mo_ = tertiaryInletModelObject()) { |
| 429 | ✗ | return mo_->optionalCast<Node>(); | |
| 430 | 16 | } | |
| 431 | 16 | return boost::none; | |
| 432 | } | ||
| 433 | |||
| 434 | 12 | boost::optional<Node> ChillerElectricASHRAE205_Impl::heatRecoveryOutletNode() const { | |
| 435 |
2/3✓ Branch 1 taken 12 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 12 times.
|
24 | if (auto mo_ = tertiaryOutletModelObject()) { |
| 436 | ✗ | return mo_->optionalCast<Node>(); | |
| 437 | 12 | } | |
| 438 | 12 | return boost::none; | |
| 439 | } | ||
| 440 | |||
| 441 | 5 | bool ChillerElectricASHRAE205_Impl::addToNode(Node& node) { | |
| 442 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<PlantLoop> t_plantLoop = node.plantLoop(); |
| 443 | |||
| 444 | // If trying to add to a node that is on the demand side of a plant loop | ||
| 445 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | if (t_plantLoop) { |
| 446 |
5/5✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 3 times.
✓ Branch 11 taken 2 times.
|
10 | if (t_plantLoop->demandComponent(node.handle())) { |
| 447 | // If there is already a another loop where it's on the demand side (condenser Plant Loop) | ||
| 448 |
1/1✓ Branch 1 taken 3 times.
|
3 | boost::optional<PlantLoop> cndLoop_ = this->condenserWaterLoop(); |
| 449 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 2 times.
|
3 | if (cndLoop_) { |
| 450 | // And it's not the same as the node's loop | ||
| 451 |
4/5✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 9 taken 1 time.
✗ Branch 10 not taken.
|
1 | if (t_plantLoop.get() != cndLoop_.get()) { |
| 452 | // And if there is no Heat Recovery (tertiary) | ||
| 453 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
|
1 | if (!this->heatRecoveryLoop().is_initialized()) { |
| 454 | // Then try to add it to the tertiary one | ||
| 455 |
7/7✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 14 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
|
1 | LOG(Warn, "Calling addToTertiaryNode to connect it to the tertiary (=Heat Recovery) loop for " << briefDescription()); |
| 456 |
1/1✓ Branch 1 taken 1 time.
|
1 | return this->addToTertiaryNode(node); |
| 457 | } | ||
| 458 | } | ||
| 459 | } | ||
| 460 | 3 | } | |
| 461 | } | ||
| 462 | |||
| 463 | // All other cases, call the base class implementation | ||
| 464 |
1/1✓ Branch 1 taken 4 times.
|
4 | return WaterToWaterComponent_Impl::addToNode(node); |
| 465 | 5 | } | |
| 466 | |||
| 467 | 1 | bool ChillerElectricASHRAE205_Impl::addToTertiaryNode(Node& node) { | |
| 468 | |||
| 469 | if constexpr (!ChillerElectricASHRAE205::isHeatRecoverySupportedByEnergyplus) { | ||
| 470 |
8/8✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
✓ Branch 23 taken 1 time.
|
1 | LOG(Warn, "For " << briefDescription() << ", Heat Recovery isn't implemented by EnergyPlus yet, so tertiary connection is disabled."); |
| 471 | 1 | return false; | |
| 472 | } | ||
| 473 | |||
| 474 | auto t_plantLoop = node.plantLoop(); | ||
| 475 | |||
| 476 | // Only accept adding to a node that is on a demand side of a plant loop | ||
| 477 | // Since tertiary here = heat recovery loop (heating) | ||
| 478 | if (t_plantLoop) { | ||
| 479 | if (t_plantLoop->demandComponent(node.handle())) { | ||
| 480 | // Call base class method which accepts both supply and demand | ||
| 481 | return WaterToWaterComponent_Impl::addToTertiaryNode(node); | ||
| 482 | } else { | ||
| 483 | LOG(Info, | ||
| 484 | "Tertiary Loop (Heat Recovery Loop) connections can only be placed on the Demand side (of a Heating Loop), for " << briefDescription()); | ||
| 485 | } | ||
| 486 | } | ||
| 487 | return false; | ||
| 488 | } | ||
| 489 | |||
| 490 | 66 | std::vector<HVACComponent> ChillerElectricASHRAE205_Impl::edges(const boost::optional<HVACComponent>& prev) { | |
| 491 | // This handles supply, demand, and tertiary connections | ||
| 492 |
1/1✓ Branch 1 taken 66 times.
|
66 | std::vector<HVACComponent> edges = WaterToWaterComponent_Impl::edges(prev); |
| 493 | |||
| 494 | 20 | auto pushOilCoolerOutletModelObject = [&]() { | |
| 495 |
2/3✓ Branch 1 taken 20 times.
✓ Branch 3 taken 20 times.
✗ Branch 4 not taken.
|
40 | if (auto edgeModelObject = oilCoolerOutletModelObject()) { |
| 496 |
2/2✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
|
20 | auto edgeHVACComponent = edgeModelObject->optionalCast<HVACComponent>(); |
| 497 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 20 times.
✗ Branch 4 not taken.
|
20 | OS_ASSERT(edgeHVACComponent); |
| 498 |
2/2✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
|
20 | edges.push_back(edgeHVACComponent.get()); |
| 499 | 40 | } | |
| 500 | 20 | }; | |
| 501 | |||
| 502 | 18 | auto pushAuxiliaryOutletModelObject = [&]() { | |
| 503 |
2/3✓ Branch 1 taken 18 times.
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
|
36 | if (auto edgeModelObject = auxiliaryOutletModelObject()) { |
| 504 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
18 | auto edgeHVACComponent = edgeModelObject->optionalCast<HVACComponent>(); |
| 505 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 18 times.
✗ Branch 4 not taken.
|
18 | OS_ASSERT(edgeHVACComponent); |
| 506 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
18 | edges.push_back(edgeHVACComponent.get()); |
| 507 | 36 | } | |
| 508 | 84 | }; | |
| 509 | |||
| 510 |
2/2✓ Branch 0 taken 65 times.
✓ Branch 1 taken 1 time.
|
66 | if (prev) { |
| 511 |
3/3✓ Branch 1 taken 65 times.
✓ Branch 3 taken 59 times.
✓ Branch 4 taken 6 times.
|
130 | if (auto inletModelObject = oilCoolerInletModelObject()) { |
| 512 |
5/5✓ Branch 1 taken 59 times.
✓ Branch 4 taken 59 times.
✓ Branch 7 taken 59 times.
✓ Branch 9 taken 19 times.
✓ Branch 10 taken 40 times.
|
59 | if (prev.get() == inletModelObject.get()) { |
| 513 |
1/1✓ Branch 1 taken 19 times.
|
19 | pushOilCoolerOutletModelObject(); |
| 514 | 19 | return edges; | |
| 515 | } | ||
| 516 | 65 | } | |
| 517 |
3/3✓ Branch 1 taken 46 times.
✓ Branch 3 taken 36 times.
✓ Branch 4 taken 10 times.
|
92 | if (auto inletModelObject = auxiliaryInletModelObject()) { |
| 518 |
5/5✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
✓ Branch 7 taken 36 times.
✓ Branch 9 taken 17 times.
✓ Branch 10 taken 19 times.
|
36 | if (prev.get() == inletModelObject.get()) { |
| 519 |
1/1✓ Branch 1 taken 17 times.
|
17 | pushAuxiliaryOutletModelObject(); |
| 520 | 17 | return edges; | |
| 521 | } | ||
| 522 | 46 | } | |
| 523 | } else { | ||
| 524 |
1/1✓ Branch 1 taken 1 time.
|
1 | pushOilCoolerOutletModelObject(); |
| 525 |
1/1✓ Branch 1 taken 1 time.
|
1 | pushAuxiliaryOutletModelObject(); |
| 526 | 1 | return edges; | |
| 527 | } | ||
| 528 | |||
| 529 | 29 | return edges; | |
| 530 | ✗ | } | |
| 531 | |||
| 532 | 35 | boost::optional<PlantLoop> ChillerElectricASHRAE205_Impl::plantLoop() const { | |
| 533 |
3/3✓ Branch 1 taken 35 times.
✓ Branch 3 taken 26 times.
✓ Branch 4 taken 9 times.
|
70 | if (boost::optional<ModelObject> mo_ = supplyOutletModelObject()) { |
| 534 |
3/4✓ Branch 1 taken 26 times.
✓ Branch 4 taken 26 times.
✓ Branch 6 taken 26 times.
✗ Branch 7 not taken.
|
52 | if (boost::optional<Node> n_ = mo_->optionalCast<Node>()) { |
| 535 |
2/2✓ Branch 1 taken 26 times.
✓ Branch 4 taken 26 times.
|
26 | return n_->plantLoop(); |
| 536 | 26 | } | |
| 537 | 35 | } | |
| 538 | 9 | return boost::none; | |
| 539 | } | ||
| 540 | |||
| 541 | 32 | boost::optional<PlantLoop> ChillerElectricASHRAE205_Impl::secondaryPlantLoop() const { | |
| 542 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 23 times.
✓ Branch 4 taken 9 times.
|
64 | if (boost::optional<ModelObject> mo_ = demandOutletModelObject()) { |
| 543 |
3/4✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
✓ Branch 6 taken 23 times.
✗ Branch 7 not taken.
|
46 | if (boost::optional<Node> n_ = mo_->optionalCast<Node>()) { |
| 544 |
2/2✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
|
23 | return n_->plantLoop(); |
| 545 | 23 | } | |
| 546 | 32 | } | |
| 547 | 9 | return boost::none; | |
| 548 | } | ||
| 549 | |||
| 550 | 15 | boost::optional<PlantLoop> ChillerElectricASHRAE205_Impl::tertiaryPlantLoop() const { | |
| 551 |
2/3✓ Branch 1 taken 15 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 15 times.
|
30 | if (boost::optional<ModelObject> mo_ = tertiaryOutletModelObject()) { |
| 552 | ✗ | if (boost::optional<Node> n_ = mo_->optionalCast<Node>()) { | |
| 553 | ✗ | return n_->plantLoop(); | |
| 554 | ✗ | } | |
| 555 | 15 | } | |
| 556 | 15 | return boost::none; | |
| 557 | } | ||
| 558 | |||
| 559 | 25 | boost::optional<PlantLoop> ChillerElectricASHRAE205_Impl::chilledWaterLoop() const { | |
| 560 | 25 | return plantLoop(); | |
| 561 | } | ||
| 562 | |||
| 563 | 23 | boost::optional<PlantLoop> ChillerElectricASHRAE205_Impl::condenserWaterLoop() const { | |
| 564 | 23 | return secondaryPlantLoop(); | |
| 565 | } | ||
| 566 | 12 | boost::optional<PlantLoop> ChillerElectricASHRAE205_Impl::heatRecoveryLoop() const { | |
| 567 | 12 | return tertiaryPlantLoop(); | |
| 568 | } | ||
| 569 | |||
| 570 | // Extra loops | ||
| 571 | |||
| 572 | /// Oil Cooler Loop | ||
| 573 | |||
| 574 | 106 | unsigned ChillerElectricASHRAE205_Impl::oilCoolerInletPort() const { | |
| 575 | 106 | return OS_Chiller_Electric_ASHRAE205Fields::OilCoolerInletNodeName; | |
| 576 | } | ||
| 577 | |||
| 578 | 100 | OptionalModelObject ChillerElectricASHRAE205_Impl::oilCoolerInletModelObject() const { | |
| 579 | 100 | return connectedObject(ChillerElectricASHRAE205_Impl::oilCoolerInletPort()); | |
| 580 | } | ||
| 581 | |||
| 582 | 30 | boost::optional<Node> ChillerElectricASHRAE205_Impl::oilCoolerInletNode() const { | |
| 583 |
3/3✓ Branch 1 taken 30 times.
✓ Branch 3 taken 24 times.
✓ Branch 4 taken 6 times.
|
60 | if (auto mo_ = oilCoolerInletModelObject()) { |
| 584 |
2/2✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
|
24 | return mo_->optionalCast<Node>(); |
| 585 | 30 | } | |
| 586 | 6 | return boost::none; | |
| 587 | } | ||
| 588 | |||
| 589 | 74 | unsigned ChillerElectricASHRAE205_Impl::oilCoolerOutletPort() const { | |
| 590 | 74 | return OS_Chiller_Electric_ASHRAE205Fields::OilCoolerOutletNodeName; | |
| 591 | } | ||
| 592 | |||
| 593 | 68 | OptionalModelObject ChillerElectricASHRAE205_Impl::oilCoolerOutletModelObject() const { | |
| 594 | 68 | return connectedObject(ChillerElectricASHRAE205_Impl::oilCoolerOutletPort()); | |
| 595 | } | ||
| 596 | |||
| 597 | 43 | boost::optional<Node> ChillerElectricASHRAE205_Impl::oilCoolerOutletNode() const { | |
| 598 |
3/3✓ Branch 1 taken 43 times.
✓ Branch 3 taken 28 times.
✓ Branch 4 taken 15 times.
|
86 | if (auto mo_ = oilCoolerOutletModelObject()) { |
| 599 |
2/2✓ Branch 1 taken 28 times.
✓ Branch 4 taken 28 times.
|
28 | return mo_->optionalCast<Node>(); |
| 600 | 43 | } | |
| 601 | 15 | return boost::none; | |
| 602 | } | ||
| 603 | |||
| 604 | 21 | boost::optional<PlantLoop> ChillerElectricASHRAE205_Impl::oilCoolerLoop() const { | |
| 605 |
3/3✓ Branch 1 taken 21 times.
✓ Branch 3 taken 12 times.
✓ Branch 4 taken 9 times.
|
42 | if (boost::optional<Node> n_ = oilCoolerOutletNode()) { |
| 606 |
2/2✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
|
12 | return n_->plantLoop(); |
| 607 | 21 | } | |
| 608 | 9 | return boost::none; | |
| 609 | } | ||
| 610 | |||
| 611 | 4 | bool ChillerElectricASHRAE205_Impl::removeFromOilCoolerLoop() { | |
| 612 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 3 times.
|
8 | if (auto plant = oilCoolerLoop()) { |
| 613 |
7/7✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 19 taken 1 time.
|
1 | return HVACComponent_Impl::removeFromLoop(plant->demandInletNode(), plant->demandOutletNode(), oilCoolerInletPort(), oilCoolerOutletPort()); |
| 614 | 4 | } | |
| 615 | |||
| 616 | 3 | return false; | |
| 617 | } | ||
| 618 | |||
| 619 | 2 | bool ChillerElectricASHRAE205_Impl::addDemandBranchOnOilCoolerLoop(PlantLoop& plantLoop) { | |
| 620 |
1/1✓ Branch 1 taken 2 times.
|
2 | Model _model = this->model(); |
| 621 | |||
| 622 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 2 times.
|
2 | if (plantLoop.model() != _model) { |
| 623 | ✗ | return false; | |
| 624 | } | ||
| 625 | |||
| 626 |
1/1✓ Branch 1 taken 2 times.
|
2 | Splitter splitter = plantLoop.demandSplitter(); |
| 627 |
1/1✓ Branch 1 taken 2 times.
|
2 | Mixer mixer = plantLoop.demandMixer(); |
| 628 | |||
| 629 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 5 taken 2 times.
✗ Branch 6 not taken.
|
2 | if (splitter.outletModelObjects().size() == 1u) { |
| 630 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<ModelObject> mo = splitter.lastOutletModelObject()) { |
| 631 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<Node> node = mo->optionalCast<Node>()) { |
| 632 |
13/22✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 2 times.
✓ Branch 18 taken 2 times.
✓ Branch 21 taken 2 times.
✓ Branch 24 taken 2 times.
✓ Branch 26 taken 2 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 2 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 2 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 2 times.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
|
2 | if ((node->outletModelObject().get() == mixer) && (node->inletModelObject().get() == splitter)) { |
| 633 | |||
| 634 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | return addToOilCoolerLoopNode(node.get()); |
| 635 | } | ||
| 636 | 2 | } | |
| 637 | 2 | } | |
| 638 | } | ||
| 639 | |||
| 640 | ✗ | unsigned nextOutletPort = splitter.nextOutletPort(); | |
| 641 | ✗ | unsigned nextInletPort = mixer.nextInletPort(); | |
| 642 | |||
| 643 | ✗ | Node node(_model); | |
| 644 | |||
| 645 | ✗ | _model.connect(splitter, nextOutletPort, node, node.inletPort()); | |
| 646 | ✗ | _model.connect(node, node.outletPort(), mixer, nextInletPort); | |
| 647 | |||
| 648 | ✗ | if (addToOilCoolerLoopNode(node)) { | |
| 649 | ✗ | return true; | |
| 650 | } | ||
| 651 | |||
| 652 | ✗ | _model.disconnect(node, node.outletPort()); | |
| 653 | ✗ | _model.disconnect(node, node.inletPort()); | |
| 654 | ✗ | node.remove(); | |
| 655 | |||
| 656 | ✗ | return false; | |
| 657 | 2 | } | |
| 658 | |||
| 659 | 3 | bool ChillerElectricASHRAE205_Impl::addToOilCoolerLoopNode(Node& node) { | |
| 660 | |||
| 661 | // One of the example files actually has the Oil Coiler and Auxiliary nodes in series on the same branch... | ||
| 662 | // But this would require a bunch of changes to allow a component to be twice on the same branch, so I'm not allowing it | ||
| 663 |
3/4✓ Branch 3 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 3 times.
|
3 | if (node.getImpl<Node_Impl>()->isConnected(getObject<ModelObject>())) { |
| 664 | // if ((oilCoolerInletNode() && (node.handle() == oilCoolerInletNode()->handle())) | ||
| 665 | // || (oilCoolerOutletNode() && (node.handle() == oilCoolerOutletNode()->handle()))) { | ||
| 666 | ✗ | return false; | |
| 667 | } | ||
| 668 | |||
| 669 |
1/1✓ Branch 1 taken 3 times.
|
3 | auto plantLoop_ = node.plantLoop(); |
| 670 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
|
3 | if (!plantLoop_) { |
| 671 | ✗ | LOG(Warn, "For " << briefDescription() << ", Oil Cooler Loop can only be connected to a PlantLoop"); | |
| 672 | ✗ | return false; | |
| 673 | } | ||
| 674 | |||
| 675 |
4/5✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 3 times.
|
3 | if (!plantLoop_->demandComponent(node.handle())) { |
| 676 | ✗ | LOG(Warn, "For " << briefDescription() << ", Oil Cooler Loop can only be connected to a PlantLoop on the demand side"); | |
| 677 | ✗ | return false; | |
| 678 | } | ||
| 679 | |||
| 680 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | HVACComponent systemStartComponent = plantLoop_->demandInletNode(); |
| 681 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | HVACComponent systemEndComponent = plantLoop_->demandOutletNode(); |
| 682 | |||
| 683 |
1/1✓ Branch 1 taken 3 times.
|
3 | removeFromOilCoolerLoop(); |
| 684 | |||
| 685 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | return HVACComponent_Impl::addToNode(node, systemStartComponent, systemEndComponent, oilCoolerInletPort(), oilCoolerOutletPort()); |
| 686 | 3 | } | |
| 687 | |||
| 688 | /// Auxiliary Loop | ||
| 689 | |||
| 690 | 71 | unsigned ChillerElectricASHRAE205_Impl::auxiliaryInletPort() const { | |
| 691 | 71 | return OS_Chiller_Electric_ASHRAE205Fields::AuxiliaryInletNodeName; | |
| 692 | } | ||
| 693 | |||
| 694 | 65 | OptionalModelObject ChillerElectricASHRAE205_Impl::auxiliaryInletModelObject() const { | |
| 695 | 65 | return connectedObject(ChillerElectricASHRAE205_Impl::auxiliaryInletPort()); | |
| 696 | } | ||
| 697 | |||
| 698 | 19 | boost::optional<Node> ChillerElectricASHRAE205_Impl::auxiliaryInletNode() const { | |
| 699 |
3/3✓ Branch 1 taken 19 times.
✓ Branch 3 taken 10 times.
✓ Branch 4 taken 9 times.
|
38 | if (auto mo_ = auxiliaryInletModelObject()) { |
| 700 |
2/2✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
|
10 | return mo_->optionalCast<Node>(); |
| 701 | 19 | } | |
| 702 | 9 | return boost::none; | |
| 703 | } | ||
| 704 | |||
| 705 | 53 | unsigned ChillerElectricASHRAE205_Impl::auxiliaryOutletPort() const { | |
| 706 | 53 | return OS_Chiller_Electric_ASHRAE205Fields::AuxiliaryOutletNodeName; | |
| 707 | } | ||
| 708 | |||
| 709 | 47 | OptionalModelObject ChillerElectricASHRAE205_Impl::auxiliaryOutletModelObject() const { | |
| 710 | 47 | return connectedObject(ChillerElectricASHRAE205_Impl::auxiliaryOutletPort()); | |
| 711 | } | ||
| 712 | |||
| 713 | 29 | boost::optional<Node> ChillerElectricASHRAE205_Impl::auxiliaryOutletNode() const { | |
| 714 |
3/3✓ Branch 1 taken 29 times.
✓ Branch 3 taken 8 times.
✓ Branch 4 taken 21 times.
|
58 | if (auto mo_ = auxiliaryOutletModelObject()) { |
| 715 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | return mo_->optionalCast<Node>(); |
| 716 | 29 | } | |
| 717 | 21 | return boost::none; | |
| 718 | } | ||
| 719 | |||
| 720 | 14 | boost::optional<PlantLoop> ChillerElectricASHRAE205_Impl::auxiliaryLoop() const { | |
| 721 |
3/3✓ Branch 1 taken 14 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 12 times.
|
28 | if (boost::optional<Node> n_ = auxiliaryOutletNode()) { |
| 722 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | return n_->plantLoop(); |
| 723 | 14 | } | |
| 724 | 12 | return boost::none; | |
| 725 | } | ||
| 726 | |||
| 727 | 4 | bool ChillerElectricASHRAE205_Impl::removeFromAuxiliaryLoop() { | |
| 728 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 3 times.
|
8 | if (auto plant = auxiliaryLoop()) { |
| 729 |
7/7✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 19 taken 1 time.
|
1 | return HVACComponent_Impl::removeFromLoop(plant->demandInletNode(), plant->demandOutletNode(), auxiliaryInletPort(), auxiliaryOutletPort()); |
| 730 | 4 | } | |
| 731 | |||
| 732 | 3 | return false; | |
| 733 | } | ||
| 734 | |||
| 735 | 2 | bool ChillerElectricASHRAE205_Impl::addDemandBranchOnAuxiliaryLoop(PlantLoop& plantLoop) { | |
| 736 |
1/1✓ Branch 1 taken 2 times.
|
2 | Model _model = this->model(); |
| 737 | |||
| 738 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 2 times.
|
2 | if (plantLoop.model() != _model) { |
| 739 | ✗ | return false; | |
| 740 | } | ||
| 741 | |||
| 742 |
1/1✓ Branch 1 taken 2 times.
|
2 | Splitter splitter = plantLoop.demandSplitter(); |
| 743 |
1/1✓ Branch 1 taken 2 times.
|
2 | Mixer mixer = plantLoop.demandMixer(); |
| 744 | |||
| 745 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 5 taken 2 times.
✗ Branch 6 not taken.
|
2 | if (splitter.outletModelObjects().size() == 1u) { |
| 746 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<ModelObject> mo = splitter.lastOutletModelObject()) { |
| 747 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<Node> node = mo->optionalCast<Node>()) { |
| 748 |
13/22✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 2 times.
✓ Branch 18 taken 2 times.
✓ Branch 21 taken 2 times.
✓ Branch 24 taken 2 times.
✓ Branch 26 taken 2 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 2 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 2 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 2 times.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
|
2 | if ((node->outletModelObject().get() == mixer) && (node->inletModelObject().get() == splitter)) { |
| 749 | |||
| 750 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | return addToAuxiliaryLoopNode(node.get()); |
| 751 | } | ||
| 752 | 2 | } | |
| 753 | 2 | } | |
| 754 | } | ||
| 755 | |||
| 756 | ✗ | unsigned nextOutletPort = splitter.nextOutletPort(); | |
| 757 | ✗ | unsigned nextInletPort = mixer.nextInletPort(); | |
| 758 | |||
| 759 | ✗ | Node node(_model); | |
| 760 | |||
| 761 | ✗ | _model.connect(splitter, nextOutletPort, node, node.inletPort()); | |
| 762 | ✗ | _model.connect(node, node.outletPort(), mixer, nextInletPort); | |
| 763 | |||
| 764 | ✗ | if (addToAuxiliaryLoopNode(node)) { | |
| 765 | ✗ | return true; | |
| 766 | } | ||
| 767 | |||
| 768 | ✗ | _model.disconnect(node, node.outletPort()); | |
| 769 | ✗ | _model.disconnect(node, node.inletPort()); | |
| 770 | ✗ | node.remove(); | |
| 771 | |||
| 772 | ✗ | return false; | |
| 773 | 2 | } | |
| 774 | |||
| 775 | 3 | bool ChillerElectricASHRAE205_Impl::addToAuxiliaryLoopNode(Node& node) { | |
| 776 | |||
| 777 | // One of the example files actually has the Oil Coiler and Auxiliary nodes in series on the same branch... | ||
| 778 | // But this would require a bunch of changes to allow a component to be twice on the same branch, so I'm not allowing it | ||
| 779 |
3/4✓ Branch 3 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 3 times.
|
3 | if (node.getImpl<Node_Impl>()->isConnected(getObject<ModelObject>())) { |
| 780 | // if ((auxiliaryInletNode() && (node.handle() == auxiliaryInletNode()->handle())) | ||
| 781 | // || (auxiliaryOutletNode() && (node.handle() == auxiliaryOutletNode()->handle()))) { | ||
| 782 | ✗ | return false; | |
| 783 | } | ||
| 784 | |||
| 785 |
1/1✓ Branch 1 taken 3 times.
|
3 | auto plantLoop_ = node.plantLoop(); |
| 786 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
|
3 | if (!plantLoop_) { |
| 787 | ✗ | LOG(Warn, "For " << briefDescription() << ", Oil Cooler Loop can only be connected to a PlantLoop"); | |
| 788 | ✗ | return false; | |
| 789 | } | ||
| 790 | |||
| 791 |
4/5✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 3 times.
|
3 | if (!plantLoop_->demandComponent(node.handle())) { |
| 792 | ✗ | LOG(Warn, "For " << briefDescription() << ", Oil Cooler Loop can only be connected to a PlantLoop on the demand side"); | |
| 793 | ✗ | return false; | |
| 794 | } | ||
| 795 | |||
| 796 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | HVACComponent systemStartComponent = plantLoop_->demandInletNode(); |
| 797 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | HVACComponent systemEndComponent = plantLoop_->demandOutletNode(); |
| 798 | |||
| 799 |
1/1✓ Branch 1 taken 3 times.
|
3 | removeFromAuxiliaryLoop(); |
| 800 | |||
| 801 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | return HVACComponent_Impl::addToNode(node, systemStartComponent, systemEndComponent, auxiliaryInletPort(), auxiliaryOutletPort()); |
| 802 | 3 | } | |
| 803 | |||
| 804 | 2 | ModelObject ChillerElectricASHRAE205_Impl::clone(Model model) const { | |
| 805 | // WaterToWaterComponent resets the supply, demand and tertiary ports | ||
| 806 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | auto mo = WaterToWaterComponent_Impl::clone(model); |
| 807 | |||
| 808 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
4 | mo.setString(oilCoolerInletPort(), ""); |
| 809 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
4 | mo.setString(oilCoolerOutletPort(), ""); |
| 810 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
4 | mo.setString(auxiliaryInletPort(), ""); |
| 811 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
4 | mo.setString(auxiliaryOutletPort(), ""); |
| 812 | 2 | return mo; | |
| 813 | ✗ | } | |
| 814 | |||
| 815 | 3 | ComponentType ChillerElectricASHRAE205_Impl::componentType() const { | |
| 816 |
1/1✓ Branch 1 taken 3 times.
|
3 | return ComponentType::Cooling; |
| 817 | } | ||
| 818 | |||
| 819 | ✗ | std::vector<FuelType> ChillerElectricASHRAE205_Impl::coolingFuelTypes() const { | |
| 820 | ✗ | std::set<FuelType> result; | |
| 821 | ✗ | result.insert(FuelType::Electricity); | |
| 822 | ✗ | if (auto p_ = condenserWaterLoop()) { | |
| 823 | ✗ | for (auto ft : p_->coolingFuelTypes()) { | |
| 824 | ✗ | result.insert(ft); | |
| 825 | ✗ | } | |
| 826 | ✗ | } | |
| 827 | ✗ | return {result.begin(), result.end()}; | |
| 828 | ✗ | } | |
| 829 | |||
| 830 | ✗ | std::vector<FuelType> ChillerElectricASHRAE205_Impl::heatingFuelTypes() const { | |
| 831 | ✗ | return {}; | |
| 832 | } | ||
| 833 | |||
| 834 | ✗ | std::vector<AppGFuelType> ChillerElectricASHRAE205_Impl::appGHeatingFuelTypes() const { | |
| 835 | ✗ | return {}; | |
| 836 | } | ||
| 837 | |||
| 838 | } // namespace detail | ||
| 839 | |||
| 840 | 6 | ChillerElectricASHRAE205::ChillerElectricASHRAE205(const ExternalFile& representationFile) | |
| 841 |
3/3✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
|
6 | : WaterToWaterComponent(ChillerElectricASHRAE205::iddObjectType(), representationFile.model()) { |
| 842 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 6 times.
✗ Branch 5 not taken.
|
6 | OS_ASSERT(getImpl<detail::ChillerElectricASHRAE205_Impl>()); |
| 843 | |||
| 844 |
1/1✓ Branch 1 taken 6 times.
|
6 | auto filePath = representationFile.filePath(); |
| 845 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | bool ok = (toString(filePath.extension()) == ".cbor"); |
| 846 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 5 times.
|
6 | if (!ok) { |
| 847 |
1/1✓ Branch 1 taken 1 time.
|
1 | remove(); |
| 848 |
17/17✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 25 taken 1 time.
✓ Branch 28 taken 1 time.
✓ Branch 31 taken 1 time.
✓ Branch 34 taken 1 time.
✓ Branch 37 taken 1 time.
✓ Branch 40 taken 1 time.
✓ Branch 43 taken 1 time.
✓ Branch 46 taken 1 time.
✓ Branch 50 taken 1 time.
✓ Branch 53 taken 1 time.
|
1 | LOG_AND_THROW("External file must have a .cbor extension, got externalfile='" << filePath << "'."); |
| 849 | } | ||
| 850 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | ok = setPointer(OS_Chiller_Electric_ASHRAE205Fields::RepresentationFileName, representationFile.handle()); |
| 851 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
✗ Branch 3 not taken.
|
5 | OS_ASSERT(ok); |
| 852 | |||
| 853 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | setPerformanceInterpolationMethod("Linear"); |
| 854 |
1/1✓ Branch 1 taken 5 times.
|
5 | autosizeRatedCapacity(); |
| 855 |
1/1✓ Branch 1 taken 5 times.
|
5 | setSizingFactor(1.0); |
| 856 |
2/2✓ Branch 3 taken 5 times.
✓ Branch 6 taken 5 times.
|
15 | getImpl<detail::ChillerElectricASHRAE205_Impl>()->setAmbientTemperatureIndicator("Outdoors"); |
| 857 |
1/1✓ Branch 1 taken 5 times.
|
5 | autosizeChilledWaterMaximumRequestedFlowRate(); |
| 858 |
1/1✓ Branch 1 taken 5 times.
|
5 | autosizeCondenserMaximumRequestedFlowRate(); |
| 859 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
10 | setChillerFlowMode("NotModulated"); |
| 860 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | setEndUseSubcategory("General"); |
| 861 | 7 | } | |
| 862 | |||
| 863 | 7619 | IddObjectType ChillerElectricASHRAE205::iddObjectType() { | |
| 864 |
1/1✓ Branch 1 taken 7619 times.
|
7619 | return {IddObjectType::OS_Chiller_Electric_ASHRAE205}; |
| 865 | } | ||
| 866 | |||
| 867 | ✗ | std::vector<std::string> ChillerElectricASHRAE205::performanceInterpolationMethodValues() { | |
| 868 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), | |
| 869 | ✗ | OS_Chiller_Electric_ASHRAE205Fields::PerformanceInterpolationMethod); | |
| 870 | } | ||
| 871 | |||
| 872 | ✗ | std::vector<std::string> ChillerElectricASHRAE205::ambientTemperatureIndicatorValues() { | |
| 873 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Chiller_Electric_ASHRAE205Fields::AmbientTemperatureIndicator); | |
| 874 | } | ||
| 875 | |||
| 876 | ✗ | std::vector<std::string> ChillerElectricASHRAE205::chillerFlowModeValues() { | |
| 877 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Chiller_Electric_ASHRAE205Fields::ChillerFlowMode); | |
| 878 | } | ||
| 879 | |||
| 880 | 11 | ExternalFile ChillerElectricASHRAE205::representationFile() const { | |
| 881 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->representationFile(); |
| 882 | } | ||
| 883 | |||
| 884 | 5 | std::string ChillerElectricASHRAE205::performanceInterpolationMethod() const { | |
| 885 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->performanceInterpolationMethod(); |
| 886 | } | ||
| 887 | |||
| 888 | 4 | boost::optional<double> ChillerElectricASHRAE205::ratedCapacity() const { | |
| 889 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->ratedCapacity(); |
| 890 | } | ||
| 891 | |||
| 892 | 5 | bool ChillerElectricASHRAE205::isRatedCapacityAutosized() const { | |
| 893 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->isRatedCapacityAutosized(); |
| 894 | } | ||
| 895 | |||
| 896 | ✗ | boost::optional<double> ChillerElectricASHRAE205::autosizedRatedCapacity() { | |
| 897 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->autosizedRatedCapacity(); | |
| 898 | } | ||
| 899 | |||
| 900 | 5 | double ChillerElectricASHRAE205::sizingFactor() const { | |
| 901 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->sizingFactor(); |
| 902 | } | ||
| 903 | |||
| 904 | 12 | std::string ChillerElectricASHRAE205::ambientTemperatureIndicator() const { | |
| 905 |
1/1✓ Branch 3 taken 12 times.
|
12 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->ambientTemperatureIndicator(); |
| 906 | } | ||
| 907 | |||
| 908 | 3 | boost::optional<Schedule> ChillerElectricASHRAE205::ambientTemperatureSchedule() const { | |
| 909 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->ambientTemperatureSchedule(); |
| 910 | } | ||
| 911 | |||
| 912 | 5 | boost::optional<ThermalZone> ChillerElectricASHRAE205::ambientTemperatureZone() const { | |
| 913 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->ambientTemperatureZone(); |
| 914 | } | ||
| 915 | |||
| 916 | 3 | boost::optional<std::string> ChillerElectricASHRAE205::ambientTemperatureOutdoorAirNodeName() const { | |
| 917 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->ambientTemperatureOutdoorAirNodeName(); |
| 918 | } | ||
| 919 | |||
| 920 | 7 | boost::optional<double> ChillerElectricASHRAE205::chilledWaterMaximumRequestedFlowRate() const { | |
| 921 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->chilledWaterMaximumRequestedFlowRate(); |
| 922 | } | ||
| 923 | |||
| 924 | 5 | bool ChillerElectricASHRAE205::isChilledWaterMaximumRequestedFlowRateAutosized() const { | |
| 925 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->isChilledWaterMaximumRequestedFlowRateAutosized(); |
| 926 | } | ||
| 927 | |||
| 928 | ✗ | boost::optional<double> ChillerElectricASHRAE205::autosizedChilledWaterMaximumRequestedFlowRate() { | |
| 929 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->autosizedChilledWaterMaximumRequestedFlowRate(); | |
| 930 | } | ||
| 931 | |||
| 932 | 7 | boost::optional<double> ChillerElectricASHRAE205::condenserMaximumRequestedFlowRate() const { | |
| 933 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->condenserMaximumRequestedFlowRate(); |
| 934 | } | ||
| 935 | |||
| 936 | 5 | bool ChillerElectricASHRAE205::isCondenserMaximumRequestedFlowRateAutosized() const { | |
| 937 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->isCondenserMaximumRequestedFlowRateAutosized(); |
| 938 | } | ||
| 939 | |||
| 940 | ✗ | boost::optional<double> ChillerElectricASHRAE205::autosizedCondenserMaximumRequestedFlowRate() { | |
| 941 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->autosizedCondenserMaximumRequestedFlowRate(); | |
| 942 | } | ||
| 943 | |||
| 944 | 4 | std::string ChillerElectricASHRAE205::chillerFlowMode() const { | |
| 945 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->chillerFlowMode(); |
| 946 | } | ||
| 947 | |||
| 948 | 7 | boost::optional<double> ChillerElectricASHRAE205::oilCoolerDesignFlowRate() const { | |
| 949 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->oilCoolerDesignFlowRate(); |
| 950 | } | ||
| 951 | |||
| 952 | 7 | boost::optional<double> ChillerElectricASHRAE205::auxiliaryCoolingDesignFlowRate() const { | |
| 953 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->auxiliaryCoolingDesignFlowRate(); |
| 954 | } | ||
| 955 | |||
| 956 | 5 | std::string ChillerElectricASHRAE205::endUseSubcategory() const { | |
| 957 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->endUseSubcategory(); |
| 958 | } | ||
| 959 | |||
| 960 | 3 | bool ChillerElectricASHRAE205::isEndUseSubcategoryDefaulted() const { | |
| 961 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->isEndUseSubcategoryDefaulted(); |
| 962 | } | ||
| 963 | |||
| 964 | ✗ | bool ChillerElectricASHRAE205::setRepresentationFile(const ExternalFile& externalFile) { | |
| 965 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setRepresentationFile(externalFile); | |
| 966 | } | ||
| 967 | |||
| 968 | 9 | bool ChillerElectricASHRAE205::setPerformanceInterpolationMethod(const std::string& performanceInterpolationMethod) { | |
| 969 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setPerformanceInterpolationMethod(performanceInterpolationMethod); |
| 970 | } | ||
| 971 | |||
| 972 | 2 | bool ChillerElectricASHRAE205::setRatedCapacity(double ratedCapacity) { | |
| 973 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setRatedCapacity(ratedCapacity); |
| 974 | } | ||
| 975 | |||
| 976 | 7 | void ChillerElectricASHRAE205::autosizeRatedCapacity() { | |
| 977 |
1/1✓ Branch 3 taken 7 times.
|
7 | getImpl<detail::ChillerElectricASHRAE205_Impl>()->autosizeRatedCapacity(); |
| 978 | 7 | } | |
| 979 | |||
| 980 | 9 | bool ChillerElectricASHRAE205::setSizingFactor(double sizingFactor) { | |
| 981 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setSizingFactor(sizingFactor); |
| 982 | } | ||
| 983 | |||
| 984 | // Done via the other setAmbientXXX | ||
| 985 | // bool ChillerElectricASHRAE205::setAmbientTemperatureIndicator(const std::string& ambientTemperatureIndicator) { | ||
| 986 | // return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setAmbientTemperatureIndicator(ambientTemperatureIndicator); | ||
| 987 | // } | ||
| 988 | |||
| 989 | 1 | bool ChillerElectricASHRAE205::setAmbientTemperatureSchedule(Schedule& schedule) { | |
| 990 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setAmbientTemperatureSchedule(schedule); |
| 991 | } | ||
| 992 | |||
| 993 | 2 | void ChillerElectricASHRAE205::resetAmbientTemperatureSchedule() { | |
| 994 |
1/1✓ Branch 3 taken 2 times.
|
2 | getImpl<detail::ChillerElectricASHRAE205_Impl>()->resetAmbientTemperatureSchedule(); |
| 995 | 2 | } | |
| 996 | |||
| 997 | 4 | bool ChillerElectricASHRAE205::setAmbientTemperatureZone(const ThermalZone& thermalZone) { | |
| 998 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setAmbientTemperatureZone(thermalZone); |
| 999 | } | ||
| 1000 | |||
| 1001 | 1 | void ChillerElectricASHRAE205::resetAmbientTemperatureZone() { | |
| 1002 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ChillerElectricASHRAE205_Impl>()->resetAmbientTemperatureZone(); |
| 1003 | 1 | } | |
| 1004 | |||
| 1005 | 1 | bool ChillerElectricASHRAE205::setAmbientTemperatureOutdoorAirNodeName(const std::string& ambientTemperatureOutdoorAirNodeName) { | |
| 1006 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setAmbientTemperatureOutdoorAirNodeName(ambientTemperatureOutdoorAirNodeName); |
| 1007 | } | ||
| 1008 | |||
| 1009 | 2 | void ChillerElectricASHRAE205::resetAmbientTemperatureOutdoorAirNodeName() { | |
| 1010 |
1/1✓ Branch 3 taken 2 times.
|
2 | getImpl<detail::ChillerElectricASHRAE205_Impl>()->resetAmbientTemperatureOutdoorAirNodeName(); |
| 1011 | 2 | } | |
| 1012 | |||
| 1013 | 4 | bool ChillerElectricASHRAE205::setChilledWaterMaximumRequestedFlowRate(double chilledWaterMaximumRequestedFlowRate) { | |
| 1014 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setChilledWaterMaximumRequestedFlowRate(chilledWaterMaximumRequestedFlowRate); |
| 1015 | } | ||
| 1016 | |||
| 1017 | 6 | void ChillerElectricASHRAE205::autosizeChilledWaterMaximumRequestedFlowRate() { | |
| 1018 |
1/1✓ Branch 3 taken 6 times.
|
6 | getImpl<detail::ChillerElectricASHRAE205_Impl>()->autosizeChilledWaterMaximumRequestedFlowRate(); |
| 1019 | 6 | } | |
| 1020 | |||
| 1021 | 4 | bool ChillerElectricASHRAE205::setCondenserMaximumRequestedFlowRate(double condenserMaximumRequestedFlowRate) { | |
| 1022 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setCondenserMaximumRequestedFlowRate(condenserMaximumRequestedFlowRate); |
| 1023 | } | ||
| 1024 | |||
| 1025 | 6 | void ChillerElectricASHRAE205::autosizeCondenserMaximumRequestedFlowRate() { | |
| 1026 |
1/1✓ Branch 3 taken 6 times.
|
6 | getImpl<detail::ChillerElectricASHRAE205_Impl>()->autosizeCondenserMaximumRequestedFlowRate(); |
| 1027 | 6 | } | |
| 1028 | |||
| 1029 | 9 | bool ChillerElectricASHRAE205::setChillerFlowMode(const std::string& chillerFlowMode) { | |
| 1030 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setChillerFlowMode(chillerFlowMode); |
| 1031 | } | ||
| 1032 | |||
| 1033 | 4 | bool ChillerElectricASHRAE205::setOilCoolerDesignFlowRate(double oilCoolerDesignFlowRate) { | |
| 1034 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setOilCoolerDesignFlowRate(oilCoolerDesignFlowRate); |
| 1035 | } | ||
| 1036 | |||
| 1037 | ✗ | void ChillerElectricASHRAE205::resetOilCoolerDesignFlowRate() { | |
| 1038 | ✗ | getImpl<detail::ChillerElectricASHRAE205_Impl>()->resetOilCoolerDesignFlowRate(); | |
| 1039 | ✗ | } | |
| 1040 | |||
| 1041 | 4 | bool ChillerElectricASHRAE205::setAuxiliaryCoolingDesignFlowRate(double auxiliaryCoolingDesignFlowRate) { | |
| 1042 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setAuxiliaryCoolingDesignFlowRate(auxiliaryCoolingDesignFlowRate); |
| 1043 | } | ||
| 1044 | |||
| 1045 | ✗ | void ChillerElectricASHRAE205::resetAuxiliaryCoolingDesignFlowRate() { | |
| 1046 | ✗ | getImpl<detail::ChillerElectricASHRAE205_Impl>()->resetAuxiliaryCoolingDesignFlowRate(); | |
| 1047 | ✗ | } | |
| 1048 | |||
| 1049 | 8 | bool ChillerElectricASHRAE205::setEndUseSubcategory(const std::string& endUseSubcategory) { | |
| 1050 |
1/1✓ Branch 3 taken 8 times.
|
8 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->setEndUseSubcategory(endUseSubcategory); |
| 1051 | } | ||
| 1052 | |||
| 1053 | 1 | void ChillerElectricASHRAE205::resetEndUseSubcategory() { | |
| 1054 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ChillerElectricASHRAE205_Impl>()->resetEndUseSubcategory(); |
| 1055 | 1 | } | |
| 1056 | |||
| 1057 | // Convenience getters | ||
| 1058 | |||
| 1059 | 25 | boost::optional<PlantLoop> ChillerElectricASHRAE205::chilledWaterLoop() const { | |
| 1060 |
1/1✓ Branch 3 taken 25 times.
|
25 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->chilledWaterLoop(); |
| 1061 | } | ||
| 1062 | |||
| 1063 | 35 | boost::optional<Node> ChillerElectricASHRAE205::chilledWaterInletNode() const { | |
| 1064 |
1/1✓ Branch 3 taken 35 times.
|
35 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->chilledWaterInletNode(); |
| 1065 | } | ||
| 1066 | |||
| 1067 | 24 | boost::optional<Node> ChillerElectricASHRAE205::chilledWaterOutletNode() const { | |
| 1068 |
1/1✓ Branch 3 taken 24 times.
|
24 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->chilledWaterOutletNode(); |
| 1069 | } | ||
| 1070 | |||
| 1071 | 20 | boost::optional<PlantLoop> ChillerElectricASHRAE205::condenserWaterLoop() const { | |
| 1072 |
1/1✓ Branch 3 taken 20 times.
|
20 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->condenserWaterLoop(); |
| 1073 | } | ||
| 1074 | |||
| 1075 | 37 | boost::optional<Node> ChillerElectricASHRAE205::condenserInletNode() const { | |
| 1076 |
1/1✓ Branch 3 taken 37 times.
|
37 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->condenserInletNode(); |
| 1077 | } | ||
| 1078 | |||
| 1079 | 25 | boost::optional<Node> ChillerElectricASHRAE205::condenserOutletNode() const { | |
| 1080 |
1/1✓ Branch 3 taken 25 times.
|
25 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->condenserOutletNode(); |
| 1081 | } | ||
| 1082 | |||
| 1083 | 11 | boost::optional<PlantLoop> ChillerElectricASHRAE205::heatRecoveryLoop() const { | |
| 1084 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->heatRecoveryLoop(); |
| 1085 | } | ||
| 1086 | |||
| 1087 | 16 | boost::optional<Node> ChillerElectricASHRAE205::heatRecoveryInletNode() const { | |
| 1088 |
1/1✓ Branch 3 taken 16 times.
|
16 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->heatRecoveryInletNode(); |
| 1089 | } | ||
| 1090 | |||
| 1091 | 12 | boost::optional<Node> ChillerElectricASHRAE205::heatRecoveryOutletNode() const { | |
| 1092 |
1/1✓ Branch 3 taken 12 times.
|
12 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->heatRecoveryOutletNode(); |
| 1093 | } | ||
| 1094 | |||
| 1095 | // Oil Cooler Loop | ||
| 1096 | |||
| 1097 | ✗ | unsigned ChillerElectricASHRAE205::oilCoolerInletPort() const { | |
| 1098 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->oilCoolerInletPort(); | |
| 1099 | } | ||
| 1100 | 5 | boost::optional<ModelObject> ChillerElectricASHRAE205::oilCoolerInletModelObject() const { | |
| 1101 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->oilCoolerInletModelObject(); |
| 1102 | } | ||
| 1103 | 30 | boost::optional<Node> ChillerElectricASHRAE205::oilCoolerInletNode() const { | |
| 1104 |
1/1✓ Branch 3 taken 30 times.
|
30 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->oilCoolerInletNode(); |
| 1105 | } | ||
| 1106 | |||
| 1107 | ✗ | unsigned ChillerElectricASHRAE205::oilCoolerOutletPort() const { | |
| 1108 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->oilCoolerOutletPort(); | |
| 1109 | } | ||
| 1110 | 5 | boost::optional<ModelObject> ChillerElectricASHRAE205::oilCoolerOutletModelObject() const { | |
| 1111 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->oilCoolerOutletModelObject(); |
| 1112 | } | ||
| 1113 | 22 | boost::optional<Node> ChillerElectricASHRAE205::oilCoolerOutletNode() const { | |
| 1114 |
1/1✓ Branch 3 taken 22 times.
|
22 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->oilCoolerOutletNode(); |
| 1115 | } | ||
| 1116 | |||
| 1117 | 17 | boost::optional<PlantLoop> ChillerElectricASHRAE205::oilCoolerLoop() const { | |
| 1118 |
1/1✓ Branch 3 taken 17 times.
|
17 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->oilCoolerLoop(); |
| 1119 | } | ||
| 1120 | |||
| 1121 | 2 | bool ChillerElectricASHRAE205::addDemandBranchOnOilCoolerLoop(PlantLoop& plantLoop) { | |
| 1122 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->addDemandBranchOnOilCoolerLoop(plantLoop); |
| 1123 | } | ||
| 1124 | |||
| 1125 | 1 | bool ChillerElectricASHRAE205::addToOilCoolerLoopNode(Node& node) { | |
| 1126 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->addToOilCoolerLoopNode(node); |
| 1127 | } | ||
| 1128 | |||
| 1129 | 1 | bool ChillerElectricASHRAE205::removeFromOilCoolerLoop() { | |
| 1130 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->removeFromOilCoolerLoop(); |
| 1131 | } | ||
| 1132 | |||
| 1133 | // Auxiliary Loop | ||
| 1134 | |||
| 1135 | ✗ | unsigned ChillerElectricASHRAE205::auxiliaryInletPort() const { | |
| 1136 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->auxiliaryInletPort(); | |
| 1137 | } | ||
| 1138 | ✗ | boost::optional<ModelObject> ChillerElectricASHRAE205::auxiliaryInletModelObject() const { | |
| 1139 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->auxiliaryInletModelObject(); | |
| 1140 | } | ||
| 1141 | 19 | boost::optional<Node> ChillerElectricASHRAE205::auxiliaryInletNode() const { | |
| 1142 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->auxiliaryInletNode(); |
| 1143 | } | ||
| 1144 | |||
| 1145 | ✗ | unsigned ChillerElectricASHRAE205::auxiliaryOutletPort() const { | |
| 1146 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->auxiliaryOutletPort(); | |
| 1147 | } | ||
| 1148 | ✗ | boost::optional<ModelObject> ChillerElectricASHRAE205::auxiliaryOutletModelObject() const { | |
| 1149 | ✗ | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->auxiliaryOutletModelObject(); | |
| 1150 | } | ||
| 1151 | 15 | boost::optional<Node> ChillerElectricASHRAE205::auxiliaryOutletNode() const { | |
| 1152 |
1/1✓ Branch 3 taken 15 times.
|
15 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->auxiliaryOutletNode(); |
| 1153 | } | ||
| 1154 | |||
| 1155 | 10 | boost::optional<PlantLoop> ChillerElectricASHRAE205::auxiliaryLoop() const { | |
| 1156 |
1/1✓ Branch 3 taken 10 times.
|
10 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->auxiliaryLoop(); |
| 1157 | } | ||
| 1158 | |||
| 1159 | 2 | bool ChillerElectricASHRAE205::addDemandBranchOnAuxiliaryLoop(PlantLoop& plantLoop) { | |
| 1160 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->addDemandBranchOnAuxiliaryLoop(plantLoop); |
| 1161 | } | ||
| 1162 | |||
| 1163 | 1 | bool ChillerElectricASHRAE205::addToAuxiliaryLoopNode(Node& node) { | |
| 1164 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->addToAuxiliaryLoopNode(node); |
| 1165 | } | ||
| 1166 | |||
| 1167 | 1 | bool ChillerElectricASHRAE205::removeFromAuxiliaryLoop() { | |
| 1168 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ChillerElectricASHRAE205_Impl>()->removeFromAuxiliaryLoop(); |
| 1169 | } | ||
| 1170 | |||
| 1171 | /// @cond | ||
| 1172 | 25 | ChillerElectricASHRAE205::ChillerElectricASHRAE205(std::shared_ptr<detail::ChillerElectricASHRAE205_Impl> impl) | |
| 1173 |
1/1✓ Branch 3 taken 25 times.
|
25 | : WaterToWaterComponent(std::move(impl)) {} |
| 1174 | /// @endcond | ||
| 1175 | |||
| 1176 | } // namespace model | ||
| 1177 | } // namespace openstudio | ||
| 1178 |