GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 63.3% 278 / 0 / 439
Functions: 73.3% 66 / 0 / 90
Branches: 43.7% 225 / 0 / 515

src/model/AirTerminalSingleDuctConstantVolumeReheat.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 "AirTerminalSingleDuctConstantVolumeReheat.hpp"
7 #include "AirTerminalSingleDuctConstantVolumeReheat_Impl.hpp"
8
9 #include "Schedule.hpp"
10 #include "Schedule_Impl.hpp"
11 #include "HVACComponent.hpp"
12 #include "HVACComponent_Impl.hpp"
13 #include "ScheduleTypeLimits.hpp"
14 #include "ScheduleTypeRegistry.hpp"
15 #include "AirLoopHVAC.hpp"
16 #include "AirLoopHVAC_Impl.hpp"
17 #include "Node.hpp"
18 #include "Node_Impl.hpp"
19 #include "PortList.hpp"
20 #include "PortList_Impl.hpp"
21 #include "AirLoopHVACZoneSplitter.hpp"
22 #include "AirLoopHVACZoneSplitter_Impl.hpp"
23 #include "AirLoopHVACZoneMixer.hpp"
24 #include "AirLoopHVACZoneMixer_Impl.hpp"
25 #include "ThermalZone.hpp"
26 #include "ThermalZone_Impl.hpp"
27 #include "Model.hpp"
28 #include "AirflowNetworkEquivalentDuct.hpp"
29 #include "AirflowNetworkEquivalentDuct_Impl.hpp"
30
31 #include <utilities/idd/OS_AirTerminal_SingleDuct_ConstantVolume_Reheat_FieldEnums.hxx>
32 #include <utilities/idd/IddEnums.hxx>
33
34 #include "../utilities/core/Compare.hpp"
35 #include "../utilities/core/Assert.hpp"
36 #include "../utilities/data/DataEnums.hpp"
37
38 namespace openstudio {
39 namespace model {
40
41 namespace detail {
42
43 24 AirTerminalSingleDuctConstantVolumeReheat_Impl::AirTerminalSingleDuctConstantVolumeReheat_Impl(const IdfObject& idfObject, Model_Impl* model,
44 24 bool keepHandle)
45 24 : StraightComponent_Impl(idfObject, model, keepHandle) {
46
4/6
✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 24 times.
✗ Branch 13 not taken.
24 OS_ASSERT(idfObject.iddObject().type() == AirTerminalSingleDuctConstantVolumeReheat::iddObjectType());
47 24 }
48
49 ✗ AirTerminalSingleDuctConstantVolumeReheat_Impl::AirTerminalSingleDuctConstantVolumeReheat_Impl(
50 ✗ const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
51 ✗ : StraightComponent_Impl(other, model, keepHandle) {
52 ✗ OS_ASSERT(other.iddObject().type() == AirTerminalSingleDuctConstantVolumeReheat::iddObjectType());
53 ✗ }
54
55 12 AirTerminalSingleDuctConstantVolumeReheat_Impl::AirTerminalSingleDuctConstantVolumeReheat_Impl(
56 12 const AirTerminalSingleDuctConstantVolumeReheat_Impl& other, Model_Impl* model, bool keepHandle)
57 12 : StraightComponent_Impl(other, model, keepHandle) {}
58
59 ✗ const std::vector<std::string>& AirTerminalSingleDuctConstantVolumeReheat_Impl::outputVariableNames() const {
60 static const std::vector<std::string> result{
61 // These apply to all AirTerminals
62 "Zone Air Terminal Sensible Heating Energy", "Zone Air Terminal Sensible Heating Rate", "Zone Air Terminal Sensible Cooling Energy",
63 "Zone Air Terminal Sensible Cooling Rate"
64
65 // No specific output for this terminal
66 ✗ };
67 ✗ return result;
68 ✗ }
69
70 3 IddObjectType AirTerminalSingleDuctConstantVolumeReheat_Impl::iddObjectType() const {
71 3 return AirTerminalSingleDuctConstantVolumeReheat::iddObjectType();
72 }
73
74 ✗ std::vector<ScheduleTypeKey> AirTerminalSingleDuctConstantVolumeReheat_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
75 // TODO: Check schedule display names.
76 ✗ std::vector<ScheduleTypeKey> result;
77 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
78 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
79 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
80 ✗ if (std::find(b, e, OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::AvailabilityScheduleName) != e) {
81 ✗ result.push_back(ScheduleTypeKey("AirTerminalSingleDuctConstantVolumeReheat", "Availability"));
82 }
83 ✗ return result;
84 ✗ }
85
86 ✗ Schedule AirTerminalSingleDuctConstantVolumeReheat_Impl::availabilitySchedule() const {
87 ✗ boost::optional<Schedule> value = optionalAvailabilitySchedule();
88 ✗ if (!value) {
89 // it is an error if we get here, however we don't want to crash
90 // so we hook up to global always on schedule
91 ✗ LOG(Error, "Required availability schedule not set, using 'Always On' schedule");
92 ✗ value = this->model().alwaysOnDiscreteSchedule();
93 ✗ OS_ASSERT(value);
94 ✗ const_cast<AirTerminalSingleDuctConstantVolumeReheat_Impl*>(this)->setAvailabilitySchedule(*value);
95 ✗ value = optionalAvailabilitySchedule();
96 }
97 ✗ OS_ASSERT(value);
98 ✗ return value.get();
99 ✗ }
100
101 30 unsigned AirTerminalSingleDuctConstantVolumeReheat_Impl::inletPort() const {
102 30 return OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::AirInletNodeName;
103 }
104
105 62 unsigned AirTerminalSingleDuctConstantVolumeReheat_Impl::outletPort() const {
106 62 return OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::AirOutletNodeName;
107 }
108
109 18 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::addToNode(Node& node) {
110
1/1
✓ Branch 1 taken 18 times.
18 Model _model = node.model();
111
112
2/3
✓ Branch 1 taken 18 times.
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
36 if (boost::optional<ModelObject> outlet = node.outletModelObject()) {
113 18 boost::optional<ThermalZone> thermalZone;
114
115
4/4
✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 6 taken 7 times.
✓ Branch 7 taken 11 times.
36 if (boost::optional<PortList> portList = outlet->optionalCast<PortList>()) {
116
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
7 thermalZone = portList->thermalZone();
117 18 }
118
119
14/19
✓ Branch 1 taken 11 times.
✓ Branch 2 taken 7 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
✓ Branch 10 taken 6 times.
✓ Branch 11 taken 5 times.
✓ Branch 13 taken 6 times.
✓ Branch 16 taken 6 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 6 times.
✓ Branch 19 taken 12 times.
✓ Branch 21 taken 11 times.
✓ Branch 22 taken 7 times.
✓ Branch 24 taken 13 times.
✓ Branch 25 taken 5 times.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
53 if (thermalZone || (outlet->optionalCast<Mixer>() && node.airLoopHVAC())) {
120
2/3
✓ Branch 1 taken 13 times.
✓ Branch 3 taken 13 times.
✗ Branch 4 not taken.
26 if (boost::optional<ModelObject> inlet = node.inletModelObject()) {
121
3/4
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
✓ Branch 6 taken 13 times.
✗ Branch 7 not taken.
26 if (boost::optional<Splitter> splitter = inlet->optionalCast<Splitter>()) {
122
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<ModelObject> sourceModelObject = inlet;
123
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 boost::optional<unsigned> sourcePort = node.connectedObjectPort(node.inletPort());
124
125
3/6
✓ Branch 0 taken 13 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 13 times.
✗ Branch 5 not taken.
26 if (sourcePort && sourceModelObject) {
126
1/1
✓ Branch 1 taken 13 times.
13 Node inletNode(_model);
127
128
6/6
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
✓ Branch 7 taken 13 times.
✓ Branch 10 taken 13 times.
✓ Branch 13 taken 13 times.
✓ Branch 16 taken 13 times.
13 _model.connect(sourceModelObject.get(), sourcePort.get(), inletNode, inletNode.inletPort());
129
130
5/5
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
✓ Branch 7 taken 13 times.
✓ Branch 10 taken 13 times.
✓ Branch 13 taken 13 times.
13 _model.connect(inletNode, inletNode.outletPort(), this->getObject<ModelObject>(), this->inletPort());
131
132
5/5
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
✓ Branch 7 taken 13 times.
✓ Branch 10 taken 13 times.
✓ Branch 13 taken 13 times.
13 _model.connect(this->getObject<ModelObject>(), outletPort(), node, node.inletPort());
133
134
2/2
✓ Branch 0 taken 7 times.
✓ Branch 1 taken 6 times.
13 if (thermalZone) {
135
1/1
✓ Branch 1 taken 7 times.
7 auto mo = this->getObject<AirTerminalSingleDuctConstantVolumeReheat>();
136
137
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 thermalZone->addEquipment(mo);
138 7 }
139
140 13 return true;
141 13 }
142 26 }
143 13 }
144 }
145 36 }
146
147 5 return false;
148 18 }
149
150 2 std::vector<IdfObject> AirTerminalSingleDuctConstantVolumeReheat_Impl::remove() {
151
1/1
✓ Branch 1 taken 2 times.
2 Model _model = this->model();
152
1/1
✓ Branch 1 taken 2 times.
2 auto thisObject = this->getObject<ModelObject>();
153
154
1/1
✓ Branch 1 taken 2 times.
2 HVACComponent _reheatCoil = reheatCoil();
155
156
1/1
✓ Branch 1 taken 2 times.
2 boost::optional<ModelObject> sourceModelObject = this->inletModelObject();
157
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 boost::optional<unsigned> sourcePort = this->connectedObjectPort(this->inletPort());
158
159
1/1
✓ Branch 1 taken 2 times.
2 boost::optional<ModelObject> targetModelObject = this->outletModelObject();
160
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 boost::optional<unsigned> targetPort = this->connectedObjectPort(this->outletPort());
161
162
1/1
✓ Branch 1 taken 2 times.
2 std::vector<ThermalZone> thermalZones = _model.getConcreteModelObjects<ThermalZone>();
163
2/2
✓ Branch 5 taken 1 time.
✓ Branch 6 taken 1 time.
2 for (auto& thermalZone : thermalZones) {
164
1/1
✓ Branch 1 taken 1 time.
1 std::vector<ModelObject> equipment = thermalZone.equipment();
165
166
2/3
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 8 not taken.
1 if (std::find(equipment.begin(), equipment.end(), thisObject) != equipment.end()) {
167
1/1
✓ Branch 1 taken 1 time.
1 thermalZone.removeEquipment(thisObject);
168
169 1 break;
170 }
171 1 }
172
173
5/10
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 2 times.
✗ Branch 9 not taken.
8 if (sourcePort && sourceModelObject && targetPort && targetModelObject) {
174
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> inletNode = sourceModelObject->optionalCast<Node>()) {
175
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<ModelObject> source2ModelObject = inletNode->inletModelObject()) {
176
5/6
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
4 if (boost::optional<unsigned> source2Port = inletNode->connectedObjectPort(inletNode->inletPort())) {
177
7/7
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
✓ Branch 16 taken 2 times.
✓ Branch 19 taken 2 times.
2 _model.connect(source2ModelObject.get(), source2Port.get(), targetModelObject.get(), targetPort.get());
178
179
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 inletNode->disconnect();
180
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 inletNode->remove();
181
182
2/3
✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
4 if (boost::optional<PlantLoop> loop = _reheatCoil.plantLoop()) {
183 ✗ loop->removeDemandBranchWithComponent(_reheatCoil);
184 2 }
185
186
1/1
✓ Branch 1 taken 2 times.
4 return StraightComponent_Impl::remove();
187 }
188 2 }
189 2 }
190 }
191
192 ✗ model().disconnect(getObject<ModelObject>(), inletPort());
193 ✗ model().disconnect(getObject<ModelObject>(), outletPort());
194
195 ✗ if (boost::optional<PlantLoop> loop = _reheatCoil.plantLoop()) {
196 ✗ loop->removeDemandBranchWithComponent(_reheatCoil);
197 ✗ }
198
199 ✗ return StraightComponent_Impl::remove();
200 2 }
201
202 3 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::isRemovable() const {
203 3 return true;
204 }
205
206 2 std::vector<ModelObject> AirTerminalSingleDuctConstantVolumeReheat_Impl::children() const {
207 2 std::vector<ModelObject> result;
208
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (OptionalHVACComponent intermediate = optionalReheatCoil()) {
209
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 result.push_back(*intermediate);
210 2 }
211 std::vector<AirflowNetworkEquivalentDuct> myAFNItems =
212
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
213
1/1
✓ Branch 5 taken 2 times.
2 result.insert(result.end(), myAFNItems.begin(), myAFNItems.end());
214 4 return result;
215 2 }
216
217 6 ModelObject AirTerminalSingleDuctConstantVolumeReheat_Impl::clone(Model model) const {
218
3/3
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
6 auto modelObjectClone = StraightComponent_Impl::clone(model).cast<AirTerminalSingleDuctConstantVolumeReheat>();
219
220
1/1
✓ Branch 1 taken 6 times.
6 HVACComponent coil = this->reheatCoil();
221
222
3/3
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
6 auto coilClone = coil.clone(model).cast<HVACComponent>();
223
224
1/1
✓ Branch 1 taken 6 times.
6 modelObjectClone.setReheatCoil(coilClone);
225
226 12 return std::move(modelObjectClone);
227 6 }
228
229 3 boost::optional<double> AirTerminalSingleDuctConstantVolumeReheat_Impl::maximumAirFlowRate() const {
230 3 return getDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumAirFlowRate, true);
231 }
232
233 5 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::isMaximumAirFlowRateAutosized() const {
234 5 bool result = false;
235
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumAirFlowRate, 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 17 HVACComponent AirTerminalSingleDuctConstantVolumeReheat_Impl::reheatCoil() const {
243
1/1
✓ Branch 1 taken 17 times.
17 boost::optional<HVACComponent> coil = optionalReheatCoil();
244
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 17 times.
✗ Branch 4 not taken.
17 OS_ASSERT(coil);
245
2/2
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
34 return coil.get();
246 17 }
247
248 19 boost::optional<HVACComponent> AirTerminalSingleDuctConstantVolumeReheat_Impl::optionalReheatCoil() const {
249
2/2
✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
19 return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::ReheatCoilName);
250 }
251
252 3 boost::optional<double> AirTerminalSingleDuctConstantVolumeReheat_Impl::maximumHotWaterorSteamFlowRate() const {
253 3 return getDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumHotWaterorSteamFlowRate, true);
254 }
255
256 5 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::isMaximumHotWaterorSteamFlowRateAutosized() const {
257 5 bool result = false;
258
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumHotWaterorSteamFlowRate, 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 6 double AirTerminalSingleDuctConstantVolumeReheat_Impl::minimumHotWaterorSteamFlowRate() const {
266
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<double> value = getDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MinimumHotWaterorSteamFlowRate, true);
267
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
268
1/1
✓ Branch 1 taken 6 times.
12 return value.get();
269 }
270
271 1 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::isMinimumHotWaterorSteamFlowRateDefaulted() const {
272 1 return isEmpty(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MinimumHotWaterorSteamFlowRate);
273 }
274
275 6 double AirTerminalSingleDuctConstantVolumeReheat_Impl::convergenceTolerance() const {
276
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<double> value = getDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::ConvergenceTolerance, true);
277
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
278
1/1
✓ Branch 1 taken 6 times.
12 return value.get();
279 }
280
281 1 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::isConvergenceToleranceDefaulted() const {
282 1 return isEmpty(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::ConvergenceTolerance);
283 }
284
285 6 double AirTerminalSingleDuctConstantVolumeReheat_Impl::maximumReheatAirTemperature() const {
286
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<double> value = getDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumReheatAirTemperature, true);
287
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
288
1/1
✓ Branch 1 taken 6 times.
12 return value.get();
289 }
290
291 1 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::isMaximumReheatAirTemperatureDefaulted() const {
292 1 return isEmpty(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumReheatAirTemperature);
293 }
294
295 24 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setAvailabilitySchedule(Schedule& schedule) {
296
3/3
✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
96 bool result = setSchedule(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::AvailabilityScheduleName,
297 "AirTerminalSingleDuctConstantVolumeReheat", "Availability", schedule);
298 24 return result;
299 }
300
301 4 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setMaximumAirFlowRate(boost::optional<double> maximumAirFlowRate) {
302 4 bool result(false);
303
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (maximumAirFlowRate) {
304 4 result = setDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumAirFlowRate, maximumAirFlowRate.get());
305 } else {
306 ✗ resetMaximumAirFlowRate();
307 ✗ result = true;
308 }
309 4 return result;
310 }
311
312 1 void AirTerminalSingleDuctConstantVolumeReheat_Impl::resetMaximumAirFlowRate() {
313
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumAirFlowRate, "");
314
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
315 1 }
316
317 25 void AirTerminalSingleDuctConstantVolumeReheat_Impl::autosizeMaximumAirFlowRate() {
318
2/2
✓ Branch 1 taken 25 times.
✓ Branch 4 taken 25 times.
50 bool result = setString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumAirFlowRate, "autosize");
319
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 25 times.
25 OS_ASSERT(result);
320 25 }
321
322 32 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setReheatCoil(const HVACComponent& coil) {
323 32 bool result = false;
324
325
6/7
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
✓ Branch 7 taken 32 times.
✓ Branch 10 taken 2 times.
✓ Branch 11 taken 10 times.
✓ Branch 12 taken 20 times.
✗ Branch 13 not taken.
32 switch (coil.iddObject().type().value()) {
326 2 case openstudio::IddObjectType::OS_Coil_Heating_Gas: {
327 2 result = true;
328 2 break;
329 }
330 10 case openstudio::IddObjectType::OS_Coil_Heating_Water: {
331 10 result = true;
332 10 break;
333 }
334 20 case openstudio::IddObjectType::OS_Coil_Heating_Electric: {
335 20 result = true;
336 20 break;
337 }
338 ✗ default: {
339 ✗ LOG(Warn, "Unsupported or invalid IddObjectType: '" << coil.iddObject().name() << "'");
340 ✗ result = false;
341 }
342 }
343
344
1/2
✓ Branch 0 taken 32 times.
✗ Branch 1 not taken.
32 if (result) {
345
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
32 result = this->setPointer(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::ReheatCoilName, coil.handle());
346 }
347
348 32 return result;
349 }
350
351 1 void AirTerminalSingleDuctConstantVolumeReheat_Impl::resetReheatCoil() {
352
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::ReheatCoilName, "");
353
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
354 1 }
355
356 4 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setMaximumHotWaterorSteamFlowRate(boost::optional<double> maximumHotWaterorSteamFlowRate) {
357 4 bool result(false);
358
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (maximumHotWaterorSteamFlowRate) {
359 result =
360 4 setDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumHotWaterorSteamFlowRate, maximumHotWaterorSteamFlowRate.get());
361 } else {
362 ✗ resetMaximumHotWaterorSteamFlowRate();
363 ✗ result = true;
364 }
365 4 return result;
366 }
367
368 1 void AirTerminalSingleDuctConstantVolumeReheat_Impl::resetMaximumHotWaterorSteamFlowRate() {
369
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumHotWaterorSteamFlowRate, "");
370
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
371 1 }
372
373 25 void AirTerminalSingleDuctConstantVolumeReheat_Impl::autosizeMaximumHotWaterorSteamFlowRate() {
374
2/2
✓ Branch 1 taken 25 times.
✓ Branch 4 taken 25 times.
50 bool result = setString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumHotWaterorSteamFlowRate, "autosize");
375
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 25 times.
25 OS_ASSERT(result);
376 25 }
377
378 28 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setMinimumHotWaterorSteamFlowRate(double minimumHotWaterorSteamFlowRate) {
379 28 bool result = setDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MinimumHotWaterorSteamFlowRate, minimumHotWaterorSteamFlowRate);
380 28 return result;
381 }
382
383 1 void AirTerminalSingleDuctConstantVolumeReheat_Impl::resetMinimumHotWaterorSteamFlowRate() {
384
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MinimumHotWaterorSteamFlowRate, "");
385
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
386 1 }
387
388 29 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setConvergenceTolerance(double convergenceTolerance) {
389 29 bool result = setDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::ConvergenceTolerance, convergenceTolerance);
390 29 return result;
391 }
392
393 1 void AirTerminalSingleDuctConstantVolumeReheat_Impl::resetConvergenceTolerance() {
394
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::ConvergenceTolerance, "");
395
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
396 1 }
397
398 29 bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setMaximumReheatAirTemperature(double maximumReheatAirTemperature) {
399 29 bool result = setDouble(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumReheatAirTemperature, maximumReheatAirTemperature);
400 29 return result;
401 }
402
403 1 void AirTerminalSingleDuctConstantVolumeReheat_Impl::resetMaximumReheatAirTemperature() {
404
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::MaximumReheatAirTemperature, "");
405
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
406 1 }
407
408 ✗ boost::optional<Schedule> AirTerminalSingleDuctConstantVolumeReheat_Impl::optionalAvailabilitySchedule() const {
409 ✗ return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_AirTerminal_SingleDuct_ConstantVolume_ReheatFields::AvailabilityScheduleName);
410 }
411
412 ✗ boost::optional<ModelObject> AirTerminalSingleDuctConstantVolumeReheat_Impl::availabilityScheduleAsModelObject() const {
413 ✗ OptionalModelObject result = availabilitySchedule();
414 ✗ return result;
415 }
416
417 ✗ boost::optional<ModelObject> AirTerminalSingleDuctConstantVolumeReheat_Impl::reheatCoilAsModelObject() const {
418 ✗ OptionalModelObject result;
419 ✗ OptionalHVACComponent intermediate = reheatCoil();
420 ✗ if (intermediate) {
421 ✗ result = *intermediate;
422 }
423 ✗ return result;
424 ✗ }
425
426 ✗ bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
427 ✗ if (modelObject) {
428 ✗ OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
429 ✗ if (intermediate) {
430 ✗ Schedule schedule(*intermediate);
431 ✗ return setAvailabilitySchedule(schedule);
432 ✗ }
433 ✗ }
434 ✗ return false;
435 }
436
437 ✗ bool AirTerminalSingleDuctConstantVolumeReheat_Impl::setReheatCoilAsModelObject(const boost::optional<ModelObject>& modelObject) {
438 ✗ if (modelObject) {
439 ✗ OptionalHVACComponent intermediate = modelObject->optionalCast<HVACComponent>();
440 ✗ if (intermediate) {
441 ✗ HVACComponent coil(*intermediate);
442 ✗ return setReheatCoil(coil);
443 ✗ } else {
444 ✗ return false;
445 }
446 ✗ } else {
447 ✗ resetReheatCoil();
448 }
449 ✗ return true;
450 }
451
452 ✗ AirflowNetworkEquivalentDuct AirTerminalSingleDuctConstantVolumeReheat_Impl::getAirflowNetworkEquivalentDuct(double length, double diameter) {
453 ✗ boost::optional<AirflowNetworkEquivalentDuct> opt = airflowNetworkEquivalentDuct();
454 ✗ if (opt) {
455 ✗ if (opt->airPathLength() != length) {
456 ✗ opt->setAirPathLength(length);
457 }
458 ✗ if (opt->airPathHydraulicDiameter() != diameter) {
459 ✗ opt->setAirPathHydraulicDiameter(diameter);
460 }
461 ✗ return opt.get();
462 }
463 ✗ return AirflowNetworkEquivalentDuct(model(), length, diameter, handle());
464 ✗ }
465
466 ✗ boost::optional<AirflowNetworkEquivalentDuct> AirTerminalSingleDuctConstantVolumeReheat_Impl::airflowNetworkEquivalentDuct() const {
467 std::vector<AirflowNetworkEquivalentDuct> myAFN =
468 ✗ getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
469 ✗ auto count = myAFN.size();
470 ✗ if (count == 1) {
471 ✗ return myAFN[0];
472 ✗ } else if (count > 1) {
473 ✗ LOG(Warn, briefDescription() << " has more than one AirflowNetwork EquivalentDuct attached, returning first.");
474 ✗ return myAFN[0];
475 }
476 ✗ return boost::none;
477 ✗ }
478
479 ✗ boost::optional<double> AirTerminalSingleDuctConstantVolumeReheat_Impl::autosizedMaximumAirFlowRate() const {
480 ✗ return getAutosizedValue("Design Size Maximum Air Flow Rate", "m3/s");
481 }
482
483 ✗ boost::optional<double> AirTerminalSingleDuctConstantVolumeReheat_Impl::autosizedMaximumHotWaterorSteamFlowRate() const {
484 ✗ return getAutosizedValue("Design Size Maximum Reheat Water Flow Rate", "m3/s");
485 }
486
487 ✗ void AirTerminalSingleDuctConstantVolumeReheat_Impl::autosize() {
488 ✗ autosizeMaximumAirFlowRate();
489 ✗ autosizeMaximumHotWaterorSteamFlowRate();
490 ✗ }
491
492 ✗ void AirTerminalSingleDuctConstantVolumeReheat_Impl::applySizingValues() {
493 ✗ boost::optional<double> val;
494 ✗ val = autosizedMaximumAirFlowRate();
495 ✗ if (val) {
496 ✗ setMaximumAirFlowRate(val.get());
497 }
498
499 ✗ val = autosizedMaximumHotWaterorSteamFlowRate();
500 ✗ if (val) {
501 ✗ setMaximumHotWaterorSteamFlowRate(val.get());
502 }
503 ✗ }
504
505 ✗ ComponentType AirTerminalSingleDuctConstantVolumeReheat_Impl::componentType() const {
506 ✗ ComponentType loopType = ComponentType::None;
507 ✗ if (auto a_ = airLoopHVAC()) {
508 ✗ loopType = a_->componentType();
509 ✗ }
510 ✗ if ((loopType == ComponentType::Both) or (loopType == ComponentType::Cooling)) {
511 ✗ return ComponentType::Both;
512 }
513
514 ✗ return ComponentType::Heating;
515 }
516
517 ✗ std::vector<FuelType> AirTerminalSingleDuctConstantVolumeReheat_Impl::coolingFuelTypes() const {
518 ✗ if (auto a_ = airLoopHVAC()) {
519 ✗ return a_->coolingFuelTypes();
520 ✗ }
521 ✗ return {};
522 }
523
524 ✗ std::vector<FuelType> AirTerminalSingleDuctConstantVolumeReheat_Impl::heatingFuelTypes() const {
525 ✗ std::set<FuelType> result;
526 ✗ for (auto ft : reheatCoil().heatingFuelTypes()) {
527 ✗ result.insert(ft);
528 ✗ }
529 ✗ if (auto a_ = airLoopHVAC()) {
530 ✗ for (auto ft : a_->heatingFuelTypes()) {
531 ✗ result.insert(ft);
532 ✗ }
533 ✗ }
534 ✗ return {result.begin(), result.end()};
535 ✗ }
536
537 ✗ std::vector<AppGFuelType> AirTerminalSingleDuctConstantVolumeReheat_Impl::appGHeatingFuelTypes() const {
538 ✗ std::set<AppGFuelType> result;
539 ✗ for (auto ft : reheatCoil().appGHeatingFuelTypes()) {
540 ✗ result.insert(ft);
541 ✗ }
542 ✗ if (auto a_ = airLoopHVAC()) {
543 ✗ for (auto ft : a_->appGHeatingFuelTypes()) {
544 ✗ result.insert(ft);
545 ✗ }
546 ✗ }
547 ✗ return {result.begin(), result.end()};
548 ✗ }
549
550 } // namespace detail
551
552 24 AirTerminalSingleDuctConstantVolumeReheat::AirTerminalSingleDuctConstantVolumeReheat(const Model& model, Schedule& availabilitySchedule,
553 24 HVACComponent& coil)
554 24 : StraightComponent(AirTerminalSingleDuctConstantVolumeReheat::iddObjectType(), model) {
555
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 24 times.
✗ Branch 5 not taken.
24 OS_ASSERT(getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>());
556
557
1/1
✓ Branch 1 taken 24 times.
24 bool test = setAvailabilitySchedule(availabilitySchedule);
558
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 24 times.
24 if (!test) {
559 ✗ remove();
560 ✗ LOG_AND_THROW("Unable to construct " << briefDescription() << ", because cannot set its " << "availability schedule to "
561 << availabilitySchedule.briefDescription() << ".");
562 }
563
564
1/1
✓ Branch 1 taken 24 times.
24 this->autosizeMaximumAirFlowRate();
565
566
1/1
✓ Branch 1 taken 24 times.
24 this->setReheatCoil(coil);
567
568
1/1
✓ Branch 1 taken 24 times.
24 this->autosizeMaximumHotWaterorSteamFlowRate();
569
570
1/1
✓ Branch 1 taken 24 times.
24 this->setMinimumHotWaterorSteamFlowRate(0.0);
571
572
1/1
✓ Branch 1 taken 24 times.
24 this->setConvergenceTolerance(0.001);
573
574
1/1
✓ Branch 1 taken 24 times.
24 this->setMaximumReheatAirTemperature(35.0);
575 24 }
576
577 7933 IddObjectType AirTerminalSingleDuctConstantVolumeReheat::iddObjectType() {
578
1/1
✓ Branch 1 taken 7933 times.
7933 return {IddObjectType::OS_AirTerminal_SingleDuct_ConstantVolume_Reheat};
579 }
580
581 ✗ Schedule AirTerminalSingleDuctConstantVolumeReheat::availabilitySchedule() const {
582 ✗ return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->availabilitySchedule();
583 }
584
585 3 boost::optional<double> AirTerminalSingleDuctConstantVolumeReheat::maximumAirFlowRate() const {
586
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->maximumAirFlowRate();
587 }
588
589 5 bool AirTerminalSingleDuctConstantVolumeReheat::isMaximumAirFlowRateAutosized() const {
590
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->isMaximumAirFlowRateAutosized();
591 }
592
593 9 HVACComponent AirTerminalSingleDuctConstantVolumeReheat::reheatCoil() const {
594
1/1
✓ Branch 3 taken 9 times.
9 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->reheatCoil();
595 }
596
597 3 boost::optional<double> AirTerminalSingleDuctConstantVolumeReheat::maximumHotWaterorSteamFlowRate() const {
598
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->maximumHotWaterorSteamFlowRate();
599 }
600
601 5 bool AirTerminalSingleDuctConstantVolumeReheat::isMaximumHotWaterorSteamFlowRateAutosized() const {
602
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->isMaximumHotWaterorSteamFlowRateAutosized();
603 }
604
605 6 double AirTerminalSingleDuctConstantVolumeReheat::minimumHotWaterorSteamFlowRate() const {
606
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->minimumHotWaterorSteamFlowRate();
607 }
608
609 1 bool AirTerminalSingleDuctConstantVolumeReheat::isMinimumHotWaterorSteamFlowRateDefaulted() const {
610
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->isMinimumHotWaterorSteamFlowRateDefaulted();
611 }
612
613 6 double AirTerminalSingleDuctConstantVolumeReheat::convergenceTolerance() const {
614
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->convergenceTolerance();
615 }
616
617 1 bool AirTerminalSingleDuctConstantVolumeReheat::isConvergenceToleranceDefaulted() const {
618
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->isConvergenceToleranceDefaulted();
619 }
620
621 6 double AirTerminalSingleDuctConstantVolumeReheat::maximumReheatAirTemperature() const {
622
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->maximumReheatAirTemperature();
623 }
624
625 1 bool AirTerminalSingleDuctConstantVolumeReheat::isMaximumReheatAirTemperatureDefaulted() const {
626
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->isMaximumReheatAirTemperatureDefaulted();
627 }
628
629 24 bool AirTerminalSingleDuctConstantVolumeReheat::setAvailabilitySchedule(Schedule& schedule) {
630
1/1
✓ Branch 3 taken 24 times.
24 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->setAvailabilitySchedule(schedule);
631 }
632
633 4 bool AirTerminalSingleDuctConstantVolumeReheat::setMaximumAirFlowRate(double maximumAirFlowRate) {
634
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
4 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->setMaximumAirFlowRate(maximumAirFlowRate);
635 }
636
637 1 void AirTerminalSingleDuctConstantVolumeReheat::resetMaximumAirFlowRate() {
638
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->resetMaximumAirFlowRate();
639 1 }
640
641 25 void AirTerminalSingleDuctConstantVolumeReheat::autosizeMaximumAirFlowRate() {
642
1/1
✓ Branch 3 taken 25 times.
25 getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->autosizeMaximumAirFlowRate();
643 25 }
644
645 32 bool AirTerminalSingleDuctConstantVolumeReheat::setReheatCoil(const HVACComponent& coil) {
646
1/1
✓ Branch 3 taken 32 times.
32 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->setReheatCoil(coil);
647 }
648
649 1 void AirTerminalSingleDuctConstantVolumeReheat::resetReheatCoil() {
650
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->resetReheatCoil();
651 1 }
652
653 4 bool AirTerminalSingleDuctConstantVolumeReheat::setMaximumHotWaterorSteamFlowRate(double maximumHotWaterorSteamFlowRate) {
654
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
4 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->setMaximumHotWaterorSteamFlowRate(maximumHotWaterorSteamFlowRate);
655 }
656
657 1 void AirTerminalSingleDuctConstantVolumeReheat::resetMaximumHotWaterorSteamFlowRate() {
658
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->resetMaximumHotWaterorSteamFlowRate();
659 1 }
660
661 25 void AirTerminalSingleDuctConstantVolumeReheat::autosizeMaximumHotWaterorSteamFlowRate() {
662
1/1
✓ Branch 3 taken 25 times.
25 getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->autosizeMaximumHotWaterorSteamFlowRate();
663 25 }
664
665 28 bool AirTerminalSingleDuctConstantVolumeReheat::setMinimumHotWaterorSteamFlowRate(double minimumHotWaterorSteamFlowRate) {
666
1/1
✓ Branch 3 taken 28 times.
28 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->setMinimumHotWaterorSteamFlowRate(minimumHotWaterorSteamFlowRate);
667 }
668
669 1 void AirTerminalSingleDuctConstantVolumeReheat::resetMinimumHotWaterorSteamFlowRate() {
670
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->resetMinimumHotWaterorSteamFlowRate();
671 1 }
672
673 29 bool AirTerminalSingleDuctConstantVolumeReheat::setConvergenceTolerance(double convergenceTolerance) {
674
1/1
✓ Branch 3 taken 29 times.
29 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->setConvergenceTolerance(convergenceTolerance);
675 }
676
677 1 void AirTerminalSingleDuctConstantVolumeReheat::resetConvergenceTolerance() {
678
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->resetConvergenceTolerance();
679 1 }
680
681 29 bool AirTerminalSingleDuctConstantVolumeReheat::setMaximumReheatAirTemperature(double maximumReheatAirTemperature) {
682
1/1
✓ Branch 3 taken 29 times.
29 return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->setMaximumReheatAirTemperature(maximumReheatAirTemperature);
683 }
684
685 1 void AirTerminalSingleDuctConstantVolumeReheat::resetMaximumReheatAirTemperature() {
686
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->resetMaximumReheatAirTemperature();
687 1 }
688
689 ✗ AirflowNetworkEquivalentDuct AirTerminalSingleDuctConstantVolumeReheat::getAirflowNetworkEquivalentDuct(double length, double diameter) {
690 ✗ return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->getAirflowNetworkEquivalentDuct(length, diameter);
691 }
692
693 ✗ boost::optional<AirflowNetworkEquivalentDuct> AirTerminalSingleDuctConstantVolumeReheat::airflowNetworkEquivalentDuct() const {
694 ✗ return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->airflowNetworkEquivalentDuct();
695 }
696
697 /// @cond
698 30 AirTerminalSingleDuctConstantVolumeReheat::AirTerminalSingleDuctConstantVolumeReheat(
699 30 std::shared_ptr<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl> impl)
700
1/1
✓ Branch 3 taken 30 times.
30 : StraightComponent(std::move(impl)) {}
701 /// @endcond
702
703 ✗ boost::optional<double> AirTerminalSingleDuctConstantVolumeReheat::autosizedMaximumAirFlowRate() const {
704 ✗ return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->autosizedMaximumAirFlowRate();
705 }
706
707 ✗ boost::optional<double> AirTerminalSingleDuctConstantVolumeReheat::autosizedMaximumHotWaterorSteamFlowRate() const {
708 ✗ return getImpl<detail::AirTerminalSingleDuctConstantVolumeReheat_Impl>()->autosizedMaximumHotWaterorSteamFlowRate();
709 }
710
711 } // namespace model
712 } // namespace openstudio
713