GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 75.0% 2654 / 0 / 3541
Functions: 91.7% 44 / 0 / 48
Branches: 67.4% 2570 / 0 / 3814

src/energyplus/ForwardTranslator.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 "EnergyPlusAPI.hpp"
7
8 #include <src/energyplus/embedded_files.hxx>
9
10 #include "ForwardTranslator.hpp"
11
12 #include "../model/Model.hpp"
13 #include "../model/Model_Impl.hpp"
14 #include "../model/Surface.hpp"
15 #include "../model/Surface_Impl.hpp"
16 #include "../model/Construction.hpp"
17 #include "../model/Construction_Impl.hpp"
18 #include "../model/ConstructionWithInternalSource.hpp"
19 #include "../model/ConstructionWithInternalSource_Impl.hpp"
20 #include "../model/WaterUseEquipment.hpp"
21 #include "../model/WaterUseEquipment_Impl.hpp"
22 #include "../model/RunPeriod.hpp"
23 #include "../model/RunPeriod_Impl.hpp"
24 #include "../model/RunPeriodControlSpecialDays.hpp"
25 #include "../model/RunPeriodControlSpecialDays_Impl.hpp"
26 #include "../model/SimulationControl.hpp"
27 #include "../model/SimulationControl_Impl.hpp"
28 #include "../model/Building.hpp"
29 #include "../model/Building_Impl.hpp"
30 #include "../model/UtilityBill.hpp"
31 #include "../model/UtilityBill_Impl.hpp"
32 #include "../model/ElectricLoadCenterDistribution.hpp"
33 #include "../model/ElectricLoadCenterDistribution_Impl.hpp"
34 #include "../model/ShadingControl.hpp"
35 #include "../model/ShadingControl_Impl.hpp"
36 #include "../model/AdditionalProperties.hpp"
37 #include "../model/ConcreteModelObjects.hpp"
38 #include "../model/SpaceLoad.hpp"
39 #include "../model/SpaceLoad_Impl.hpp"
40 #include "../model/SpaceType.hpp"
41 #include "../model/SpaceInfiltrationDesignFlowRate.hpp"
42 #include "../model/SpaceInfiltrationDesignFlowRate_Impl.hpp"
43 #include "../model/SpaceInfiltrationEffectiveLeakageArea.hpp"
44 #include "../model/SpaceInfiltrationEffectiveLeakageArea_Impl.hpp"
45 #include "../model/SpaceInfiltrationFlowCoefficient.hpp"
46 #include "../model/SpaceInfiltrationFlowCoefficient_Impl.hpp"
47 #include "../model/ElectricEquipmentITEAirCooled.hpp"
48 #include "../model/ElectricEquipmentITEAirCooled_Impl.hpp"
49 #include "../model/OutputControlTableStyle.hpp"
50 #include "../model/OutputControlTableStyle_Impl.hpp"
51 #include "../model/OutputMeter.hpp"
52 #include "../model/OutputMeter_Impl.hpp"
53 #include "../model/OutputSQLite.hpp"
54 #include "../model/OutputSQLite_Impl.hpp"
55
56 #include "../utilities/idf/Workspace.hpp"
57 #include "../utilities/idf/IdfExtensibleGroup.hpp"
58 #include "../utilities/idf/IdfFile.hpp"
59 #include "../utilities/idf/WorkspaceObjectOrder.hpp"
60 #include "../utilities/core/Logger.hpp"
61 #include "../utilities/core/Assert.hpp"
62 #include "../utilities/core/FilesystemHelpers.hpp"
63 #include "../utilities/geometry/BoundingBox.hpp"
64 #include "../utilities/time/Time.hpp"
65 #include "../utilities/plot/ProgressBar.hpp"
66
67 #include <utilities/idd/IddEnums.hxx>
68 #include <utilities/idd/IddFactory.hxx>
69 #include <utilities/idd/FluidProperties_Name_FieldEnums.hxx>
70 #include <utilities/idd/FluidProperties_GlycolConcentration_FieldEnums.hxx>
71 #include <utilities/idd/GlobalGeometryRules_FieldEnums.hxx>
72 #include <utilities/idd/Output_Table_SummaryReports_FieldEnums.hxx>
73 #include <utilities/idd/OutputControl_Table_Style_FieldEnums.hxx>
74 #include <utilities/idd/Output_VariableDictionary_FieldEnums.hxx>
75 #include <utilities/idd/Output_SQLite_FieldEnums.hxx>
76 #include <utilities/idd/LifeCycleCost_NonrecurringCost_FieldEnums.hxx>
77 #include <utilities/idd/SetpointManager_MixedAir_FieldEnums.hxx>
78
79 #include "../utilities/idd/IddEnums.hpp"
80
81 #include "../utilities/core/Deprecated.hpp"
82
83 #include <algorithm>
84 #include <iterator>
85 #include <sstream>
86 #include <thread>
87
88 using namespace openstudio::model;
89
90 using namespace std;
91
92 namespace openstudio {
93
94 namespace energyplus {
95
96
2/2
✓ Branch 9 taken 632 times.
✓ Branch 12 taken 632 times.
632 ForwardTranslator::ForwardTranslator() : m_progressBar(nullptr) {
97
1/1
✓ Branch 1 taken 632 times.
632 m_logSink.setLogLevel(Warn);
98
2/2
✓ Branch 1 taken 632 times.
✓ Branch 4 taken 632 times.
632 m_logSink.setChannelRegex(boost::regex("openstudio\\.energyplus\\.ForwardTranslator"));
99
1/1
✓ Branch 2 taken 632 times.
632 m_logSink.setThreadId(std::this_thread::get_id());
100
1/1
✓ Branch 1 taken 632 times.
632 createFluidPropertiesMap();
101 632 }
102
103 ✗ ForwardTranslatorOptions ForwardTranslator::forwardTranslatorOptions() const {
104 ✗ return m_forwardTranslatorOptions;
105 }
106
107 12 void ForwardTranslator::setForwardTranslatorOptions(ForwardTranslatorOptions forwardTranslatorOptions) {
108 12 m_forwardTranslatorOptions = std::move(forwardTranslatorOptions);
109 12 }
110
111 856 Workspace ForwardTranslator::translateModel(const Model& model, ProgressBar* progressBar) {
112
113 // When m_forwardTranslatorOptions.excludeSpaceTranslation() is false, could we skip the (expensive) clone since we aren't combining spaces?
114 // No, we are still doing stuff like removing orphan loads, spaces not part of a thermal zone, etc
115
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
856 auto modelCopy = model.clone(true).cast<Model>();
116
117 856 m_progressBar = progressBar;
118
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 856 times.
856 if (m_progressBar) {
119 ✗ m_progressBar->setMinimum(0);
120 ✗ m_progressBar->setMaximum(model.numObjects());
121 }
122
123
1/1
✓ Branch 1 taken 856 times.
1712 return translateModelPrivate(modelCopy, true);
124 856 }
125
126 33 Workspace ForwardTranslator::translateModelObject(ModelObject& modelObject) {
127
1/1
✓ Branch 1 taken 33 times.
33 Model modelCopy;
128
2/2
✓ Branch 1 taken 33 times.
✓ Branch 4 taken 33 times.
33 modelObject.clone(modelCopy);
129
130 33 m_progressBar = nullptr;
131
132
1/1
✓ Branch 1 taken 33 times.
66 return translateModelPrivate(modelCopy, false);
133 33 }
134
135 57 std::vector<LogMessage> ForwardTranslator::warnings() const {
136
1/1
✓ Branch 1 taken 57 times.
57 std::vector<LogMessage> allMessages = m_logSink.logMessages();
137 57 std::vector<LogMessage> result;
138
2/2
✓ Branch 1 taken 57 times.
✓ Branch 6 taken 57 times.
57 std::copy_if(allMessages.cbegin(), allMessages.cend(), std::back_inserter(result),
139 62 [](const auto& logMessage) { return logMessage.logLevel() == Warn; });
140 114 return result;
141 57 }
142
143 142 std::vector<LogMessage> ForwardTranslator::errors() const {
144
1/1
✓ Branch 1 taken 142 times.
142 std::vector<LogMessage> allMessages = m_logSink.logMessages();
145 142 std::vector<LogMessage> result;
146
2/2
✓ Branch 1 taken 142 times.
✓ Branch 6 taken 142 times.
142 std::copy_if(allMessages.cbegin(), allMessages.cend(), std::back_inserter(result),
147 94 [](const auto& logMessage) { return logMessage.logLevel() > Warn; });
148 284 return result;
149 142 }
150
151 ✗ void ForwardTranslator::setKeepRunControlSpecialDays(bool keepRunControlSpecialDays) {
152 ✗ m_forwardTranslatorOptions.setKeepRunControlSpecialDays(keepRunControlSpecialDays);
153 ✗ }
154
155 2 void ForwardTranslator::setIPTabularOutput(bool isIP) {
156 2 m_forwardTranslatorOptions.setIPTabularOutput(isIP);
157 2 }
158
159 4 void ForwardTranslator::setExcludeLCCObjects(bool excludeLCCObjects) {
160 4 m_forwardTranslatorOptions.setExcludeLCCObjects(excludeLCCObjects);
161 4 }
162
163 3 void ForwardTranslator::setExcludeSQliteOutputReport(bool excludeSQliteOutputReport) {
164 3 m_forwardTranslatorOptions.setExcludeSQliteOutputReport(excludeSQliteOutputReport);
165 3 }
166
167 3 void ForwardTranslator::setExcludeHTMLOutputReport(bool excludeHTMLOutputReport) {
168 3 m_forwardTranslatorOptions.setExcludeHTMLOutputReport(excludeHTMLOutputReport);
169 3 }
170
171 2 void ForwardTranslator::setExcludeVariableDictionary(bool excludeVariableDictionary) {
172 2 m_forwardTranslatorOptions.setExcludeVariableDictionary(excludeVariableDictionary);
173 2 }
174
175 120 void ForwardTranslator::setExcludeSpaceTranslation(bool excludeSpaceTranslation) {
176 120 m_forwardTranslatorOptions.setExcludeSpaceTranslation(excludeSpaceTranslation);
177 120 }
178
179 67 void ForwardTranslator::setExcludeSpaceLoadInstances(bool excludeSpaceLoadInstances) {
180 67 m_forwardTranslatorOptions.setExcludeSpaceLoadInstances(excludeSpaceLoadInstances);
181 67 }
182
183 // #5510 - Sort by name first, then by reporting frequency
184 // This is a weird case where the "Name" field is actually not unique
185 1690 bool OutputMeterSorterPredicate(const WorkspaceObject& a, const WorkspaceObject& b) {
186 // 1. Sort by name
187
1/1
✓ Branch 1 taken 1690 times.
1690 const auto nameA = a.nameString();
188
1/1
✓ Branch 1 taken 1690 times.
1690 const auto nameB = b.nameString();
189
2/2
✓ Branch 1 taken 831 times.
✓ Branch 2 taken 859 times.
1690 if (nameA != nameB) {
190
1/1
✓ Branch 1 taken 831 times.
831 return istringLess(nameA, nameB);
191 }
192
193 // Safe to cast. Now we'll sort by the remaining fields in case of name equality
194 // I don't use std::tuple{meterA.reportingFrequency(), meterA.meterFileOnly(), meterA.cumulative()} < tuple{...}
195 // Because I don't want to greedily evaluate all fields if not needed
196
1/1
✓ Branch 1 taken 859 times.
859 auto meterA = a.cast<OutputMeter>();
197
1/1
✓ Branch 1 taken 859 times.
859 auto meterB = b.cast<OutputMeter>();
198
199 // 2. reportingFrequency
200
1/1
✓ Branch 1 taken 859 times.
859 const auto freqA = meterA.reportingFrequency();
201
1/1
✓ Branch 1 taken 859 times.
859 const auto freqB = meterB.reportingFrequency();
202
2/2
✓ Branch 1 taken 415 times.
✓ Branch 2 taken 444 times.
859 if (freqA != freqB) {
203 415 return freqA < freqB;
204 }
205
206 // 3. meterFileOnly
207
1/1
✓ Branch 1 taken 444 times.
444 const bool fileA = meterA.meterFileOnly();
208
1/1
✓ Branch 1 taken 444 times.
444 const bool fileB = meterB.meterFileOnly();
209
2/2
✓ Branch 0 taken 260 times.
✓ Branch 1 taken 184 times.
444 if (fileA != fileB) {
210 260 return !fileA; // A comes first if it's not File Only
211 }
212
213 // 4. cumulative
214
1/1
✓ Branch 1 taken 184 times.
184 const bool cumA = meterA.cumulative();
215
1/1
✓ Branch 1 taken 184 times.
184 const bool cumB = meterB.cumulative();
216
2/2
✓ Branch 0 taken 183 times.
✓ Branch 1 taken 1 time.
184 if (cumA != cumB) {
217 183 return !cumA; // A comes first if it's not cumulative
218 }
219
220 // Equal in all fields
221 1 return false;
222 1690 }
223
224 // Figure out which object
225 // * If the load is assigned to a space,
226 // * m_forwardTranslatorOptions.excludeSpaceTranslation() = true: translate and return the IdfObject for the Zone
227 // * m_forwardTranslatorOptions.excludeSpaceTranslation() = false: translate and return the IdfObject for Space
228 // * If the load is assigned to a spaceType:
229 // * translateAndMapModelObjec(spaceType) (which will return a ZoneList if m_forwardTranslatorOptions.excludeSpaceTranslation() is true, SpaceList otherwise)
230 798 IdfObject ForwardTranslator::getSpaceLoadParent(const model::SpaceLoad& sp, bool allowSpaceType) {
231
232 798 OptionalIdfObject relatedIdfObject;
233
234
3/3
✓ Branch 1 taken 798 times.
✓ Branch 3 taken 427 times.
✓ Branch 4 taken 371 times.
1596 if (boost::optional<Space> space_ = sp.space()) {
235
3/3
✓ Branch 1 taken 427 times.
✓ Branch 3 taken 81 times.
✓ Branch 4 taken 346 times.
427 if (m_forwardTranslatorOptions.excludeSpaceTranslation()) {
236
3/4
✓ Branch 1 taken 81 times.
✓ Branch 4 taken 81 times.
✓ Branch 6 taken 81 times.
✗ Branch 7 not taken.
162 if (auto thermalZone_ = space_->thermalZone()) {
237
2/2
✓ Branch 1 taken 81 times.
✓ Branch 4 taken 81 times.
81 relatedIdfObject = translateAndMapModelObject(thermalZone_.get());
238 } else {
239 ✗ OS_ASSERT(false); // This shouldn't happen, since we removed all orphaned spaces earlier in the FT
240 81 }
241 } else {
242
2/2
✓ Branch 1 taken 346 times.
✓ Branch 4 taken 346 times.
346 relatedIdfObject = translateAndMapModelObject(space_.get());
243 }
244
2/3
✓ Branch 1 taken 371 times.
✓ Branch 3 taken 371 times.
✗ Branch 4 not taken.
742 } else if (boost::optional<SpaceType> spaceType_ = sp.spaceType()) {
245
1/2
✓ Branch 0 taken 371 times.
✗ Branch 1 not taken.
371 if (allowSpaceType) {
246
2/2
✓ Branch 1 taken 371 times.
✓ Branch 4 taken 371 times.
371 relatedIdfObject = translateAndMapModelObject(spaceType_.get());
247 } else {
248 ✗ OS_ASSERT(false);
249 }
250 1169 }
251
252
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 798 times.
✗ Branch 4 not taken.
798 OS_ASSERT(relatedIdfObject);
253
2/2
✓ Branch 1 taken 798 times.
✓ Branch 4 taken 798 times.
1596 return relatedIdfObject.get();
254 798 };
255
256 889 Workspace ForwardTranslator::translateModelPrivate(model::Model& model, bool fullModelTranslation) {
257
1/1
✓ Branch 1 taken 889 times.
889 reset();
258
259 // translate Version first
260
1/1
✓ Branch 1 taken 889 times.
889 auto version = model.getUniqueModelObject<model::Version>();
261
1/1
✓ Branch 1 taken 889 times.
889 translateAndMapModelObject(version);
262
263 // translate Timestep second (this initializes it if need be)
264
1/1
✓ Branch 1 taken 889 times.
889 auto timestep = model.getUniqueModelObject<model::Timestep>();
265
1/1
✓ Branch 1 taken 889 times.
889 translateAndMapModelObject(timestep);
266
267 // resolve surface marching conflicts before combining thermal zones or removing spaces
268 // as those operations may change search distances
269
1/1
✓ Branch 1 taken 889 times.
889 resolveMatchedSurfaceConstructionConflicts(model);
270
1/1
✓ Branch 1 taken 889 times.
889 resolveMatchedSubSurfaceConstructionConflicts(model);
271
272 // remove subsurfaces from air walls
273
3/3
✓ Branch 1 taken 889 times.
✓ Branch 8 taken 3315 times.
✓ Branch 9 taken 889 times.
4204 for (const auto& surface : model.getConcreteModelObjects<Surface>()) {
274
3/3
✓ Branch 1 taken 3315 times.
✓ Branch 3 taken 300 times.
✓ Branch 4 taken 3015 times.
3315 if (surface.isAirWall()) {
275
2/3
✓ Branch 1 taken 300 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 300 times.
300 for (auto& subSurface : surface.subSurfaces()) {
276 ✗ LOG(Warn, "Removing SubSurface '" << subSurface.nameString() << "' from air wall Surface '" << surface.nameString() << "'.");
277 ✗ subSurface.remove();
278 300 }
279 }
280 889 }
281
282 // check for spaces not in a thermal zone
283
3/3
✓ Branch 1 taken 889 times.
✓ Branch 8 taken 683 times.
✓ Branch 9 taken 889 times.
1572 for (auto& space : model.getConcreteModelObjects<Space>()) {
284
3/3
✓ Branch 1 taken 683 times.
✓ Branch 5 taken 2 times.
✓ Branch 6 taken 681 times.
683 if (!space.thermalZone()) {
285
9/9
✓ 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 20 taken 2 times.
✓ Branch 23 taken 2 times.
✓ Branch 26 taken 2 times.
2 LOG(Warn, "Space " << space.name().get() << " is not associated with a ThermalZone, it will not be translated.");
286
1/1
✓ Branch 1 taken 2 times.
2 space.remove();
287 }
288 889 }
289
290 // remove orphan surfaces
291
3/3
✓ Branch 1 taken 889 times.
✓ Branch 8 taken 4152 times.
✓ Branch 9 taken 889 times.
5041 for (auto& planarSurface : model.getModelObjects<PlanarSurface>()) {
292
3/3
✓ Branch 1 taken 4152 times.
✓ Branch 5 taken 7 times.
✓ Branch 6 taken 4145 times.
4152 if (!planarSurface.planarSurfaceGroup()) {
293 // a sub surface may have already been removed if the parent surface was removed
294
2/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
7 if (!planarSurface.handle().isNull()) {
295
7/7
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
✓ Branch 10 taken 7 times.
✓ Branch 14 taken 7 times.
✓ Branch 17 taken 7 times.
✓ Branch 20 taken 7 times.
7 LOG(Warn, planarSurface.briefDescription() << " is not associated with a PlanarSurfaceGroup, it will not be translated.");
296
1/1
✓ Branch 1 taken 7 times.
7 planarSurface.remove();
297 }
298 }
299 889 }
300
301 // remove orphan loads
302
3/3
✓ Branch 1 taken 889 times.
✓ Branch 8 taken 814 times.
✓ Branch 9 taken 889 times.
1703 for (auto& spaceLoad : model.getModelObjects<SpaceLoad>()) {
303
3/3
✓ Branch 1 taken 814 times.
✓ Branch 4 taken 22 times.
✓ Branch 5 taken 792 times.
1628 if (spaceLoad.optionalCast<model::WaterUseEquipment>()) {
304 // WaterUseEquipment is not required to be attached to a space
305 22 continue;
306 }
307
11/16
✓ Branch 1 taken 792 times.
✓ Branch 4 taken 425 times.
✓ Branch 5 taken 367 times.
✓ Branch 7 taken 425 times.
✓ Branch 10 taken 5 times.
✓ Branch 11 taken 420 times.
✓ Branch 12 taken 425 times.
✓ Branch 13 taken 367 times.
✓ Branch 15 taken 792 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 5 times.
✓ Branch 19 taken 787 times.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
792 if ((!spaceLoad.space()) && (!spaceLoad.spaceType())) {
308
7/7
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✓ Branch 14 taken 5 times.
✓ Branch 17 taken 5 times.
✓ Branch 20 taken 5 times.
5 LOG(Warn, spaceLoad.briefDescription() << " is not associated with a Space or SpaceType, it will not be translated.");
309
1/1
✓ Branch 1 taken 5 times.
5 spaceLoad.remove();
310 }
311 889 }
312
313
3/3
✓ Branch 1 taken 889 times.
✓ Branch 3 taken 61 times.
✓ Branch 4 taken 828 times.
889 if (m_forwardTranslatorOptions.excludeSpaceTranslation()) {
314 // next thing to do is combine all spaces in each thermal zone
315 // after this each zone will have 0 or 1 spaces and each space will have 0 or 1 zone
316
3/3
✓ Branch 1 taken 61 times.
✓ Branch 7 taken 70 times.
✓ Branch 8 taken 61 times.
131 for (auto& thermalZone : model.getConcreteModelObjects<ThermalZone>()) {
317
1/1
✓ Branch 1 taken 70 times.
70 thermalZone.combineSpaces();
318 61 }
319 } else {
320
321 // The SpaceInfiltration:EffectiveLeakageAreas and FlowCoefficients (unlike the SpaceInfiltration:DesignFlowRate),
322 // and the ElectricEquipment:ITE:AirCooled only accept a Zone or a Space, not a ZoneList nor a SpaceList
323 // So we need to put them on the spaces to avoid problems. But we do not need to hardSize() them (they end up going on a Space).
324 // then remove the spacetype ones to be safe (make 100% sure they won't get translated)
325
326
3/3
✓ Branch 1 taken 828 times.
✓ Branch 8 taken 157 times.
✓ Branch 9 taken 828 times.
985 for (auto& sp : model.getConcreteModelObjects<SpaceType>()) {
327 // auto spi = sp.spaceInfiltrationDesignFlowRates();
328
1/1
✓ Branch 1 taken 157 times.
157 auto spiel = sp.spaceInfiltrationEffectiveLeakageAreas();
329
1/1
✓ Branch 1 taken 157 times.
157 auto spifc = sp.spaceInfiltrationFlowCoefficients();
330
1/1
✓ Branch 1 taken 157 times.
157 auto ites = sp.electricEquipmentITEAirCooled();
331 157 std::vector<SpaceLoad> loads;
332
1/1
✓ Branch 4 taken 157 times.
157 loads.reserve(spiel.size() + spifc.size() + ites.size());
333
1/1
✓ Branch 5 taken 157 times.
157 loads.insert(loads.end(), spiel.begin(), spiel.end());
334
1/1
✓ Branch 5 taken 157 times.
157 loads.insert(loads.end(), spifc.begin(), spifc.end());
335
1/1
✓ Branch 5 taken 157 times.
157 loads.insert(loads.end(), ites.begin(), ites.end());
336
337
2/2
✓ Branch 5 taken 8 times.
✓ Branch 6 taken 157 times.
165 for (auto& infil : loads) {
338
2/3
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
16 if (infil.spaceType()) {
339
3/3
✓ Branch 1 taken 8 times.
✓ Branch 8 taken 16 times.
✓ Branch 9 taken 8 times.
24 for (auto& space : sp.spaces()) {
340
3/3
✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
16 auto infilClone = infil.clone(model).cast<SpaceLoad>();
341
1/1
✓ Branch 1 taken 16 times.
16 infilClone.setParent(space);
342 24 }
343
1/1
✓ Branch 1 taken 8 times.
8 infil.remove();
344 }
345 }
346 985 }
347 }
348
349 // remove unused space types
350
1/1
✓ Branch 1 taken 889 times.
889 std::vector<SpaceType> spaceTypes = model.getConcreteModelObjects<SpaceType>();
351
2/2
✓ Branch 5 taken 303 times.
✓ Branch 6 taken 889 times.
1192 for (auto& spaceType : spaceTypes) {
352
1/1
✓ Branch 1 taken 303 times.
303 std::vector<Space> spaces = spaceType.spaces();
353
2/2
✓ Branch 1 taken 101 times.
✓ Branch 2 taken 202 times.
303 if (spaces.empty()) {
354
9/9
✓ Branch 1 taken 101 times.
✓ Branch 4 taken 101 times.
✓ Branch 7 taken 101 times.
✓ Branch 10 taken 101 times.
✓ Branch 13 taken 101 times.
✓ Branch 16 taken 101 times.
✓ Branch 20 taken 101 times.
✓ Branch 23 taken 101 times.
✓ Branch 26 taken 101 times.
101 LOG(Info, "SpaceType " << spaceType.name().get() << " is not referenced by any space, it will not be translated.");
355
1/1
✓ Branch 1 taken 101 times.
101 spaceType.remove();
356 202 } else if (spaces.size() == 1) {
357 //LOG(Info, "SpaceType " << spaceType.name().get() << " is referenced by one space, loads will be transfered to the space and the space type removed.");
358 // hard apply space type adds a dummy space type to prevent inheriting building space type
359 //spaces[0].hardApplySpaceType(false);
360 //spaceType.remove();
361 }
362 303 }
363
364 //Fix for Bug 717 - Take any OtherEquipment objects that still point to a spacetype and make
365 //a new instance of them for every space that that spacetype points to then delete the one
366 //that pointed to a spacetype
367 //
368 // TODO JM 2021-10-14: combineSpaces already does that. The only reason this code block is here is because:
369 // 1. ThermalZone::combineSpaces doesn't touch the initial Space Types, it's just that they are unused
370 // 2. This object is part of iddObjectToTranslate() which is a mistake to begin with: spaces/spaceTypes should be responsible for translating
371 // their loads!
372 // 3. Removing the unused space types right above should have taken care of the problem
373
1/1
✓ Branch 1 taken 889 times.
889 std::vector<OtherEquipment> otherEquipments = model.getConcreteModelObjects<OtherEquipment>();
374
2/2
✓ Branch 5 taken 4 times.
✓ Branch 6 taken 889 times.
893 for (auto& otherEquipment : otherEquipments) {
375
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<SpaceType> spaceTypeOfOtherEquipment = otherEquipment.spaceType();
376
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 if (spaceTypeOfOtherEquipment) {
377 //loop through the spaces in this space type and make a new instance for each one
378 ✗ std::vector<Space> spaces = spaceTypeOfOtherEquipment.get().spaces();
379 ✗ for (const auto& space : spaces) {
380 ✗ auto otherEquipmentForSpace = otherEquipment.clone().cast<OtherEquipment>();
381 ✗ otherEquipmentForSpace.setSpace(space);
382 //make a nice name for the thing
383
384 //std::string otherEquipmentForSpaceName = otherEquipment.name()
385 //otherEquipment.setName("newName")
386 ✗ }
387 //now, delete the one that points to a spacetype
388 ✗ otherEquipment.remove();
389 ✗ }
390 4 }
391
392 // Energyplus only allows single zone input for ITE object. If space type is assigned in OS,
393 // will translate to multiple ITE objects assigned to each zone under the same space type.
394 // then delete the one that pointed to a spacetype.
395 // By doing this, we can solve the potential problem that if this load is applied to a space type,
396 // the load gets copied to each space of the space type, which may cause conflict of supply air node.
397 //
398 // TODO JM 2021-10-14: combineSpaces already does that. The only reason this code block is here is because:
399 // 1. ThermalZone::combineSpaces doesn't touch the initial Space Types, it's just that they are unused
400 // 2. This object is part of iddObjectToTranslate() which is a mistake to begin with: spaces/spaceTypes should be responsible for translating
401 // their loads!
402 // 3. Removing the unused space types right above should have taken care of the problem
403
1/1
✓ Branch 1 taken 889 times.
889 std::vector<ElectricEquipmentITEAirCooled> iTEAirCooledEquipments = model.getConcreteModelObjects<ElectricEquipmentITEAirCooled>();
404
2/2
✓ Branch 5 taken 28 times.
✓ Branch 6 taken 889 times.
917 for (auto& iTequipment : iTEAirCooledEquipments) {
405
1/1
✓ Branch 1 taken 28 times.
28 boost::optional<SpaceType> spaceTypeOfITEquipment = iTequipment.spaceType();
406
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 26 times.
28 if (spaceTypeOfITEquipment) {
407 //loop through the spaces in this space type and make a new instance for each one
408
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 std::vector<Space> spaces = spaceTypeOfITEquipment.get().spaces();
409
2/2
✓ Branch 5 taken 3 times.
✓ Branch 6 taken 2 times.
5 for (const auto& space : spaces) {
410
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 auto iTEquipmentForSpace = iTequipment.clone().cast<ElectricEquipmentITEAirCooled>();
411
1/1
✓ Branch 1 taken 3 times.
3 iTEquipmentForSpace.setSpace(space);
412 3 }
413 //now, delete the one that points to a spacetype
414
1/1
✓ Branch 1 taken 2 times.
2 iTequipment.remove();
415 2 }
416 28 }
417
418 // Temporary workaround for EnergyPlusTeam #4451
419 // requested by http://code.google.com/p/cbecc/issues/detail?id=736
420 // do this after combining spaces to avoid suprises about relative coordinate changes
421
3/3
✓ Branch 1 taken 889 times.
✓ Branch 8 taken 476 times.
✓ Branch 9 taken 889 times.
1365 for (const auto& thermalZone : model.getConcreteModelObjects<ThermalZone>()) {
422
1/1
✓ Branch 1 taken 476 times.
476 boost::optional<DaylightingControl> dc = thermalZone.secondaryDaylightingControl();
423
2/2
✓ Branch 0 taken 11 times.
✓ Branch 1 taken 465 times.
476 if (dc) {
424
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 double z = dc->positionZCoordinate();
425
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 11 times.
11 if (z < 0) {
426 // find lowest point in thermalZone and move space origin down to that point
427 // lowest point will have z = 0 in relative coordinates
428 ✗ std::vector<Space> spaces = thermalZone.spaces();
429 ✗ OS_ASSERT(spaces.size() == 1);
430
431 ✗ double minZ = z;
432 ✗ BoundingBox bb = spaces[0].boundingBox();
433 ✗ if (bb.minZ()) {
434 ✗ minZ = std::min(minZ, bb.minZ().get());
435 }
436 ✗ OS_ASSERT(minZ < 0);
437
438 ✗ Transformation currentT = spaces[0].transformation();
439 ✗ Transformation newT = Transformation::translation(Vector3d(0, 0, minZ)) * currentT;
440 ✗ bool test = spaces[0].changeTransformation(newT);
441 ✗ OS_ASSERT(test);
442 ✗ }
443 }
444 1365 }
445
446 // TODO: Is this still needed?
447 // ensure shading controls only reference windows in a single zone and determine control sequence number
448 // DLM: ideally E+ would not need to know the zone, shading controls could work across zones
449
1/1
✓ Branch 1 taken 889 times.
889 std::vector<ShadingControl> shadingControls = model.getConcreteModelObjects<ShadingControl>();
450
1/1
✓ Branch 3 taken 889 times.
889 std::sort(shadingControls.begin(), shadingControls.end(), WorkspaceObjectNameLess());
451 889 std::map<Handle, ShadingControlVector> zoneHandleToShadingControlVectorMap;
452
2/2
✓ Branch 5 taken 4 times.
✓ Branch 6 taken 889 times.
893 for (auto& shadingControl : shadingControls) {
453 4 std::set<Handle> thisZoneHandleSet;
454
3/3
✓ Branch 1 taken 4 times.
✓ Branch 8 taken 6 times.
✓ Branch 9 taken 4 times.
10 for (auto& subSurface : shadingControl.subSurfaces()) {
455
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<Space> space = subSurface.space();
456
1/2
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
6 if (space) {
457
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 boost::optional<ThermalZone> thermalZone = space->thermalZone();
458
1/2
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
6 if (thermalZone) {
459
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 Handle zoneHandle = thermalZone->handle();
460
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 2 times.
6 if (thisZoneHandleSet.empty()) {
461 // first thermal zone, no clone
462
1/1
✓ Branch 1 taken 4 times.
4 thisZoneHandleSet.insert(zoneHandle);
463
1/1
✓ Branch 1 taken 4 times.
4 auto it = zoneHandleToShadingControlVectorMap.find(zoneHandle);
464
2/2
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 2 times.
4 if (it == zoneHandleToShadingControlVectorMap.end()) {
465
1/1
✓ Branch 3 taken 2 times.
2 zoneHandleToShadingControlVectorMap.insert(std::make_pair(zoneHandle, std::vector<ShadingControl>()));
466 }
467
1/1
✓ Branch 1 taken 4 times.
4 it = zoneHandleToShadingControlVectorMap.find(zoneHandle);
468
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 4 times.
✗ Branch 5 not taken.
4 OS_ASSERT(it != zoneHandleToShadingControlVectorMap.end());
469
1/1
✓ Branch 2 taken 4 times.
4 it->second.push_back(shadingControl);
470
3/3
✓ Branch 1 taken 4 times.
✓ Branch 6 taken 4 times.
✓ Branch 9 taken 4 times.
12 shadingControl.additionalProperties().setFeature("Shading Control Sequence Number", static_cast<int>(it->second.size()));
471
2/3
✓ Branch 2 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
2 } else if (thisZoneHandleSet.find(zoneHandle) != thisZoneHandleSet.end()) {
472 // already in here, good to go
473
474 } else {
475 // additional thermal zone, must clone
476 ✗ thisZoneHandleSet.insert(zoneHandle);
477 ✗ auto clone = shadingControl.clone(model).cast<ShadingControl>();
478 // assign clone to control subSurface
479 ✗ clone.addSubSurface(subSurface);
480 // Try insert
481 ✗ auto [it, success] = zoneHandleToShadingControlVectorMap.insert({zoneHandle, std::vector<ShadingControl>()});
482 ✗ OS_ASSERT(success);
483 ✗ OS_ASSERT(it != zoneHandleToShadingControlVectorMap.end());
484 ✗ it->second.push_back(clone);
485 ✗ clone.additionalProperties().setFeature("Shading Control Sequence Number", static_cast<int>(it->second.size()));
486 ✗ }
487 } else {
488 ✗ LOG(Warn, "Cannot find ThermalZone for " << subSurface.briefDescription() << " referencing " << shadingControl.briefDescription());
489 }
490 6 } else {
491 ✗ LOG(Warn, "Cannot find Space for " << subSurface.briefDescription() << " referencing " << shadingControl.briefDescription());
492 }
493 10 }
494 4 }
495
496
2/3
✓ Branch 1 taken 889 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 889 times.
889 if (!m_forwardTranslatorOptions.keepRunControlSpecialDays()) {
497 ✗ LOG(Warn, "You have manually choosen to not translate the RunPeriodControlSpecialDays, ignoring them.");
498 ✗ for (model::RunPeriodControlSpecialDays holiday : model.getConcreteModelObjects<model::RunPeriodControlSpecialDays>()) {
499 ✗ holiday.remove();
500 ✗ }
501 }
502
503
2/2
✓ Branch 0 taken 856 times.
✓ Branch 1 taken 33 times.
889 if (fullModelTranslation) {
504
505 // translate life cycle cost parameters
506
3/3
✓ Branch 1 taken 856 times.
✓ Branch 3 taken 837 times.
✓ Branch 4 taken 19 times.
856 if (!m_forwardTranslatorOptions.excludeLCCObjects()) {
507
1/1
✓ Branch 1 taken 837 times.
837 boost::optional<LifeCycleCostParameters> lifeCycleCostParameters = model.lifeCycleCostParameters();
508
2/2
✓ Branch 1 taken 826 times.
✓ Branch 2 taken 11 times.
837 if (!lifeCycleCostParameters) {
509 // only warn if costs are present
510
3/3
✓ Branch 1 taken 826 times.
✓ Branch 5 taken 8 times.
✓ Branch 6 taken 818 times.
826 if (!model.getConcreteModelObjects<LifeCycleCost>().empty()) {
511
5/5
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✓ Branch 10 taken 8 times.
✓ Branch 13 taken 8 times.
8 LOG(Warn, "No LifeCycleCostParameters but LifeCycleCosts are present, adding default LifeCycleCostParameters.");
512 }
513
514 // always add this object so E+ results section exists
515
2/2
✓ Branch 1 taken 826 times.
✓ Branch 4 taken 826 times.
826 lifeCycleCostParameters = model.getUniqueModelObject<LifeCycleCostParameters>();
516 }
517
2/2
✓ Branch 1 taken 837 times.
✓ Branch 4 taken 837 times.
837 translateAndMapModelObject(*lifeCycleCostParameters);
518 837 }
519
520 // ensure that building exists
521
1/1
✓ Branch 1 taken 856 times.
856 boost::optional<model::Building> building = model.building();
522
2/2
✓ Branch 1 taken 713 times.
✓ Branch 2 taken 143 times.
856 if (!building) {
523
2/2
✓ Branch 1 taken 713 times.
✓ Branch 4 taken 713 times.
713 building = model.getUniqueModelObject<model::Building>();
524 }
525
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
856 translateAndMapModelObject(*building);
526
527 // ensure that simulation control exists
528
1/1
✓ Branch 1 taken 856 times.
856 boost::optional<model::SimulationControl> simulationControl = model.getOptionalUniqueModelObject<model::SimulationControl>();
529
2/2
✓ Branch 1 taken 795 times.
✓ Branch 2 taken 61 times.
856 if (!simulationControl) {
530
2/2
✓ Branch 1 taken 795 times.
✓ Branch 4 taken 795 times.
795 simulationControl = model.getUniqueModelObject<model::SimulationControl>();
531 }
532
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
856 translateAndMapModelObject(*simulationControl);
533
534 // ensure that sizing parameters control exists
535
1/1
✓ Branch 1 taken 856 times.
856 boost::optional<model::SizingParameters> sizingParameters = model.getOptionalUniqueModelObject<model::SizingParameters>();
536
2/2
✓ Branch 1 taken 844 times.
✓ Branch 2 taken 12 times.
856 if (!sizingParameters) {
537
2/2
✓ Branch 1 taken 844 times.
✓ Branch 4 taken 844 times.
844 sizingParameters = model.getUniqueModelObject<model::SizingParameters>();
538 }
539
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
856 translateAndMapModelObject(*sizingParameters);
540
541 // ensure that run period exists
542 // DLM: should this only be done if there is a WeatherFile object?
543
1/1
✓ Branch 1 taken 856 times.
856 boost::optional<model::RunPeriod> runPeriod = model.runPeriod();
544
2/2
✓ Branch 1 taken 802 times.
✓ Branch 2 taken 54 times.
856 if (!runPeriod) {
545
2/2
✓ Branch 1 taken 802 times.
✓ Branch 4 taken 802 times.
802 runPeriod = model.getUniqueModelObject<model::RunPeriod>();
546 }
547
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
856 translateAndMapModelObject(*runPeriod);
548
549 // ensure that output table summary reports exists
550 // If the user manually added an OutputTableSummaryReports, but he also opted-in to exclude it on the FT, which decision do we keep?
551 // Given that it's a much harder to set the option on the FT, I'll respect that one
552
3/3
✓ Branch 1 taken 856 times.
✓ Branch 3 taken 844 times.
✓ Branch 4 taken 12 times.
856 if (!m_forwardTranslatorOptions.excludeHTMLOutputReport()) {
553
1/1
✓ Branch 1 taken 844 times.
844 auto optOutputTableSummaryReports = model.getOptionalUniqueModelObject<model::OutputTableSummaryReports>();
554 // Add default one if none explicitly specified
555
2/2
✓ Branch 1 taken 838 times.
✓ Branch 2 taken 6 times.
844 if (!optOutputTableSummaryReports) {
556
1/1
✓ Branch 1 taken 838 times.
838 auto outputTableSummaryReports = model.getUniqueModelObject<model::OutputTableSummaryReports>();
557
2/2
✓ Branch 1 taken 838 times.
✓ Branch 4 taken 838 times.
838 outputTableSummaryReports.addSummaryReport("AllSummary");
558
1/1
✓ Branch 1 taken 838 times.
838 translateAndMapModelObject(outputTableSummaryReports);
559 838 }
560 844 }
561
562 // NOTE: General note about taking a reference via emplace_back in the FT. It is faster to construct an object in place, but you must be careful
563 // that m_idfObjects is NOT going to be resized while you are using the reference or it would be invalidated
564 // eg:
565 // auto& objectRef = m_idfObjects.emplace_back(xxxx);
566 // translateAndMapModelObject(object.child()); // UH OH: THIS IS LIKELY GOING TO RESIZE m_idfObjects and if so &objectRef is now invalid!!
567
568 // add a global geometry rules object
569
1/1
✓ Branch 1 taken 856 times.
856 auto& globalGeometryRules = m_idfObjects.emplace_back(openstudio::IddObjectType::GlobalGeometryRules);
570
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
1712 globalGeometryRules.setString(openstudio::GlobalGeometryRulesFields::StartingVertexPosition, "UpperLeftCorner");
571
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
1712 globalGeometryRules.setString(openstudio::GlobalGeometryRulesFields::VertexEntryDirection, "Counterclockwise");
572
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
1712 globalGeometryRules.setString(openstudio::GlobalGeometryRulesFields::CoordinateSystem, "Relative");
573
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
1712 globalGeometryRules.setString(openstudio::GlobalGeometryRulesFields::DaylightingReferencePointCoordinateSystem, "Relative");
574
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
856 globalGeometryRules.setString(openstudio::GlobalGeometryRulesFields::RectangularSurfaceCoordinateSystem, "Relative");
575
576 // create meters for utility bill objects
577
1/1
✓ Branch 1 taken 856 times.
856 std::vector<UtilityBill> utilityBills = model.getConcreteModelObjects<UtilityBill>();
578
2/2
✓ Branch 5 taken 20 times.
✓ Branch 6 taken 856 times.
876 for (const auto& utilityBill : utilityBills) {
579 // these meters and variables will be translated later
580
1/1
✓ Branch 1 taken 20 times.
20 OutputMeter consumptionMeter = utilityBill.consumptionMeter();
581
1/1
✓ Branch 1 taken 20 times.
20 boost::optional<OutputMeter> peakDemandMeter = utilityBill.peakDemandMeter();
582 20 }
583 856 }
584
585
1/1
✓ Branch 1 taken 889 times.
889 translateConstructions(model);
586
1/1
✓ Branch 1 taken 889 times.
889 translateSchedules(model);
587
588 // Translate the Outdoor Air Node
589 {
590
1/1
✓ Branch 1 taken 889 times.
889 auto node = model.outdoorAirNode();
591 // Create a new IddObjectType::OutdoorAir_Node
592
2/2
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
889 IdfObject idfObject(IddObjectType::OutdoorAir_Node);
593
1/1
✓ Branch 1 taken 889 times.
889 m_idfObjects.push_back(idfObject);
594
3/3
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
✓ Branch 7 taken 889 times.
889 idfObject.setName(node.name().get());
595 889 }
596
597 // get AirLoopHVACDedicatedOutdoorAirSystem in sorted order
598
1/1
✓ Branch 1 taken 889 times.
889 std::vector<AirLoopHVACDedicatedOutdoorAirSystem> doass = model.getConcreteModelObjects<AirLoopHVACDedicatedOutdoorAirSystem>();
599
1/1
✓ Branch 3 taken 889 times.
889 std::sort(doass.begin(), doass.end(), WorkspaceObjectNameLess());
600
2/2
✓ Branch 4 taken 5 times.
✓ Branch 5 taken 889 times.
894 for (auto& doas : doass) {
601
1/1
✓ Branch 1 taken 5 times.
5 translateAndMapModelObject(doas);
602 }
603
604 // get air loops in sorted order
605
1/1
✓ Branch 1 taken 889 times.
889 std::vector<AirLoopHVAC> airLoops = model.getConcreteModelObjects<AirLoopHVAC>();
606
1/1
✓ Branch 3 taken 889 times.
889 std::sort(airLoops.begin(), airLoops.end(), WorkspaceObjectNameLess());
607
2/2
✓ Branch 4 taken 200 times.
✓ Branch 5 taken 889 times.
1089 for (auto& airLoop : airLoops) {
608
1/1
✓ Branch 1 taken 200 times.
200 translateAndMapModelObject(airLoop);
609 }
610
611 // get AirConditionerVariableRefrigerantFlow objects in sorted order
612
1/1
✓ Branch 1 taken 889 times.
889 std::vector<AirConditionerVariableRefrigerantFlow> vrfs = model.getConcreteModelObjects<AirConditionerVariableRefrigerantFlow>();
613
1/1
✓ Branch 3 taken 889 times.
889 std::sort(vrfs.begin(), vrfs.end(), WorkspaceObjectNameLess());
614
2/2
✓ Branch 4 taken 12 times.
✓ Branch 5 taken 889 times.
901 for (auto& vrf : vrfs) {
615
1/1
✓ Branch 1 taken 12 times.
12 translateAndMapModelObject(vrf);
616 }
617
618 // get AirConditionerVariableRefrigerantFlowFluidTemperatureControl objects in sorted order
619 std::vector<AirConditionerVariableRefrigerantFlowFluidTemperatureControl> vrfftcs =
620
1/1
✓ Branch 1 taken 889 times.
889 model.getConcreteModelObjects<AirConditionerVariableRefrigerantFlowFluidTemperatureControl>();
621
1/1
✓ Branch 3 taken 889 times.
889 std::sort(vrfftcs.begin(), vrfftcs.end(), WorkspaceObjectNameLess());
622
2/2
✓ Branch 4 taken 3 times.
✓ Branch 5 taken 889 times.
892 for (auto& vrfftc : vrfftcs) {
623
1/1
✓ Branch 1 taken 3 times.
3 translateAndMapModelObject(vrfftc);
624 }
625
626 // get AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR objects in sorted order
627 std::vector<AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR> vrfftchrs =
628
1/1
✓ Branch 1 taken 889 times.
889 model.getConcreteModelObjects<AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR>();
629
1/1
✓ Branch 3 taken 889 times.
889 std::sort(vrfftchrs.begin(), vrfftchrs.end(), WorkspaceObjectNameLess());
630
2/2
✓ Branch 4 taken 3 times.
✓ Branch 5 taken 889 times.
892 for (auto& vrfftchr : vrfftchrs) {
631
1/1
✓ Branch 1 taken 3 times.
3 translateAndMapModelObject(vrfftchr);
632 }
633
634 // get plant loops in sorted order
635
1/1
✓ Branch 1 taken 889 times.
889 std::vector<PlantLoop> plantLoops = model.getConcreteModelObjects<PlantLoop>();
636
1/1
✓ Branch 3 taken 889 times.
889 std::sort(plantLoops.begin(), plantLoops.end(), WorkspaceObjectNameLess());
637
2/2
✓ Branch 4 taken 240 times.
✓ Branch 5 taken 889 times.
1129 for (auto& plantLoop : plantLoops) {
638
1/1
✓ Branch 1 taken 240 times.
240 translateAndMapModelObject(plantLoop);
639 }
640
641 // translate AFN
642
1/1
✓ Branch 1 taken 889 times.
889 translateAirflowNetwork(model);
643
644 // now loop over all objects
645
3/3
✓ Branch 1 taken 889 times.
✓ Branch 8 taken 168910 times.
✓ Branch 9 taken 889 times.
169799 for (const IddObjectType& iddObjectType : iddObjectsToTranslate()) {
646
647 // get objects by type in sorted order
648
1/1
✓ Branch 1 taken 168910 times.
168910 std::vector<WorkspaceObject> objects = model.getObjectsByType(iddObjectType);
649
3/3
✓ Branch 1 taken 168910 times.
✓ Branch 4 taken 889 times.
✓ Branch 5 taken 168021 times.
168910 if (iddObjectType == IddObjectType::OS_Output_Meter) {
650
1/1
✓ Branch 3 taken 889 times.
889 std::sort(objects.begin(), objects.end(), OutputMeterSorterPredicate);
651 } else {
652
1/1
✓ Branch 3 taken 168021 times.
168021 std::sort(objects.begin(), objects.end(), WorkspaceObjectNameLess());
653 }
654
655
2/2
✓ Branch 5 taken 31866 times.
✓ Branch 6 taken 168910 times.
200776 for (const WorkspaceObject& workspaceObject : objects) {
656
1/1
✓ Branch 1 taken 31866 times.
31866 auto modelObject = workspaceObject.cast<ModelObject>();
657
1/1
✓ Branch 1 taken 31866 times.
31866 translateAndMapModelObject(modelObject);
658 31866 }
659 169799 }
660
661
2/2
✓ Branch 0 taken 856 times.
✓ Branch 1 taken 33 times.
889 if (fullModelTranslation) {
662 // add output requests
663
1/1
✓ Branch 1 taken 856 times.
856 this->createStandardOutputRequests(model);
664 }
665
666
3/3
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
✓ Branch 7 taken 889 times.
889 Workspace workspace(StrictnessLevel::Minimal, IddFileType::EnergyPlus);
667
1/1
✓ Branch 1 taken 889 times.
889 OptionalWorkspaceObject vo = workspace.versionObject();
668
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 889 times.
✗ Branch 4 not taken.
889 OS_ASSERT(vo);
669
3/3
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
✓ Branch 7 taken 889 times.
889 workspace.removeObject(vo->handle());
670
671
1/1
✓ Branch 1 taken 889 times.
889 workspace.setFastNaming(true);
672
1/1
✓ Branch 1 taken 889 times.
889 workspace.addObjects(m_idfObjects);
673
1/1
✓ Branch 1 taken 889 times.
889 workspace.setFastNaming(false);
674
3/5
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 889 times.
✗ Branch 10 not taken.
889 OS_ASSERT(workspace.getObjectsByType(IddObjectType::Version).size() == 1U);
675
676 1778 return workspace;
677 889 }
678
679 // struct for sorting children in forward translator
680 struct ChildSorter
681 {
682 33208 ChildSorter(std::vector<IddObjectType>& iddObjectTypes) : m_iddObjectTypes(iddObjectTypes) {}
683
684 // sort first by position in iddObjectTypes and then by name
685 34475 bool operator()(const model::ModelObject& a, const model::ModelObject& b) const {
686
3/3
✓ Branch 1 taken 34475 times.
✓ Branch 4 taken 34475 times.
✓ Branch 9 taken 34475 times.
34475 auto ita = std::find(m_iddObjectTypes.begin(), m_iddObjectTypes.end(), a.iddObject().type());
687
3/3
✓ Branch 1 taken 34475 times.
✓ Branch 4 taken 34475 times.
✓ Branch 9 taken 34475 times.
34475 auto itb = std::find(m_iddObjectTypes.begin(), m_iddObjectTypes.end(), b.iddObject().type());
688
689
2/2
✓ Branch 2 taken 2621 times.
✓ Branch 3 taken 31854 times.
34475 if (ita < itb) {
690 2621 return true;
691
2/2
✓ Branch 2 taken 5150 times.
✓ Branch 3 taken 26704 times.
31854 } else if (ita > itb) {
692 5150 return false;
693 }
694
5/5
✓ Branch 1 taken 26704 times.
✓ Branch 4 taken 26704 times.
✓ Branch 7 taken 26704 times.
✓ Branch 11 taken 179 times.
✓ Branch 12 taken 26525 times.
26704 if (a.iddObject().type() == IddObjectType::OS_Output_Meter) {
695
1/1
✓ Branch 1 taken 179 times.
179 return OutputMeterSorterPredicate(a, b);
696 }
697
698
1/1
✓ Branch 1 taken 26525 times.
26525 return WorkspaceObjectNameLess()(a, b);
699 }
700
701 std::vector<IddObjectType> m_iddObjectTypes;
702 };
703
704 // NOLINTBEGIN(readability-function-size, bugprone-branch-clone)
705 92436 boost::optional<IdfObject> ForwardTranslator::translateAndMapModelObject(ModelObject& modelObject) {
706 92436 boost::optional<IdfObject> retVal;
707
708 // if already translated then exit
709
2/2
✓ Branch 1 taken 92436 times.
✓ Branch 4 taken 92436 times.
92436 auto objInMapIt = m_map.find(modelObject.handle());
710
2/2
✓ Branch 2 taken 42881 times.
✓ Branch 3 taken 49555 times.
92436 if (objInMapIt != m_map.end()) {
711
1/1
✓ Branch 2 taken 42881 times.
42881 return boost::optional<IdfObject>(objInMapIt->second);
712 }
713
714
8/8
✓ Branch 1 taken 49555 times.
✓ Branch 4 taken 49555 times.
✓ Branch 7 taken 49555 times.
✓ Branch 10 taken 49555 times.
✓ Branch 13 taken 49555 times.
✓ Branch 17 taken 49555 times.
✓ Branch 20 taken 49555 times.
✓ Branch 23 taken 49555 times.
49555 LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
715
716
386/529
✓ Branch 1 taken 49555 times.
✓ Branch 4 taken 49555 times.
✓ Branch 7 taken 49555 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 12 times.
✓ Branch 12 taken 3 times.
✓ Branch 13 taken 3 times.
✓ Branch 14 taken 200 times.
✓ Branch 15 taken 3 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 2 times.
✓ Branch 18 taken 1 time.
✓ Branch 19 taken 2 times.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✓ Branch 23 taken 3 times.
✓ Branch 24 taken 1 time.
✓ Branch 25 taken 5 times.
✓ Branch 26 taken 72 times.
✓ Branch 27 taken 1 time.
✓ Branch 28 taken 3 times.
✓ Branch 29 taken 2 times.
✓ Branch 30 taken 1 time.
✓ Branch 31 taken 1 time.
✓ Branch 32 taken 205 times.
✓ Branch 33 taken 200 times.
✓ Branch 34 taken 58 times.
✓ Branch 35 taken 5 times.
✓ Branch 36 taken 1 time.
✓ Branch 37 taken 13 times.
✓ Branch 38 taken 4 times.
✓ Branch 39 taken 73 times.
✓ Branch 40 taken 440 times.
✓ Branch 41 taken 1 time.
✓ Branch 42 taken 5 times.
✓ Branch 43 taken 2 times.
✓ Branch 44 taken 1 time.
✗ Branch 45 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✓ Branch 48 taken 5 times.
✓ Branch 49 taken 2 times.
✓ Branch 50 taken 3 times.
✓ Branch 51 taken 2 times.
✓ Branch 52 taken 2 times.
✓ Branch 53 taken 14 times.
✗ Branch 54 not taken.
✓ Branch 55 taken 856 times.
✓ Branch 56 taken 94 times.
✓ Branch 57 taken 7 times.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 60 not taken.
✓ Branch 61 taken 4 times.
✓ Branch 62 taken 3 times.
✓ Branch 63 taken 1 time.
✓ Branch 64 taken 3 times.
✓ Branch 65 taken 20 times.
✗ Branch 66 not taken.
✓ Branch 67 taken 45 times.
✗ Branch 68 not taken.
✓ Branch 69 taken 1 time.
✓ Branch 70 taken 1 time.
✓ Branch 71 taken 15 times.
✓ Branch 72 taken 16 times.
✓ Branch 73 taken 16 times.
✓ Branch 74 taken 11 times.
✓ Branch 75 taken 79 times.
✓ Branch 76 taken 2 times.
✓ Branch 77 taken 14 times.
✗ Branch 78 not taken.
✓ Branch 79 taken 9 times.
✓ Branch 80 taken 2 times.
✓ Branch 81 taken 24 times.
✓ Branch 82 taken 4 times.
✓ Branch 83 taken 5 times.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✓ Branch 86 taken 4 times.
✓ Branch 87 taken 13 times.
✗ Branch 88 not taken.
✓ Branch 89 taken 9 times.
✓ Branch 90 taken 4 times.
✗ Branch 91 not taken.
✓ Branch 92 taken 16 times.
✓ Branch 93 taken 19 times.
✓ Branch 94 taken 9 times.
✗ Branch 95 not taken.
✓ Branch 96 taken 3 times.
✗ Branch 97 not taken.
✓ Branch 98 taken 36 times.
✓ Branch 99 taken 6 times.
✗ Branch 100 not taken.
✓ Branch 101 taken 45 times.
✓ Branch 102 taken 4 times.
✗ Branch 103 not taken.
✗ Branch 104 not taken.
✓ Branch 105 taken 6 times.
✓ Branch 106 taken 24 times.
✓ Branch 107 taken 4 times.
✓ Branch 108 taken 11 times.
✓ Branch 109 taken 4 times.
✓ Branch 110 taken 3 times.
✗ Branch 111 not taken.
✗ Branch 112 not taken.
✓ Branch 113 taken 1 time.
✓ Branch 114 taken 16 times.
✓ Branch 115 taken 3 times.
✓ Branch 116 taken 4 times.
✓ Branch 117 taken 5 times.
✓ Branch 118 taken 1 time.
✓ Branch 119 taken 4 times.
✓ Branch 120 taken 11 times.
✓ Branch 121 taken 1 time.
✓ Branch 122 taken 5 times.
✓ Branch 123 taken 3 times.
✓ Branch 124 taken 110 times.
✗ Branch 125 not taken.
✓ Branch 126 taken 6873 times.
✓ Branch 127 taken 487 times.
✓ Branch 128 taken 514 times.
✓ Branch 129 taken 494 times.
✓ Branch 130 taken 89 times.
✓ Branch 131 taken 9 times.
✗ Branch 132 not taken.
✗ Branch 133 not taken.
✓ Branch 134 taken 53 times.
✓ Branch 135 taken 53 times.
✓ Branch 136 taken 6 times.
✗ Branch 137 not taken.
✗ Branch 138 not taken.
✓ Branch 139 taken 4 times.
✗ Branch 140 not taken.
✗ Branch 141 not taken.
✗ Branch 142 not taken.
✓ Branch 143 taken 7 times.
✓ Branch 144 taken 1056 times.
✓ Branch 145 taken 339 times.
✗ Branch 146 not taken.
✓ Branch 147 taken 36 times.
✓ Branch 148 taken 2 times.
✓ Branch 149 taken 12 times.
✓ Branch 150 taken 6 times.
✗ Branch 151 not taken.
✓ Branch 152 taken 44 times.
✓ Branch 153 taken 31 times.
✓ Branch 154 taken 10 times.
✓ Branch 155 taken 1074 times.
✓ Branch 156 taken 2 times.
✓ Branch 157 taken 2 times.
✓ Branch 158 taken 2 times.
✓ Branch 159 taken 8 times.
✓ Branch 160 taken 12 times.
✓ Branch 161 taken 8 times.
✓ Branch 162 taken 158 times.
✗ Branch 163 not taken.
✗ Branch 164 not taken.
✓ Branch 165 taken 240 times.
✓ Branch 166 taken 200 times.
✓ Branch 167 taken 56 times.
✓ Branch 168 taken 148 times.
✓ Branch 169 taken 1 time.
✓ Branch 170 taken 1 time.
✓ Branch 171 taken 1 time.
✓ Branch 172 taken 67 times.
✓ Branch 173 taken 47 times.
✓ Branch 174 taken 155 times.
✓ Branch 175 taken 88 times.
✗ Branch 176 not taken.
✗ Branch 177 not taken.
✗ Branch 178 not taken.
✗ Branch 179 not taken.
✗ Branch 180 not taken.
✗ Branch 181 not taken.
✓ Branch 182 taken 282 times.
✓ Branch 183 taken 176 times.
✓ Branch 184 taken 33 times.
✓ Branch 185 taken 1 time.
✓ Branch 186 taken 12 times.
✗ Branch 187 not taken.
✓ Branch 188 taken 2 times.
✓ Branch 189 taken 1 time.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✓ Branch 192 taken 2 times.
✓ Branch 193 taken 4 times.
✓ Branch 194 taken 69 times.
✓ Branch 195 taken 4 times.
✓ Branch 196 taken 2 times.
✓ Branch 197 taken 15 times.
✓ Branch 198 taken 3 times.
✓ Branch 199 taken 3 times.
✓ Branch 200 taken 8 times.
✓ Branch 201 taken 21 times.
✓ Branch 202 taken 12 times.
✓ Branch 203 taken 18 times.
✓ Branch 204 taken 5 times.
✓ Branch 205 taken 6 times.
✓ Branch 206 taken 33 times.
✓ Branch 207 taken 3 times.
✓ Branch 208 taken 1 time.
✓ Branch 209 taken 1 time.
✓ Branch 210 taken 2 times.
✗ Branch 211 not taken.
✓ Branch 212 taken 1 time.
✗ Branch 213 not taken.
✓ Branch 214 taken 1 time.
✗ Branch 215 not taken.
✓ Branch 216 taken 1 time.
✓ Branch 217 taken 1 time.
✓ Branch 218 taken 1 time.
✓ Branch 219 taken 1 time.
✓ Branch 220 taken 1 time.
✓ Branch 221 taken 1 time.
✓ Branch 222 taken 5 times.
✓ Branch 223 taken 1 time.
✓ Branch 224 taken 1 time.
✓ Branch 225 taken 1 time.
✓ Branch 226 taken 1 time.
✓ Branch 227 taken 1 time.
✓ Branch 228 taken 1 time.
✓ Branch 229 taken 47 times.
✓ Branch 230 taken 3 times.
✓ Branch 231 taken 98 times.
✓ Branch 232 taken 28 times.
✓ Branch 233 taken 18 times.
✓ Branch 234 taken 7 times.
✓ Branch 235 taken 2 times.
✗ Branch 236 not taken.
✗ Branch 237 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
✓ Branch 240 taken 2 times.
✓ Branch 241 taken 2 times.
✓ Branch 242 taken 3 times.
✓ Branch 243 taken 3 times.
✓ Branch 244 taken 3 times.
✓ Branch 245 taken 3 times.
✓ Branch 246 taken 3 times.
✓ Branch 247 taken 3 times.
✓ Branch 248 taken 3 times.
✓ Branch 249 taken 1 time.
✓ Branch 250 taken 3 times.
✓ Branch 251 taken 3 times.
✓ Branch 252 taken 2 times.
✓ Branch 253 taken 1 time.
✓ Branch 254 taken 1 time.
✗ Branch 255 not taken.
✓ Branch 256 taken 3 times.
✓ Branch 257 taken 1 time.
✗ Branch 258 not taken.
✗ Branch 259 not taken.
✓ Branch 260 taken 46 times.
✓ Branch 261 taken 10 times.
✓ Branch 262 taken 3 times.
✓ Branch 263 taken 3 times.
✓ Branch 264 taken 3 times.
✓ Branch 265 taken 3 times.
✓ Branch 266 taken 2 times.
✓ Branch 267 taken 3 times.
✓ Branch 268 taken 1 time.
✓ Branch 269 taken 1 time.
✓ Branch 270 taken 1 time.
✓ Branch 271 taken 1 time.
✓ Branch 272 taken 3 times.
✓ Branch 273 taken 3 times.
✓ Branch 274 taken 4 times.
✓ Branch 275 taken 2 times.
✓ Branch 276 taken 1 time.
✗ Branch 277 not taken.
✓ Branch 278 taken 36 times.
✓ Branch 279 taken 7 times.
✓ Branch 280 taken 5 times.
✓ Branch 281 taken 54 times.
✓ Branch 282 taken 162 times.
✓ Branch 283 taken 135 times.
✓ Branch 284 taken 12 times.
✗ Branch 285 not taken.
✓ Branch 286 taken 43 times.
✓ Branch 287 taken 3 times.
✓ Branch 288 taken 3 times.
✓ Branch 289 taken 41 times.
✓ Branch 290 taken 18 times.
✓ Branch 291 taken 11 times.
✓ Branch 292 taken 22 times.
✗ Branch 293 not taken.
✗ Branch 294 not taken.
✓ Branch 295 taken 1 time.
✓ Branch 296 taken 16 times.
✓ Branch 297 taken 855 times.
✗ Branch 298 not taken.
✗ Branch 299 not taken.
✗ Branch 300 not taken.
✗ Branch 301 not taken.
✓ Branch 302 taken 246 times.
✓ Branch 303 taken 94 times.
✗ Branch 304 not taken.
✗ Branch 305 not taken.
✓ Branch 306 taken 573 times.
✓ Branch 307 taken 77 times.
✗ Branch 308 not taken.
✓ Branch 309 taken 44 times.
✓ Branch 310 taken 1 time.
✓ Branch 311 taken 1 time.
✓ Branch 312 taken 2 times.
✓ Branch 313 taken 1 time.
✗ Branch 314 not taken.
✗ Branch 315 not taken.
✗ Branch 316 not taken.
✗ Branch 317 not taken.
✓ Branch 318 taken 6793 times.
✓ Branch 319 taken 4 times.
✓ Branch 320 taken 1 time.
✓ Branch 321 taken 1 time.
✗ Branch 322 not taken.
✓ Branch 323 taken 2 times.
✓ Branch 324 taken 240 times.
✗ Branch 325 not taken.
✓ Branch 326 taken 1 time.
✗ Branch 327 not taken.
✓ Branch 328 taken 2 times.
✗ Branch 329 not taken.
✗ Branch 330 not taken.
✗ Branch 331 not taken.
✗ Branch 332 not taken.
✗ Branch 333 not taken.
✗ Branch 334 not taken.
✗ Branch 335 not taken.
✓ Branch 336 taken 10 times.
✓ Branch 337 taken 4 times.
✓ Branch 338 taken 32 times.
✓ Branch 339 taken 11 times.
✓ Branch 340 taken 2 times.
✓ Branch 341 taken 5 times.
✓ Branch 342 taken 2 times.
✓ Branch 343 taken 2 times.
✓ Branch 344 taken 3 times.
✓ Branch 345 taken 5 times.
✓ Branch 346 taken 3 times.
✓ Branch 347 taken 2 times.
✓ Branch 348 taken 5 times.
✓ Branch 349 taken 5 times.
✓ Branch 350 taken 2 times.
✓ Branch 351 taken 5 times.
✓ Branch 352 taken 397 times.
✓ Branch 353 taken 148 times.
✓ Branch 354 taken 10 times.
✓ Branch 355 taken 844 times.
✓ Branch 356 taken 2 times.
✓ Branch 357 taken 27 times.
✓ Branch 358 taken 119 times.
✓ Branch 359 taken 61 times.
✓ Branch 360 taken 1 time.
✓ Branch 361 taken 10 times.
✗ Branch 362 not taken.
✗ Branch 363 not taken.
✓ Branch 364 taken 236 times.
✓ Branch 365 taken 10 times.
✓ Branch 366 taken 6 times.
✓ Branch 367 taken 8 times.
✓ Branch 368 taken 3 times.
✓ Branch 369 taken 5 times.
✓ Branch 370 taken 4 times.
✗ Branch 371 not taken.
✗ Branch 372 not taken.
✗ Branch 373 not taken.
✗ Branch 374 not taken.
✗ Branch 375 not taken.
✓ Branch 376 taken 1 time.
✗ Branch 377 not taken.
✓ Branch 378 taken 1 time.
✓ Branch 379 taken 1 time.
✗ Branch 380 not taken.
✗ Branch 381 not taken.
✗ Branch 382 not taken.
✗ Branch 383 not taken.
✗ Branch 384 not taken.
✗ Branch 385 not taken.
✗ Branch 386 not taken.
✗ Branch 387 not taken.
✗ Branch 388 not taken.
✓ Branch 389 taken 250 times.
✓ Branch 390 taken 856 times.
✓ Branch 391 taken 4 times.
✓ Branch 392 taken 13 times.
✓ Branch 393 taken 94 times.
✓ Branch 394 taken 3029 times.
✓ Branch 395 taken 2663 times.
✓ Branch 396 taken 9 times.
✓ Branch 397 taken 5 times.
✗ Branch 398 not taken.
✓ Branch 399 taken 618 times.
✓ Branch 400 taken 3186 times.
✓ Branch 401 taken 21 times.
✓ Branch 402 taken 10 times.
✓ Branch 403 taken 2 times.
✗ Branch 404 not taken.
✓ Branch 405 taken 1 time.
✗ Branch 406 not taken.
✗ Branch 407 not taken.
✓ Branch 408 taken 121 times.
✗ Branch 409 not taken.
✗ Branch 410 not taken.
✗ Branch 411 not taken.
✗ Branch 412 not taken.
✗ Branch 413 not taken.
✗ Branch 414 not taken.
✗ Branch 415 not taken.
✓ Branch 416 taken 1 time.
✓ Branch 417 taken 19 times.
✗ Branch 418 not taken.
✗ Branch 419 not taken.
✗ Branch 420 not taken.
✗ Branch 421 not taken.
✓ Branch 422 taken 1 time.
✗ Branch 423 not taken.
✗ Branch 424 not taken.
✓ Branch 425 taken 58 times.
✗ Branch 426 not taken.
✗ Branch 427 not taken.
✓ Branch 428 taken 1 time.
✓ Branch 429 taken 1 time.
✓ Branch 430 taken 4 times.
✓ Branch 431 taken 404 times.
✓ Branch 432 taken 468 times.
✓ Branch 433 taken 52 times.
✓ Branch 434 taken 856 times.
✓ Branch 435 taken 774 times.
✓ Branch 436 taken 70 times.
✓ Branch 437 taken 14 times.
✓ Branch 438 taken 15 times.
✓ Branch 439 taken 202 times.
✓ Branch 440 taken 51 times.
✓ Branch 441 taken 1 time.
✓ Branch 442 taken 35 times.
✓ Branch 443 taken 35 times.
✓ Branch 444 taken 1 time.
✓ Branch 445 taken 1 time.
✓ Branch 446 taken 3 times.
✓ Branch 447 taken 1 time.
✓ Branch 448 taken 36 times.
✓ Branch 449 taken 856 times.
✓ Branch 450 taken 2 times.
✓ Branch 451 taken 1 time.
✓ Branch 452 taken 1 time.
✓ Branch 453 taken 1 time.
✓ Branch 454 taken 1 time.
✓ Branch 455 taken 1 time.
✓ Branch 456 taken 1 time.
✓ Branch 457 taken 153 times.
✗ Branch 458 not taken.
✓ Branch 459 taken 4 times.
✓ Branch 460 taken 2 times.
✓ Branch 461 taken 3261 times.
✓ Branch 462 taken 44 times.
✓ Branch 463 taken 44 times.
✓ Branch 464 taken 1 time.
✓ Branch 465 taken 2 times.
✗ Branch 466 not taken.
✓ Branch 467 taken 5 times.
✗ Branch 468 not taken.
✗ Branch 469 not taken.
✓ Branch 470 taken 2 times.
✓ Branch 471 taken 4 times.
✓ Branch 472 taken 1 time.
✓ Branch 473 taken 1 time.
✓ Branch 474 taken 403 times.
✓ Branch 475 taken 1 time.
✓ Branch 476 taken 3 times.
✓ Branch 477 taken 10 times.
✓ Branch 478 taken 10 times.
✗ Branch 479 not taken.
✓ Branch 480 taken 537 times.
✓ Branch 481 taken 1 time.
✓ Branch 482 taken 2 times.
✓ Branch 483 taken 47 times.
✓ Branch 484 taken 889 times.
✓ Branch 485 taken 11 times.
✗ Branch 486 not taken.
✓ Branch 487 taken 889 times.
✓ Branch 488 taken 33 times.
✗ Branch 489 not taken.
✓ Branch 490 taken 3 times.
✗ Branch 491 not taken.
✗ Branch 492 not taken.
✗ Branch 493 not taken.
✗ Branch 494 not taken.
✓ Branch 495 taken 46 times.
✓ Branch 496 taken 45 times.
✓ Branch 497 taken 4 times.
✓ Branch 498 taken 2 times.
✗ Branch 499 not taken.
✓ Branch 500 taken 10 times.
✓ Branch 501 taken 45 times.
✗ Branch 502 not taken.
✓ Branch 503 taken 11 times.
✗ Branch 504 not taken.
✗ Branch 505 not taken.
✗ Branch 506 not taken.
✓ Branch 507 taken 10 times.
✗ Branch 508 not taken.
✗ Branch 509 not taken.
✓ Branch 510 taken 1 time.
✗ Branch 511 not taken.
✗ Branch 512 not taken.
✗ Branch 513 not taken.
✗ Branch 514 not taken.
✓ Branch 515 taken 127 times.
✓ Branch 516 taken 5 times.
✓ Branch 517 taken 1 time.
✗ Branch 518 not taken.
✓ Branch 519 taken 2 times.
✓ Branch 520 taken 5 times.
✓ Branch 521 taken 5 times.
✓ Branch 522 taken 15 times.
✓ Branch 523 taken 4 times.
✓ Branch 524 taken 9 times.
✓ Branch 525 taken 28 times.
✓ Branch 526 taken 4 times.
✗ Branch 527 not taken.
✓ Branch 528 taken 2 times.
✓ Branch 529 taken 15 times.
✓ Branch 530 taken 6 times.
✓ Branch 531 taken 2 times.
✓ Branch 532 taken 1 time.
✓ Branch 533 taken 2 times.
✓ Branch 534 taken 3 times.
✗ Branch 535 not taken.
49555 switch (modelObject.iddObject().type().value()) {
717 ✗ case openstudio::IddObjectType::OS_AdditionalProperties: {
718 // no op
719 ✗ break;
720 }
721 12 case openstudio::IddObjectType::OS_AirConditioner_VariableRefrigerantFlow: {
722
1/1
✓ Branch 1 taken 12 times.
12 auto vrf = modelObject.cast<AirConditionerVariableRefrigerantFlow>();
723
1/1
✓ Branch 1 taken 12 times.
12 retVal = translateAirConditionerVariableRefrigerantFlow(vrf);
724 12 break;
725 12 }
726 3 case openstudio::IddObjectType::OS_AirConditioner_VariableRefrigerantFlow_FluidTemperatureControl: {
727 model::AirConditionerVariableRefrigerantFlowFluidTemperatureControl vrf =
728
1/1
✓ Branch 1 taken 3 times.
3 modelObject.cast<AirConditionerVariableRefrigerantFlowFluidTemperatureControl>();
729
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateAirConditionerVariableRefrigerantFlowFluidTemperatureControl(vrf);
730 3 break;
731 3 }
732 3 case openstudio::IddObjectType::OS_AirConditioner_VariableRefrigerantFlow_FluidTemperatureControl_HR: {
733 model::AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR vrf =
734
1/1
✓ Branch 1 taken 3 times.
3 modelObject.cast<AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR>();
735
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateAirConditionerVariableRefrigerantFlowFluidTemperatureControlHR(vrf);
736 3 break;
737 3 }
738 200 case openstudio::IddObjectType::OS_AirLoopHVAC: {
739
1/1
✓ Branch 1 taken 200 times.
200 auto airLoopHVAC = modelObject.cast<AirLoopHVAC>();
740
1/1
✓ Branch 1 taken 200 times.
200 retVal = translateAirLoopHVAC(airLoopHVAC);
741 200 break;
742 200 }
743 3 case openstudio::IddObjectType::OS_AirLoopHVAC_ReturnPlenum: {
744
1/1
✓ Branch 1 taken 3 times.
3 auto airLoopHVACReturnPlenum = modelObject.cast<AirLoopHVACReturnPlenum>();
745
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateAirLoopHVACReturnPlenum(airLoopHVACReturnPlenum);
746 3 break;
747 3 }
748 ✗ case openstudio::IddObjectType::OS_AirLoopHVAC_SupplyPlenum: {
749 ✗ auto airLoopHVACSupplyPlenum = modelObject.cast<AirLoopHVACSupplyPlenum>();
750 ✗ retVal = translateAirLoopHVACSupplyPlenum(airLoopHVACSupplyPlenum);
751 ✗ break;
752 ✗ }
753 2 case openstudio::IddObjectType::OS_AirTerminal_DualDuct_ConstantVolume: {
754
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<AirTerminalDualDuctConstantVolume>();
755
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateAirTerminalDualDuctConstantVolume(mo);
756 2 break;
757 2 }
758 1 case openstudio::IddObjectType::OS_AirTerminal_DualDuct_VAV: {
759
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<AirTerminalDualDuctVAV>();
760
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateAirTerminalDualDuctVAV(mo);
761 1 break;
762 1 }
763 2 case openstudio::IddObjectType::OS_AirTerminal_DualDuct_VAV_OutdoorAir: {
764
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<AirTerminalDualDuctVAVOutdoorAir>();
765
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateAirTerminalDualDuctVAVOutdoorAir(mo);
766 2 break;
767 2 }
768 ✗ case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_ConstantVolume_FourPipeInduction: {
769 ✗ auto airTerminal = modelObject.cast<AirTerminalSingleDuctConstantVolumeFourPipeInduction>();
770 ✗ retVal = translateAirTerminalSingleDuctConstantVolumeFourPipeInduction(airTerminal);
771 ✗ break;
772 ✗ }
773 ✗ case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_ConstantVolume_Reheat: {
774 ✗ auto airTerminal = modelObject.cast<AirTerminalSingleDuctConstantVolumeReheat>();
775 ✗ retVal = translateAirTerminalSingleDuctConstantVolumeReheat(airTerminal);
776 ✗ break;
777 ✗ }
778 ✗ case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_ConstantVolume_CooledBeam: {
779 ✗ auto airTerminal = modelObject.cast<AirTerminalSingleDuctConstantVolumeCooledBeam>();
780 ✗ retVal = translateAirTerminalSingleDuctConstantVolumeCooledBeam(airTerminal);
781 ✗ break;
782 ✗ }
783 3 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_ConstantVolume_FourPipeBeam: {
784
1/1
✓ Branch 1 taken 3 times.
3 auto airTerminal = modelObject.cast<AirTerminalSingleDuctConstantVolumeFourPipeBeam>();
785
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateAirTerminalSingleDuctConstantVolumeFourPipeBeam(airTerminal);
786 3 break;
787 3 }
788 1 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_ParallelPIU_Reheat: {
789
1/1
✓ Branch 1 taken 1 time.
1 auto airTerminal = modelObject.cast<AirTerminalSingleDuctParallelPIUReheat>();
790
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateAirTerminalSingleDuctParallelPIUReheat(airTerminal);
791 1 break;
792 1 }
793 5 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_SeriesPIU_Reheat: {
794
1/1
✓ Branch 1 taken 5 times.
5 auto airTerminal = modelObject.cast<AirTerminalSingleDuctSeriesPIUReheat>();
795
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateAirTerminalSingleDuctSeriesPIUReheat(airTerminal);
796 5 break;
797 5 }
798 72 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_ConstantVolume_NoReheat: {
799
1/1
✓ Branch 1 taken 72 times.
72 auto airTerminal = modelObject.cast<AirTerminalSingleDuctConstantVolumeNoReheat>();
800
1/1
✓ Branch 1 taken 72 times.
72 retVal = translateAirTerminalSingleDuctConstantVolumeNoReheat(airTerminal);
801 72 break;
802 72 }
803 1 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_VAV_NoReheat: {
804
1/1
✓ Branch 1 taken 1 time.
1 auto airTerminal = modelObject.cast<AirTerminalSingleDuctVAVNoReheat>();
805
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateAirTerminalSingleDuctVAVNoReheat(airTerminal);
806 1 break;
807 1 }
808 3 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_VAV_Reheat: {
809
1/1
✓ Branch 1 taken 3 times.
3 auto airTerminal = modelObject.cast<AirTerminalSingleDuctVAVReheat>();
810
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateAirTerminalSingleDuctVAVReheat(airTerminal);
811 3 break;
812 3 }
813 2 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_InletSideMixer: {
814
1/1
✓ Branch 1 taken 2 times.
2 auto airTerminal = modelObject.cast<AirTerminalSingleDuctInletSideMixer>();
815
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateAirTerminalSingleDuctInletSideMixer(airTerminal);
816 2 break;
817 2 }
818 1 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_VAV_HeatAndCool_NoReheat: {
819
1/1
✓ Branch 1 taken 1 time.
1 auto airTerminal = modelObject.cast<AirTerminalSingleDuctVAVHeatAndCoolNoReheat>();
820
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateAirTerminalSingleDuctVAVHeatAndCoolNoReheat(airTerminal);
821 1 break;
822 1 }
823 1 case openstudio::IddObjectType::OS_AirTerminal_SingleDuct_VAV_HeatAndCool_Reheat: {
824
1/1
✓ Branch 1 taken 1 time.
1 auto airTerminal = modelObject.cast<AirTerminalSingleDuctVAVHeatAndCoolReheat>();
825
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateAirTerminalSingleDuctVAVHeatAndCoolReheat(airTerminal);
826 1 break;
827 1 }
828 205 case openstudio::IddObjectType::OS_AirLoopHVAC_ZoneSplitter: {
829
1/1
✓ Branch 1 taken 205 times.
205 auto splitter = modelObject.cast<AirLoopHVACZoneSplitter>();
830
1/1
✓ Branch 1 taken 205 times.
205 retVal = translateAirLoopHVACZoneSplitter(splitter);
831 205 break;
832 205 }
833 200 case openstudio::IddObjectType::OS_AirLoopHVAC_ZoneMixer: {
834
1/1
✓ Branch 1 taken 200 times.
200 auto mixer = modelObject.cast<AirLoopHVACZoneMixer>();
835
1/1
✓ Branch 1 taken 200 times.
200 retVal = translateAirLoopHVACZoneMixer(mixer);
836 200 break;
837 200 }
838 58 case openstudio::IddObjectType::OS_AirLoopHVAC_OutdoorAirSystem: {
839
1/1
✓ Branch 1 taken 58 times.
58 auto oaSystem = modelObject.cast<AirLoopHVACOutdoorAirSystem>();
840
1/1
✓ Branch 1 taken 58 times.
58 retVal = translateAirLoopHVACOutdoorAirSystem(oaSystem);
841 58 break;
842 58 }
843 5 case openstudio::IddObjectType::OS_AirLoopHVAC_DedicatedOutdoorAirSystem: {
844
1/1
✓ Branch 1 taken 5 times.
5 auto doaSystem = modelObject.cast<AirLoopHVACDedicatedOutdoorAirSystem>();
845
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateAirLoopHVACDedicatedOutdoorAirSystem(doaSystem);
846 5 break;
847 5 }
848 1 case openstudio::IddObjectType::OS_AirLoopHVAC_UnitaryHeatPump_AirToAir: {
849
1/1
✓ Branch 1 taken 1 time.
1 auto unitary = modelObject.cast<AirLoopHVACUnitaryHeatPumpAirToAir>();
850
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateAirLoopHVACUnitaryHeatPumpAirToAir(unitary);
851 1 break;
852 1 }
853 13 case openstudio::IddObjectType::OS_AirLoopHVAC_UnitaryHeatCool_VAVChangeoverBypass: {
854
1/1
✓ Branch 1 taken 13 times.
13 auto unitary = modelObject.cast<AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass>();
855
1/1
✓ Branch 1 taken 13 times.
13 retVal = translateAirLoopHVACUnitaryHeatCoolVAVChangeoverBypass(unitary);
856 13 break;
857 13 }
858 4 case openstudio::IddObjectType::OS_AirLoopHVAC_UnitaryHeatPump_AirToAir_MultiSpeed: {
859
1/1
✓ Branch 1 taken 4 times.
4 auto unitary = modelObject.cast<AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed>();
860
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateAirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed(unitary);
861 4 break;
862 4 }
863 73 case openstudio::IddObjectType::OS_AirLoopHVAC_UnitarySystem: {
864
1/1
✓ Branch 1 taken 73 times.
73 auto unitary = modelObject.cast<AirLoopHVACUnitarySystem>();
865
1/1
✓ Branch 1 taken 73 times.
73 retVal = translateAirLoopHVACUnitarySystem(unitary);
866 73 break;
867 73 }
868 440 case openstudio::IddObjectType::OS_AvailabilityManagerAssignmentList: {
869
1/1
✓ Branch 1 taken 440 times.
440 auto mo = modelObject.cast<AvailabilityManagerAssignmentList>();
870
1/1
✓ Branch 1 taken 440 times.
440 retVal = translateAvailabilityManagerAssignmentList(mo);
871 440 break;
872 440 }
873 1 case openstudio::IddObjectType::OS_AvailabilityManager_Scheduled: {
874
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<AvailabilityManagerScheduled>();
875
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateAvailabilityManagerScheduled(mo);
876 1 break;
877 1 }
878 5 case openstudio::IddObjectType::OS_AvailabilityManager_ScheduledOn: {
879
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<AvailabilityManagerScheduledOn>();
880
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateAvailabilityManagerScheduledOn(mo);
881 5 break;
882 5 }
883 2 case openstudio::IddObjectType::OS_AvailabilityManager_ScheduledOff: {
884
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<AvailabilityManagerScheduledOff>();
885
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateAvailabilityManagerScheduledOff(mo);
886 2 break;
887 2 }
888 1 case openstudio::IddObjectType::OS_AvailabilityManager_HybridVentilation: {
889
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<AvailabilityManagerHybridVentilation>();
890
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateAvailabilityManagerHybridVentilation(mo);
891 1 break;
892 1 }
893 ✗ case openstudio::IddObjectType::OS_AvailabilityManager_OptimumStart: {
894 ✗ auto mo = modelObject.cast<AvailabilityManagerOptimumStart>();
895 ✗ retVal = translateAvailabilityManagerOptimumStart(mo);
896 ✗ break;
897 ✗ }
898 ✗ case openstudio::IddObjectType::OS_AvailabilityManager_DifferentialThermostat: {
899 ✗ auto mo = modelObject.cast<AvailabilityManagerDifferentialThermostat>();
900 ✗ retVal = translateAvailabilityManagerDifferentialThermostat(mo);
901 ✗ break;
902 ✗ }
903 ✗ case openstudio::IddObjectType::OS_AvailabilityManager_NightVentilation: {
904 ✗ auto mo = modelObject.cast<AvailabilityManagerNightVentilation>();
905 ✗ retVal = translateAvailabilityManagerNightVentilation(mo);
906 ✗ break;
907 ✗ }
908 5 case openstudio::IddObjectType::OS_AvailabilityManager_NightCycle: {
909
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<AvailabilityManagerNightCycle>();
910
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateAvailabilityManagerNightCycle(mo);
911 5 break;
912 5 }
913 2 case openstudio::IddObjectType::OS_AvailabilityManager_HighTemperatureTurnOn: {
914
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<AvailabilityManagerHighTemperatureTurnOn>();
915
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateAvailabilityManagerHighTemperatureTurnOn(mo);
916 2 break;
917 2 }
918 3 case openstudio::IddObjectType::OS_AvailabilityManager_HighTemperatureTurnOff: {
919
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<AvailabilityManagerHighTemperatureTurnOff>();
920
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateAvailabilityManagerHighTemperatureTurnOff(mo);
921 3 break;
922 3 }
923 2 case openstudio::IddObjectType::OS_AvailabilityManager_LowTemperatureTurnOn: {
924
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<AvailabilityManagerLowTemperatureTurnOn>();
925
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateAvailabilityManagerLowTemperatureTurnOn(mo);
926 2 break;
927 2 }
928 2 case openstudio::IddObjectType::OS_AvailabilityManager_LowTemperatureTurnOff: {
929
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<AvailabilityManagerLowTemperatureTurnOff>();
930
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateAvailabilityManagerLowTemperatureTurnOff(mo);
931 2 break;
932 2 }
933 14 case openstudio::IddObjectType::OS_Boiler_HotWater: {
934
1/1
✓ Branch 1 taken 14 times.
14 auto boiler = modelObject.cast<BoilerHotWater>();
935
1/1
✓ Branch 1 taken 14 times.
14 retVal = translateBoilerHotWater(boiler);
936 14 break;
937 14 }
938 ✗ case openstudio::IddObjectType::OS_Boiler_Steam: {
939 ✗ auto boiler = modelObject.cast<BoilerSteam>();
940 ✗ retVal = translateBoilerSteam(boiler);
941 ✗ break;
942 ✗ }
943 856 case openstudio::IddObjectType::OS_Building: {
944
1/1
✓ Branch 1 taken 856 times.
856 auto building = modelObject.cast<Building>();
945
1/1
✓ Branch 1 taken 856 times.
856 retVal = translateBuilding(building);
946 856 break;
947 856 }
948 94 case openstudio::IddObjectType::OS_BuildingStory: {
949 // no-op
950 94 return retVal;
951 }
952 7 case openstudio::IddObjectType::OS_CentralHeatPumpSystem: {
953
1/1
✓ Branch 1 taken 7 times.
7 auto mo = modelObject.cast<CentralHeatPumpSystem>();
954
1/1
✓ Branch 1 taken 7 times.
7 retVal = translateCentralHeatPumpSystem(mo);
955 7 break;
956 7 }
957 ✗ case openstudio::IddObjectType::OS_CentralHeatPumpSystem_Module: {
958 // no-op
959 ✗ return retVal;
960 }
961 ✗ case openstudio::IddObjectType::OS_Chiller_Absorption: {
962 ✗ auto mo = modelObject.cast<ChillerAbsorption>();
963 ✗ retVal = translateChillerAbsorption(mo);
964 ✗ break;
965 ✗ }
966 ✗ case openstudio::IddObjectType::OS_Chiller_Absorption_Indirect: {
967 ✗ auto mo = modelObject.cast<ChillerAbsorptionIndirect>();
968 ✗ retVal = translateChillerAbsorptionIndirect(mo);
969 ✗ break;
970 ✗ }
971 4 case openstudio::IddObjectType::OS_Chiller_Electric_ASHRAE205: {
972
1/1
✓ Branch 1 taken 4 times.
4 auto mo = modelObject.cast<ChillerElectricASHRAE205>();
973
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateChillerElectricASHRAE205(mo);
974 4 break;
975 4 }
976 3 case openstudio::IddObjectType::OS_Chiller_Electric_EIR: {
977
1/1
✓ Branch 1 taken 3 times.
3 auto chiller = modelObject.cast<ChillerElectricEIR>();
978
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateChillerElectricEIR(chiller);
979 3 break;
980 3 }
981 1 case openstudio::IddObjectType::OS_Chiller_Electric_ReformulatedEIR: {
982
1/1
✓ Branch 1 taken 1 time.
1 auto chiller = modelObject.cast<ChillerElectricReformulatedEIR>();
983
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateChillerElectricReformulatedEIR(chiller);
984 1 break;
985 1 }
986 3 case openstudio::IddObjectType::OS_ChillerHeaterPerformance_Electric_EIR: {
987
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<ChillerHeaterPerformanceElectricEIR>();
988
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateChillerHeaterPerformanceElectricEIR(mo);
989 3 break;
990 3 }
991 20 case openstudio::IddObjectType::OS_ClimateZones: {
992 // no-op
993 20 return retVal;
994 }
995 ✗ case openstudio::IddObjectType::OS_Construction_CfactorUndergroundWall: {
996 ✗ auto construction = modelObject.cast<CFactorUndergroundWallConstruction>();
997 ✗ retVal = translateCFactorUndergroundWallConstruction(construction);
998 ✗ break;
999 ✗ }
1000 45 case openstudio::IddObjectType::OS_ConvergenceLimits: {
1001
1/1
✓ Branch 1 taken 45 times.
45 auto limits = modelObject.cast<ConvergenceLimits>();
1002
1/1
✓ Branch 1 taken 45 times.
45 retVal = translateConvergenceLimits(limits);
1003 45 break;
1004 45 }
1005 ✗ case openstudio::IddObjectType::OS_Coil_Cooling_CooledBeam: {
1006 // This is handled directly in ATU:SingleDuct:ConstantVolume::CooledBeam
1007 ✗ break;
1008 }
1009 1 case openstudio::IddObjectType::OS_Coil_Cooling_FourPipeBeam: {
1010 // This is handled directly in ATU:SingleDuct:ConstantVolume::FourPipeBeam
1011 1 break;
1012 }
1013 1 case openstudio::IddObjectType::OS_Coil_Heating_FourPipeBeam: {
1014 // This is handled directly in ATU:SingleDuct:ConstantVolume::FourPipeBeam
1015 1 break;
1016 }
1017 15 case openstudio::IddObjectType::OS_Coil_Cooling_DX: {
1018
1/1
✓ Branch 1 taken 15 times.
15 auto coil = modelObject.cast<CoilCoolingDX>();
1019
3/3
✓ Branch 1 taken 15 times.
✓ Branch 3 taken 13 times.
✓ Branch 4 taken 2 times.
15 if (this->isHVACComponentWithinUnitary(coil)) {
1020
1/1
✓ Branch 1 taken 13 times.
13 retVal = translateCoilCoolingDXWithoutUnitary(coil);
1021 } else {
1022
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateCoilCoolingDX(coil);
1023 }
1024 15 break;
1025 15 }
1026 16 case openstudio::IddObjectType::OS_Coil_Cooling_DX_CurveFit_Performance: {
1027
1/1
✓ Branch 1 taken 16 times.
16 auto performance = modelObject.cast<CoilCoolingDXCurveFitPerformance>();
1028
1/1
✓ Branch 1 taken 16 times.
16 retVal = translateCoilCoolingDXCurveFitPerformance(performance);
1029 16 break;
1030 16 }
1031 16 case openstudio::IddObjectType::OS_Coil_Cooling_DX_CurveFit_OperatingMode: {
1032
1/1
✓ Branch 1 taken 16 times.
16 auto operatingMode = modelObject.cast<CoilCoolingDXCurveFitOperatingMode>();
1033
1/1
✓ Branch 1 taken 16 times.
16 retVal = translateCoilCoolingDXCurveFitOperatingMode(operatingMode);
1034 16 break;
1035 16 }
1036 11 case openstudio::IddObjectType::OS_Coil_Cooling_DX_CurveFit_Speed: {
1037
1/1
✓ Branch 1 taken 11 times.
11 auto speed = modelObject.cast<CoilCoolingDXCurveFitSpeed>();
1038
1/1
✓ Branch 1 taken 11 times.
11 retVal = translateCoilCoolingDXCurveFitSpeed(speed);
1039 11 break;
1040 11 }
1041 79 case openstudio::IddObjectType::OS_Coil_Cooling_DX_SingleSpeed: {
1042
1/1
✓ Branch 1 taken 79 times.
79 auto coil = modelObject.cast<CoilCoolingDXSingleSpeed>();
1043
3/3
✓ Branch 1 taken 79 times.
✓ Branch 3 taken 32 times.
✓ Branch 4 taken 47 times.
79 if (isHVACComponentWithinUnitary(coil)) {
1044
1/1
✓ Branch 1 taken 32 times.
32 retVal = translateCoilCoolingDXSingleSpeedWithoutUnitary(coil);
1045 } else {
1046
1/1
✓ Branch 1 taken 47 times.
47 retVal = translateCoilCoolingDXSingleSpeed(coil);
1047 }
1048 79 break;
1049 79 }
1050 2 case openstudio::IddObjectType::OS_Coil_Cooling_DX_SingleSpeed_ThermalStorage: {
1051
1/1
✓ Branch 1 taken 2 times.
2 auto coil = modelObject.cast<CoilCoolingDXSingleSpeedThermalStorage>();
1052
3/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
2 if (isHVACComponentWithinUnitary(coil)) {
1053
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateCoilCoolingDXSingleSpeedThermalStorageWithoutUnitary(coil);
1054 } else {
1055
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateCoilCoolingDXSingleSpeedThermalStorage(coil);
1056 }
1057 2 break;
1058 2 }
1059 14 case openstudio::IddObjectType::OS_Coil_Cooling_DX_MultiSpeed: {
1060
1/1
✓ Branch 1 taken 14 times.
14 auto coil = modelObject.cast<CoilCoolingDXMultiSpeed>();
1061
1/1
✓ Branch 1 taken 14 times.
14 retVal = translateCoilCoolingDXMultiSpeed(coil);
1062 14 break;
1063 14 }
1064 ✗ case openstudio::IddObjectType::OS_Coil_Cooling_DX_MultiSpeed_StageData: {
1065 ✗ return retVal;
1066 }
1067 9 case openstudio::IddObjectType::OS_Coil_Cooling_DX_TwoSpeed: {
1068
1/1
✓ Branch 1 taken 9 times.
9 auto coil = modelObject.cast<CoilCoolingDXTwoSpeed>();
1069
2/3
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 9 times.
9 if (isHVACComponentWithinUnitary(coil)) {
1070 ✗ retVal = translateCoilCoolingDXTwoSpeedWithoutUnitary(coil);
1071 } else {
1072
1/1
✓ Branch 1 taken 9 times.
9 retVal = translateCoilCoolingDXTwoSpeed(coil);
1073 }
1074 9 break;
1075 9 }
1076 2 case openstudio::IddObjectType::OS_Coil_Cooling_DX_TwoStageWithHumidityControlMode: {
1077
1/1
✓ Branch 1 taken 2 times.
2 auto coil = modelObject.cast<CoilCoolingDXTwoStageWithHumidityControlMode>();
1078
2/3
✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
2 if (isHVACComponentWithinUnitary(coil)) {
1079 ✗ retVal = translateCoilCoolingDXTwoStageWithHumidityControlModeWithoutUnitary(coil);
1080 } else {
1081
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateCoilCoolingDXTwoStageWithHumidityControlMode(coil);
1082 }
1083 2 break;
1084 2 }
1085 24 case openstudio::IddObjectType::OS_Coil_Cooling_DX_VariableRefrigerantFlow: {
1086
1/1
✓ Branch 1 taken 24 times.
24 auto coil = modelObject.cast<CoilCoolingDXVariableRefrigerantFlow>();
1087
1/1
✓ Branch 1 taken 24 times.
24 retVal = translateCoilCoolingDXVariableRefrigerantFlow(coil);
1088 24 break;
1089 24 }
1090 4 case openstudio::IddObjectType::OS_Coil_Cooling_DX_VariableRefrigerantFlow_FluidTemperatureControl: {
1091 model::CoilCoolingDXVariableRefrigerantFlowFluidTemperatureControl coil =
1092
1/1
✓ Branch 1 taken 4 times.
4 modelObject.cast<CoilCoolingDXVariableRefrigerantFlowFluidTemperatureControl>();
1093
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoilCoolingDXVariableRefrigerantFlowFluidTemperatureControl(coil);
1094 4 break;
1095 4 }
1096 5 case openstudio::IddObjectType::OS_Coil_Cooling_DX_VariableSpeed: {
1097
1/1
✓ Branch 1 taken 5 times.
5 auto coil = modelObject.cast<CoilCoolingDXVariableSpeed>();
1098
3/3
✓ Branch 1 taken 5 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 1 time.
5 if (isHVACComponentWithinUnitary(coil)) {
1099
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoilCoolingDXVariableSpeedWithoutUnitary(coil);
1100 } else {
1101
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateCoilCoolingDXVariableSpeed(coil);
1102 }
1103 5 break;
1104 5 }
1105 ✗ case openstudio::IddObjectType::OS_Coil_Cooling_DX_VariableSpeed_SpeedData: {
1106 // DLM: is this a no-op?
1107 ✗ break;
1108 }
1109 ✗ case openstudio::IddObjectType::OS_Coil_Cooling_LowTemperatureRadiant_ConstantFlow: {
1110 // no-op
1111 ✗ return retVal;
1112 }
1113 4 case openstudio::IddObjectType::OS_Coil_Cooling_LowTemperatureRadiant_VariableFlow: {
1114 // no-op
1115 4 return retVal;
1116 }
1117 13 case openstudio::IddObjectType::OS_Coil_Cooling_Water: {
1118
1/1
✓ Branch 1 taken 13 times.
13 auto coil = modelObject.cast<CoilCoolingWater>();
1119
1/1
✓ Branch 1 taken 13 times.
13 retVal = translateCoilCoolingWater(coil);
1120 13 break;
1121 13 }
1122 ✗ case openstudio::IddObjectType::OS_Coil_Cooling_Water_Panel_Radiant: {
1123 // no-op
1124 ✗ return retVal;
1125 }
1126 9 case openstudio::IddObjectType::OS_Coil_Cooling_WaterToAirHeatPump_EquationFit: {
1127
1/1
✓ Branch 1 taken 9 times.
9 auto coil = modelObject.cast<CoilCoolingWaterToAirHeatPumpEquationFit>();
1128
1/1
✓ Branch 1 taken 9 times.
9 retVal = translateCoilCoolingWaterToAirHeatPumpEquationFit(coil);
1129 9 break;
1130 9 }
1131 4 case openstudio::IddObjectType::OS_Coil_Cooling_WaterToAirHeatPump_VariableSpeedEquationFit: {
1132
1/1
✓ Branch 1 taken 4 times.
4 auto coil = modelObject.cast<CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>();
1133
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit(coil);
1134 4 break;
1135 4 }
1136 ✗ case openstudio::IddObjectType::OS_Coil_Cooling_WaterToAirHeatPump_VariableSpeedEquationFit_SpeedData: {
1137 // DLM: is this a no-op?
1138 ✗ break;
1139 }
1140 16 case openstudio::IddObjectType::OS_Coil_Heating_Desuperheater: {
1141
1/1
✓ Branch 1 taken 16 times.
16 auto coil = modelObject.cast<CoilHeatingDesuperheater>();
1142
1/1
✓ Branch 1 taken 16 times.
16 retVal = translateCoilHeatingDesuperheater(coil);
1143 16 break;
1144 16 }
1145 19 case openstudio::IddObjectType::OS_Coil_Heating_DX_SingleSpeed: {
1146
1/1
✓ Branch 1 taken 19 times.
19 auto coil = modelObject.cast<CoilHeatingDXSingleSpeed>();
1147
3/3
✓ Branch 1 taken 19 times.
✓ Branch 3 taken 18 times.
✓ Branch 4 taken 1 time.
19 if (isHVACComponentWithinUnitary(coil)) {
1148
1/1
✓ Branch 1 taken 18 times.
18 retVal = translateCoilHeatingDXSingleSpeedWithoutUnitary(coil);
1149 } else {
1150
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateCoilHeatingDXSingleSpeed(coil);
1151 }
1152 19 break;
1153 19 }
1154 9 case openstudio::IddObjectType::OS_Coil_Heating_DX_MultiSpeed: {
1155
1/1
✓ Branch 1 taken 9 times.
9 auto coil = modelObject.cast<CoilHeatingDXMultiSpeed>();
1156
1/1
✓ Branch 1 taken 9 times.
9 retVal = translateCoilHeatingDXMultiSpeed(coil);
1157 9 break;
1158 9 }
1159 ✗ case openstudio::IddObjectType::OS_Coil_Heating_DX_MultiSpeed_StageData: {
1160 ✗ return retVal;
1161 }
1162 3 case openstudio::IddObjectType::OS_Coil_Heating_DX_VariableSpeed: {
1163
1/1
✓ Branch 1 taken 3 times.
3 auto coil = modelObject.cast<CoilHeatingDXVariableSpeed>();
1164
2/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
3 if (isHVACComponentWithinUnitary(coil)) {
1165
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateCoilHeatingDXVariableSpeedWithoutUnitary(coil);
1166 } else {
1167 ✗ retVal = translateCoilHeatingDXVariableSpeed(coil);
1168 }
1169 3 break;
1170 3 }
1171 ✗ case openstudio::IddObjectType::OS_Coil_Heating_DX_VariableSpeed_SpeedData: {
1172 //DLM: is this a no-op?
1173 ✗ break;
1174 }
1175 36 case openstudio::IddObjectType::OS_Coil_Heating_Electric: {
1176
1/1
✓ Branch 1 taken 36 times.
36 auto coil = modelObject.cast<CoilHeatingElectric>();
1177
1/1
✓ Branch 1 taken 36 times.
36 retVal = translateCoilHeatingElectric(coil);
1178 36 break;
1179 36 }
1180 6 case openstudio::IddObjectType::OS_Coil_Heating_Electric_MultiStage: {
1181
1/1
✓ Branch 1 taken 6 times.
6 auto coil = modelObject.cast<CoilHeatingElectricMultiStage>();
1182
1/1
✓ Branch 1 taken 6 times.
6 retVal = translateCoilHeatingElectricMultiStage(coil);
1183 6 break;
1184 6 }
1185 ✗ case openstudio::IddObjectType::OS_Coil_Heating_Electric_MultiStage_StageData: {
1186 // no-op
1187 ✗ return retVal;
1188 }
1189 45 case openstudio::IddObjectType::OS_Coil_Heating_Gas: {
1190
1/1
✓ Branch 1 taken 45 times.
45 auto coil = modelObject.cast<CoilHeatingGas>();
1191
1/1
✓ Branch 1 taken 45 times.
45 retVal = translateCoilHeatingGas(coil);
1192 45 break;
1193 45 }
1194 4 case openstudio::IddObjectType::OS_Coil_Heating_Gas_MultiStage: {
1195
1/1
✓ Branch 1 taken 4 times.
4 auto coil = modelObject.cast<CoilHeatingGasMultiStage>();
1196
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoilHeatingGasMultiStage(coil);
1197 4 break;
1198 4 }
1199 ✗ case openstudio::IddObjectType::OS_Coil_Heating_Gas_MultiStage_StageData: {
1200 // no-op
1201 ✗ return retVal;
1202 }
1203 ✗ case openstudio::IddObjectType::OS_Coil_Heating_LowTemperatureRadiant_ConstantFlow: {
1204 // no-op
1205 ✗ return retVal;
1206 }
1207 6 case openstudio::IddObjectType::OS_Coil_Heating_LowTemperatureRadiant_VariableFlow: {
1208 // no-op
1209 6 return retVal;
1210 }
1211 24 case openstudio::IddObjectType::OS_Coil_Heating_DX_VariableRefrigerantFlow: {
1212
1/1
✓ Branch 1 taken 24 times.
24 auto coil = modelObject.cast<CoilHeatingDXVariableRefrigerantFlow>();
1213
1/1
✓ Branch 1 taken 24 times.
24 retVal = translateCoilHeatingDXVariableRefrigerantFlow(coil);
1214 24 break;
1215 24 }
1216 4 case openstudio::IddObjectType::OS_Coil_Heating_DX_VariableRefrigerantFlow_FluidTemperatureControl: {
1217 model::CoilHeatingDXVariableRefrigerantFlowFluidTemperatureControl coil =
1218
1/1
✓ Branch 1 taken 4 times.
4 modelObject.cast<CoilHeatingDXVariableRefrigerantFlowFluidTemperatureControl>();
1219
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoilHeatingDXVariableRefrigerantFlowFluidTemperatureControl(coil);
1220 4 break;
1221 4 }
1222 11 case openstudio::IddObjectType::OS_Coil_Heating_Water: {
1223
1/1
✓ Branch 1 taken 11 times.
11 auto coil = modelObject.cast<CoilHeatingWater>();
1224
1/1
✓ Branch 1 taken 11 times.
11 retVal = translateCoilHeatingWater(coil);
1225 11 break;
1226 11 }
1227 4 case openstudio::IddObjectType::OS_Coil_Heating_WaterToAirHeatPump_EquationFit: {
1228
1/1
✓ Branch 1 taken 4 times.
4 auto coil = modelObject.cast<CoilHeatingWaterToAirHeatPumpEquationFit>();
1229
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoilHeatingWaterToAirHeatPumpEquationFit(coil);
1230 4 break;
1231 4 }
1232 3 case openstudio::IddObjectType::OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit: {
1233
1/1
✓ Branch 1 taken 3 times.
3 auto coil = modelObject.cast<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit>();
1234
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateCoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(coil);
1235 3 break;
1236 3 }
1237 ✗ case openstudio::IddObjectType::OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit_SpeedData: {
1238 // DLM: is this a no-op?
1239 ✗ break;
1240 }
1241 ✗ case openstudio::IddObjectType::OS_Coil_Heating_Water_Baseboard: {
1242 // DLM: is this a no-op?
1243 ✗ break;
1244 }
1245 1 case openstudio::IddObjectType::OS_Coil_Heating_Water_Baseboard_Radiant: {
1246 // no-op
1247 1 return retVal;
1248 }
1249 16 case openstudio::IddObjectType::OS_CoilPerformance_DX_Cooling: {
1250
1/1
✓ Branch 1 taken 16 times.
16 auto mo = modelObject.cast<CoilPerformanceDXCooling>();
1251
1/1
✓ Branch 1 taken 16 times.
16 retVal = translateCoilPerformanceDXCooling(mo);
1252 16 break;
1253 16 }
1254 3 case openstudio::IddObjectType::OS_CoilSystem_Cooling_Water: {
1255
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<CoilSystemCoolingWater>();
1256
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateCoilSystemCoolingWater(mo);
1257 3 break;
1258 3 }
1259 4 case openstudio::IddObjectType::OS_CoilSystem_Cooling_Water_HeatExchangerAssisted: {
1260
1/1
✓ Branch 1 taken 4 times.
4 auto mo = modelObject.cast<CoilSystemCoolingWaterHeatExchangerAssisted>();
1261
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoilSystemCoolingWaterHeatExchangerAssisted(mo);
1262 4 break;
1263 4 }
1264 5 case openstudio::IddObjectType::OS_CoilSystem_Cooling_DX_HeatExchangerAssisted: {
1265
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<CoilSystemCoolingDXHeatExchangerAssisted>();
1266
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateCoilSystemCoolingDXHeatExchangerAssisted(mo);
1267 5 break;
1268 5 }
1269 1 case openstudio::IddObjectType::OS_CoilSystem_IntegratedHeatPump_AirSource: {
1270
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<CoilSystemIntegratedHeatPumpAirSource>();
1271
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateCoilSystemIntegratedHeatPumpAirSource(mo);
1272 1 break;
1273 1 }
1274 4 case openstudio::IddObjectType::OS_Coil_UserDefined: {
1275
1/1
✓ Branch 1 taken 4 times.
4 auto coil = modelObject.cast<CoilUserDefined>();
1276
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoilUserDefined(coil);
1277 4 break;
1278 4 }
1279 11 case openstudio::IddObjectType::OS_Coil_WaterHeating_Desuperheater: {
1280
1/1
✓ Branch 1 taken 11 times.
11 auto coil = modelObject.cast<CoilWaterHeatingDesuperheater>();
1281
1/1
✓ Branch 1 taken 11 times.
11 retVal = translateCoilWaterHeatingDesuperheater(coil);
1282 11 break;
1283 11 }
1284 1 case openstudio::IddObjectType::OS_Coil_WaterHeating_AirToWaterHeatPump: {
1285
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<CoilWaterHeatingAirToWaterHeatPump>();
1286
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateCoilWaterHeatingAirToWaterHeatPump(mo);
1287 1 break;
1288 1 }
1289 5 case openstudio::IddObjectType::OS_Coil_WaterHeating_AirToWaterHeatPump_VariableSpeed: {
1290
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<CoilWaterHeatingAirToWaterHeatPumpVariableSpeed>();
1291
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateCoilWaterHeatingAirToWaterHeatPumpVariableSpeed(mo);
1292 5 break;
1293 5 }
1294 3 case openstudio::IddObjectType::OS_Coil_WaterHeating_AirToWaterHeatPump_Wrapped: {
1295
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<CoilWaterHeatingAirToWaterHeatPumpWrapped>();
1296
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateCoilWaterHeatingAirToWaterHeatPumpWrapped(mo);
1297 3 break;
1298 3 }
1299 110 case openstudio::IddObjectType::OS_ComponentData: {
1300 // no-op
1301 110 return retVal;
1302 }
1303 ✗ case openstudio::IddObjectType::OS_ComponentCost_Adjustments: {
1304 ✗ LOG(Warn, "OS:ComponentCost:Adjustments '" << modelObject.name().get() << "' not translated to EnergyPlus.");
1305 ✗ return retVal;
1306 }
1307 6873 case openstudio::IddObjectType::OS_Connection: {
1308 // no-op
1309 6873 return retVal;
1310 }
1311 487 case openstudio::IddObjectType::OS_Connector_Mixer: {
1312 // no-op
1313 487 return retVal;
1314 }
1315 514 case openstudio::IddObjectType::OS_Connector_Splitter: {
1316 // no-op
1317 514 return retVal;
1318 }
1319 494 case openstudio::IddObjectType::OS_Construction: {
1320
1/1
✓ Branch 1 taken 494 times.
494 auto construction = modelObject.cast<Construction>();
1321
1/1
✓ Branch 1 taken 494 times.
494 retVal = translateConstruction(construction);
1322 494 break;
1323 494 }
1324 89 case openstudio::IddObjectType::OS_Construction_AirBoundary: {
1325
1/1
✓ Branch 1 taken 89 times.
89 auto constructionAirBoundary = modelObject.cast<ConstructionAirBoundary>();
1326
1/1
✓ Branch 1 taken 89 times.
89 retVal = translateConstructionAirBoundary(constructionAirBoundary);
1327 89 break;
1328 89 }
1329 9 case openstudio::IddObjectType::OS_Construction_InternalSource: {
1330
1/1
✓ Branch 1 taken 9 times.
9 auto constructionIntSource = modelObject.cast<ConstructionWithInternalSource>();
1331
1/1
✓ Branch 1 taken 9 times.
9 retVal = translateConstructionWithInternalSource(constructionIntSource);
1332 9 break;
1333 9 }
1334 ✗ case openstudio::IddObjectType::OS_Construction_FfactorGroundFloor: {
1335 ✗ auto mo = modelObject.cast<FFactorGroundFloorConstruction>();
1336 ✗ retVal = translateFFactorGroundFloorConstruction(mo);
1337 ✗ break;
1338 ✗ }
1339 ✗ case openstudio::IddObjectType::OS_Construction_WindowDataFile: {
1340 ✗ LOG(Warn, "OS_WindowDataFile is not currently translated");
1341 ✗ break;
1342 }
1343 53 case openstudio::IddObjectType::OS_Controller_MechanicalVentilation: {
1344
1/1
✓ Branch 1 taken 53 times.
53 auto controller = modelObject.cast<ControllerMechanicalVentilation>();
1345
1/1
✓ Branch 1 taken 53 times.
53 retVal = translateControllerMechanicalVentilation(controller);
1346 53 break;
1347 53 }
1348 53 case openstudio::IddObjectType::OS_Controller_OutdoorAir: {
1349
1/1
✓ Branch 1 taken 53 times.
53 auto controller = modelObject.cast<ControllerOutdoorAir>();
1350
1/1
✓ Branch 1 taken 53 times.
53 retVal = translateControllerOutdoorAir(controller);
1351 53 break;
1352 53 }
1353 6 case openstudio::IddObjectType::OS_Controller_WaterCoil: {
1354
1/1
✓ Branch 1 taken 6 times.
6 auto controller = modelObject.cast<ControllerWaterCoil>();
1355
1/1
✓ Branch 1 taken 6 times.
6 retVal = translateControllerWaterCoil(controller);
1356 6 break;
1357 6 }
1358 ✗ case openstudio::IddObjectType::OS_CoolingTowerPerformance_CoolTools: {
1359 ✗ auto mo = modelObject.cast<CoolingTowerPerformanceCoolTools>();
1360 ✗ retVal = translateCoolingTowerPerformanceCoolTools(mo);
1361 ✗ break;
1362 ✗ }
1363 ✗ case openstudio::IddObjectType::OS_CoolingTowerPerformance_YorkCalc: {
1364 ✗ auto mo = modelObject.cast<CoolingTowerPerformanceYorkCalc>();
1365 ✗ retVal = translateCoolingTowerPerformanceYorkCalc(mo);
1366 ✗ break;
1367 ✗ }
1368 4 case openstudio::IddObjectType::OS_CoolingTower_SingleSpeed: {
1369
1/1
✓ Branch 1 taken 4 times.
4 auto tower = modelObject.cast<CoolingTowerSingleSpeed>();
1370
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateCoolingTowerSingleSpeed(tower);
1371 4 break;
1372 4 }
1373 ✗ case openstudio::IddObjectType::OS_CoolingTower_TwoSpeed: {
1374 ✗ auto tower = modelObject.cast<CoolingTowerTwoSpeed>();
1375 ✗ retVal = translateCoolingTowerTwoSpeed(tower);
1376 ✗ break;
1377 ✗ }
1378 ✗ case openstudio::IddObjectType::OS_CoolingTower_VariableSpeed: {
1379 ✗ auto tower = modelObject.cast<CoolingTowerVariableSpeed>();
1380 ✗ retVal = translateCoolingTowerVariableSpeed(tower);
1381 ✗ break;
1382 ✗ }
1383 ✗ case openstudio::IddObjectType::OS_CurrencyType: {
1384 ✗ auto mo = modelObject.cast<CurrencyType>();
1385 ✗ retVal = translateCurrencyType(mo);
1386 ✗ break;
1387 ✗ }
1388 7 case openstudio::IddObjectType::OS_Curve_Bicubic: {
1389
1/1
✓ Branch 1 taken 7 times.
7 auto curve = modelObject.cast<CurveBicubic>();
1390
1/1
✓ Branch 1 taken 7 times.
7 retVal = translateCurveBicubic(curve);
1391 7 break;
1392 7 }
1393 1056 case openstudio::IddObjectType::OS_Curve_Biquadratic: {
1394
1/1
✓ Branch 1 taken 1056 times.
1056 auto curve = modelObject.cast<CurveBiquadratic>();
1395
1/1
✓ Branch 1 taken 1056 times.
1056 retVal = translateCurveBiquadratic(curve);
1396 1056 break;
1397 1056 }
1398 339 case openstudio::IddObjectType::OS_Curve_Cubic: {
1399
1/1
✓ Branch 1 taken 339 times.
339 auto curve = modelObject.cast<CurveCubic>();
1400
1/1
✓ Branch 1 taken 339 times.
339 retVal = translateCurveCubic(curve);
1401 339 break;
1402 339 }
1403 ✗ case openstudio::IddObjectType::OS_Curve_DoubleExponentialDecay: {
1404 ✗ auto curve = modelObject.cast<CurveDoubleExponentialDecay>();
1405 ✗ retVal = translateCurveDoubleExponentialDecay(curve);
1406 ✗ break;
1407 ✗ }
1408 36 case openstudio::IddObjectType::OS_Curve_Exponent: {
1409
1/1
✓ Branch 1 taken 36 times.
36 auto curve = modelObject.cast<CurveExponent>();
1410
1/1
✓ Branch 1 taken 36 times.
36 retVal = translateCurveExponent(curve);
1411 36 break;
1412 36 }
1413 2 case openstudio::IddObjectType::OS_Curve_ExponentialDecay: {
1414
1/1
✓ Branch 1 taken 2 times.
2 auto curve = modelObject.cast<CurveExponentialDecay>();
1415
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateCurveExponentialDecay(curve);
1416 2 break;
1417 2 }
1418 12 case openstudio::IddObjectType::OS_Curve_ExponentialSkewNormal: {
1419
1/1
✓ Branch 1 taken 12 times.
12 auto curve = modelObject.cast<CurveExponentialSkewNormal>();
1420
1/1
✓ Branch 1 taken 12 times.
12 retVal = translateCurveExponentialSkewNormal(curve);
1421 12 break;
1422 12 }
1423 6 case openstudio::IddObjectType::OS_Curve_FanPressureRise: {
1424
1/1
✓ Branch 1 taken 6 times.
6 auto curve = modelObject.cast<CurveFanPressureRise>();
1425
1/1
✓ Branch 1 taken 6 times.
6 retVal = translateCurveFanPressureRise(curve);
1426 6 break;
1427 6 }
1428 ✗ case openstudio::IddObjectType::OS_Curve_Functional_PressureDrop: {
1429 ✗ auto curve = modelObject.cast<CurveFunctionalPressureDrop>();
1430 ✗ retVal = translateCurveFunctionalPressureDrop(curve);
1431 ✗ break;
1432 ✗ }
1433 44 case openstudio::IddObjectType::OS_Curve_Linear: {
1434
1/1
✓ Branch 1 taken 44 times.
44 auto curve = modelObject.cast<CurveLinear>();
1435
1/1
✓ Branch 1 taken 44 times.
44 retVal = translateCurveLinear(curve);
1436 44 break;
1437 44 }
1438 31 case openstudio::IddObjectType::OS_Curve_QuadLinear: {
1439
1/1
✓ Branch 1 taken 31 times.
31 auto curve = modelObject.cast<CurveQuadLinear>();
1440
1/1
✓ Branch 1 taken 31 times.
31 retVal = translateCurveQuadLinear(curve);
1441 31 break;
1442 31 }
1443 10 case openstudio::IddObjectType::OS_Curve_QuintLinear: {
1444
1/1
✓ Branch 1 taken 10 times.
10 auto curve = modelObject.cast<CurveQuintLinear>();
1445
1/1
✓ Branch 1 taken 10 times.
10 retVal = translateCurveQuintLinear(curve);
1446 10 break;
1447 10 }
1448 1074 case openstudio::IddObjectType::OS_Curve_Quadratic: {
1449
1/1
✓ Branch 1 taken 1074 times.
1074 auto curve = modelObject.cast<CurveQuadratic>();
1450
1/1
✓ Branch 1 taken 1074 times.
1074 retVal = translateCurveQuadratic(curve);
1451 1074 break;
1452 1074 }
1453 2 case openstudio::IddObjectType::OS_Curve_QuadraticLinear: {
1454
1/1
✓ Branch 1 taken 2 times.
2 auto curve = modelObject.cast<CurveQuadraticLinear>();
1455
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateCurveQuadraticLinear(curve);
1456 2 break;
1457 2 }
1458 2 case openstudio::IddObjectType::OS_Curve_Quartic: {
1459
1/1
✓ Branch 1 taken 2 times.
2 auto curve = modelObject.cast<CurveQuartic>();
1460
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateCurveQuartic(curve);
1461 2 break;
1462 2 }
1463 2 case openstudio::IddObjectType::OS_Curve_RectangularHyperbola1: {
1464
1/1
✓ Branch 1 taken 2 times.
2 auto curve = modelObject.cast<CurveRectangularHyperbola1>();
1465
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateCurveRectangularHyperbola1(curve);
1466 2 break;
1467 2 }
1468 8 case openstudio::IddObjectType::OS_Curve_RectangularHyperbola2: {
1469
1/1
✓ Branch 1 taken 8 times.
8 auto curve = modelObject.cast<CurveRectangularHyperbola2>();
1470
1/1
✓ Branch 1 taken 8 times.
8 retVal = translateCurveRectangularHyperbola2(curve);
1471 8 break;
1472 8 }
1473 12 case openstudio::IddObjectType::OS_Curve_Sigmoid: {
1474
1/1
✓ Branch 1 taken 12 times.
12 auto curve = modelObject.cast<CurveSigmoid>();
1475
1/1
✓ Branch 1 taken 12 times.
12 retVal = translateCurveSigmoid(curve);
1476 12 break;
1477 12 }
1478 8 case openstudio::IddObjectType::OS_Curve_Triquadratic: {
1479
1/1
✓ Branch 1 taken 8 times.
8 auto curve = modelObject.cast<CurveTriquadratic>();
1480
1/1
✓ Branch 1 taken 8 times.
8 retVal = translateCurveTriquadratic(curve);
1481 8 break;
1482 8 }
1483 158 case openstudio::IddObjectType::OS_SizingPeriod_DesignDay: {
1484
1/1
✓ Branch 1 taken 158 times.
158 auto designDay = modelObject.cast<DesignDay>();
1485
1/1
✓ Branch 1 taken 158 times.
158 retVal = translateDesignDay(designDay);
1486 158 break;
1487 158 }
1488 ✗ case openstudio::IddObjectType::OS_SizingPeriod_WeatherFileConditionType: {
1489 ✗ LOG(Warn, "OS_SizingPeriod_WeatherFileConditionType is not currently translated");
1490 ✗ return retVal;
1491 }
1492 ✗ case openstudio::IddObjectType::OS_SizingPeriod_WeatherFileDays: {
1493 ✗ LOG(Warn, "OS_SizingPeriod_WeatherFileDays is not currently translated");
1494 ✗ return retVal;
1495 }
1496 240 case openstudio::IddObjectType::OS_Sizing_Plant: {
1497
1/1
✓ Branch 1 taken 240 times.
240 auto sizingPlant = modelObject.cast<SizingPlant>();
1498
1/1
✓ Branch 1 taken 240 times.
240 retVal = translateSizingPlant(sizingPlant);
1499 240 break;
1500 240 }
1501 200 case openstudio::IddObjectType::OS_Sizing_System: {
1502
1/1
✓ Branch 1 taken 200 times.
200 auto mo = modelObject.cast<SizingSystem>();
1503
1/1
✓ Branch 1 taken 200 times.
200 retVal = translateSizingSystem(mo);
1504 200 break;
1505 200 }
1506 56 case openstudio::IddObjectType::OS_Sizing_Zone: {
1507
1/1
✓ Branch 1 taken 56 times.
56 auto mo = modelObject.cast<SizingZone>();
1508
1/1
✓ Branch 1 taken 56 times.
56 retVal = translateSizingZone(mo);
1509 56 break;
1510 56 }
1511 148 case openstudio::IddObjectType::OS_Daylighting_Control: {
1512
1/1
✓ Branch 1 taken 148 times.
148 auto daylightingControl = modelObject.cast<DaylightingControl>();
1513
1/1
✓ Branch 1 taken 148 times.
148 retVal = translateDaylightingControl(daylightingControl);
1514 148 break;
1515 148 }
1516
1517 1 case openstudio::IddObjectType::OS_DaylightingDevice_Shelf: {
1518
1/1
✓ Branch 1 taken 1 time.
1 auto daylightingDeviceShelf = modelObject.cast<DaylightingDeviceShelf>();
1519
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateDaylightingDeviceShelf(daylightingDeviceShelf);
1520 1 break;
1521 1 }
1522 1 case openstudio::IddObjectType::OS_DaylightingDevice_Tubular: {
1523
1/1
✓ Branch 1 taken 1 time.
1 auto daylightingDeviceTubular = modelObject.cast<DaylightingDeviceTubular>();
1524
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateDaylightingDeviceTubular(daylightingDeviceTubular);
1525 1 break;
1526 1 }
1527 1 case openstudio::IddObjectType::OS_DaylightingDevice_LightWell: {
1528
1/1
✓ Branch 1 taken 1 time.
1 auto daylightingDeviceLightWell = modelObject.cast<DaylightingDeviceLightWell>();
1529
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateDaylightingDeviceLightWell(daylightingDeviceLightWell);
1530 1 break;
1531 1 }
1532 67 case openstudio::IddObjectType::OS_DefaultConstructionSet: {
1533 // no-op
1534 67 return retVal;
1535 }
1536 47 case openstudio::IddObjectType::OS_DefaultScheduleSet: {
1537 // no-op
1538 47 return retVal;
1539 }
1540 155 case openstudio::IddObjectType::OS_DefaultSurfaceConstructions: {
1541 // no-op
1542 155 return retVal;
1543 }
1544 88 case openstudio::IddObjectType::OS_DefaultSubSurfaceConstructions: {
1545 // no-op
1546 88 return retVal;
1547 }
1548 ✗ case openstudio::IddObjectType::OS_DesignSpecification_OutdoorAir: {
1549 ✗ LOG_AND_THROW("Shouldn't get there");
1550 return retVal;
1551 }
1552 ✗ case openstudio::IddObjectType::OS_DesignSpecification_ZoneAirDistribution: {
1553 // DLM: appears to be translated in SizingZone
1554 ✗ break;
1555 }
1556 ✗ case openstudio::IddObjectType::OS_DistrictCooling: {
1557 ✗ auto districtCooling = modelObject.cast<DistrictCooling>();
1558 ✗ retVal = translateDistrictCooling(districtCooling);
1559 ✗ break;
1560 ✗ }
1561 ✗ case openstudio::IddObjectType::OS_DistrictHeating_Water: {
1562 ✗ auto districtHeating = modelObject.cast<DistrictHeatingWater>();
1563 ✗ retVal = translateDistrictHeatingWater(districtHeating);
1564 ✗ break;
1565 ✗ }
1566 ✗ case openstudio::IddObjectType::OS_DistrictHeating_Steam: {
1567 ✗ auto districtHeatingSteam = modelObject.cast<DistrictHeatingSteam>();
1568 ✗ retVal = translateDistrictHeatingSteam(districtHeatingSteam);
1569 ✗ break;
1570 ✗ }
1571 ✗ case openstudio::IddObjectType::OS_Duct: {
1572 ✗ auto duct = modelObject.cast<Duct>();
1573 ✗ retVal = translateDuct(duct);
1574 ✗ break;
1575 ✗ }
1576 282 case openstudio::IddObjectType::OS_ElectricEquipment: {
1577
1/1
✓ Branch 1 taken 282 times.
282 auto equipment = modelObject.cast<ElectricEquipment>();
1578
1/1
✓ Branch 1 taken 282 times.
282 retVal = translateElectricEquipment(equipment);
1579 282 break;
1580 282 }
1581 176 case openstudio::IddObjectType::OS_ElectricEquipment_Definition: {
1582
1/1
✓ Branch 1 taken 176 times.
176 auto definition = modelObject.cast<ElectricEquipmentDefinition>();
1583
1/1
✓ Branch 1 taken 176 times.
176 retVal = translateElectricEquipmentDefinition(definition);
1584 176 break;
1585 176 }
1586 33 case openstudio::IddObjectType::OS_ElectricEquipment_ITE_AirCooled: {
1587
1/1
✓ Branch 1 taken 33 times.
33 auto equipmentITE = modelObject.cast<ElectricEquipmentITEAirCooled>();
1588
1/1
✓ Branch 1 taken 33 times.
33 retVal = translateElectricEquipmentITEAirCooled(equipmentITE);
1589 33 break;
1590 33 }
1591 1 case openstudio::IddObjectType::OS_ElectricEquipment_ITE_AirCooled_Definition: {
1592
1/1
✓ Branch 1 taken 1 time.
1 auto definition = modelObject.cast<ElectricEquipmentITEAirCooledDefinition>();
1593
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateElectricEquipmentITEAirCooledDefinition(definition);
1594 1 break;
1595 1 }
1596 12 case openstudio::IddObjectType::OS_ElectricLoadCenter_Distribution: {
1597
1/1
✓ Branch 1 taken 12 times.
12 auto temp = modelObject.cast<ElectricLoadCenterDistribution>();
1598
1/1
✓ Branch 1 taken 12 times.
12 retVal = translateElectricLoadCenterDistribution(temp);
1599 12 break;
1600 12 }
1601 ✗ case openstudio::IddObjectType::OS_ElectricLoadCenter_Inverter_LookUpTable: {
1602 ✗ auto temp = modelObject.cast<ElectricLoadCenterInverterLookUpTable>();
1603 ✗ retVal = translateElectricLoadCenterInverterLookUpTable(temp);
1604 ✗ break;
1605 ✗ }
1606 2 case openstudio::IddObjectType::OS_ElectricLoadCenter_Inverter_Simple: {
1607
1/1
✓ Branch 1 taken 2 times.
2 auto temp = modelObject.cast<ElectricLoadCenterInverterSimple>();
1608
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateElectricLoadCenterInverterSimple(temp);
1609 2 break;
1610 2 }
1611 1 case openstudio::IddObjectType::OS_ElectricLoadCenter_Inverter_PVWatts: {
1612
1/1
✓ Branch 1 taken 1 time.
1 auto temp = modelObject.cast<ElectricLoadCenterInverterPVWatts>();
1613
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateElectricLoadCenterInverterPVWatts(temp);
1614 1 break;
1615 1 }
1616 ✗ case openstudio::IddObjectType::OS_ElectricLoadCenter_Storage_Simple: {
1617 ✗ auto temp = modelObject.cast<ElectricLoadCenterStorageSimple>();
1618 ✗ retVal = translateElectricLoadCenterStorageSimple(temp);
1619 ✗ break;
1620 ✗ }
1621 ✗ case openstudio::IddObjectType::OS_ElectricLoadCenter_Storage_Converter: {
1622 ✗ auto temp = modelObject.cast<ElectricLoadCenterStorageConverter>();
1623 ✗ retVal = translateElectricLoadCenterStorageConverter(temp);
1624 ✗ break;
1625 ✗ }
1626 2 case openstudio::IddObjectType::OS_ElectricLoadCenter_Storage_LiIonNMCBattery: {
1627
1/1
✓ Branch 1 taken 2 times.
2 auto temp = modelObject.cast<ElectricLoadCenterStorageLiIonNMCBattery>();
1628
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateElectricLoadCenterStorageLiIonNMCBattery(temp);
1629 2 break;
1630 2 }
1631 4 case openstudio::IddObjectType::OS_ElectricLoadCenter_Transformer: {
1632
1/1
✓ Branch 1 taken 4 times.
4 auto temp = modelObject.cast<ElectricLoadCenterTransformer>();
1633
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateElectricLoadCenterTransformer(temp);
1634 4 break;
1635 4 }
1636 69 case openstudio::IddObjectType::OS_EnergyManagementSystem_Actuator: {
1637
1/1
✓ Branch 1 taken 69 times.
69 auto actuator = modelObject.cast<EnergyManagementSystemActuator>();
1638
1/1
✓ Branch 1 taken 69 times.
69 retVal = translateEnergyManagementSystemActuator(actuator);
1639 69 break;
1640 69 }
1641 4 case openstudio::IddObjectType::OS_EnergyManagementSystem_ConstructionIndexVariable: {
1642
1/1
✓ Branch 1 taken 4 times.
4 auto civ = modelObject.cast<EnergyManagementSystemConstructionIndexVariable>();
1643
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateEnergyManagementSystemConstructionIndexVariable(civ);
1644 4 break;
1645 4 }
1646 2 case openstudio::IddObjectType::OS_EnergyManagementSystem_CurveOrTableIndexVariable: {
1647
1/1
✓ Branch 1 taken 2 times.
2 auto cotiv = modelObject.cast<EnergyManagementSystemCurveOrTableIndexVariable>();
1648
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateEnergyManagementSystemCurveOrTableIndexVariable(cotiv);
1649 2 break;
1650 2 }
1651 15 case openstudio::IddObjectType::OS_EnergyManagementSystem_GlobalVariable: {
1652
1/1
✓ Branch 1 taken 15 times.
15 auto globalVariable = modelObject.cast<EnergyManagementSystemGlobalVariable>();
1653
1/1
✓ Branch 1 taken 15 times.
15 retVal = translateEnergyManagementSystemGlobalVariable(globalVariable);
1654 15 break;
1655 15 }
1656 3 case openstudio::IddObjectType::OS_EnergyManagementSystem_InternalVariable: {
1657
1/1
✓ Branch 1 taken 3 times.
3 auto internalVariable = modelObject.cast<EnergyManagementSystemInternalVariable>();
1658
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateEnergyManagementSystemInternalVariable(internalVariable);
1659 3 break;
1660 3 }
1661 3 case openstudio::IddObjectType::OS_EnergyManagementSystem_MeteredOutputVariable: {
1662
1/1
✓ Branch 1 taken 3 times.
3 auto mov = modelObject.cast<EnergyManagementSystemMeteredOutputVariable>();
1663
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateEnergyManagementSystemMeteredOutputVariable(mov);
1664 3 break;
1665 3 }
1666 8 case openstudio::IddObjectType::OS_EnergyManagementSystem_OutputVariable: {
1667
1/1
✓ Branch 1 taken 8 times.
8 auto outputVariable = modelObject.cast<EnergyManagementSystemOutputVariable>();
1668
1/1
✓ Branch 1 taken 8 times.
8 retVal = translateEnergyManagementSystemOutputVariable(outputVariable);
1669 8 break;
1670 8 }
1671 21 case openstudio::IddObjectType::OS_EnergyManagementSystem_Program: {
1672
1/1
✓ Branch 1 taken 21 times.
21 auto program = modelObject.cast<EnergyManagementSystemProgram>();
1673
1/1
✓ Branch 1 taken 21 times.
21 retVal = translateEnergyManagementSystemProgram(program);
1674 21 break;
1675 21 }
1676 12 case openstudio::IddObjectType::OS_EnergyManagementSystem_ProgramCallingManager: {
1677
1/1
✓ Branch 1 taken 12 times.
12 auto programCallingManager = modelObject.cast<EnergyManagementSystemProgramCallingManager>();
1678
1/1
✓ Branch 1 taken 12 times.
12 retVal = translateEnergyManagementSystemProgramCallingManager(programCallingManager);
1679 12 break;
1680 12 }
1681 18 case openstudio::IddObjectType::OS_EnergyManagementSystem_Sensor: {
1682
1/1
✓ Branch 1 taken 18 times.
18 auto sensor = modelObject.cast<EnergyManagementSystemSensor>();
1683
1/1
✓ Branch 1 taken 18 times.
18 retVal = translateEnergyManagementSystemSensor(sensor);
1684 18 break;
1685 18 }
1686 5 case openstudio::IddObjectType::OS_EnergyManagementSystem_Subroutine: {
1687
1/1
✓ Branch 1 taken 5 times.
5 auto subroutine = modelObject.cast<EnergyManagementSystemSubroutine>();
1688
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateEnergyManagementSystemSubroutine(subroutine);
1689 5 break;
1690 5 }
1691 6 case openstudio::IddObjectType::OS_EnergyManagementSystem_TrendVariable: {
1692
1/1
✓ Branch 1 taken 6 times.
6 auto trendVariable = modelObject.cast<EnergyManagementSystemTrendVariable>();
1693
1/1
✓ Branch 1 taken 6 times.
6 retVal = translateEnergyManagementSystemTrendVariable(trendVariable);
1694 6 break;
1695 6 }
1696 33 case openstudio::IddObjectType::OS_EvaporativeCooler_Direct_ResearchSpecial: {
1697
1/1
✓ Branch 1 taken 33 times.
33 auto evap = modelObject.cast<EvaporativeCoolerDirectResearchSpecial>();
1698
1/1
✓ Branch 1 taken 33 times.
33 retVal = translateEvaporativeCoolerDirectResearchSpecial(evap);
1699 33 break;
1700 33 }
1701 3 case openstudio::IddObjectType::OS_EvaporativeCooler_Indirect_ResearchSpecial: {
1702
1/1
✓ Branch 1 taken 3 times.
3 auto evap = modelObject.cast<EvaporativeCoolerIndirectResearchSpecial>();
1703
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateEvaporativeCoolerIndirectResearchSpecial(evap);
1704 3 break;
1705 3 }
1706 1 case openstudio::IddObjectType::OS_EvaporativeFluidCooler_SingleSpeed: {
1707
1/1
✓ Branch 1 taken 1 time.
1 auto evap = modelObject.cast<EvaporativeFluidCoolerSingleSpeed>();
1708
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateEvaporativeFluidCoolerSingleSpeed(evap);
1709 1 break;
1710 1 }
1711 1 case openstudio::IddObjectType::OS_EvaporativeFluidCooler_TwoSpeed: {
1712
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<EvaporativeFluidCoolerTwoSpeed>();
1713
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateEvaporativeFluidCoolerTwoSpeed(mo);
1714 1 break;
1715 1 }
1716 2 case openstudio::IddObjectType::OS_Exterior_Lights: {
1717
1/1
✓ Branch 1 taken 2 times.
2 auto lights = modelObject.cast<ExteriorLights>();
1718
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateExteriorLights(lights);
1719 2 break;
1720 2 }
1721 ✗ case openstudio::IddObjectType::OS_Exterior_Lights_Definition: {
1722 // no-op
1723 ✗ break;
1724 }
1725
1726 1 case openstudio::IddObjectType::OS_Exterior_FuelEquipment: {
1727
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<ExteriorFuelEquipment>();
1728
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExteriorFuelEquipment(mo);
1729 1 break;
1730 1 }
1731 ✗ case openstudio::IddObjectType::OS_Exterior_FuelEquipment_Definition: {
1732 // no-op
1733 ✗ break;
1734 }
1735
1736 1 case openstudio::IddObjectType::OS_Exterior_WaterEquipment: {
1737
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<ExteriorWaterEquipment>();
1738
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExteriorWaterEquipment(mo);
1739 1 break;
1740 1 }
1741 ✗ case openstudio::IddObjectType::OS_Exterior_WaterEquipment_Definition: {
1742 // no-op
1743 ✗ break;
1744 }
1745
1746 1 case openstudio::IddObjectType::OS_ExternalInterface: {
1747
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterface>();
1748
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterface(ei);
1749 1 break;
1750 1 }
1751 1 case openstudio::IddObjectType::OS_ExternalInterface_Actuator: {
1752
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceActuator>();
1753
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceActuator(ei);
1754 1 break;
1755 1 }
1756 1 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitExport_From_Variable: {
1757
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitExportFromVariable>();
1758
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceFunctionalMockupUnitExportFromVariable(ei);
1759 1 break;
1760 1 }
1761 1 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitExport_To_Actuator: {
1762
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitExportToActuator>();
1763
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceFunctionalMockupUnitExportToActuator(ei);
1764 1 break;
1765 1 }
1766 1 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitExport_To_Schedule: {
1767
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitExportToSchedule>();
1768
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceFunctionalMockupUnitExportToSchedule(ei);
1769 1 break;
1770 1 }
1771 1 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitExport_To_Variable: {
1772
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitExportToVariable>();
1773
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceFunctionalMockupUnitExportToVariable(ei);
1774 1 break;
1775 1 }
1776 5 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport: {
1777
1/1
✓ Branch 1 taken 5 times.
5 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitImport>();
1778
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateExternalInterfaceFunctionalMockupUnitImport(ei);
1779 5 break;
1780 5 }
1781 1 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport_From_Variable: {
1782
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitImportFromVariable>();
1783
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceFunctionalMockupUnitImportFromVariable(ei);
1784 1 break;
1785 1 }
1786 1 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport_To_Actuator: {
1787
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitImportToActuator>();
1788
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceFunctionalMockupUnitImportToActuator(ei);
1789 1 break;
1790 1 }
1791 1 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport_To_Schedule: {
1792
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitImportToSchedule>();
1793
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceFunctionalMockupUnitImportToSchedule(ei);
1794 1 break;
1795 1 }
1796 1 case openstudio::IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport_To_Variable: {
1797
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceFunctionalMockupUnitImportToVariable>();
1798
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceFunctionalMockupUnitImportToVariable(ei);
1799 1 break;
1800 1 }
1801 1 case openstudio::IddObjectType::OS_ExternalInterface_Schedule: {
1802
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceSchedule>();
1803
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceSchedule(ei);
1804 1 break;
1805 1 }
1806 1 case openstudio::IddObjectType::OS_ExternalInterface_Variable: {
1807
1/1
✓ Branch 1 taken 1 time.
1 auto ei = modelObject.cast<ExternalInterfaceVariable>();
1808
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateExternalInterfaceVariable(ei);
1809 1 break;
1810 1 }
1811 47 case openstudio::IddObjectType::OS_Facility: {
1812 // no-op
1813 47 return retVal;
1814 }
1815 3 case openstudio::IddObjectType::OS_Fan_ComponentModel: {
1816
1/1
✓ Branch 1 taken 3 times.
3 auto fan = modelObject.cast<FanComponentModel>();
1817
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateFanComponentModel(fan);
1818 3 break;
1819 3 }
1820 98 case openstudio::IddObjectType::OS_Fan_ConstantVolume: {
1821
1/1
✓ Branch 1 taken 98 times.
98 auto fan = modelObject.cast<FanConstantVolume>();
1822
1/1
✓ Branch 1 taken 98 times.
98 retVal = translateFanConstantVolume(fan);
1823 98 break;
1824 98 }
1825 28 case openstudio::IddObjectType::OS_Fan_OnOff: {
1826
1/1
✓ Branch 1 taken 28 times.
28 auto fan = modelObject.cast<FanOnOff>();
1827
1/1
✓ Branch 1 taken 28 times.
28 retVal = translateFanOnOff(fan);
1828 28 break;
1829 28 }
1830 18 case openstudio::IddObjectType::OS_Fan_SystemModel: {
1831
1/1
✓ Branch 1 taken 18 times.
18 auto fan = modelObject.cast<FanSystemModel>();
1832
1/1
✓ Branch 1 taken 18 times.
18 retVal = translateFanSystemModel(fan);
1833 18 break;
1834 18 }
1835 7 case openstudio::IddObjectType::OS_Fan_VariableVolume: {
1836
1/1
✓ Branch 1 taken 7 times.
7 auto fan = modelObject.cast<FanVariableVolume>();
1837
1/1
✓ Branch 1 taken 7 times.
7 retVal = translateFanVariableVolume(fan);
1838 7 break;
1839 7 }
1840
1841 2 case openstudio::IddObjectType::OS_Fan_ZoneExhaust: {
1842
1/1
✓ Branch 1 taken 2 times.
2 auto fan = modelObject.cast<FanZoneExhaust>();
1843
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateFanZoneExhaust(fan);
1844 2 break;
1845 2 }
1846 ✗ case openstudio::IddObjectType::OS_FluidCooler_SingleSpeed: {
1847 ✗ auto fluidCoolerSingleSpeed = modelObject.cast<FluidCoolerSingleSpeed>();
1848 ✗ retVal = translateFluidCoolerSingleSpeed(fluidCoolerSingleSpeed);
1849 ✗ break;
1850 ✗ }
1851 ✗ case openstudio::IddObjectType::OS_FluidCooler_TwoSpeed: {
1852 ✗ auto fluidCoolerTwoSpeed = modelObject.cast<FluidCoolerTwoSpeed>();
1853 ✗ retVal = translateFluidCoolerTwoSpeed(fluidCoolerTwoSpeed);
1854 ✗ break;
1855 ✗ }
1856 ✗ case openstudio::IddObjectType::OS_Foundation_Kiva: {
1857 ✗ auto kiva = modelObject.cast<FoundationKiva>();
1858 ✗ retVal = translateFoundationKiva(kiva);
1859 ✗ break;
1860 ✗ }
1861 ✗ case openstudio::IddObjectType::OS_Foundation_Kiva_Settings: {
1862 ✗ auto kivaSettings = modelObject.cast<FoundationKivaSettings>();
1863 ✗ retVal = translateFoundationKivaSettings(kivaSettings);
1864 ✗ break;
1865 ✗ }
1866 2 case openstudio::IddObjectType::OS_Generator_MicroTurbine: {
1867 // Will also translate the Generator:MicroTurbine:HeatRecovery if there is one attached to the Generator:MicroTurbine
1868
1/1
✓ Branch 1 taken 2 times.
2 auto mchp = modelObject.cast<GeneratorMicroTurbine>();
1869
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateGeneratorMicroTurbine(mchp);
1870 2 break;
1871 2 }
1872 2 case openstudio::IddObjectType::OS_Generator_MicroTurbine_HeatRecovery: {
1873 // no-op, just Log a Trace message
1874
5/5
✓ 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.
2 LOG(Trace, "OS_Generator_MicroTurbine_HeatRecovery is not translated by itself but in the parent GeneratorMicroTurbine");
1875 2 break;
1876 }
1877 3 case openstudio::IddObjectType::OS_Generator_FuelCell: {
1878 // Will also translate all children of Generator:FuelCell (Generator:FuelCell:AirSupply, etc)
1879
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelCell>();
1880
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelCell(temp);
1881 3 break;
1882 3 }
1883 3 case openstudio::IddObjectType::OS_Generator_FuelCell_AirSupply: {
1884
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelCellAirSupply>();
1885
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelCellAirSupply(temp);
1886 3 break;
1887 3 }
1888 3 case openstudio::IddObjectType::OS_Generator_FuelCell_AuxiliaryHeater: {
1889
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelCellAuxiliaryHeater>();
1890
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelCellAuxiliaryHeater(temp);
1891 3 break;
1892 3 }
1893 3 case openstudio::IddObjectType::OS_Generator_FuelCell_ElectricalStorage: {
1894
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelCellElectricalStorage>();
1895
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelCellElectricalStorage(temp);
1896 3 break;
1897 3 }
1898 3 case openstudio::IddObjectType::OS_Generator_FuelCell_ExhaustGasToWaterHeatExchanger: {
1899
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelCellExhaustGasToWaterHeatExchanger>();
1900
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelCellExhaustGasToWaterHeatExchanger(temp);
1901 3 break;
1902 3 }
1903 3 case openstudio::IddObjectType::OS_Generator_FuelCell_Inverter: {
1904
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelCellInverter>();
1905
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelCellInverter(temp);
1906 3 break;
1907 3 }
1908 3 case openstudio::IddObjectType::OS_Generator_FuelCell_PowerModule: {
1909
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelCellPowerModule>();
1910
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelCellPowerModule(temp);
1911 3 break;
1912 3 }
1913 1 case openstudio::IddObjectType::OS_Generator_FuelCell_StackCooler: {
1914
1/1
✓ Branch 1 taken 1 time.
1 auto temp = modelObject.cast<GeneratorFuelCellStackCooler>();
1915
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateGeneratorFuelCellStackCooler(temp);
1916 1 break;
1917 1 }
1918 3 case openstudio::IddObjectType::OS_Generator_FuelCell_WaterSupply: {
1919
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelCellWaterSupply>();
1920
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelCellWaterSupply(temp);
1921 3 break;
1922 3 }
1923 3 case openstudio::IddObjectType::OS_Generator_FuelSupply: {
1924
1/1
✓ Branch 1 taken 3 times.
3 auto temp = modelObject.cast<GeneratorFuelSupply>();
1925
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGeneratorFuelSupply(temp);
1926 3 break;
1927 3 }
1928 // TODO: JM 2018-10-12 Placeholder for Generator:MicroCHP if/when it is implemented
1929 // to remember that translateGeneratorMicroCHP should be calling translation of child GeneratorFuelSupply as needed
1930 /*
1931 *case openstudio::IddObjectType::OS_Generator_MicroCHP:
1932 *{
1933 * auto temp = modelObject.cast<GeneratorMicroCHP>();
1934 * retVal = translateGeneratorMicroCHP(temp);
1935 * break;
1936 *}
1937 */
1938 2 case openstudio::IddObjectType::OS_Generator_Photovoltaic: {
1939
1/1
✓ Branch 1 taken 2 times.
2 auto temp = modelObject.cast<GeneratorPhotovoltaic>();
1940
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateGeneratorPhotovoltaic(temp);
1941 2 break;
1942 2 }
1943 1 case openstudio::IddObjectType::OS_Generator_PVWatts: {
1944
1/1
✓ Branch 1 taken 1 time.
1 auto temp = modelObject.cast<GeneratorPVWatts>();
1945
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateGeneratorPVWatts(temp);
1946 1 break;
1947 1 }
1948 1 case openstudio::IddObjectType::OS_Generator_WindTurbine: {
1949
1/1
✓ Branch 1 taken 1 time.
1 auto temp = modelObject.cast<GeneratorWindTurbine>();
1950
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateGeneratorWindTurbine(temp);
1951 1 break;
1952 1 }
1953 ✗ case openstudio::IddObjectType::OS_Glare_Sensor: {
1954 // no-op
1955 ✗ break;
1956 }
1957 3 case openstudio::IddObjectType::OS_GroundHeatExchanger_HorizontalTrench: {
1958
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<GroundHeatExchangerHorizontalTrench>();
1959
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateGroundHeatExchangerHorizontalTrench(mo);
1960 3 break;
1961 3 }
1962 1 case openstudio::IddObjectType::OS_GroundHeatExchanger_Vertical: {
1963
1/1
✓ Branch 1 taken 1 time.
1 auto groundHeatExchangerVertical = modelObject.cast<GroundHeatExchangerVertical>();
1964
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateGroundHeatExchangerVertical(groundHeatExchangerVertical);
1965 1 break;
1966 1 }
1967 ✗ case openstudio::IddObjectType::OS_HeaderedPumps_ConstantSpeed: {
1968 ✗ auto mo = modelObject.cast<HeaderedPumpsConstantSpeed>();
1969 ✗ retVal = translateHeaderedPumpsConstantSpeed(mo);
1970 ✗ break;
1971 ✗ }
1972 ✗ case openstudio::IddObjectType::OS_HeaderedPumps_VariableSpeed: {
1973 ✗ auto mo = modelObject.cast<HeaderedPumpsVariableSpeed>();
1974 ✗ retVal = translateHeaderedPumpsVariableSpeed(mo);
1975 ✗ break;
1976 ✗ }
1977 46 case openstudio::IddObjectType::OS_HeatBalanceAlgorithm: {
1978
1/1
✓ Branch 1 taken 46 times.
46 auto mo = modelObject.cast<HeatBalanceAlgorithm>();
1979
1/1
✓ Branch 1 taken 46 times.
46 retVal = translateHeatBalanceAlgorithm(mo);
1980 46 break;
1981 46 }
1982 10 case openstudio::IddObjectType::OS_HeatExchanger_AirToAir_SensibleAndLatent: {
1983
1/1
✓ Branch 1 taken 10 times.
10 auto mo = modelObject.cast<HeatExchangerAirToAirSensibleAndLatent>();
1984
1/1
✓ Branch 1 taken 10 times.
10 retVal = translateHeatExchangerAirToAirSensibleAndLatent(mo);
1985 10 break;
1986 10 }
1987 3 case openstudio::IddObjectType::OS_HeatExchanger_Desiccant_BalancedFlow: {
1988
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<HeatExchangerDesiccantBalancedFlow>();
1989
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateHeatExchangerDesiccantBalancedFlow(mo);
1990 3 break;
1991 3 }
1992 3 case openstudio::IddObjectType::OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1: {
1993
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<HeatExchangerDesiccantBalancedFlowPerformanceDataType1>();
1994
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateHeatExchangerDesiccantBalancedFlowPerformanceDataType1(mo);
1995 3 break;
1996 3 }
1997 3 case openstudio::IddObjectType::OS_HeatExchanger_FluidToFluid: {
1998
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<HeatExchangerFluidToFluid>();
1999
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateHeatExchangerFluidToFluid(mo);
2000 3 break;
2001 3 }
2002 3 case openstudio::IddObjectType::OS_HeatPump_AirToWater: {
2003
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<HeatPumpAirToWater>();
2004
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateHeatPumpAirToWater(mo);
2005 3 break;
2006 3 }
2007 2 case openstudio::IddObjectType::OS_HeatPump_AirToWater_Cooling: {
2008 // no-op, just Log a Trace message
2009
5/5
✓ 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.
2 LOG(Trace, "HeatPumpAirToWaterCooling is not translated by itself but in the parent HeatPumpAirToWater");
2010 2 break;
2011 }
2012 3 case openstudio::IddObjectType::OS_HeatPump_AirToWater_Heating: {
2013 // no-op, just Log a Trace message
2014
5/5
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 13 taken 3 times.
3 LOG(Trace, "HeatPumpAirToWaterHeating is not translated by itself but in the parent HeatPumpAirToWater");
2015 3 break;
2016 }
2017 1 case openstudio::IddObjectType::OS_HeatPump_AirToWater_FuelFired_Heating: {
2018
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<HeatPumpAirToWaterFuelFiredHeating>();
2019
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateHeatPumpAirToWaterFuelFiredHeating(mo);
2020 1 break;
2021 1 }
2022 1 case openstudio::IddObjectType::OS_HeatPump_AirToWater_FuelFired_Cooling: {
2023
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<HeatPumpAirToWaterFuelFiredCooling>();
2024
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateHeatPumpAirToWaterFuelFiredCooling(mo);
2025 1 break;
2026 1 }
2027
2028 1 case openstudio::IddObjectType::OS_HeatPump_WaterToWater_EquationFit_Cooling: {
2029
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<HeatPumpWaterToWaterEquationFitCooling>();
2030
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateHeatPumpWaterToWaterEquationFitCooling(mo);
2031 1 break;
2032 1 }
2033 1 case openstudio::IddObjectType::OS_HeatPump_WaterToWater_EquationFit_Heating: {
2034
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<HeatPumpWaterToWaterEquationFitHeating>();
2035
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateHeatPumpWaterToWaterEquationFitHeating(mo);
2036 1 break;
2037 1 }
2038 3 case openstudio::IddObjectType::OS_HeatPump_PlantLoop_EIR_Cooling: {
2039
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<HeatPumpPlantLoopEIRCooling>();
2040
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateHeatPumpPlantLoopEIRCooling(mo);
2041 3 break;
2042 3 }
2043 3 case openstudio::IddObjectType::OS_HeatPump_PlantLoop_EIR_Heating: {
2044
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<HeatPumpPlantLoopEIRHeating>();
2045
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateHeatPumpPlantLoopEIRHeating(mo);
2046 3 break;
2047 3 }
2048 4 case openstudio::IddObjectType::OS_HotWaterEquipment: {
2049
1/1
✓ Branch 1 taken 4 times.
4 auto hotWaterEquipment = modelObject.cast<HotWaterEquipment>();
2050
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateHotWaterEquipment(hotWaterEquipment);
2051 4 break;
2052 4 }
2053 2 case openstudio::IddObjectType::OS_HotWaterEquipment_Definition: {
2054
1/1
✓ Branch 1 taken 2 times.
2 auto definition = modelObject.cast<HotWaterEquipmentDefinition>();
2055
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateHotWaterEquipmentDefinition(definition);
2056 2 break;
2057 2 }
2058 1 case openstudio::IddObjectType::OS_Humidifier_Steam_Electric: {
2059
1/1
✓ Branch 1 taken 1 time.
1 auto humidifierSteamElectric = modelObject.cast<HumidifierSteamElectric>();
2060
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateHumidifierSteamElectric(humidifierSteamElectric);
2061 1 break;
2062 1 }
2063 ✗ case openstudio::IddObjectType::OS_Humidifier_Steam_Gas: {
2064 ✗ auto humidifierSteamGas = modelObject.cast<HumidifierSteamGas>();
2065 ✗ retVal = translateHumidifierSteamGas(humidifierSteamGas);
2066 ✗ break;
2067 ✗ }
2068 36 case openstudio::IddObjectType::OS_WindowMaterial_Gas: {
2069
1/1
✓ Branch 1 taken 36 times.
36 auto gas = modelObject.cast<Gas>();
2070
1/1
✓ Branch 1 taken 36 times.
36 retVal = translateGas(gas);
2071 36 break;
2072 36 }
2073 7 case openstudio::IddObjectType::OS_GasEquipment: {
2074
1/1
✓ Branch 1 taken 7 times.
7 auto equipment = modelObject.cast<GasEquipment>();
2075
1/1
✓ Branch 1 taken 7 times.
7 retVal = translateGasEquipment(equipment);
2076 7 break;
2077 7 }
2078 5 case openstudio::IddObjectType::OS_GasEquipment_Definition: {
2079
1/1
✓ Branch 1 taken 5 times.
5 auto definition = modelObject.cast<GasEquipmentDefinition>();
2080
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateGasEquipmentDefinition(definition);
2081 5 break;
2082 5 }
2083 54 case openstudio::IddObjectType::OS_IlluminanceMap: {
2084
1/1
✓ Branch 1 taken 54 times.
54 auto illuminanceMap = modelObject.cast<IlluminanceMap>();
2085
1/1
✓ Branch 1 taken 54 times.
54 retVal = translateIlluminanceMap(illuminanceMap);
2086 54 break;
2087 54 }
2088 162 case openstudio::IddObjectType::OS_InteriorPartitionSurface: {
2089
1/1
✓ Branch 1 taken 162 times.
162 auto interiorPartitionSurface = modelObject.cast<InteriorPartitionSurface>();
2090
1/1
✓ Branch 1 taken 162 times.
162 retVal = translateInteriorPartitionSurface(interiorPartitionSurface);
2091 162 break;
2092 162 }
2093 135 case openstudio::IddObjectType::OS_InteriorPartitionSurfaceGroup: {
2094
1/1
✓ Branch 1 taken 135 times.
135 auto interiorPartitionSurfaceGroup = modelObject.cast<InteriorPartitionSurfaceGroup>();
2095
1/1
✓ Branch 1 taken 135 times.
135 retVal = translateInteriorPartitionSurfaceGroup(interiorPartitionSurfaceGroup);
2096 135 break;
2097 135 }
2098 12 case openstudio::IddObjectType::OS_InternalMass: {
2099
1/1
✓ Branch 1 taken 12 times.
12 auto internalMass = modelObject.cast<InternalMass>();
2100
1/1
✓ Branch 1 taken 12 times.
12 retVal = translateInternalMass(internalMass);
2101 12 break;
2102 12 }
2103 ✗ case openstudio::IddObjectType::OS_InternalMass_Definition: {
2104 // no-op
2105 ✗ break;
2106 }
2107 43 case openstudio::IddObjectType::OS_WaterHeater_Mixed: {
2108
1/1
✓ Branch 1 taken 43 times.
43 auto waterHeaterMixed = modelObject.cast<WaterHeaterMixed>();
2109
1/1
✓ Branch 1 taken 43 times.
43 retVal = translateWaterHeaterMixed(waterHeaterMixed);
2110 43 break;
2111 43 }
2112 3 case openstudio::IddObjectType::OS_WaterHeater_HeatPump: {
2113
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<WaterHeaterHeatPump>();
2114
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateWaterHeaterHeatPump(mo);
2115 3 break;
2116 3 }
2117 3 case openstudio::IddObjectType::OS_WaterHeater_HeatPump_WrappedCondenser: {
2118
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<WaterHeaterHeatPumpWrappedCondenser>();
2119
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateWaterHeaterHeatPumpWrappedCondenser(mo);
2120 3 break;
2121 3 }
2122 41 case openstudio::IddObjectType::OS_WaterHeater_Sizing: {
2123
1/1
✓ Branch 1 taken 41 times.
41 auto waterHeaterSizing = modelObject.cast<WaterHeaterSizing>();
2124
1/1
✓ Branch 1 taken 41 times.
41 retVal = translateWaterHeaterSizing(waterHeaterSizing);
2125 41 break;
2126 41 }
2127 18 case openstudio::IddObjectType::OS_WaterHeater_Stratified: {
2128
1/1
✓ Branch 1 taken 18 times.
18 auto waterHeaterStratified = modelObject.cast<WaterHeaterStratified>();
2129
1/1
✓ Branch 1 taken 18 times.
18 retVal = translateWaterHeaterStratified(waterHeaterStratified);
2130 18 break;
2131 18 }
2132 11 case openstudio::IddObjectType::OS_WaterUse_Connections: {
2133
1/1
✓ Branch 1 taken 11 times.
11 auto waterUseConnections = modelObject.cast<WaterUseConnections>();
2134
1/1
✓ Branch 1 taken 11 times.
11 retVal = translateWaterUseConnections(waterUseConnections);
2135 11 break;
2136 11 }
2137 22 case openstudio::IddObjectType::OS_WaterUse_Equipment: {
2138
1/1
✓ Branch 1 taken 22 times.
22 auto waterUseEquipment = modelObject.cast<WaterUseEquipment>();
2139
1/1
✓ Branch 1 taken 22 times.
22 retVal = translateWaterUseEquipment(waterUseEquipment);
2140 22 break;
2141 22 }
2142 ✗ case openstudio::IddObjectType::OS_WaterUse_Equipment_Definition: {
2143 // no-op
2144 ✗ break;
2145 }
2146 ✗ case openstudio::IddObjectType::OS_WindowMaterial_GasMixture: {
2147 ✗ auto gasMixture = modelObject.cast<GasMixture>();
2148 ✗ retVal = translateGasMixture(gasMixture);
2149 ✗ break;
2150 ✗ }
2151 1 case openstudio::IddObjectType::OS_LoadProfile_Plant: {
2152
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<LoadProfilePlant>();
2153
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateLoadProfilePlant(mo);
2154 1 break;
2155 1 }
2156 16 case openstudio::IddObjectType::OS_LifeCycleCost: {
2157
1/1
✓ Branch 1 taken 16 times.
16 auto lifeCycleCost = modelObject.cast<LifeCycleCost>();
2158
1/1
✓ Branch 1 taken 16 times.
16 retVal = translateLifeCycleCost(lifeCycleCost);
2159 16 break;
2160 16 }
2161 855 case openstudio::IddObjectType::OS_LifeCycleCost_Parameters: {
2162
1/1
✓ Branch 1 taken 855 times.
855 auto lifeCycleCostParameters = modelObject.cast<LifeCycleCostParameters>();
2163
1/1
✓ Branch 1 taken 855 times.
855 retVal = translateLifeCycleCostParameters(lifeCycleCostParameters);
2164 855 break;
2165 855 }
2166 ✗ case openstudio::IddObjectType::OS_LifeCycleCost_UsePriceEscalation: {
2167 // DLM: these objects can be created from LifeCycleCostParameters
2168 ✗ LOG(Warn, "OS:LifeCycleCost:UsePriceEscalation '" << modelObject.name().get() << "' not translated to EnergyPlus.");
2169 ✗ return retVal;
2170 }
2171 ✗ case openstudio::IddObjectType::OS_LightingDesignDay: {
2172 // no-op
2173 ✗ break;
2174 }
2175 ✗ case openstudio::IddObjectType::OS_LightingSimulationControl: {
2176 // no-op
2177 ✗ break;
2178 }
2179 ✗ case openstudio::IddObjectType::OS_LightingSimulationZone: {
2180 // no-op
2181 ✗ break;
2182 }
2183 246 case openstudio::IddObjectType::OS_Lights: {
2184
1/1
✓ Branch 1 taken 246 times.
246 auto lights = modelObject.cast<Lights>();
2185
1/1
✓ Branch 1 taken 246 times.
246 retVal = translateLights(lights);
2186 246 break;
2187 246 }
2188 94 case openstudio::IddObjectType::OS_Lights_Definition: {
2189
1/1
✓ Branch 1 taken 94 times.
94 auto definition = modelObject.cast<LightsDefinition>();
2190
1/1
✓ Branch 1 taken 94 times.
94 retVal = translateLightsDefinition(definition);
2191 94 break;
2192 94 }
2193 ✗ case openstudio::IddObjectType::OS_Luminaire: {
2194 ✗ auto luminaire = modelObject.cast<Luminaire>();
2195 ✗ retVal = translateLuminaire(luminaire);
2196 ✗ break;
2197 ✗ }
2198 ✗ case openstudio::IddObjectType::OS_Luminaire_Definition: {
2199 // no-op
2200 ✗ break;
2201 }
2202 573 case openstudio::IddObjectType::OS_Material: {
2203
1/1
✓ Branch 1 taken 573 times.
573 auto material = modelObject.cast<StandardOpaqueMaterial>();
2204
1/1
✓ Branch 1 taken 573 times.
573 retVal = translateStandardOpaqueMaterial(material);
2205 573 break;
2206 573 }
2207 77 case openstudio::IddObjectType::OS_Material_AirGap: {
2208
1/1
✓ Branch 1 taken 77 times.
77 auto material = modelObject.cast<AirGap>();
2209
1/1
✓ Branch 1 taken 77 times.
77 retVal = translateAirGap(material);
2210 77 break;
2211 77 }
2212 ✗ case openstudio::IddObjectType::OS_Material_InfraredTransparent: {
2213 ✗ auto material = modelObject.cast<InfraredTransparentMaterial>();
2214 ✗ retVal = translateInfraredTransparentMaterial(material);
2215 ✗ break;
2216 ✗ }
2217 44 case openstudio::IddObjectType::OS_Material_NoMass: {
2218
1/1
✓ Branch 1 taken 44 times.
44 auto material = modelObject.cast<MasslessOpaqueMaterial>();
2219
1/1
✓ Branch 1 taken 44 times.
44 retVal = translateMasslessOpaqueMaterial(material);
2220 44 break;
2221 44 }
2222 1 case openstudio::IddObjectType::OS_MaterialProperty_GlazingSpectralData: {
2223
1/1
✓ Branch 1 taken 1 time.
1 auto spectralData = modelObject.cast<MaterialPropertyGlazingSpectralData>();
2224
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateMaterialPropertyGlazingSpectralData(spectralData);
2225 1 break;
2226 1 }
2227 1 case openstudio::IddObjectType::OS_MaterialProperty_MoisturePenetrationDepth_Settings: {
2228
1/1
✓ Branch 1 taken 1 time.
1 auto empd = modelObject.cast<MaterialPropertyMoisturePenetrationDepthSettings>();
2229
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateMaterialPropertyMoisturePenetrationDepthSettings(empd);
2230 1 break;
2231 1 }
2232 2 case openstudio::IddObjectType::OS_MaterialProperty_PhaseChange: {
2233
1/1
✓ Branch 1 taken 2 times.
2 auto phaseChange = modelObject.cast<MaterialPropertyPhaseChange>();
2234
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateMaterialPropertyPhaseChange(phaseChange);
2235 2 break;
2236 2 }
2237 1 case openstudio::IddObjectType::OS_MaterialProperty_PhaseChangeHysteresis: {
2238
1/1
✓ Branch 1 taken 1 time.
1 auto phaseChangeHysteresis = modelObject.cast<MaterialPropertyPhaseChangeHysteresis>();
2239
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateMaterialPropertyPhaseChangeHysteresis(phaseChangeHysteresis);
2240 1 break;
2241 1 }
2242 ✗ case openstudio::IddObjectType::OS_Material_RoofVegetation: {
2243 ✗ auto material = modelObject.cast<RoofVegetation>();
2244 ✗ retVal = translateRoofVegetation(material);
2245 ✗ break;
2246 ✗ }
2247 ✗ case openstudio::IddObjectType::OS_Meter_Custom: {
2248 ✗ auto meterCustom = modelObject.cast<MeterCustom>();
2249 ✗ retVal = translateMeterCustom(meterCustom);
2250 ✗ break;
2251 ✗ }
2252 ✗ case openstudio::IddObjectType::OS_Meter_CustomDecrement: {
2253 ✗ auto meterCustomDecrement = modelObject.cast<MeterCustomDecrement>();
2254 ✗ retVal = translateMeterCustomDecrement(meterCustomDecrement);
2255 ✗ break;
2256 ✗ }
2257 ✗ case openstudio::IddObjectType::OS_ModelObjectList: {
2258 // no-op
2259 ✗ break;
2260 }
2261 6793 case openstudio::IddObjectType::OS_Node: {
2262
1/1
✓ Branch 1 taken 6793 times.
6793 auto node = modelObject.cast<Node>();
2263
1/1
✓ Branch 1 taken 6793 times.
6793 retVal = translateNode(node);
2264 6793 break;
2265 6793 }
2266 4 case openstudio::IddObjectType::OS_OtherEquipment: {
2267
1/1
✓ Branch 1 taken 4 times.
4 auto otherEquipment = modelObject.cast<OtherEquipment>();
2268
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateOtherEquipment(otherEquipment);
2269 4 break;
2270 4 }
2271 1 case openstudio::IddObjectType::OS_PhotovoltaicPerformance_EquivalentOneDiode: {
2272
1/1
✓ Branch 1 taken 1 time.
1 auto temp = modelObject.cast<PhotovoltaicPerformanceEquivalentOneDiode>();
2273
1/1
✓ Branch 1 taken 1 time.
1 retVal = translatePhotovoltaicPerformanceEquivalentOneDiode(temp);
2274 1 break;
2275 1 }
2276 1 case openstudio::IddObjectType::OS_PhotovoltaicPerformance_Sandia: {
2277
1/1
✓ Branch 1 taken 1 time.
1 auto temp = modelObject.cast<PhotovoltaicPerformanceSandia>();
2278
1/1
✓ Branch 1 taken 1 time.
1 retVal = translatePhotovoltaicPerformanceSandia(temp);
2279 1 break;
2280 1 }
2281 ✗ case openstudio::IddObjectType::OS_PhotovoltaicPerformance_Simple: {
2282 ✗ auto temp = modelObject.cast<PhotovoltaicPerformanceSimple>();
2283 ✗ retVal = translatePhotovoltaicPerformanceSimple(temp);
2284 ✗ break;
2285 ✗ }
2286 2 case openstudio::IddObjectType::OS_OtherEquipment_Definition: {
2287
1/1
✓ Branch 1 taken 2 times.
2 auto definition = modelObject.cast<OtherEquipmentDefinition>();
2288
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateOtherEquipmentDefinition(definition);
2289 2 break;
2290 2 }
2291 240 case openstudio::IddObjectType::OS_PlantLoop: {
2292
1/1
✓ Branch 1 taken 240 times.
240 auto plantLoop = modelObject.cast<PlantLoop>();
2293
1/1
✓ Branch 1 taken 240 times.
240 retVal = translatePlantLoop(plantLoop);
2294 240 break;
2295 240 }
2296 ✗ case openstudio::IddObjectType::OS_PlantComponent_TemperatureSource: {
2297 ✗ auto mo = modelObject.cast<PlantComponentTemperatureSource>();
2298 ✗ retVal = translatePlantComponentTemperatureSource(mo);
2299 ✗ break;
2300 ✗ }
2301 1 case openstudio::IddObjectType::OS_PlantComponent_UserDefined: {
2302
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<PlantComponentUserDefined>();
2303
1/1
✓ Branch 1 taken 1 time.
1 retVal = translatePlantComponentUserDefined(mo);
2304 1 break;
2305 1 }
2306 ✗ case openstudio::IddObjectType::OS_PlantEquipmentOperation_CoolingLoad: {
2307 ✗ auto mo = modelObject.cast<PlantEquipmentOperationCoolingLoad>();
2308 ✗ retVal = translatePlantEquipmentOperationCoolingLoad(mo);
2309 ✗ break;
2310 ✗ }
2311 2 case openstudio::IddObjectType::OS_PlantEquipmentOperation_HeatingLoad: {
2312
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<PlantEquipmentOperationHeatingLoad>();
2313
1/1
✓ Branch 1 taken 2 times.
2 retVal = translatePlantEquipmentOperationHeatingLoad(mo);
2314 2 break;
2315 2 }
2316 ✗ case openstudio::IddObjectType::OS_PlantEquipmentOperation_OutdoorDryBulb: {
2317 ✗ auto mo = modelObject.cast<PlantEquipmentOperationOutdoorDryBulb>();
2318 ✗ retVal = translatePlantEquipmentOperationOutdoorDryBulb(mo);
2319 ✗ break;
2320 ✗ }
2321 ✗ case openstudio::IddObjectType::OS_PlantEquipmentOperation_OutdoorWetBulb: {
2322 ✗ auto mo = modelObject.cast<PlantEquipmentOperationOutdoorWetBulb>();
2323 ✗ retVal = translatePlantEquipmentOperationOutdoorWetBulb(mo);
2324 ✗ break;
2325 ✗ }
2326 ✗ case openstudio::IddObjectType::OS_PlantEquipmentOperation_OutdoorDewpoint: {
2327 ✗ auto mo = modelObject.cast<PlantEquipmentOperationOutdoorDewpoint>();
2328 ✗ retVal = translatePlantEquipmentOperationOutdoorDewpoint(mo);
2329 ✗ break;
2330 ✗ }
2331 ✗ case openstudio::IddObjectType::OS_PlantEquipmentOperation_OutdoorDryBulbDifference: {
2332 ✗ auto mo = modelObject.cast<PlantEquipmentOperationOutdoorDryBulbDifference>();
2333 ✗ retVal = translatePlantEquipmentOperationOutdoorDryBulbDifference(mo);
2334 ✗ break;
2335 ✗ }
2336 ✗ case openstudio::IddObjectType::OS_PlantEquipmentOperation_OutdoorWetBulbDifference: {
2337 ✗ auto mo = modelObject.cast<PlantEquipmentOperationOutdoorWetBulbDifference>();
2338 ✗ retVal = translatePlantEquipmentOperationOutdoorWetBulbDifference(mo);
2339 ✗ break;
2340 ✗ }
2341 ✗ case openstudio::IddObjectType::OS_PlantEquipmentOperation_OutdoorDewpointDifference: {
2342 ✗ auto mo = modelObject.cast<PlantEquipmentOperationOutdoorDewpointDifference>();
2343 ✗ retVal = translatePlantEquipmentOperationOutdoorDewpointDifference(mo);
2344 ✗ break;
2345 ✗ }
2346 ✗ case openstudio::IddObjectType::OS_PlantEquipmentOperation_OutdoorRelativeHumidity: {
2347 ✗ auto mo = modelObject.cast<PlantEquipmentOperationOutdoorRelativeHumidity>();
2348 ✗ retVal = translatePlantEquipmentOperationOutdoorRelativeHumidity(mo);
2349 ✗ break;
2350 ✗ }
2351 10 case openstudio::IddObjectType::OS_Pump_ConstantSpeed: {
2352
1/1
✓ Branch 1 taken 10 times.
10 auto pump = modelObject.cast<PumpConstantSpeed>();
2353
1/1
✓ Branch 1 taken 10 times.
10 retVal = translatePumpConstantSpeed(pump);
2354 10 break;
2355 10 }
2356 4 case openstudio::IddObjectType::OS_Pump_VariableSpeed: {
2357
1/1
✓ Branch 1 taken 4 times.
4 auto pump = modelObject.cast<PumpVariableSpeed>();
2358
1/1
✓ Branch 1 taken 4 times.
4 retVal = translatePumpVariableSpeed(pump);
2359 4 break;
2360 4 }
2361 32 case openstudio::IddObjectType::OS_OutputControl_Files: {
2362
1/1
✓ Branch 1 taken 32 times.
32 auto outputControlFiles = modelObject.cast<OutputControlFiles>();
2363
1/1
✓ Branch 1 taken 32 times.
32 retVal = translateOutputControlFiles(outputControlFiles);
2364 32 break;
2365 32 }
2366 11 case openstudio::IddObjectType::OS_OutputControl_ReportingTolerances: {
2367
1/1
✓ Branch 1 taken 11 times.
11 auto outputControlReportingTolerances = modelObject.cast<OutputControlReportingTolerances>();
2368
1/1
✓ Branch 1 taken 11 times.
11 retVal = translateOutputControlReportingTolerances(outputControlReportingTolerances);
2369 11 break;
2370 11 }
2371 2 case openstudio::IddObjectType::OS_OutputControl_ResilienceSummaries: {
2372
1/1
✓ Branch 1 taken 2 times.
2 auto outputControlResilienceSummaries = modelObject.cast<OutputControlResilienceSummaries>();
2373
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateOutputControlResilienceSummaries(outputControlResilienceSummaries);
2374 2 break;
2375 2 }
2376 5 case openstudio::IddObjectType::OS_OutputControl_Table_Style: {
2377
1/1
✓ Branch 1 taken 5 times.
5 auto outputControlTableStyle = modelObject.cast<OutputControlTableStyle>();
2378
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateOutputControlTableStyle(outputControlTableStyle);
2379 5 break;
2380 5 }
2381 2 case openstudio::IddObjectType::OS_OutputControl_Timestamp: {
2382
1/1
✓ Branch 1 taken 2 times.
2 auto outputControlTimestamp = modelObject.cast<OutputControlTimestamp>();
2383
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateOutputControlTimestamp(outputControlTimestamp);
2384 2 break;
2385 2 }
2386 2 case openstudio::IddObjectType::OS_Output_DebuggingData: {
2387
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<OutputDebuggingData>();
2388
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateOutputDebuggingData(mo);
2389 2 break;
2390 2 }
2391 3 case openstudio::IddObjectType::OS_Output_Diagnostics: {
2392
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<OutputDiagnostics>();
2393
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateOutputDiagnostics(mo);
2394 3 break;
2395 3 }
2396 5 case openstudio::IddObjectType::OS_Output_JSON: {
2397
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<OutputJSON>();
2398
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateOutputJSON(mo);
2399 5 break;
2400 5 }
2401 3 case openstudio::IddObjectType::OS_Output_SQLite: {
2402
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<OutputSQLite>();
2403
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateOutputSQLite(mo);
2404 3 break;
2405 3 }
2406 2 case openstudio::IddObjectType::OS_Output_Schedules: {
2407
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<OutputSchedules>();
2408
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateOutputSchedules(mo);
2409 2 break;
2410 2 }
2411 5 case openstudio::IddObjectType::OS_Output_Constructions: {
2412
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<OutputConstructions>();
2413
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateOutputConstructions(mo);
2414 5 break;
2415 5 }
2416 5 case openstudio::IddObjectType::OS_Output_EnvironmentalImpactFactors: {
2417
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<OutputEnvironmentalImpactFactors>();
2418
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateOutputEnvironmentalImpactFactors(mo);
2419 5 break;
2420 5 }
2421 2 case openstudio::IddObjectType::OS_EnvironmentalImpactFactors: {
2422
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<EnvironmentalImpactFactors>();
2423
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateEnvironmentalImpactFactors(mo);
2424 2 break;
2425 2 }
2426 5 case openstudio::IddObjectType::OS_FuelFactors: {
2427
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<FuelFactors>();
2428
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateFuelFactors(mo);
2429 5 break;
2430 5 }
2431 397 case openstudio::IddObjectType::OS_Output_Meter: {
2432
1/1
✓ Branch 1 taken 397 times.
397 auto meter = modelObject.cast<OutputMeter>();
2433
1/1
✓ Branch 1 taken 397 times.
397 retVal = translateOutputMeter(meter);
2434 397 break;
2435 397 }
2436 148 case openstudio::IddObjectType::OS_Output_Variable: {
2437
1/1
✓ Branch 1 taken 148 times.
148 auto outputVariable = modelObject.cast<OutputVariable>();
2438
1/1
✓ Branch 1 taken 148 times.
148 retVal = translateOutputVariable(outputVariable);
2439 148 break;
2440 148 }
2441 10 case openstudio::IddObjectType::OS_Output_EnergyManagementSystem: {
2442
1/1
✓ Branch 1 taken 10 times.
10 auto outputEnergyManagementSystem = modelObject.cast<OutputEnergyManagementSystem>();
2443
1/1
✓ Branch 1 taken 10 times.
10 retVal = translateOutputEnergyManagementSystem(outputEnergyManagementSystem);
2444 10 break;
2445 10 }
2446 844 case openstudio::IddObjectType::OS_Output_Table_SummaryReports: {
2447
1/1
✓ Branch 1 taken 844 times.
844 auto summaryReports = modelObject.cast<OutputTableSummaryReports>();
2448
1/1
✓ Branch 1 taken 844 times.
844 retVal = translateOutputTableSummaryReports(summaryReports);
2449 844 break;
2450 844 }
2451 2 case openstudio::IddObjectType::OS_Output_Table_Annual: {
2452
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<OutputTableAnnual>();
2453
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateOutputTableAnnual(mo);
2454 2 break;
2455 2 }
2456 27 case openstudio::IddObjectType::OS_Output_Table_Monthly: {
2457
1/1
✓ Branch 1 taken 27 times.
27 auto mo = modelObject.cast<OutputTableMonthly>();
2458
1/1
✓ Branch 1 taken 27 times.
27 retVal = translateOutputTableMonthly(mo);
2459 27 break;
2460 27 }
2461 119 case openstudio::IddObjectType::OS_People: {
2462
1/1
✓ Branch 1 taken 119 times.
119 auto people = modelObject.cast<People>();
2463
1/1
✓ Branch 1 taken 119 times.
119 retVal = translatePeople(people);
2464 119 break;
2465 119 }
2466 61 case openstudio::IddObjectType::OS_People_Definition: {
2467
1/1
✓ Branch 1 taken 61 times.
61 auto definition = modelObject.cast<PeopleDefinition>();
2468
1/1
✓ Branch 1 taken 61 times.
61 retVal = translatePeopleDefinition(definition);
2469 61 break;
2470 61 }
2471 1 case openstudio::IddObjectType::OS_PerformancePrecisionTradeoffs: {
2472
1/1
✓ Branch 1 taken 1 time.
1 auto performancePrecisionTradeoffs = modelObject.cast<PerformancePrecisionTradeoffs>();
2473
1/1
✓ Branch 1 taken 1 time.
1 retVal = translatePerformancePrecisionTradeoffs(performancePrecisionTradeoffs);
2474 1 break;
2475 1 }
2476 10 case openstudio::IddObjectType::OS_Pipe_Adiabatic: {
2477
1/1
✓ Branch 1 taken 10 times.
10 auto pipe = modelObject.cast<PipeAdiabatic>();
2478
1/1
✓ Branch 1 taken 10 times.
10 retVal = translatePipeAdiabatic(pipe);
2479 10 break;
2480 10 }
2481 ✗ case openstudio::IddObjectType::OS_Pipe_Indoor: {
2482 ✗ auto pipe = modelObject.cast<PipeIndoor>();
2483 ✗ retVal = translatePipeIndoor(pipe);
2484 ✗ break;
2485 ✗ }
2486 ✗ case openstudio::IddObjectType::OS_Pipe_Outdoor: {
2487 ✗ auto pipe = modelObject.cast<PipeOutdoor>();
2488 ✗ retVal = translatePipeOutdoor(pipe);
2489 ✗ break;
2490 ✗ }
2491 236 case openstudio::IddObjectType::OS_PortList: {
2492
1/1
✓ Branch 1 taken 236 times.
236 auto portList = modelObject.cast<PortList>();
2493
1/1
✓ Branch 1 taken 236 times.
236 retVal = translatePortList(portList);
2494 236 break;
2495 236 }
2496 10 case openstudio::IddObjectType::OS_ProgramControl: {
2497
5/5
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
✓ Branch 13 taken 10 times.
10 LOG(Warn, "OS_ProgramControl is not currently translated");
2498 10 break;
2499 }
2500 6 case openstudio::IddObjectType::OS_PythonPlugin_Instance: {
2501
1/1
✓ Branch 1 taken 6 times.
6 auto obj = modelObject.cast<PythonPluginInstance>();
2502
1/1
✓ Branch 1 taken 6 times.
6 retVal = translatePythonPluginInstance(obj);
2503 6 break;
2504 6 }
2505 8 case openstudio::IddObjectType::OS_PythonPlugin_Variable: {
2506
1/1
✓ Branch 1 taken 8 times.
8 auto obj = modelObject.cast<PythonPluginVariable>();
2507
1/1
✓ Branch 1 taken 8 times.
8 retVal = translatePythonPluginVariable(obj);
2508 8 break;
2509 8 }
2510 3 case openstudio::IddObjectType::OS_PythonPlugin_TrendVariable: {
2511
1/1
✓ Branch 1 taken 3 times.
3 auto obj = modelObject.cast<PythonPluginTrendVariable>();
2512
1/1
✓ Branch 1 taken 3 times.
3 retVal = translatePythonPluginTrendVariable(obj);
2513 3 break;
2514 3 }
2515 5 case openstudio::IddObjectType::OS_PythonPlugin_OutputVariable: {
2516
1/1
✓ Branch 1 taken 5 times.
5 auto obj = modelObject.cast<PythonPluginOutputVariable>();
2517
1/1
✓ Branch 1 taken 5 times.
5 retVal = translatePythonPluginOutputVariable(obj);
2518 5 break;
2519 5 }
2520 4 case openstudio::IddObjectType::OS_PythonPlugin_SearchPaths: {
2521
1/1
✓ Branch 1 taken 4 times.
4 auto obj = modelObject.cast<PythonPluginSearchPaths>();
2522
1/1
✓ Branch 1 taken 4 times.
4 retVal = translatePythonPluginSearchPaths(obj);
2523 4 break;
2524 4 }
2525 ✗ case openstudio::IddObjectType::OS_RadianceParameters: {
2526 // no-op
2527 ✗ break;
2528 }
2529 ✗ case openstudio::IddObjectType::OS_Refrigeration_AirChiller: {
2530 ✗ auto refrigerationAirChiller = modelObject.cast<RefrigerationAirChiller>();
2531 ✗ retVal = translateRefrigerationAirChiller(refrigerationAirChiller);
2532 ✗ break;
2533 ✗ }
2534 ✗ case openstudio::IddObjectType::OS_Refrigeration_Case: {
2535 ✗ auto refrigerationCase = modelObject.cast<RefrigerationCase>();
2536 ✗ retVal = translateRefrigerationCase(refrigerationCase);
2537 ✗ break;
2538 ✗ }
2539 ✗ case openstudio::IddObjectType::OS_Refrigeration_Compressor: {
2540 ✗ auto refrigerationCompressor = modelObject.cast<RefrigerationCompressor>();
2541 ✗ retVal = translateRefrigerationCompressor(refrigerationCompressor);
2542 ✗ break;
2543 ✗ }
2544 ✗ case openstudio::IddObjectType::OS_Refrigeration_CompressorRack: {
2545 ✗ auto refrigerationCompressorRack = modelObject.cast<RefrigerationCompressorRack>();
2546 ✗ retVal = translateRefrigerationCompressorRack(refrigerationCompressorRack);
2547 ✗ break;
2548 ✗ }
2549 1 case openstudio::IddObjectType::OS_Refrigeration_Condenser_AirCooled: {
2550
1/1
✓ Branch 1 taken 1 time.
1 auto refrigerationCondenserAirCooled = modelObject.cast<RefrigerationCondenserAirCooled>();
2551
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateRefrigerationCondenserAirCooled(refrigerationCondenserAirCooled);
2552 1 break;
2553 1 }
2554 ✗ case openstudio::IddObjectType::OS_Refrigeration_Condenser_Cascade: {
2555 ✗ auto refrigerationCondenserCascade = modelObject.cast<RefrigerationCondenserCascade>();
2556 ✗ retVal = translateRefrigerationCondenserCascade(refrigerationCondenserCascade);
2557 ✗ break;
2558 ✗ }
2559 1 case openstudio::IddObjectType::OS_Refrigeration_Condenser_EvaporativeCooled: {
2560
1/1
✓ Branch 1 taken 1 time.
1 auto refrigerationCondenserEvaporativeCooled = modelObject.cast<RefrigerationCondenserEvaporativeCooled>();
2561
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateRefrigerationCondenserEvaporativeCooled(refrigerationCondenserEvaporativeCooled);
2562 1 break;
2563 1 }
2564 1 case openstudio::IddObjectType::OS_Refrigeration_Condenser_WaterCooled: {
2565
1/1
✓ Branch 1 taken 1 time.
1 auto refrigerationCondenserWaterCooled = modelObject.cast<RefrigerationCondenserWaterCooled>();
2566
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateRefrigerationCondenserWaterCooled(refrigerationCondenserWaterCooled);
2567 1 break;
2568 1 }
2569 ✗ case openstudio::IddObjectType::OS_Refrigeration_DefrostCycleParameters: {
2570 // DLM: is this a no-op?
2571 ✗ break;
2572 }
2573 ✗ case openstudio::IddObjectType::OS_Refrigeration_GasCooler_AirCooled: {
2574 ✗ auto refrigerationGasCoolerAirCooled = modelObject.cast<RefrigerationGasCoolerAirCooled>();
2575 ✗ retVal = translateRefrigerationGasCoolerAirCooled(refrigerationGasCoolerAirCooled);
2576 ✗ break;
2577 ✗ }
2578 ✗ case openstudio::IddObjectType::OS_Refrigeration_Subcooler_LiquidSuction: {
2579 ✗ auto refrigerationSubcoolerLiquidSuction = modelObject.cast<RefrigerationSubcoolerLiquidSuction>();
2580 ✗ retVal = translateRefrigerationSubcoolerLiquidSuction(refrigerationSubcoolerLiquidSuction);
2581 ✗ break;
2582 ✗ }
2583 ✗ case openstudio::IddObjectType::OS_Refrigeration_Subcooler_Mechanical: {
2584 ✗ auto refrigerationSubcoolerMechanical = modelObject.cast<RefrigerationSubcoolerMechanical>();
2585 ✗ retVal = translateRefrigerationSubcoolerMechanical(refrigerationSubcoolerMechanical);
2586 ✗ break;
2587 ✗ }
2588 ✗ case openstudio::IddObjectType::OS_Refrigeration_SecondarySystem: {
2589 ✗ auto refrigerationSecondarySystem = modelObject.cast<RefrigerationSecondarySystem>();
2590 ✗ retVal = translateRefrigerationSecondarySystem(refrigerationSecondarySystem);
2591 ✗ break;
2592 ✗ }
2593 ✗ case openstudio::IddObjectType::OS_Refrigeration_System: {
2594 ✗ auto refrigerationSystem = modelObject.cast<RefrigerationSystem>();
2595 ✗ retVal = translateRefrigerationSystem(refrigerationSystem);
2596 ✗ break;
2597 ✗ }
2598 ✗ case openstudio::IddObjectType::OS_Refrigeration_TranscriticalSystem: {
2599 ✗ auto refrigerationTranscriticalSystem = modelObject.cast<RefrigerationTranscriticalSystem>();
2600 ✗ retVal = translateRefrigerationTranscriticalSystem(refrigerationTranscriticalSystem);
2601 ✗ break;
2602 ✗ }
2603 ✗ case openstudio::IddObjectType::OS_Refrigeration_WalkIn: {
2604 ✗ auto refrigerationWalkIn = modelObject.cast<RefrigerationWalkIn>();
2605 ✗ retVal = translateRefrigerationWalkIn(refrigerationWalkIn);
2606 ✗ break;
2607 ✗ }
2608 ✗ case openstudio::IddObjectType::OS_Refrigeration_WalkIn_ZoneBoundary: {
2609 // DLM: is this a no-op
2610 ✗ break;
2611 }
2612 250 case openstudio::IddObjectType::OS_Rendering_Color: {
2613 // no-op
2614 250 return retVal;
2615 }
2616 856 case openstudio::IddObjectType::OS_RunPeriod: {
2617
1/1
✓ Branch 1 taken 856 times.
856 auto runPeriod = modelObject.cast<RunPeriod>();
2618
1/1
✓ Branch 1 taken 856 times.
856 retVal = translateRunPeriod(runPeriod);
2619 856 break;
2620 856 }
2621 4 case openstudio::IddObjectType::OS_RunPeriodControl_DaylightSavingTime: {
2622
1/1
✓ Branch 1 taken 4 times.
4 auto mo = modelObject.cast<RunPeriodControlDaylightSavingTime>();
2623
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateRunPeriodControlDaylightSavingTime(mo);
2624 4 break;
2625 4 }
2626 13 case openstudio::IddObjectType::OS_RunPeriodControl_SpecialDays: {
2627
1/1
✓ Branch 1 taken 13 times.
13 auto mo = modelObject.cast<RunPeriodControlSpecialDays>();
2628
1/1
✓ Branch 1 taken 13 times.
13 retVal = translateRunPeriodControlSpecialDays(mo);
2629 13 break;
2630 13 }
2631 94 case openstudio::IddObjectType::OS_Schedule_Compact: {
2632
1/1
✓ Branch 1 taken 94 times.
94 auto schedule = modelObject.cast<ScheduleCompact>();
2633
1/1
✓ Branch 1 taken 94 times.
94 retVal = translateScheduleCompact(schedule);
2634 94 break;
2635 94 }
2636 3029 case openstudio::IddObjectType::OS_Schedule_Constant: {
2637
1/1
✓ Branch 1 taken 3029 times.
3029 auto schedule = modelObject.cast<ScheduleConstant>();
2638
1/1
✓ Branch 1 taken 3029 times.
3029 retVal = translateScheduleConstant(schedule);
2639 3029 break;
2640 3029 }
2641 2663 case openstudio::IddObjectType::OS_Schedule_Day: {
2642
1/1
✓ Branch 1 taken 2663 times.
2663 auto schedule = modelObject.cast<ScheduleDay>();
2643
1/1
✓ Branch 1 taken 2663 times.
2663 retVal = translateScheduleDay(schedule);
2644 2663 break;
2645 2663 }
2646 9 case openstudio::IddObjectType::OS_Schedule_FixedInterval: {
2647
1/1
✓ Branch 1 taken 9 times.
9 auto schedule = modelObject.cast<ScheduleFixedInterval>();
2648
1/1
✓ Branch 1 taken 9 times.
9 retVal = translateScheduleFixedInterval(schedule);
2649 9 break;
2650 9 }
2651 5 case openstudio::IddObjectType::OS_Schedule_File: {
2652
1/1
✓ Branch 1 taken 5 times.
5 auto schedule = modelObject.cast<ScheduleFile>();
2653
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateScheduleFile(schedule);
2654 5 break;
2655 5 }
2656 ✗ case openstudio::IddObjectType::OS_Schedule_Rule: {
2657 // no-op
2658 ✗ break;
2659 }
2660 618 case openstudio::IddObjectType::OS_Schedule_Ruleset: {
2661
1/1
✓ Branch 1 taken 618 times.
618 auto mo = modelObject.cast<ScheduleRuleset>();
2662
1/1
✓ Branch 1 taken 618 times.
618 retVal = translateScheduleRuleset(mo);
2663 618 break;
2664 618 }
2665 3186 case openstudio::IddObjectType::OS_ScheduleTypeLimits: {
2666
1/1
✓ Branch 1 taken 3186 times.
3186 auto mo = modelObject.cast<ScheduleTypeLimits>();
2667
1/1
✓ Branch 1 taken 3186 times.
3186 retVal = translateScheduleTypeLimits(mo);
2668 3186 break;
2669 3186 }
2670 21 case openstudio::IddObjectType::OS_Schedule_Week: {
2671
1/1
✓ Branch 1 taken 21 times.
21 auto schedule = modelObject.cast<ScheduleWeek>();
2672
1/1
✓ Branch 1 taken 21 times.
21 retVal = translateScheduleWeek(schedule);
2673 21 break;
2674 21 }
2675 10 case openstudio::IddObjectType::OS_Schedule_Year: {
2676
1/1
✓ Branch 1 taken 10 times.
10 auto schedule = modelObject.cast<ScheduleYear>();
2677
1/1
✓ Branch 1 taken 10 times.
10 retVal = translateScheduleYear(schedule);
2678 10 break;
2679 10 }
2680 2 case openstudio::IddObjectType::OS_Schedule_VariableInterval: {
2681
1/1
✓ Branch 1 taken 2 times.
2 auto schedule = modelObject.cast<ScheduleVariableInterval>();
2682
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateScheduleVariableInterval(schedule);
2683 2 break;
2684 2 }
2685 ✗ case openstudio::IddObjectType::OS_SetpointManager_Coldest: {
2686 ✗ auto spm = modelObject.cast<SetpointManagerColdest>();
2687 ✗ retVal = translateSetpointManagerColdest(spm);
2688 ✗ break;
2689 ✗ }
2690 1 case openstudio::IddObjectType::OS_SetpointManager_FollowGroundTemperature: {
2691
1/1
✓ Branch 1 taken 1 time.
1 auto spm = modelObject.cast<SetpointManagerFollowGroundTemperature>();
2692
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSetpointManagerFollowGroundTemperature(spm);
2693 1 break;
2694 1 }
2695 ✗ case openstudio::IddObjectType::OS_SetpointManager_FollowOutdoorAirTemperature: {
2696 ✗ auto spm = modelObject.cast<SetpointManagerFollowOutdoorAirTemperature>();
2697 ✗ retVal = translateSetpointManagerFollowOutdoorAirTemperature(spm);
2698 ✗ break;
2699 ✗ }
2700 ✗ case openstudio::IddObjectType::OS_SetpointManager_FollowSystemNodeTemperature: {
2701 ✗ auto spm = modelObject.cast<SetpointManagerFollowSystemNodeTemperature>();
2702 ✗ retVal = translateSetpointManagerFollowSystemNodeTemperature(spm);
2703 ✗ break;
2704 ✗ }
2705 121 case openstudio::IddObjectType::OS_SetpointManager_MixedAir: {
2706
1/1
✓ Branch 1 taken 121 times.
121 auto spm = modelObject.cast<SetpointManagerMixedAir>();
2707
1/1
✓ Branch 1 taken 121 times.
121 retVal = translateSetpointManagerMixedAir(spm);
2708 121 break;
2709 121 }
2710 ✗ case openstudio::IddObjectType::OS_SetpointManager_MultiZone_Cooling_Average: {
2711 ✗ auto spm = modelObject.cast<SetpointManagerMultiZoneCoolingAverage>();
2712 ✗ retVal = translateSetpointManagerMultiZoneCoolingAverage(spm);
2713 ✗ break;
2714 ✗ }
2715 ✗ case openstudio::IddObjectType::OS_SetpointManager_MultiZone_Heating_Average: {
2716 ✗ auto spm = modelObject.cast<SetpointManagerMultiZoneHeatingAverage>();
2717 ✗ retVal = translateSetpointManagerMultiZoneHeatingAverage(spm);
2718 ✗ break;
2719 ✗ }
2720 ✗ case openstudio::IddObjectType::OS_SetpointManager_MultiZone_Humidity_Maximum: {
2721 ✗ auto spm = modelObject.cast<SetpointManagerMultiZoneHumidityMaximum>();
2722 ✗ retVal = translateSetpointManagerMultiZoneHumidityMaximum(spm);
2723 ✗ break;
2724 ✗ }
2725 ✗ case openstudio::IddObjectType::OS_SetpointManager_MultiZone_Humidity_Minimum: {
2726 ✗ auto spm = modelObject.cast<SetpointManagerMultiZoneHumidityMinimum>();
2727 ✗ retVal = translateSetpointManagerMultiZoneHumidityMinimum(spm);
2728 ✗ break;
2729 ✗ }
2730 ✗ case openstudio::IddObjectType::OS_SetpointManager_MultiZone_MaximumHumidity_Average: {
2731 ✗ auto spm = modelObject.cast<SetpointManagerMultiZoneMaximumHumidityAverage>();
2732 ✗ retVal = translateSetpointManagerMultiZoneMaximumHumidityAverage(spm);
2733 ✗ break;
2734 ✗ }
2735 ✗ case openstudio::IddObjectType::OS_SetpointManager_MultiZone_MinimumHumidity_Average: {
2736 ✗ auto spm = modelObject.cast<SetpointManagerMultiZoneMinimumHumidityAverage>();
2737 ✗ retVal = translateSetpointManagerMultiZoneMinimumHumidityAverage(spm);
2738 ✗ break;
2739 ✗ }
2740 ✗ case openstudio::IddObjectType::OS_SetpointManager_OutdoorAirPretreat: {
2741 ✗ auto spm = modelObject.cast<SetpointManagerOutdoorAirPretreat>();
2742 ✗ retVal = translateSetpointManagerOutdoorAirPretreat(spm);
2743 ✗ break;
2744 ✗ }
2745 1 case openstudio::IddObjectType::OS_SetpointManager_OutdoorAirReset: {
2746
1/1
✓ Branch 1 taken 1 time.
1 auto spm = modelObject.cast<SetpointManagerOutdoorAirReset>();
2747
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSetpointManagerOutdoorAirReset(spm);
2748 1 break;
2749 1 }
2750 19 case openstudio::IddObjectType::OS_SetpointManager_Scheduled: {
2751
1/1
✓ Branch 1 taken 19 times.
19 auto spm = modelObject.cast<SetpointManagerScheduled>();
2752
1/1
✓ Branch 1 taken 19 times.
19 retVal = translateSetpointManagerScheduled(spm);
2753 19 break;
2754 19 }
2755 ✗ case openstudio::IddObjectType::OS_SetpointManager_Scheduled_DualSetpoint: {
2756 ✗ auto spm = modelObject.cast<SetpointManagerScheduledDualSetpoint>();
2757 ✗ retVal = translateSetpointManagerScheduledDualSetpoint(spm);
2758 ✗ break;
2759 ✗ }
2760 ✗ case openstudio::IddObjectType::OS_SetpointManager_SingleZone_Cooling: {
2761 ✗ auto spm = modelObject.cast<SetpointManagerSingleZoneCooling>();
2762 ✗ retVal = translateSetpointManagerSingleZoneCooling(spm);
2763 ✗ break;
2764 ✗ }
2765 ✗ case openstudio::IddObjectType::OS_SetpointManager_SingleZone_Heating: {
2766 ✗ auto spm = modelObject.cast<SetpointManagerSingleZoneHeating>();
2767 ✗ retVal = translateSetpointManagerSingleZoneHeating(spm);
2768 ✗ break;
2769 ✗ }
2770 ✗ case openstudio::IddObjectType::OS_SetpointManager_SingleZone_Humidity_Maximum: {
2771 ✗ auto spm = modelObject.cast<SetpointManagerSingleZoneHumidityMaximum>();
2772 ✗ retVal = translateSetpointManagerSingleZoneHumidityMaximum(spm);
2773 ✗ break;
2774 ✗ }
2775 1 case openstudio::IddObjectType::OS_SetpointManager_SingleZone_Humidity_Minimum: {
2776
1/1
✓ Branch 1 taken 1 time.
1 auto spm = modelObject.cast<SetpointManagerSingleZoneHumidityMinimum>();
2777
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSetpointManagerSingleZoneHumidityMinimum(spm);
2778 1 break;
2779 1 }
2780 ✗ case openstudio::IddObjectType::OS_SetpointManager_SingleZone_OneStageCooling: {
2781 ✗ auto spm = modelObject.cast<SetpointManagerSingleZoneOneStageCooling>();
2782 ✗ retVal = translateSetpointManagerSingleZoneOneStageCooling(spm);
2783 ✗ break;
2784 ✗ }
2785 ✗ case openstudio::IddObjectType::OS_SetpointManager_SingleZone_OneStageHeating: {
2786 ✗ auto spm = modelObject.cast<SetpointManagerSingleZoneOneStageHeating>();
2787 ✗ retVal = translateSetpointManagerSingleZoneOneStageHeating(spm);
2788 ✗ break;
2789 ✗ }
2790 58 case openstudio::IddObjectType::OS_SetpointManager_SingleZone_Reheat: {
2791
1/1
✓ Branch 1 taken 58 times.
58 auto spm = modelObject.cast<SetpointManagerSingleZoneReheat>();
2792
1/1
✓ Branch 1 taken 58 times.
58 retVal = translateSetpointManagerSingleZoneReheat(spm);
2793 58 break;
2794 58 }
2795 ✗ case openstudio::IddObjectType::OS_SetpointManager_Warmest: {
2796 ✗ auto spm = modelObject.cast<SetpointManagerWarmest>();
2797 ✗ retVal = translateSetpointManagerWarmest(spm);
2798 ✗ break;
2799 ✗ }
2800 ✗ case openstudio::IddObjectType::OS_SetpointManager_WarmestTemperatureFlow: {
2801 ✗ auto spm = modelObject.cast<SetpointManagerWarmestTemperatureFlow>();
2802 ✗ retVal = translateSetpointManagerWarmestTemperatureFlow(spm);
2803 ✗ break;
2804 ✗ }
2805 1 case openstudio::IddObjectType::OS_SetpointManager_SystemNodeReset_Humidity: {
2806
1/1
✓ Branch 1 taken 1 time.
1 auto spm = modelObject.cast<SetpointManagerSystemNodeResetHumidity>();
2807
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSetpointManagerSystemNodeResetHumidity(spm);
2808 1 break;
2809 1 }
2810 1 case openstudio::IddObjectType::OS_SetpointManager_SystemNodeReset_Temperature: {
2811
1/1
✓ Branch 1 taken 1 time.
1 auto spm = modelObject.cast<SetpointManagerSystemNodeResetTemperature>();
2812
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSetpointManagerSystemNodeResetTemperature(spm);
2813 1 break;
2814 1 }
2815 4 case openstudio::IddObjectType::OS_ShadingControl: {
2816
1/1
✓ Branch 1 taken 4 times.
4 auto shadingControl = modelObject.cast<ShadingControl>();
2817
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateShadingControl(shadingControl);
2818 4 break;
2819 4 }
2820 404 case openstudio::IddObjectType::OS_ShadingSurface: {
2821
1/1
✓ Branch 1 taken 404 times.
404 auto shadingSurface = modelObject.cast<ShadingSurface>();
2822
1/1
✓ Branch 1 taken 404 times.
404 retVal = translateShadingSurface(shadingSurface);
2823 404 break;
2824 404 }
2825 468 case openstudio::IddObjectType::OS_ShadingSurfaceGroup: {
2826
1/1
✓ Branch 1 taken 468 times.
468 auto shadingSurfaceGroup = modelObject.cast<ShadingSurfaceGroup>();
2827
1/1
✓ Branch 1 taken 468 times.
468 retVal = translateShadingSurfaceGroup(shadingSurfaceGroup);
2828 468 break;
2829 468 }
2830 52 case openstudio::IddObjectType::OS_ShadowCalculation: {
2831
1/1
✓ Branch 1 taken 52 times.
52 auto mo = modelObject.cast<ShadowCalculation>();
2832
1/1
✓ Branch 1 taken 52 times.
52 retVal = translateShadowCalculation(mo);
2833 52 break;
2834 52 }
2835 856 case openstudio::IddObjectType::OS_SimulationControl: {
2836
1/1
✓ Branch 1 taken 856 times.
856 auto simulationControl = modelObject.cast<SimulationControl>();
2837
1/1
✓ Branch 1 taken 856 times.
856 retVal = translateSimulationControl(simulationControl);
2838 856 break;
2839 856 }
2840 774 case openstudio::IddObjectType::OS_Space: {
2841
1/1
✓ Branch 1 taken 774 times.
774 auto space = modelObject.cast<Space>();
2842
1/1
✓ Branch 1 taken 774 times.
774 retVal = translateSpace(space);
2843 774 break;
2844 774 }
2845 70 case openstudio::IddObjectType::OS_SpaceInfiltration_DesignFlowRate: {
2846
1/1
✓ Branch 1 taken 70 times.
70 auto spaceInfiltrationDesignFlowRate = modelObject.cast<SpaceInfiltrationDesignFlowRate>();
2847
1/1
✓ Branch 1 taken 70 times.
70 retVal = translateSpaceInfiltrationDesignFlowRate(spaceInfiltrationDesignFlowRate);
2848 70 break;
2849 70 }
2850 14 case openstudio::IddObjectType::OS_SpaceInfiltration_EffectiveLeakageArea: {
2851
1/1
✓ Branch 1 taken 14 times.
14 auto spaceInfiltrationEffectiveLeakageArea = modelObject.cast<SpaceInfiltrationEffectiveLeakageArea>();
2852
1/1
✓ Branch 1 taken 14 times.
14 retVal = translateSpaceInfiltrationEffectiveLeakageArea(spaceInfiltrationEffectiveLeakageArea);
2853 14 break;
2854 14 }
2855 15 case openstudio::IddObjectType::OS_SpaceInfiltration_FlowCoefficient: {
2856
1/1
✓ Branch 1 taken 15 times.
15 auto spaceInfiltrationFlowCoefficient = modelObject.cast<SpaceInfiltrationFlowCoefficient>();
2857
1/1
✓ Branch 1 taken 15 times.
15 retVal = translateSpaceInfiltrationFlowCoefficient(spaceInfiltrationFlowCoefficient);
2858 15 break;
2859 15 }
2860 202 case openstudio::IddObjectType::OS_SpaceType: {
2861
1/1
✓ Branch 1 taken 202 times.
202 auto spaceType = modelObject.cast<SpaceType>();
2862
1/1
✓ Branch 1 taken 202 times.
202 retVal = translateSpaceType(spaceType);
2863 202 break;
2864 202 }
2865 51 case openstudio::IddObjectType::OS_Site: {
2866
1/1
✓ Branch 1 taken 51 times.
51 auto site = modelObject.cast<Site>();
2867
1/1
✓ Branch 1 taken 51 times.
51 retVal = translateSite(site);
2868 51 break;
2869 51 }
2870 1 case openstudio::IddObjectType::OS_Site_GroundReflectance: {
2871
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SiteGroundReflectance>();
2872
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSiteGroundReflectance(mo);
2873 1 break;
2874 1 }
2875 35 case openstudio::IddObjectType::OS_Site_GroundTemperature_BuildingSurface: {
2876
1/1
✓ Branch 1 taken 35 times.
35 auto mo = modelObject.cast<SiteGroundTemperatureBuildingSurface>();
2877
1/1
✓ Branch 1 taken 35 times.
35 retVal = translateSiteGroundTemperatureBuildingSurface(mo);
2878 35 break;
2879 35 }
2880 35 case openstudio::IddObjectType::OS_Site_GroundTemperature_Deep: {
2881
1/1
✓ Branch 1 taken 35 times.
35 auto mo = modelObject.cast<SiteGroundTemperatureDeep>();
2882
1/1
✓ Branch 1 taken 35 times.
35 retVal = translateSiteGroundTemperatureDeep(mo);
2883 35 break;
2884 35 }
2885 1 case openstudio::IddObjectType::OS_Site_GroundTemperature_FCfactorMethod: {
2886
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SiteGroundTemperatureFCfactorMethod>();
2887
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSiteGroundTemperatureFCfactorMethod(mo);
2888 1 break;
2889 1 }
2890 1 case openstudio::IddObjectType::OS_Site_GroundTemperature_Shallow: {
2891
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SiteGroundTemperatureShallow>();
2892
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSiteGroundTemperatureShallow(mo);
2893 1 break;
2894 1 }
2895 3 case openstudio::IddObjectType::OS_Site_GroundTemperature_Undisturbed_KusudaAchenbach: {
2896
1/1
✓ Branch 1 taken 3 times.
3 model::SiteGroundTemperatureUndisturbedKusudaAchenbach mo = modelObject.cast<SiteGroundTemperatureUndisturbedKusudaAchenbach>();
2897
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateSiteGroundTemperatureUndisturbedKusudaAchenbach(mo);
2898 3 break;
2899 3 }
2900 1 case openstudio::IddObjectType::OS_Site_GroundTemperature_Undisturbed_Xing: {
2901
1/1
✓ Branch 1 taken 1 time.
1 model::SiteGroundTemperatureUndisturbedXing mo = modelObject.cast<SiteGroundTemperatureUndisturbedXing>();
2902
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSiteGroundTemperatureUndisturbedXing(mo);
2903 1 break;
2904 1 }
2905 36 case openstudio::IddObjectType::OS_Site_WaterMainsTemperature: {
2906
1/1
✓ Branch 1 taken 36 times.
36 auto mo = modelObject.cast<SiteWaterMainsTemperature>();
2907
1/1
✓ Branch 1 taken 36 times.
36 retVal = translateSiteWaterMainsTemperature(mo);
2908 36 break;
2909 36 }
2910 856 case openstudio::IddObjectType::OS_Sizing_Parameters: {
2911
1/1
✓ Branch 1 taken 856 times.
856 auto mo = modelObject.cast<SizingParameters>();
2912
1/1
✓ Branch 1 taken 856 times.
856 retVal = translateSizingParameters(mo);
2913 856 break;
2914 856 }
2915 2 case openstudio::IddObjectType::OS_SolarCollector_FlatPlate_PhotovoltaicThermal: {
2916
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<SolarCollectorFlatPlatePhotovoltaicThermal>();
2917
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateSolarCollectorFlatPlatePhotovoltaicThermal(mo);
2918 2 break;
2919 2 }
2920 1 case openstudio::IddObjectType::OS_SolarCollector_FlatPlate_Water: {
2921
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SolarCollectorFlatPlateWater>();
2922
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSolarCollectorFlatPlateWater(mo);
2923 1 break;
2924 1 }
2925
2926 1 case openstudio::IddObjectType::OS_SolarCollector_IntegralCollectorStorage: {
2927
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SolarCollectorIntegralCollectorStorage>();
2928
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSolarCollectorIntegralCollectorStorage(mo);
2929 1 break;
2930 1 }
2931 1 case openstudio::IddObjectType::OS_SolarCollectorPerformance_FlatPlate: {
2932
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SolarCollectorPerformanceFlatPlate>();
2933
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSolarCollectorPerformanceFlatPlate(mo);
2934 1 break;
2935 1 }
2936 1 case openstudio::IddObjectType::OS_SolarCollectorPerformance_IntegralCollectorStorage: {
2937
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SolarCollectorPerformanceIntegralCollectorStorage>();
2938
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSolarCollectorPerformanceIntegralCollectorStorage(mo);
2939 1 break;
2940 1 }
2941 1 case openstudio::IddObjectType::OS_SolarCollectorPerformance_PhotovoltaicThermal_BIPVT: {
2942
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SolarCollectorPerformancePhotovoltaicThermalBIPVT>();
2943
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSolarCollectorPerformancePhotovoltaicThermalBIPVT(mo);
2944 1 break;
2945 1 }
2946 1 case openstudio::IddObjectType::OS_SolarCollectorPerformance_PhotovoltaicThermal_Simple: {
2947
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<SolarCollectorPerformancePhotovoltaicThermalSimple>();
2948
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSolarCollectorPerformancePhotovoltaicThermalSimple(mo);
2949 1 break;
2950 1 }
2951 153 case openstudio::IddObjectType::OS_StandardsInformation_Construction: {
2952 // no-op
2953 153 return retVal;
2954 }
2955 ✗ case openstudio::IddObjectType::OS_StandardsInformation_Material: {
2956 // no-op
2957 ✗ return retVal;
2958 }
2959 4 case openstudio::IddObjectType::OS_SteamEquipment: {
2960
1/1
✓ Branch 1 taken 4 times.
4 auto steamEquipment = modelObject.cast<SteamEquipment>();
2961
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateSteamEquipment(steamEquipment);
2962 4 break;
2963 4 }
2964 2 case openstudio::IddObjectType::OS_SteamEquipment_Definition: {
2965
1/1
✓ Branch 1 taken 2 times.
2 auto definition = modelObject.cast<SteamEquipmentDefinition>();
2966
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateSteamEquipmentDefinition(definition);
2967 2 break;
2968 2 }
2969 3261 case openstudio::IddObjectType::OS_Surface: {
2970
1/1
✓ Branch 1 taken 3261 times.
3261 auto surface = modelObject.cast<Surface>();
2971
1/1
✓ Branch 1 taken 3261 times.
3261 retVal = translateSurface(surface);
2972 3261 break;
2973 3261 }
2974 44 case openstudio::IddObjectType::OS_SurfaceConvectionAlgorithm_Inside: {
2975
1/1
✓ Branch 1 taken 44 times.
44 auto mo = modelObject.cast<InsideSurfaceConvectionAlgorithm>();
2976
1/1
✓ Branch 1 taken 44 times.
44 retVal = translateInsideSurfaceConvectionAlgorithm(mo);
2977 44 break;
2978 44 }
2979 44 case openstudio::IddObjectType::OS_SurfaceConvectionAlgorithm_Outside: {
2980
1/1
✓ Branch 1 taken 44 times.
44 auto mo = modelObject.cast<OutsideSurfaceConvectionAlgorithm>();
2981
1/1
✓ Branch 1 taken 44 times.
44 retVal = translateOutsideSurfaceConvectionAlgorithm(mo);
2982 44 break;
2983 44 }
2984 1 case openstudio::IddObjectType::OS_SurfaceControl_MovableInsulation: {
2985
1/1
✓ Branch 1 taken 1 time.
1 auto obj = modelObject.cast<SurfaceControlMovableInsulation>();
2986
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSurfaceControlMovableInsulation(obj);
2987 1 break;
2988 1 }
2989 2 case openstudio::IddObjectType::OS_SurfaceProperty_ConvectionCoefficients: {
2990
1/1
✓ Branch 1 taken 2 times.
2 auto obj = modelObject.cast<SurfacePropertyConvectionCoefficients>();
2991
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateSurfacePropertyConvectionCoefficients(obj);
2992 2 break;
2993 2 }
2994 ✗ case openstudio::IddObjectType::OS_SurfaceProperty_ConvectionCoefficients_MultipleSurface: {
2995 ✗ auto obj = modelObject.cast<SurfacePropertyConvectionCoefficientsMultipleSurface>();
2996 ✗ retVal = translateSurfacePropertyConvectionCoefficientsMultipleSurface(obj);
2997 ✗ break;
2998 ✗ }
2999 5 case openstudio::IddObjectType::OS_SurfaceProperty_LocalEnvironment: {
3000
1/1
✓ Branch 1 taken 5 times.
5 auto obj = modelObject.cast<SurfacePropertyLocalEnvironment>();
3001
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateSurfacePropertyLocalEnvironment(obj);
3002 5 break;
3003 5 }
3004 ✗ case openstudio::IddObjectType::OS_SurfaceProperty_ExposedFoundationPerimeter: {
3005 ✗ auto obj = modelObject.cast<SurfacePropertyExposedFoundationPerimeter>();
3006 ✗ retVal = translateSurfacePropertyExposedFoundationPerimeter(obj);
3007 ✗ break;
3008 ✗ }
3009 ✗ case openstudio::IddObjectType::OS_SurfaceProperty_OtherSideCoefficients: {
3010 ✗ auto obj = modelObject.cast<SurfacePropertyOtherSideCoefficients>();
3011 ✗ retVal = translateSurfacePropertyOtherSideCoefficients(obj);
3012 ✗ break;
3013 ✗ }
3014 2 case openstudio::IddObjectType::OS_SurfaceProperty_OtherSideConditionsModel: {
3015
1/1
✓ Branch 1 taken 2 times.
2 auto obj = modelObject.cast<SurfacePropertyOtherSideConditionsModel>();
3016
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateSurfacePropertyOtherSideConditionsModel(obj);
3017 2 break;
3018 2 }
3019 4 case openstudio::IddObjectType::OS_SurfaceProperty_SurroundingSurfaces: {
3020
1/1
✓ Branch 1 taken 4 times.
4 auto obj = modelObject.cast<SurfacePropertySurroundingSurfaces>();
3021
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateSurfacePropertySurroundingSurfaces(obj);
3022 4 break;
3023 4 }
3024 1 case openstudio::IddObjectType::OS_SurfaceProperty_GroundSurfaces: {
3025
1/1
✓ Branch 1 taken 1 time.
1 auto obj = modelObject.cast<SurfacePropertyGroundSurfaces>();
3026
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSurfacePropertyGroundSurfaces(obj);
3027 1 break;
3028 1 }
3029 1 case openstudio::IddObjectType::OS_SurfaceProperty_IncidentSolarMultiplier: {
3030
1/1
✓ Branch 1 taken 1 time.
1 auto obj = modelObject.cast<SurfacePropertyIncidentSolarMultiplier>();
3031
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSurfacePropertyIncidentSolarMultiplier(obj);
3032 1 break;
3033 1 }
3034 403 case openstudio::IddObjectType::OS_SubSurface: {
3035
1/1
✓ Branch 1 taken 403 times.
403 auto subSurface = modelObject.cast<SubSurface>();
3036
1/1
✓ Branch 1 taken 403 times.
403 retVal = translateSubSurface(subSurface);
3037 403 break;
3038 403 }
3039 1 case openstudio::IddObjectType::OS_SwimmingPool_Indoor: {
3040
1/1
✓ Branch 1 taken 1 time.
1 auto obj = modelObject.cast<SwimmingPoolIndoor>();
3041
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateSwimmingPoolIndoor(obj);
3042 1 break;
3043 1 }
3044
3045 #if defined(_MSC_VER)
3046 # pragma warning(push)
3047 # pragma warning(disable : 4996)
3048 #elif (defined(__GNUC__))
3049 # pragma GCC diagnostic push
3050 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3051 #endif
3052 3 case openstudio::IddObjectType::OS_Table_MultiVariableLookup: {
3053
1/1
✓ Branch 1 taken 3 times.
3 auto table = modelObject.cast<TableMultiVariableLookup>();
3054
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateTableMultiVariableLookup(table);
3055 3 break;
3056 3 }
3057 #if defined(_MSC_VER)
3058 # pragma warning(pop)
3059 #elif (defined(__GNUC__))
3060 # pragma GCC diagnostic pop
3061 #endif
3062
3063 10 case openstudio::IddObjectType::OS_Table_Lookup: {
3064
1/1
✓ Branch 1 taken 10 times.
10 auto table = modelObject.cast<TableLookup>();
3065
1/1
✓ Branch 1 taken 10 times.
10 retVal = translateTableLookup(table);
3066 10 break;
3067 10 }
3068 10 case openstudio::IddObjectType::OS_Table_IndependentVariable: {
3069
1/1
✓ Branch 1 taken 10 times.
10 auto tableIndependentVariable = modelObject.cast<TableIndependentVariable>();
3070
1/1
✓ Branch 1 taken 10 times.
10 retVal = translateTableIndependentVariable(tableIndependentVariable);
3071 10 break;
3072 10 }
3073 ✗ case openstudio::IddObjectType::OS_TemperingValve: {
3074 ✗ auto mo = modelObject.cast<TemperingValve>();
3075 ✗ retVal = translateTemperingValve(mo);
3076 ✗ break;
3077 ✗ }
3078 537 case openstudio::IddObjectType::OS_ThermalZone: {
3079
1/1
✓ Branch 1 taken 537 times.
537 auto zone = modelObject.cast<ThermalZone>();
3080
1/1
✓ Branch 1 taken 537 times.
537 retVal = translateThermalZone(zone);
3081 537 break;
3082 537 }
3083 1 case openstudio::IddObjectType::OS_ThermalStorage_Ice_Detailed: {
3084
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<ThermalStorageIceDetailed>();
3085
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateThermalStorageIceDetailed(mo);
3086 1 break;
3087 1 }
3088 2 case openstudio::IddObjectType::OS_ThermalStorage_ChilledWater_Stratified: {
3089
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<ThermalStorageChilledWaterStratified>();
3090
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateThermalStorageChilledWaterStratified(mo);
3091 2 break;
3092 2 }
3093 47 case openstudio::IddObjectType::OS_ThermostatSetpoint_DualSetpoint: {
3094
1/1
✓ Branch 1 taken 47 times.
47 auto thermostat = modelObject.cast<ThermostatSetpointDualSetpoint>();
3095
1/1
✓ Branch 1 taken 47 times.
47 retVal = translateThermostatSetpointDualSetpoint(thermostat);
3096 47 break;
3097 47 }
3098 889 case openstudio::IddObjectType::OS_Timestep: {
3099
1/1
✓ Branch 1 taken 889 times.
889 auto timestep = modelObject.cast<Timestep>();
3100
1/1
✓ Branch 1 taken 889 times.
889 retVal = translateTimestep(timestep);
3101 889 break;
3102 889 }
3103 11 case openstudio::IddObjectType::OS_UnitarySystemPerformance_Multispeed: {
3104
1/1
✓ Branch 1 taken 11 times.
11 auto sysPerfMultispeed = modelObject.cast<UnitarySystemPerformanceMultispeed>();
3105
1/1
✓ Branch 1 taken 11 times.
11 retVal = translateUnitarySystemPerformanceMultispeed(sysPerfMultispeed);
3106 11 break;
3107 11 }
3108 ✗ case openstudio::IddObjectType::OS_UtilityBill: {
3109 // no-op
3110 ✗ break;
3111 }
3112
3113 // TODO: once UtilityCost objects are wrapped
3114 //case openstudio::IddObjectType::OS_UtilityCost_Charge_Block:
3115 //{
3116 //LOG(Warn, "OS_UtilityCost_Charge_Block is not currently translated");
3117 //break;
3118 //}
3119 //case openstudio::IddObjectType::OS_UtilityCost_Charge_Simple:
3120 //{
3121 //LOG(Warn, "OS_UtilityCost_Charge_Simple is not currently translated");
3122 //break;
3123 //}
3124 //case openstudio::IddObjectType::OS_UtilityCost_Computation:
3125 //{
3126 //LOG(Warn, "OS_UtilityCost_Computation is not currently translated");
3127 //break;
3128 //}
3129 //case openstudio::IddObjectType::OS_UtilityCost_Qualify:
3130 //{
3131 //LOG(Warn, "OS_UtilityCost_Qualify is not currently translated");
3132 //break;
3133 //}
3134 //case openstudio::IddObjectType::OS_UtilityCost_Ratchet:
3135 //{
3136 //LOG(Warn, "OS_UtilityCost_Ratchet is not currently translated");
3137 //break;
3138 //}
3139 //case openstudio::IddObjectType::OS_UtilityCost_Tariff:
3140 //{
3141 //LOG(Warn, "OS_UtilityCost_Tariff is not currently translated");
3142 //break;
3143 //}
3144 //case openstudio::IddObjectType::OS_UtilityCost_Variable:
3145 //{
3146 //LOG(Warn, "OS_UtilityCost_Variable is not currently translated");
3147 //break;
3148 //}
3149
3150 889 case openstudio::IddObjectType::OS_Version: {
3151
1/1
✓ Branch 1 taken 889 times.
889 auto version = modelObject.cast<Version>();
3152
1/1
✓ Branch 1 taken 889 times.
889 retVal = translateVersion(version);
3153 889 break;
3154 889 }
3155 33 case openstudio::IddObjectType::OS_WeatherFile: {
3156 // no-op
3157 33 return retVal;
3158 }
3159 ✗ case openstudio::IddObjectType::OS_WeatherProperty_SkyTemperature: {
3160 ✗ auto mo = modelObject.cast<SkyTemperature>();
3161 ✗ retVal = translateSkyTemperature(mo);
3162 ✗ break;
3163 ✗ }
3164 3 case openstudio::IddObjectType::OS_WindowMaterial_Blind: {
3165
1/1
✓ Branch 1 taken 3 times.
3 auto blind = modelObject.cast<Blind>();
3166
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateBlind(blind);
3167 3 break;
3168 3 }
3169 ✗ case openstudio::IddObjectType::OS_WindowMaterial_DaylightRedirectionDevice: {
3170 ✗ auto drd = modelObject.cast<DaylightRedirectionDevice>();
3171 ✗ retVal = translateDaylightRedirectionDevice(drd);
3172 ✗ break;
3173 ✗ }
3174 ✗ case openstudio::IddObjectType::OS_WindowMaterial_Glazing_RefractionExtinctionMethod: {
3175 ✗ auto mo = modelObject.cast<RefractionExtinctionGlazing>();
3176 ✗ retVal = translateRefractionExtinctionGlazing(mo);
3177 ✗ break;
3178 ✗ }
3179 ✗ case openstudio::IddObjectType::OS_WindowMaterial_Screen: {
3180 ✗ auto mo = modelObject.cast<Screen>();
3181 ✗ retVal = translateScreen(mo);
3182 ✗ break;
3183 ✗ }
3184 ✗ case openstudio::IddObjectType::OS_WindowMaterial_Shade: {
3185 ✗ auto shade = modelObject.cast<Shade>();
3186 ✗ retVal = translateShade(shade);
3187 ✗ break;
3188 ✗ }
3189 46 case openstudio::IddObjectType::OS_WindowMaterial_SimpleGlazingSystem: {
3190
1/1
✓ Branch 1 taken 46 times.
46 auto glazing = modelObject.cast<SimpleGlazing>();
3191
1/1
✓ Branch 1 taken 46 times.
46 retVal = translateSimpleGlazing(glazing);
3192 46 break;
3193 46 }
3194 45 case openstudio::IddObjectType::OS_WindowMaterial_Glazing: {
3195
1/1
✓ Branch 1 taken 45 times.
45 auto glazing = modelObject.cast<StandardGlazing>();
3196
1/1
✓ Branch 1 taken 45 times.
45 retVal = translateStandardGlazing(glazing);
3197 45 break;
3198 45 }
3199 4 case openstudio::IddObjectType::OS_WindowMaterial_GlazingGroup_Thermochromic: {
3200
1/1
✓ Branch 1 taken 4 times.
4 auto glazing = modelObject.cast<ThermochromicGlazing>();
3201
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateThermochromicGlazing(glazing);
3202 4 break;
3203 4 }
3204 2 case openstudio::IddObjectType::OS_WindowProperty_FrameAndDivider: {
3205
1/1
✓ Branch 1 taken 2 times.
2 auto frameAndDivider = modelObject.cast<WindowPropertyFrameAndDivider>();
3206
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateWindowPropertyFrameAndDivider(frameAndDivider);
3207 2 break;
3208 2 }
3209 ✗ case openstudio::IddObjectType::OS_YearDescription: {
3210 // no-op
3211 ✗ return retVal;
3212 }
3213 10 case openstudio::IddObjectType::OS_ZoneAirContaminantBalance: {
3214
1/1
✓ Branch 1 taken 10 times.
10 auto mo = modelObject.cast<ZoneAirContaminantBalance>();
3215
1/1
✓ Branch 1 taken 10 times.
10 retVal = translateZoneAirContaminantBalance(mo);
3216 10 break;
3217 10 }
3218 45 case openstudio::IddObjectType::OS_ZoneAirHeatBalanceAlgorithm: {
3219
1/1
✓ Branch 1 taken 45 times.
45 auto mo = modelObject.cast<ZoneAirHeatBalanceAlgorithm>();
3220
1/1
✓ Branch 1 taken 45 times.
45 retVal = translateZoneAirHeatBalanceAlgorithm(mo);
3221 45 break;
3222 45 }
3223 ✗ case openstudio::IddObjectType::OS_ZoneAirMassFlowConservation: {
3224 ✗ auto mo = modelObject.cast<ZoneAirMassFlowConservation>();
3225 ✗ retVal = translateZoneAirMassFlowConservation(mo);
3226 ✗ break;
3227 ✗ }
3228 11 case openstudio::IddObjectType::OS_ZoneCapacitanceMultiplier_ResearchSpecial: {
3229
1/1
✓ Branch 1 taken 11 times.
11 auto mo = modelObject.cast<ZoneCapacitanceMultiplierResearchSpecial>();
3230
1/1
✓ Branch 1 taken 11 times.
11 retVal = translateZoneCapacitanceMultiplierResearchSpecial(mo);
3231 11 break;
3232 11 }
3233 ✗ case openstudio::IddObjectType::OS_ZoneControl_ContaminantController: {
3234 ✗ auto mo = modelObject.cast<ZoneControlContaminantController>();
3235 ✗ retVal = translateZoneControlContaminantController(mo);
3236 ✗ break;
3237 ✗ }
3238 ✗ case openstudio::IddObjectType::OS_ZoneControl_Humidistat: {
3239 ✗ auto mo = modelObject.cast<ZoneControlHumidistat>();
3240 ✗ retVal = translateZoneControlHumidistat(mo);
3241 ✗ break;
3242 ✗ }
3243 ✗ case openstudio::IddObjectType::OS_ZoneControl_Thermostat_StagedDualSetpoint: {
3244 ✗ auto mo = modelObject.cast<ZoneControlThermostatStagedDualSetpoint>();
3245 ✗ retVal = translateZoneControlThermostatStagedDualSetpoint(mo);
3246 ✗ break;
3247 ✗ }
3248 10 case openstudio::IddObjectType::OS_ZoneHVAC_Baseboard_Convective_Electric: {
3249
1/1
✓ Branch 1 taken 10 times.
10 auto mo = modelObject.cast<ZoneHVACBaseboardConvectiveElectric>();
3250
1/1
✓ Branch 1 taken 10 times.
10 retVal = translateZoneHVACBaseboardConvectiveElectric(mo);
3251 10 break;
3252 10 }
3253 ✗ case openstudio::IddObjectType::OS_ZoneHVAC_Baseboard_Convective_Water: {
3254 ✗ auto mo = modelObject.cast<ZoneHVACBaseboardConvectiveWater>();
3255 ✗ retVal = translateZoneHVACBaseboardConvectiveWater(mo);
3256 ✗ break;
3257 ✗ }
3258 ✗ case openstudio::IddObjectType::OS_ZoneHVAC_Baseboard_RadiantConvective_Electric: {
3259 ✗ auto mo = modelObject.cast<ZoneHVACBaseboardRadiantConvectiveElectric>();
3260 ✗ retVal = translateZoneHVACBaseboardRadiantConvectiveElectric(mo);
3261 ✗ break;
3262 ✗ }
3263 1 case openstudio::IddObjectType::OS_ZoneHVAC_Baseboard_RadiantConvective_Water: {
3264
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<ZoneHVACBaseboardRadiantConvectiveWater>();
3265
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateZoneHVACBaseboardRadiantConvectiveWater(mo);
3266 1 break;
3267 1 }
3268 ✗ case openstudio::IddObjectType::OS_ZoneHVAC_CoolingPanel_RadiantConvective_Water: {
3269 ✗ auto mo = modelObject.cast<ZoneHVACCoolingPanelRadiantConvectiveWater>();
3270 ✗ retVal = translateZoneHVACCoolingPanelRadiantConvectiveWater(mo);
3271 ✗ break;
3272 ✗ }
3273 ✗ case openstudio::IddObjectType::OS_ZoneHVAC_Dehumidifier_DX: {
3274 ✗ auto mo = modelObject.cast<ZoneHVACDehumidifierDX>();
3275 ✗ retVal = translateZoneHVACDehumidifierDX(mo);
3276 ✗ break;
3277 ✗ }
3278 ✗ case openstudio::IddObjectType::OS_ZoneHVAC_EnergyRecoveryVentilator: {
3279 ✗ auto mo = modelObject.cast<ZoneHVACEnergyRecoveryVentilator>();
3280 ✗ retVal = translateZoneHVACEnergyRecoveryVentilator(mo);
3281 ✗ break;
3282 ✗ }
3283 ✗ case openstudio::IddObjectType::OS_ZoneHVAC_EnergyRecoveryVentilator_Controller: {
3284 ✗ auto mo = modelObject.cast<ZoneHVACEnergyRecoveryVentilatorController>();
3285 ✗ retVal = translateZoneHVACEnergyRecoveryVentilatorController(mo);
3286 ✗ break;
3287 ✗ }
3288 127 case openstudio::IddObjectType::OS_ZoneHVAC_EquipmentList: {
3289
1/1
✓ Branch 1 taken 127 times.
127 auto mo = modelObject.cast<ZoneHVACEquipmentList>();
3290
1/1
✓ Branch 1 taken 127 times.
127 retVal = translateZoneHVACEquipmentList(mo);
3291 127 break;
3292 127 }
3293 5 case openstudio::IddObjectType::OS_ZoneHVAC_EvaporativeCoolerUnit: {
3294
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<ZoneHVACEvaporativeCoolerUnit>();
3295
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateZoneHVACEvaporativeCoolerUnit(mo);
3296 5 break;
3297 5 }
3298 1 case openstudio::IddObjectType::OS_ZoneHVAC_FourPipeFanCoil: {
3299
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<ZoneHVACFourPipeFanCoil>();
3300
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateZoneHVACFourPipeFanCoil(mo);
3301 1 break;
3302 1 }
3303 ✗ case openstudio::IddObjectType::OS_ZoneHVAC_HighTemperatureRadiant: {
3304 ✗ auto mo = modelObject.cast<ZoneHVACHighTemperatureRadiant>();
3305 ✗ retVal = translateZoneHVACHighTemperatureRadiant(mo);
3306 ✗ break;
3307 ✗ }
3308 2 case openstudio::IddObjectType::OS_ZoneHVAC_IdealLoadsAirSystem: {
3309
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<ZoneHVACIdealLoadsAirSystem>();
3310
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateZoneHVACIdealLoadsAirSystem(mo);
3311 2 break;
3312 2 }
3313 5 case openstudio::IddObjectType::OS_ZoneHVAC_LowTemperatureRadiant_Electric: {
3314
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<ZoneHVACLowTemperatureRadiantElectric>();
3315
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateZoneHVACLowTemperatureRadiantElectric(mo);
3316 5 break;
3317 5 }
3318 5 case openstudio::IddObjectType::OS_ZoneHVAC_LowTemperatureRadiant_ConstantFlow: {
3319
1/1
✓ Branch 1 taken 5 times.
5 auto mo = modelObject.cast<ZoneHVACLowTempRadiantConstFlow>();
3320
1/1
✓ Branch 1 taken 5 times.
5 retVal = translateZoneHVACLowTempRadiantConstFlow(mo);
3321 5 break;
3322 5 }
3323 15 case openstudio::IddObjectType::OS_ZoneHVAC_LowTemperatureRadiant_VariableFlow: {
3324
1/1
✓ Branch 1 taken 15 times.
15 auto mo = modelObject.cast<ZoneHVACLowTempRadiantVarFlow>();
3325
1/1
✓ Branch 1 taken 15 times.
15 retVal = translateZoneHVACLowTempRadiantVarFlow(mo);
3326 15 break;
3327 15 }
3328 4 case openstudio::IddObjectType::OS_ZoneHVAC_PackagedTerminalHeatPump: {
3329
1/1
✓ Branch 1 taken 4 times.
4 auto mo = modelObject.cast<ZoneHVACPackagedTerminalHeatPump>();
3330
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateZoneHVACPackagedTerminalHeatPump(mo);
3331 4 break;
3332 4 }
3333 9 case openstudio::IddObjectType::OS_ZoneHVAC_PackagedTerminalAirConditioner: {
3334
1/1
✓ Branch 1 taken 9 times.
9 auto mo = modelObject.cast<ZoneHVACPackagedTerminalAirConditioner>();
3335
1/1
✓ Branch 1 taken 9 times.
9 retVal = translateZoneHVACPackagedTerminalAirConditioner(mo);
3336 9 break;
3337 9 }
3338 28 case openstudio::IddObjectType::OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlow: {
3339
1/1
✓ Branch 1 taken 28 times.
28 auto mo = modelObject.cast<ZoneHVACTerminalUnitVariableRefrigerantFlow>();
3340
1/1
✓ Branch 1 taken 28 times.
28 retVal = translateZoneHVACTerminalUnitVariableRefrigerantFlow(mo);
3341 28 break;
3342 28 }
3343 4 case openstudio::IddObjectType::OS_ZoneHVAC_UnitHeater: {
3344
1/1
✓ Branch 1 taken 4 times.
4 auto mo = modelObject.cast<ZoneHVACUnitHeater>();
3345
1/1
✓ Branch 1 taken 4 times.
4 retVal = translateZoneHVACUnitHeater(mo);
3346 4 break;
3347 4 }
3348 ✗ case openstudio::IddObjectType::OS_ZoneHVAC_UnitVentilator: {
3349 ✗ auto mo = modelObject.cast<ZoneHVACUnitVentilator>();
3350 ✗ retVal = translateZoneHVACUnitVentilator(mo);
3351 ✗ break;
3352 ✗ }
3353 2 case openstudio::IddObjectType::OS_ZoneHVAC_WaterToAirHeatPump: {
3354
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<ZoneHVACWaterToAirHeatPump>();
3355
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateZoneHVACWaterToAirHeatPump(mo);
3356 2 break;
3357 2 }
3358 15 case openstudio::IddObjectType::OS_ZoneMixing: {
3359
1/1
✓ Branch 1 taken 15 times.
15 auto mo = modelObject.cast<ZoneMixing>();
3360
1/1
✓ Branch 1 taken 15 times.
15 retVal = translateZoneMixing(mo);
3361 15 break;
3362 15 }
3363 6 case openstudio::IddObjectType::OS_ComfortViewFactorAngles: {
3364
1/1
✓ Branch 1 taken 6 times.
6 auto mo = modelObject.cast<ComfortViewFactorAngles>();
3365
1/1
✓ Branch 1 taken 6 times.
6 retVal = translateComfortViewFactorAngles(mo);
3366 6 break;
3367 6 }
3368 2 case openstudio::IddObjectType::OS_ZoneMRTCalculation: {
3369
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<ZoneMRTCalculation>();
3370
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateZoneMRTCalculation(mo);
3371 2 break;
3372 2 }
3373 1 case openstudio::IddObjectType::OS_ZoneProperty_UserViewFactors_BySurfaceName: {
3374
1/1
✓ Branch 1 taken 1 time.
1 auto mo = modelObject.cast<ZonePropertyUserViewFactorsBySurfaceName>();
3375
1/1
✓ Branch 1 taken 1 time.
1 retVal = translateZonePropertyUserViewFactorsBySurfaceName(mo);
3376 1 break;
3377 1 }
3378 2 case openstudio::IddObjectType::OS_ZoneVentilation_DesignFlowRate: {
3379
1/1
✓ Branch 1 taken 2 times.
2 auto mo = modelObject.cast<ZoneVentilationDesignFlowRate>();
3380
1/1
✓ Branch 1 taken 2 times.
2 retVal = translateZoneVentilationDesignFlowRate(mo);
3381 2 break;
3382 2 }
3383 3 case openstudio::IddObjectType::OS_ZoneVentilation_WindandStackOpenArea: {
3384
1/1
✓ Branch 1 taken 3 times.
3 auto mo = modelObject.cast<ZoneVentilationWindandStackOpenArea>();
3385
1/1
✓ Branch 1 taken 3 times.
3 retVal = translateZoneVentilationWindandStackOpenArea(mo);
3386 3 break;
3387 3 }
3388 //If no case statement log a warning
3389 ✗ default: {
3390 ✗ LOG(Warn, "Unknown IddObjectType: '" << modelObject.iddObject().name() << "'");
3391 ✗ return retVal;
3392 }
3393 }
3394
3395
2/2
✓ Branch 0 taken 31958 times.
✓ Branch 1 taken 8648 times.
40606 if (retVal) {
3396
4/4
✓ Branch 1 taken 31958 times.
✓ Branch 4 taken 31958 times.
✓ Branch 7 taken 31958 times.
✓ Branch 10 taken 31958 times.
31958 m_map.insert(make_pair(modelObject.handle(), retVal.get()));
3397
3398
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 31958 times.
31958 if (m_progressBar) {
3399 ✗ m_progressBar->setValue((int)m_map.size());
3400 }
3401 }
3402
3403 // is this redundant?
3404 // ETH@20120112 Yes.
3405
1/1
✓ Branch 1 taken 40606 times.
81212 OptionalParentObject opo = modelObject.optionalCast<ParentObject>();
3406
2/2
✓ Branch 0 taken 33208 times.
✓ Branch 1 taken 7398 times.
40606 if (opo) {
3407
2/2
✓ Branch 1 taken 33208 times.
✓ Branch 4 taken 33208 times.
33208 ModelObjectVector children = opo->children();
3408
1/1
✓ Branch 1 taken 33208 times.
33208 IddObjectTypeVector types = iddObjectsToTranslate();
3409
3410 // sort these objects as well
3411
2/2
✓ Branch 1 taken 33208 times.
✓ Branch 6 taken 33208 times.
33208 std::sort(children.begin(), children.end(), ChildSorter(types));
3412
3413
2/2
✓ Branch 5 taken 16284 times.
✓ Branch 6 taken 33208 times.
49492 for (auto& elem : children) {
3414
5/5
✓ Branch 2 taken 16284 times.
✓ Branch 5 taken 16284 times.
✓ Branch 10 taken 16284 times.
✓ Branch 14 taken 11394 times.
✓ Branch 15 taken 4890 times.
16284 if (std::find(types.begin(), types.end(), elem.iddObject().type()) != types.end()) {
3415
1/1
✓ Branch 1 taken 11394 times.
11394 translateAndMapModelObject(elem);
3416 }
3417 }
3418 33208 }
3419
3420 40606 return retVal;
3421 92436 }
3422 // NOLINTEND(readability-function-size, bugprone-branch-clone)
3423
3424 856 std::string ForwardTranslator::stripOS2(const string& s) {
3425 856 std::string result;
3426
3/4
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 856 times.
856 if (s.substr(0, 3) == "OS:") {
3427 ✗ result = s.substr(3);
3428 } else {
3429
1/1
✓ Branch 1 taken 856 times.
856 result = s;
3430 }
3431 856 return result;
3432 ✗ }
3433
3434 34097 std::vector<IddObjectType> ForwardTranslator::iddObjectsToTranslate() {
3435 static const std::vector<IddObjectType> result{
3436
3437 IddObjectType::OS_Version,
3438
3439 IddObjectType::OS_ComponentData,
3440
3441 IddObjectType::OS_LifeCycleCost_Parameters,
3442 IddObjectType::OS_CurrencyType,
3443 IddObjectType::OS_ComponentCost_Adjustments,
3444 IddObjectType::OS_LifeCycleCost_UsePriceEscalation,
3445
3446 IddObjectType::OS_SimulationControl,
3447 IddObjectType::OS_ProgramControl,
3448 IddObjectType::OS_ConvergenceLimits,
3449 IddObjectType::OS_HeatBalanceAlgorithm,
3450 IddObjectType::OS_RunPeriod,
3451 IddObjectType::OS_RunPeriodControl_DaylightSavingTime,
3452 IddObjectType::OS_RunPeriodControl_SpecialDays,
3453 IddObjectType::OS_ShadowCalculation,
3454 IddObjectType::OS_SurfaceConvectionAlgorithm_Inside,
3455 IddObjectType::OS_SurfaceConvectionAlgorithm_Outside,
3456 IddObjectType::OS_SurfaceProperty_ConvectionCoefficients_MultipleSurface,
3457 IddObjectType::OS_Timestep,
3458 IddObjectType::OS_Sizing_Parameters,
3459 IddObjectType::OS_ZoneAirContaminantBalance,
3460 IddObjectType::OS_ZoneAirHeatBalanceAlgorithm,
3461 IddObjectType::OS_ZoneAirMassFlowConservation,
3462 IddObjectType::OS_ZoneCapacitanceMultiplier_ResearchSpecial,
3463 IddObjectType::OS_OutputControl_Files,
3464 IddObjectType::OS_OutputControl_ReportingTolerances,
3465 IddObjectType::OS_OutputControl_ResilienceSummaries,
3466 IddObjectType::OS_OutputControl_Table_Style,
3467 IddObjectType::OS_OutputControl_Timestamp,
3468 IddObjectType::OS_Output_Constructions,
3469 IddObjectType::OS_Output_DebuggingData,
3470 IddObjectType::OS_Output_Diagnostics,
3471 IddObjectType::OS_Output_JSON,
3472 IddObjectType::OS_Output_Schedules,
3473 IddObjectType::OS_Output_SQLite,
3474
3475 // Note: we just always translate Output:EnvironmentalImpactFactors, and in there (it exists), then trigger translatation of the two others
3476 IddObjectType::OS_Output_EnvironmentalImpactFactors,
3477 // IddObjectType::OS_EnvironmentalImpactFactors,
3478 // IddObjectType::OS_FuelFactors,
3479
3480 IddObjectType::OS_Output_Table_SummaryReports,
3481 IddObjectType::OS_Output_Table_Annual,
3482 IddObjectType::OS_Output_Table_Monthly,
3483
3484 IddObjectType::OS_PerformancePrecisionTradeoffs,
3485
3486 IddObjectType::OS_Site,
3487 IddObjectType::OS_Site_GroundReflectance,
3488 IddObjectType::OS_Site_GroundTemperature_BuildingSurface,
3489 IddObjectType::OS_Site_GroundTemperature_Deep,
3490 IddObjectType::OS_Site_GroundTemperature_FCfactorMethod,
3491 IddObjectType::OS_Site_GroundTemperature_Shallow,
3492 IddObjectType::OS_Site_WaterMainsTemperature,
3493 IddObjectType::OS_ClimateZones,
3494 IddObjectType::OS_SizingPeriod_DesignDay,
3495 IddObjectType::OS_SizingPeriod_WeatherFileConditionType,
3496 IddObjectType::OS_SizingPeriod_WeatherFileDays,
3497 IddObjectType::OS_Foundation_Kiva,
3498 IddObjectType::OS_Foundation_Kiva_Settings,
3499
3500 // TODO: once UtilityCost objects are wrapped
3501 // IddObjectType::OS_UtilityCost_Charge_Block,
3502 // IddObjectType::OS_UtilityCost_Charge_Simple,
3503 // IddObjectType::OS_UtilityCost_Computation,
3504 // IddObjectType::OS_UtilityCost_Qualify,
3505 // IddObjectType::OS_UtilityCost_Ratchet,
3506 // IddObjectType::OS_UtilityCost_Tariff,
3507 // IddObjectType::OS_UtilityCost_Variable,
3508
3509 IddObjectType::OS_WeatherFile,
3510 IddObjectType::OS_WeatherProperty_SkyTemperature,
3511
3512 IddObjectType::OS_Rendering_Color,
3513 IddObjectType::OS_SpaceType,
3514
3515 IddObjectType::OS_Facility,
3516 IddObjectType::OS_Building,
3517 IddObjectType::OS_BuildingStory,
3518 IddObjectType::OS_LightingSimulationZone,
3519
3520 IddObjectType::OS_ThermalZone,
3521 IddObjectType::OS_Space,
3522 IddObjectType::OS_Surface,
3523 IddObjectType::OS_SubSurface,
3524 IddObjectType::OS_InteriorPartitionSurfaceGroup,
3525 IddObjectType::OS_InteriorPartitionSurface,
3526 IddObjectType::OS_ShadingSurfaceGroup,
3527 IddObjectType::OS_ShadingSurface,
3528
3529 IddObjectType::OS_ZoneProperty_UserViewFactors_BySurfaceName,
3530
3531 IddObjectType::OS_Daylighting_Control,
3532 IddObjectType::OS_DaylightingDevice_Shelf,
3533 IddObjectType::OS_DaylightingDevice_Tubular,
3534 IddObjectType::OS_DaylightingDevice_LightWell,
3535 IddObjectType::OS_IlluminanceMap,
3536
3537 // Definition objects will be translated as needed by instance objects.
3538 IddObjectType::OS_InternalMass,
3539 IddObjectType::OS_People,
3540 IddObjectType::OS_Lights,
3541 IddObjectType::OS_Luminaire,
3542 IddObjectType::OS_ElectricEquipment,
3543 IddObjectType::OS_ElectricEquipment_ITE_AirCooled,
3544 IddObjectType::OS_GasEquipment,
3545 IddObjectType::OS_HotWaterEquipment,
3546 IddObjectType::OS_SteamEquipment,
3547 IddObjectType::OS_OtherEquipment,
3548 IddObjectType::OS_SpaceInfiltration_DesignFlowRate,
3549 IddObjectType::OS_SpaceInfiltration_EffectiveLeakageArea,
3550 IddObjectType::OS_SpaceInfiltration_FlowCoefficient,
3551 IddObjectType::OS_Exterior_Lights,
3552 IddObjectType::OS_Exterior_FuelEquipment,
3553 IddObjectType::OS_Exterior_WaterEquipment,
3554
3555 IddObjectType::OS_AirLoopHVAC,
3556
3557 // Translated by AirLoopHVAC
3558 // IddObjectType::OS_AirLoopHVAC_OutdoorAirSystem,
3559
3560 IddObjectType::OS_AirLoopHVAC_UnitaryHeatCool_VAVChangeoverBypass,
3561 IddObjectType::OS_AirLoopHVAC_UnitaryCoolOnly,
3562 IddObjectType::OS_AirLoopHVAC_ZoneMixer,
3563 IddObjectType::OS_AirLoopHVAC_ZoneSplitter,
3564 IddObjectType::OS_AirTerminal_DualDuct_ConstantVolume,
3565 IddObjectType::OS_AirTerminal_DualDuct_VAV_OutdoorAir,
3566 IddObjectType::OS_AirTerminal_SingleDuct_ConstantVolume_CooledBeam,
3567 IddObjectType::OS_AirTerminal_SingleDuct_ConstantVolume_NoReheat,
3568 // Unlike other AVMs, this one doesn't live on the AVM AssignmentList, so need to tell it to translate all the time
3569 IddObjectType::OS_AvailabilityManager_HybridVentilation,
3570 IddObjectType::OS_Chiller_Electric_EIR,
3571 IddObjectType::OS_Chiller_Electric_ReformulatedEIR,
3572
3573 // Coil:Cooling:DX will be translated by the UnitarySystem it's in, and will in turn translate CurveFitPerformance, which will translate
3574 // OperatingMode, which will translate Speed
3575 // IddObjectType::OS_Coil_Cooling_DX,
3576 // IddObjectType::OS_Coil_Cooling_DX_CurveFit_Performance,
3577 // IddObjectType::OS_Coil_Cooling_DX_CurveFit_OperatingMode,
3578 // IddObjectType::OS_Coil_Cooling_DX_CurveFit_Speed,
3579
3580 IddObjectType::OS_Coil_Cooling_DX_SingleSpeed,
3581 // IddObjectType::OS_Coil_Cooling_DX_SingleSpeed_ThermalStorage,
3582 IddObjectType::OS_Coil_Cooling_DX_TwoSpeed,
3583 IddObjectType::OS_Coil_Cooling_Water,
3584 IddObjectType::OS_Coil_Cooling_WaterToAirHeatPump_EquationFit,
3585 IddObjectType::OS_Coil_Heating_Desuperheater,
3586 IddObjectType::OS_Coil_Heating_Gas,
3587 IddObjectType::OS_Coil_Heating_Water,
3588 IddObjectType::OS_Coil_Heating_WaterToAirHeatPump_EquationFit,
3589 IddObjectType::OS_Coil_WaterHeating_Desuperheater,
3590 // IddObjectType::OS_Coil_UserDefined,
3591
3592 // If using a plantLoop, this will be translated by the PlantLoop. But WaterHeaters can also be used stand-alone, so always translate them
3593 // We'll check in their FT if the "Peak Use Flow Rate" is actually initialized as it's an indication that the WH was
3594 IddObjectType::OS_WaterHeater_Mixed,
3595 IddObjectType::OS_WaterHeater_Stratified,
3596
3597 IddObjectType::OS_Connection,
3598 IddObjectType::OS_Connector_Mixer,
3599 IddObjectType::OS_Connector_Splitter,
3600 // IddObjectType::OS_Controller_OutdoorAir, // Will be translated by the AirLoopHVACOutdoorAirSystem
3601 IddObjectType::OS_CoolingTower_SingleSpeed,
3602 IddObjectType::OS_Curve_Bicubic,
3603 IddObjectType::OS_Curve_Biquadratic,
3604 IddObjectType::OS_Curve_Cubic,
3605 IddObjectType::OS_Curve_DoubleExponentialDecay,
3606 IddObjectType::OS_Curve_Exponent,
3607 IddObjectType::OS_Curve_ExponentialDecay,
3608 IddObjectType::OS_Curve_ExponentialSkewNormal,
3609 IddObjectType::OS_Curve_FanPressureRise,
3610 IddObjectType::OS_Curve_Functional_PressureDrop,
3611 IddObjectType::OS_Curve_Linear,
3612 IddObjectType::OS_Curve_QuadLinear,
3613 IddObjectType::OS_Curve_QuintLinear,
3614 IddObjectType::OS_Curve_Quadratic,
3615 IddObjectType::OS_Curve_QuadraticLinear,
3616 IddObjectType::OS_Curve_Quartic,
3617 IddObjectType::OS_Curve_RectangularHyperbola1,
3618 IddObjectType::OS_Curve_RectangularHyperbola2,
3619 IddObjectType::OS_Curve_Sigmoid,
3620 IddObjectType::OS_Curve_Triquadratic,
3621 IddObjectType::OS_Table_MultiVariableLookup,
3622 IddObjectType::OS_Table_Lookup,
3623
3624 // Should be on a PlantLoop to be translated
3625 // IddObjectType::OS_DistrictCooling,
3626 // IddObjectType::OS_DistrictHeating_Water,
3627 // IddObjectType::OS_DistrictHeating_Steam,
3628
3629 IddObjectType::OS_EvaporativeCooler_Direct_ResearchSpecial,
3630
3631 IddObjectType::OS_Node,
3632 IddObjectType::OS_PlantLoop,
3633 IddObjectType::OS_Splitter,
3634 IddObjectType::OS_ZoneHVAC_Baseboard_Convective_Water,
3635 IddObjectType::OS_ZoneHVAC_IdealLoadsAirSystem,
3636 IddObjectType::OS_ZoneHVAC_HighTemperatureRadiant,
3637 IddObjectType::OS_ZoneHVAC_LowTemperatureRadiant_ConstantFlow,
3638 IddObjectType::OS_ZoneHVAC_LowTemperatureRadiant_VariableFlow,
3639 IddObjectType::OS_ZoneHVAC_LowTemperatureRadiant_Electric,
3640 IddObjectType::OS_ZoneMixing,
3641
3642 IddObjectType::OS_Refrigeration_CompressorRack,
3643 IddObjectType::OS_Refrigeration_System,
3644 IddObjectType::OS_Refrigeration_TranscriticalSystem,
3645
3646 IddObjectType::OS_ElectricLoadCenter_Distribution,
3647 // ElectricLoadCenterDistribution is responsible for translating its generators/inverters/storages
3648 // IddObjectType::OS_Generator_MicroTurbine,
3649 // IddObjectType::OS_Generator_FuelCell,
3650 // IddObjectType::OS_Generator_Photovoltaic,
3651 // IddObjectType::OS_Generator_PVWatts,
3652 // IddObjectType::OS_Generator_WindTurbine,
3653 // Fuel Cell is responsible for translating these
3654 // IddObjectType::OS_Generator_FuelCell_AirSupply,
3655 // IddObjectType::OS_Generator_FuelCell_AuxiliaryHeater,
3656 // IddObjectType::OS_Generator_FuelCell_ElectricalStorage,
3657 // IddObjectType::OS_Generator_FuelCell_ExhaustGasToWaterHeatExchanger,
3658 // IddObjectType::OS_Generator_FuelCell_Inverter,
3659 // IddObjectType::OS_Generator_FuelCell_PowerModule,
3660 // IddObjectType::OS_Generator_FuelCell_StackCooler,
3661 // IddObjectType::OS_Generator_FuelCell_WaterSupply,
3662 // Fuel Cell (and MicroCHP when implemented) are responsible for translating this one
3663 // IddObjectType::OS_Generator_FuelSupply,
3664 // IddObjectType::OS_ElectricLoadCenter_Inverter_LookUpTable,
3665 // IddObjectType::OS_ElectricLoadCenter_Inverter_Simple,
3666 // IddObjectType::OS_ElectricLoadCenter_Inverter_PVWatts,
3667 // IddObjectType::OS_ElectricLoadCenter_Storage_Simple,
3668 // IddObjectType::OS_ElectricLoadCenter_Storage_Converter,
3669 // IddObjectType::OS_ElectricLoadCenter_Storage_LiIonNMCBattery,
3670
3671 // Generator_Photovoltaic is responsible for translating these three
3672 // IddObjectType::OS_PhotovoltaicPerformance_EquivalentOneDiode,
3673 // IddObjectType::OS_PhotovoltaicPerformance_Simple,
3674 // IddObjectType::OS_PhotovoltaicPerformance_Sandia,
3675
3676 // Transformer can be standalone, see ASHRAE9012016_OfficeMedium_Denver.idf for example
3677 IddObjectType::OS_ElectricLoadCenter_Transformer,
3678
3679 // put these down here so they have a chance to be translated with their "parent"
3680 IddObjectType::OS_LifeCycleCost,
3681
3682 IddObjectType::OS_Output_Meter,
3683 IddObjectType::OS_Meter_Custom,
3684 IddObjectType::OS_Meter_CustomDecrement,
3685 IddObjectType::OS_Output_Variable,
3686
3687 IddObjectType::OS_EnergyManagementSystem_GlobalVariable,
3688 IddObjectType::OS_EnergyManagementSystem_InternalVariable,
3689 IddObjectType::OS_EnergyManagementSystem_Sensor,
3690 IddObjectType::OS_EnergyManagementSystem_Actuator,
3691 IddObjectType::OS_EnergyManagementSystem_ConstructionIndexVariable,
3692 IddObjectType::OS_EnergyManagementSystem_CurveOrTableIndexVariable,
3693 IddObjectType::OS_EnergyManagementSystem_MeteredOutputVariable,
3694 IddObjectType::OS_EnergyManagementSystem_Program,
3695 IddObjectType::OS_EnergyManagementSystem_Subroutine,
3696 IddObjectType::OS_EnergyManagementSystem_ProgramCallingManager,
3697 IddObjectType::OS_EnergyManagementSystem_OutputVariable,
3698 IddObjectType::OS_EnergyManagementSystem_TrendVariable,
3699 IddObjectType::OS_Output_EnergyManagementSystem,
3700
3701 IddObjectType::OS_ExternalInterface,
3702 IddObjectType::OS_ExternalInterface_Actuator,
3703 IddObjectType::OS_ExternalInterface_Schedule,
3704 IddObjectType::OS_ExternalInterface_Variable,
3705 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitExport_From_Variable,
3706 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitExport_To_Actuator,
3707 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitExport_To_Schedule,
3708 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitExport_To_Variable,
3709 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport,
3710 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport_From_Variable,
3711 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport_To_Actuator,
3712 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport_To_Schedule,
3713 IddObjectType::OS_ExternalInterface_FunctionalMockupUnitImport_To_Variable,
3714
3715 IddObjectType::
3716 OS_PythonPlugin_SearchPaths, // this FT intentionally happens before PythonPlugin_Instance so that we can't end up with two PythonPlugin_SearchPaths objects
3717 IddObjectType::OS_PythonPlugin_Instance,
3718 IddObjectType::OS_PythonPlugin_Variable,
3719 IddObjectType::OS_PythonPlugin_TrendVariable,
3720 IddObjectType::OS_PythonPlugin_OutputVariable,
3721
194/197
✓ Branch 0 taken 543 times.
✓ Branch 1 taken 33554 times.
✓ Branch 3 taken 543 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 543 times.
✓ Branch 9 taken 543 times.
✓ Branch 12 taken 543 times.
✓ Branch 15 taken 543 times.
✓ Branch 18 taken 543 times.
✓ Branch 21 taken 543 times.
✓ Branch 24 taken 543 times.
✓ Branch 27 taken 543 times.
✓ Branch 30 taken 543 times.
✓ Branch 33 taken 543 times.
✓ Branch 36 taken 543 times.
✓ Branch 39 taken 543 times.
✓ Branch 42 taken 543 times.
✓ Branch 45 taken 543 times.
✓ Branch 48 taken 543 times.
✓ Branch 51 taken 543 times.
✓ Branch 54 taken 543 times.
✓ Branch 57 taken 543 times.
✓ Branch 60 taken 543 times.
✓ Branch 63 taken 543 times.
✓ Branch 66 taken 543 times.
✓ Branch 69 taken 543 times.
✓ Branch 72 taken 543 times.
✓ Branch 75 taken 543 times.
✓ Branch 78 taken 543 times.
✓ Branch 81 taken 543 times.
✓ Branch 84 taken 543 times.
✓ Branch 87 taken 543 times.
✓ Branch 90 taken 543 times.
✓ Branch 93 taken 543 times.
✓ Branch 96 taken 543 times.
✓ Branch 99 taken 543 times.
✓ Branch 102 taken 543 times.
✓ Branch 105 taken 543 times.
✓ Branch 108 taken 543 times.
✓ Branch 111 taken 543 times.
✓ Branch 114 taken 543 times.
✓ Branch 117 taken 543 times.
✓ Branch 120 taken 543 times.
✓ Branch 123 taken 543 times.
✓ Branch 126 taken 543 times.
✓ Branch 129 taken 543 times.
✓ Branch 132 taken 543 times.
✓ Branch 135 taken 543 times.
✓ Branch 138 taken 543 times.
✓ Branch 141 taken 543 times.
✓ Branch 144 taken 543 times.
✓ Branch 147 taken 543 times.
✓ Branch 150 taken 543 times.
✓ Branch 153 taken 543 times.
✓ Branch 156 taken 543 times.
✓ Branch 159 taken 543 times.
✓ Branch 162 taken 543 times.
✓ Branch 165 taken 543 times.
✓ Branch 168 taken 543 times.
✓ Branch 171 taken 543 times.
✓ Branch 174 taken 543 times.
✓ Branch 177 taken 543 times.
✓ Branch 180 taken 543 times.
✓ Branch 183 taken 543 times.
✓ Branch 186 taken 543 times.
✓ Branch 189 taken 543 times.
✓ Branch 192 taken 543 times.
✓ Branch 195 taken 543 times.
✓ Branch 198 taken 543 times.
✓ Branch 201 taken 543 times.
✓ Branch 204 taken 543 times.
✓ Branch 207 taken 543 times.
✓ Branch 210 taken 543 times.
✓ Branch 213 taken 543 times.
✓ Branch 216 taken 543 times.
✓ Branch 219 taken 543 times.
✓ Branch 222 taken 543 times.
✓ Branch 225 taken 543 times.
✓ Branch 228 taken 543 times.
✓ Branch 231 taken 543 times.
✓ Branch 234 taken 543 times.
✓ Branch 237 taken 543 times.
✓ Branch 240 taken 543 times.
✓ Branch 243 taken 543 times.
✓ Branch 246 taken 543 times.
✓ Branch 249 taken 543 times.
✓ Branch 252 taken 543 times.
✓ Branch 255 taken 543 times.
✓ Branch 258 taken 543 times.
✓ Branch 261 taken 543 times.
✓ Branch 264 taken 543 times.
✓ Branch 267 taken 543 times.
✓ Branch 270 taken 543 times.
✓ Branch 273 taken 543 times.
✓ Branch 276 taken 543 times.
✓ Branch 279 taken 543 times.
✓ Branch 282 taken 543 times.
✓ Branch 285 taken 543 times.
✓ Branch 288 taken 543 times.
✓ Branch 291 taken 543 times.
✓ Branch 294 taken 543 times.
✓ Branch 297 taken 543 times.
✓ Branch 300 taken 543 times.
✓ Branch 303 taken 543 times.
✓ Branch 306 taken 543 times.
✓ Branch 309 taken 543 times.
✓ Branch 312 taken 543 times.
✓ Branch 315 taken 543 times.
✓ Branch 318 taken 543 times.
✓ Branch 321 taken 543 times.
✓ Branch 324 taken 543 times.
✓ Branch 327 taken 543 times.
✓ Branch 330 taken 543 times.
✓ Branch 333 taken 543 times.
✓ Branch 336 taken 543 times.
✓ Branch 339 taken 543 times.
✓ Branch 342 taken 543 times.
✓ Branch 345 taken 543 times.
✓ Branch 348 taken 543 times.
✓ Branch 351 taken 543 times.
✓ Branch 354 taken 543 times.
✓ Branch 357 taken 543 times.
✓ Branch 360 taken 543 times.
✓ Branch 363 taken 543 times.
✓ Branch 366 taken 543 times.
✓ Branch 369 taken 543 times.
✓ Branch 372 taken 543 times.
✓ Branch 375 taken 543 times.
✓ Branch 378 taken 543 times.
✓ Branch 381 taken 543 times.
✓ Branch 384 taken 543 times.
✓ Branch 387 taken 543 times.
✓ Branch 390 taken 543 times.
✓ Branch 393 taken 543 times.
✓ Branch 396 taken 543 times.
✓ Branch 399 taken 543 times.
✓ Branch 402 taken 543 times.
✓ Branch 405 taken 543 times.
✓ Branch 408 taken 543 times.
✓ Branch 411 taken 543 times.
✓ Branch 414 taken 543 times.
✓ Branch 417 taken 543 times.
✓ Branch 420 taken 543 times.
✓ Branch 423 taken 543 times.
✓ Branch 426 taken 543 times.
✓ Branch 429 taken 543 times.
✓ Branch 432 taken 543 times.
✓ Branch 435 taken 543 times.
✓ Branch 438 taken 543 times.
✓ Branch 441 taken 543 times.
✓ Branch 444 taken 543 times.
✓ Branch 447 taken 543 times.
✓ Branch 450 taken 543 times.
✓ Branch 453 taken 543 times.
✓ Branch 456 taken 543 times.
✓ Branch 459 taken 543 times.
✓ Branch 462 taken 543 times.
✓ Branch 465 taken 543 times.
✓ Branch 468 taken 543 times.
✓ Branch 471 taken 543 times.
✓ Branch 474 taken 543 times.
✓ Branch 477 taken 543 times.
✓ Branch 480 taken 543 times.
✓ Branch 483 taken 543 times.
✓ Branch 486 taken 543 times.
✓ Branch 489 taken 543 times.
✓ Branch 492 taken 543 times.
✓ Branch 495 taken 543 times.
✓ Branch 498 taken 543 times.
✓ Branch 501 taken 543 times.
✓ Branch 504 taken 543 times.
✓ Branch 507 taken 543 times.
✓ Branch 510 taken 543 times.
✓ Branch 513 taken 543 times.
✓ Branch 516 taken 543 times.
✓ Branch 519 taken 543 times.
✓ Branch 522 taken 543 times.
✓ Branch 525 taken 543 times.
✓ Branch 528 taken 543 times.
✓ Branch 531 taken 543 times.
✓ Branch 534 taken 543 times.
✓ Branch 537 taken 543 times.
✓ Branch 540 taken 543 times.
✓ Branch 543 taken 543 times.
✓ Branch 546 taken 543 times.
✓ Branch 549 taken 543 times.
✓ Branch 552 taken 543 times.
✓ Branch 555 taken 543 times.
✓ Branch 558 taken 543 times.
✓ Branch 561 taken 543 times.
✓ Branch 564 taken 543 times.
✓ Branch 567 taken 543 times.
✓ Branch 570 taken 543 times.
✓ Branch 573 taken 543 times.
✓ Branch 576 taken 543 times.
✗ Branch 580 not taken.
✗ Branch 581 not taken.
35183 };
3722
3723 34097 return result;
3724 }
3725
3726 889 void ForwardTranslator::translateConstructions(const model::Model& model) {
3727 std::vector<IddObjectType> iddObjectTypes{
3728 IddObjectType::OS_MaterialProperty_GlazingSpectralData,
3729 IddObjectType::OS_Material,
3730 IddObjectType::OS_Material_AirGap,
3731 IddObjectType::OS_Material_InfraredTransparent,
3732 IddObjectType::OS_Material_NoMass,
3733 IddObjectType::OS_Material_RoofVegetation,
3734
3735 IddObjectType::OS_WindowMaterial_Blind,
3736 IddObjectType::OS_WindowMaterial_DaylightRedirectionDevice,
3737 IddObjectType::OS_WindowMaterial_Gas,
3738 IddObjectType::OS_WindowMaterial_GasMixture,
3739 IddObjectType::OS_WindowMaterial_Glazing,
3740 IddObjectType::OS_WindowMaterial_GlazingGroup_Thermochromic,
3741 IddObjectType::OS_WindowMaterial_Glazing_RefractionExtinctionMethod,
3742 IddObjectType::OS_WindowMaterial_Screen,
3743 IddObjectType::OS_WindowMaterial_Shade,
3744 IddObjectType::OS_WindowMaterial_SimpleGlazingSystem,
3745 IddObjectType::OS_WindowProperty_FrameAndDivider,
3746 IddObjectType::OS_ShadingControl,
3747
3748 IddObjectType::OS_Construction,
3749 IddObjectType::OS_Construction_AirBoundary,
3750 IddObjectType::OS_Construction_CfactorUndergroundWall,
3751 IddObjectType::OS_Construction_FfactorGroundFloor,
3752 IddObjectType::OS_Construction_InternalSource,
3753 IddObjectType::OS_Construction_WindowDataFile,
3754 IddObjectType::OS_StandardsInformation_Construction,
3755
3756 IddObjectType::OS_DefaultSubSurfaceConstructions,
3757 IddObjectType::OS_DefaultSurfaceConstructions,
3758 IddObjectType::OS_DefaultConstructionSet,
3759 IddObjectType::OS_DefaultScheduleSet,
3760
3761 // Translated by the object it references directly
3762 // IddObjectType::OS_MaterialProperty_MoisturePenetrationDepth_Settings, // Material Only
3763 // IdObjectType::OS_MaterialProperty_PhaseChange, // Material Only
3764 // IddObjectType::OS_MaterialProperty_PhaseChangeHysteresis, // Material Only
3765 // IddObjectType::OS_SurfaceControl_MovableInsulation, // Surface Only
3766 // IddObjectType::OS_SurfaceProperty_OtherSideCoefficients, // Surface, SubSurface,
3767 // IddObjectType::OS_SurfaceProperty_OtherSideConditionsModel, // Surface, SubSurface,
3768 // IddObjectType::OS_SurfaceProperty_ExposedFoundationPerimeter, // Surface Only
3769 // IddObjectType::OS_SurfaceProperty_ConvectionCoefficients, // Surface, SubSurface, or InternalMass
3770
30/30
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
✓ Branch 7 taken 889 times.
✓ Branch 10 taken 889 times.
✓ Branch 13 taken 889 times.
✓ Branch 16 taken 889 times.
✓ Branch 19 taken 889 times.
✓ Branch 22 taken 889 times.
✓ Branch 25 taken 889 times.
✓ Branch 28 taken 889 times.
✓ Branch 31 taken 889 times.
✓ Branch 34 taken 889 times.
✓ Branch 37 taken 889 times.
✓ Branch 40 taken 889 times.
✓ Branch 43 taken 889 times.
✓ Branch 46 taken 889 times.
✓ Branch 49 taken 889 times.
✓ Branch 52 taken 889 times.
✓ Branch 55 taken 889 times.
✓ Branch 58 taken 889 times.
✓ Branch 61 taken 889 times.
✓ Branch 64 taken 889 times.
✓ Branch 67 taken 889 times.
✓ Branch 70 taken 889 times.
✓ Branch 73 taken 889 times.
✓ Branch 76 taken 889 times.
✓ Branch 79 taken 889 times.
✓ Branch 82 taken 889 times.
✓ Branch 85 taken 889 times.
✓ Branch 88 taken 889 times.
1778 };
3771
3772
2/2
✓ Branch 5 taken 25781 times.
✓ Branch 6 taken 889 times.
26670 for (const IddObjectType& iddObjectType : iddObjectTypes) {
3773
3774 // get objects by type in sorted order
3775
1/1
✓ Branch 1 taken 25781 times.
25781 std::vector<WorkspaceObject> objects = model.getObjectsByType(iddObjectType);
3776
1/1
✓ Branch 3 taken 25781 times.
25781 std::sort(objects.begin(), objects.end(), WorkspaceObjectNameLess());
3777
3778
2/2
✓ Branch 5 taken 1936 times.
✓ Branch 6 taken 25781 times.
27717 for (const WorkspaceObject& workspaceObject : objects) {
3779
1/1
✓ Branch 1 taken 1936 times.
1936 auto modelObject = workspaceObject.cast<ModelObject>();
3780
1/1
✓ Branch 1 taken 1936 times.
1936 boost::optional<IdfObject> result = translateAndMapModelObject(modelObject);
3781
3782
3/3
✓ Branch 1 taken 1936 times.
✓ Branch 3 taken 592 times.
✓ Branch 4 taken 1344 times.
3872 if (auto constructionBase_ = modelObject.optionalCast<ConstructionBase>()) {
3783
6/6
✓ Branch 1 taken 592 times.
✓ Branch 4 taken 592 times.
✓ Branch 7 taken 592 times.
✓ Branch 10 taken 592 times.
✓ Branch 14 taken 1 time.
✓ Branch 15 taken 591 times.
1776 if (istringEqual("Interior Partition Surface Construction", workspaceObject.name().get())) {
3784
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 m_interiorPartitionSurfaceConstruction = constructionBase_.get();
3785 }
3786
3787
5/6
✓ Branch 1 taken 592 times.
✓ Branch 4 taken 592 times.
✓ Branch 7 taken 592 times.
✓ Branch 10 taken 592 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 592 times.
1776 if (istringEqual("Shading Surface Construction", workspaceObject.name().get())) {
3788 ✗ m_exteriorSurfaceConstruction = constructionBase_.get();
3789 }
3790 1936 }
3791 1936 }
3792 25781 }
3793 889 }
3794
3795 889 void ForwardTranslator::translateSchedules(const model::Model& model) {
3796
3797 // Make sure these get in the idf file
3798 {
3799
1/1
✓ Branch 1 taken 889 times.
889 auto schedule = model.alwaysOnDiscreteSchedule();
3800
1/1
✓ Branch 1 taken 889 times.
889 translateAndMapModelObject(schedule);
3801
1/1
✓ Branch 1 taken 889 times.
889 schedule = model.alwaysOffDiscreteSchedule();
3802
1/1
✓ Branch 1 taken 889 times.
889 translateAndMapModelObject(schedule);
3803
1/1
✓ Branch 1 taken 889 times.
889 schedule = model.alwaysOnContinuousSchedule();
3804
1/1
✓ Branch 1 taken 889 times.
889 translateAndMapModelObject(schedule);
3805 889 }
3806
3807 // loop over schedule type limits
3808
2/2
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
889 std::vector<WorkspaceObject> objects = model.getObjectsByType(IddObjectType::OS_ScheduleTypeLimits);
3809
1/1
✓ Branch 3 taken 889 times.
889 std::sort(objects.begin(), objects.end(), WorkspaceObjectNameLess());
3810
2/2
✓ Branch 5 taken 3186 times.
✓ Branch 6 taken 889 times.
4075 for (const WorkspaceObject& workspaceObject : objects) {
3811
1/1
✓ Branch 1 taken 3186 times.
3186 auto modelObject = workspaceObject.cast<ModelObject>();
3812
1/1
✓ Branch 1 taken 3186 times.
3186 translateAndMapModelObject(modelObject);
3813 3186 }
3814
3815 // now loop over all schedule types
3816 std::vector<IddObjectType> iddObjectTypes{IddObjectType::OS_Schedule_Compact, IddObjectType::OS_Schedule_Constant,
3817 IddObjectType::OS_Schedule_Day, IddObjectType::OS_Schedule_Week,
3818 IddObjectType::OS_Schedule_Year, IddObjectType::OS_Schedule_Ruleset,
3819 IddObjectType::OS_Schedule_FixedInterval, IddObjectType::OS_Schedule_VariableInterval,
3820
10/10
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
✓ Branch 7 taken 889 times.
✓ Branch 10 taken 889 times.
✓ Branch 13 taken 889 times.
✓ Branch 16 taken 889 times.
✓ Branch 19 taken 889 times.
✓ Branch 22 taken 889 times.
✓ Branch 25 taken 889 times.
✓ Branch 28 taken 889 times.
1778 IddObjectType::OS_Schedule_File};
3821
3822
2/2
✓ Branch 5 taken 8001 times.
✓ Branch 6 taken 889 times.
8890 for (const IddObjectType& iddObjectType : iddObjectTypes) {
3823
3824 // get objects by type in sorted order
3825
1/1
✓ Branch 1 taken 8001 times.
8001 objects = model.getObjectsByType(iddObjectType);
3826
1/1
✓ Branch 3 taken 8001 times.
8001 std::sort(objects.begin(), objects.end(), WorkspaceObjectNameLess());
3827
3828
2/2
✓ Branch 5 taken 6451 times.
✓ Branch 6 taken 8001 times.
14452 for (const WorkspaceObject& workspaceObject : objects) {
3829
1/1
✓ Branch 1 taken 6451 times.
6451 auto modelObject = workspaceObject.cast<ModelObject>();
3830
1/1
✓ Branch 1 taken 6451 times.
6451 translateAndMapModelObject(modelObject);
3831 6451 }
3832 }
3833 889 }
3834
3835 889 void ForwardTranslator::translateAirflowNetwork(const model::Model& model) {
3836 // translate AFN if there is a simulation control object
3837 boost::optional<model::AirflowNetworkSimulationControl> afnSimulationControl =
3838
1/1
✓ Branch 1 taken 889 times.
889 model.getOptionalUniqueModelObject<model::AirflowNetworkSimulationControl>();
3839
2/2
✓ Branch 0 taken 7 times.
✓ Branch 1 taken 882 times.
889 if (afnSimulationControl) {
3840
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 translateAirflowNetworkSimulationControl(afnSimulationControl.get());
3841
3842 // Zones
3843
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkZone> zones = model.getConcreteModelObjects<model::AirflowNetworkZone>();
3844
1/1
✓ Branch 3 taken 7 times.
7 std::sort(zones.begin(), zones.end(), WorkspaceObjectNameLess());
3845
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : zones) {
3846 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3847 ✗ translateAirflowNetworkZone(modelObject);
3848 }
3849
3850 // Reference Crack Conditions
3851 std::vector<model::AirflowNetworkReferenceCrackConditions> refcracks =
3852
1/1
✓ Branch 1 taken 7 times.
7 model.getConcreteModelObjects<model::AirflowNetworkReferenceCrackConditions>();
3853
1/1
✓ Branch 3 taken 7 times.
7 std::sort(refcracks.begin(), refcracks.end(), WorkspaceObjectNameLess());
3854
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : refcracks) {
3855 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3856 ✗ translateAirflowNetworkReferenceCrackConditions(modelObject);
3857 }
3858
3859 // Cracks
3860
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkCrack> cracks = model.getConcreteModelObjects<model::AirflowNetworkCrack>();
3861
1/1
✓ Branch 3 taken 7 times.
7 std::sort(cracks.begin(), cracks.end(), WorkspaceObjectNameLess());
3862
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : cracks) {
3863 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3864 ✗ translateAirflowNetworkCrack(modelObject);
3865 }
3866
3867 // Effective Leakage Area
3868
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkEffectiveLeakageArea> elas = model.getConcreteModelObjects<model::AirflowNetworkEffectiveLeakageArea>();
3869
1/1
✓ Branch 3 taken 7 times.
7 std::sort(elas.begin(), elas.end(), WorkspaceObjectNameLess());
3870
2/2
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 7 times.
8 for (auto& modelObject : elas) {
3871
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(Trace, "Translating " << modelObject.briefDescription() << ".");
3872
1/1
✓ Branch 1 taken 1 time.
1 translateAirflowNetworkEffectiveLeakageArea(modelObject);
3873 }
3874
3875 // Simple Openings
3876
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkSimpleOpening> simples = model.getConcreteModelObjects<model::AirflowNetworkSimpleOpening>();
3877
1/1
✓ Branch 3 taken 7 times.
7 std::sort(simples.begin(), simples.end(), WorkspaceObjectNameLess());
3878
2/2
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 7 times.
8 for (auto& modelObject : simples) {
3879
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(Trace, "Translating " << modelObject.briefDescription() << ".");
3880
1/1
✓ Branch 1 taken 1 time.
1 translateAirflowNetworkSimpleOpening(modelObject);
3881 }
3882
3883 // Detailed Openings
3884
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkDetailedOpening> detaileds = model.getConcreteModelObjects<model::AirflowNetworkDetailedOpening>();
3885
1/1
✓ Branch 3 taken 7 times.
7 std::sort(detaileds.begin(), detaileds.end(), WorkspaceObjectNameLess());
3886
2/2
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 7 times.
8 for (auto& modelObject : detaileds) {
3887
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(Trace, "Translating " << modelObject.briefDescription() << ".");
3888
1/1
✓ Branch 1 taken 1 time.
1 translateAirflowNetworkDetailedOpening(modelObject);
3889 }
3890
3891 // Horizontal Openings
3892
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkHorizontalOpening> horzs = model.getConcreteModelObjects<model::AirflowNetworkHorizontalOpening>();
3893
1/1
✓ Branch 3 taken 7 times.
7 std::sort(horzs.begin(), horzs.end(), WorkspaceObjectNameLess());
3894
2/2
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 7 times.
8 for (auto& modelObject : horzs) {
3895
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(Trace, "Translating " << modelObject.briefDescription() << ".");
3896
1/1
✓ Branch 1 taken 1 time.
1 translateAirflowNetworkHorizontalOpening(modelObject);
3897 }
3898
3899 // Specified Flow Rate
3900
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkSpecifiedFlowRate> sfrs = model.getConcreteModelObjects<model::AirflowNetworkSpecifiedFlowRate>();
3901
1/1
✓ Branch 3 taken 7 times.
7 std::sort(sfrs.begin(), sfrs.end(), WorkspaceObjectNameLess());
3902
2/2
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 7 times.
8 for (auto& modelObject : sfrs) {
3903
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(Trace, "Translating " << modelObject.briefDescription() << ".");
3904
1/1
✓ Branch 1 taken 1 time.
1 translateAirflowNetworkSpecifiedFlowRate(modelObject);
3905 }
3906
3907 // Surfaces
3908
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkSurface> surfs = model.getConcreteModelObjects<model::AirflowNetworkSurface>();
3909
1/1
✓ Branch 3 taken 7 times.
7 std::sort(surfs.begin(), surfs.end(), WorkspaceObjectNameLess());
3910
2/2
✓ Branch 4 taken 5 times.
✓ Branch 5 taken 7 times.
12 for (auto& modelObject : surfs) {
3911
8/8
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✓ Branch 13 taken 5 times.
✓ Branch 17 taken 5 times.
✓ Branch 20 taken 5 times.
✓ Branch 23 taken 5 times.
5 LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3912
1/1
✓ Branch 1 taken 5 times.
5 translateAirflowNetworkSurface(modelObject);
3913 }
3914
3915 // Nodes
3916
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkDistributionNode> nodes = model.getConcreteModelObjects<model::AirflowNetworkDistributionNode>();
3917
1/1
✓ Branch 3 taken 7 times.
7 std::sort(nodes.begin(), nodes.end(), WorkspaceObjectNameLess());
3918
2/2
✓ Branch 4 taken 4 times.
✓ Branch 5 taken 7 times.
11 for (auto& modelObject : nodes) {
3919
8/8
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 13 taken 4 times.
✓ Branch 17 taken 4 times.
✓ Branch 20 taken 4 times.
✓ Branch 23 taken 4 times.
4 LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3920
1/1
✓ Branch 1 taken 4 times.
4 translateAirflowNetworkDistributionNode(modelObject);
3921 }
3922
3923 // Linkages
3924
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkDistributionLinkage> links = model.getConcreteModelObjects<model::AirflowNetworkDistributionLinkage>();
3925
1/1
✓ Branch 3 taken 7 times.
7 std::sort(links.begin(), links.end(), WorkspaceObjectNameLess());
3926
2/2
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 7 times.
9 for (auto& modelObject : links) {
3927
8/8
✓ 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 17 taken 2 times.
✓ Branch 20 taken 2 times.
✓ Branch 23 taken 2 times.
2 LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3928
1/1
✓ Branch 1 taken 2 times.
2 translateAirflowNetworkDistributionLinkage(modelObject);
3929 }
3930
3931 // External Nodes
3932
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkExternalNode> exts = model.getConcreteModelObjects<model::AirflowNetworkExternalNode>();
3933
1/1
✓ Branch 3 taken 7 times.
7 std::sort(exts.begin(), exts.end(), WorkspaceObjectNameLess());
3934
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : exts) {
3935 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3936 ✗ translateAirflowNetworkExternalNode(modelObject);
3937 }
3938
3939 // Zone Exhaust Fan
3940
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkZoneExhaustFan> zefs = model.getConcreteModelObjects<model::AirflowNetworkZoneExhaustFan>();
3941
1/1
✓ Branch 3 taken 7 times.
7 std::sort(zefs.begin(), zefs.end(), WorkspaceObjectNameLess());
3942
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : zefs) {
3943 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3944 ✗ translateAirflowNetworkZoneExhaustFan(modelObject);
3945 }
3946
3947 // Fan
3948
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkFan> fans = model.getConcreteModelObjects<model::AirflowNetworkFan>();
3949
1/1
✓ Branch 3 taken 7 times.
7 std::sort(fans.begin(), fans.end(), WorkspaceObjectNameLess());
3950
2/2
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 7 times.
8 for (auto& modelObject : fans) {
3951
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(Trace, "Translating " << modelObject.briefDescription() << ".");
3952
1/1
✓ Branch 1 taken 1 time.
1 translateAirflowNetworkFan(modelObject);
3953 }
3954
3955 // Duct
3956
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkDuct> ducts = model.getConcreteModelObjects<model::AirflowNetworkDuct>();
3957
1/1
✓ Branch 3 taken 7 times.
7 std::sort(ducts.begin(), ducts.end(), WorkspaceObjectNameLess());
3958
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : ducts) {
3959 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3960 ✗ translateAirflowNetworkDuct(modelObject);
3961 }
3962
3963 // Equivalent Duct
3964
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkEquivalentDuct> equivds = model.getConcreteModelObjects<model::AirflowNetworkEquivalentDuct>();
3965
1/1
✓ Branch 3 taken 7 times.
7 std::sort(equivds.begin(), equivds.end(), WorkspaceObjectNameLess());
3966
2/2
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 7 times.
9 for (auto& modelObject : equivds) {
3967
8/8
✓ 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 17 taken 2 times.
✓ Branch 20 taken 2 times.
✓ Branch 23 taken 2 times.
2 LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3968
1/1
✓ Branch 1 taken 2 times.
2 translateAirflowNetworkEquivalentDuct(modelObject);
3969 }
3970
3971 // Leakage Ratio
3972
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkLeakageRatio> lrs = model.getConcreteModelObjects<model::AirflowNetworkLeakageRatio>();
3973
1/1
✓ Branch 3 taken 7 times.
7 std::sort(lrs.begin(), lrs.end(), WorkspaceObjectNameLess());
3974
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : lrs) {
3975 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3976 ✗ translateAirflowNetworkLeakageRatio(modelObject);
3977 }
3978
3979 // Constant Pressure Drops
3980
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkConstantPressureDrop> constps = model.getConcreteModelObjects<model::AirflowNetworkConstantPressureDrop>();
3981
1/1
✓ Branch 3 taken 7 times.
7 std::sort(constps.begin(), constps.end(), WorkspaceObjectNameLess());
3982
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : constps) {
3983 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3984 ✗ translateAirflowNetworkConstantPressureDrop(modelObject);
3985 }
3986
3987 // Outdoor Air Flow
3988
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkOutdoorAirflow> oafs = model.getConcreteModelObjects<model::AirflowNetworkOutdoorAirflow>();
3989
1/1
✓ Branch 3 taken 7 times.
7 std::sort(oafs.begin(), oafs.end(), WorkspaceObjectNameLess());
3990
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : oafs) {
3991 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
3992 ✗ translateAirflowNetworkOutdoorAirflow(modelObject);
3993 }
3994
3995 // Duct VFs
3996
1/1
✓ Branch 1 taken 7 times.
7 std::vector<model::AirflowNetworkDuctViewFactors> ductvfs = model.getConcreteModelObjects<model::AirflowNetworkDuctViewFactors>();
3997
1/1
✓ Branch 3 taken 7 times.
7 std::sort(ductvfs.begin(), ductvfs.end(), WorkspaceObjectNameLess());
3998
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : ductvfs) {
3999 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
4000 ✗ translateAirflowNetworkDuctViewFactors(modelObject);
4001 }
4002
4003 // Occupant Ventilation Control
4004 std::vector<model::AirflowNetworkOccupantVentilationControl> occvcs =
4005
1/1
✓ Branch 1 taken 7 times.
7 model.getConcreteModelObjects<model::AirflowNetworkOccupantVentilationControl>();
4006
1/1
✓ Branch 3 taken 7 times.
7 std::sort(occvcs.begin(), occvcs.end(), WorkspaceObjectNameLess());
4007
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 7 times.
7 for (auto& modelObject : occvcs) {
4008 ✗ LOG(Trace, "Translating " << modelObject.briefDescription() << ".");
4009 ✗ translateAirflowNetworkOccupantVentilationControl(modelObject);
4010 }
4011
4012 7 } else {
4013
4014 882 unsigned int count = 0;
4015
4016 // Zones
4017
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkZone> zones = model.getConcreteModelObjects<model::AirflowNetworkZone>();
4018 882 count += zones.size();
4019
4020 // Reference Crack Conditions
4021 std::vector<model::AirflowNetworkReferenceCrackConditions> refcracks =
4022
1/1
✓ Branch 1 taken 882 times.
882 model.getConcreteModelObjects<model::AirflowNetworkReferenceCrackConditions>();
4023 882 count += refcracks.size();
4024
4025 // Cracks
4026
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkCrack> cracks = model.getConcreteModelObjects<model::AirflowNetworkCrack>();
4027 882 count += cracks.size();
4028
4029 // Effective Leakage Area
4030
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkEffectiveLeakageArea> elas = model.getConcreteModelObjects<model::AirflowNetworkEffectiveLeakageArea>();
4031 882 count += elas.size();
4032
4033 // Simple Openings
4034
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkSimpleOpening> simples = model.getConcreteModelObjects<model::AirflowNetworkSimpleOpening>();
4035 882 count += simples.size();
4036
4037 // Detailed Openings
4038
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkDetailedOpening> detaileds = model.getConcreteModelObjects<model::AirflowNetworkDetailedOpening>();
4039 882 count += detaileds.size();
4040
4041 // Horizontal Openings
4042
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkHorizontalOpening> horzs = model.getConcreteModelObjects<model::AirflowNetworkHorizontalOpening>();
4043 882 count += horzs.size();
4044
4045 // Specified Flow Rate
4046
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkSpecifiedFlowRate> sfrs = model.getConcreteModelObjects<model::AirflowNetworkSpecifiedFlowRate>();
4047 882 count += sfrs.size();
4048
4049 // Surfaces
4050
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkSurface> surfs = model.getConcreteModelObjects<model::AirflowNetworkSurface>();
4051 882 count += surfs.size();
4052
4053 // Nodes
4054
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkDistributionNode> nodes = model.getConcreteModelObjects<model::AirflowNetworkDistributionNode>();
4055 882 count += nodes.size();
4056
4057 // Linkages
4058
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkDistributionLinkage> links = model.getConcreteModelObjects<model::AirflowNetworkDistributionLinkage>();
4059 882 count += links.size();
4060
4061 // External Nodes
4062
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkExternalNode> exts = model.getConcreteModelObjects<model::AirflowNetworkExternalNode>();
4063 882 count += exts.size();
4064
4065 // Zone Exhaust Fan
4066
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkZoneExhaustFan> zefs = model.getConcreteModelObjects<model::AirflowNetworkZoneExhaustFan>();
4067 882 count += zefs.size();
4068
4069 // Fan
4070
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkFan> fans = model.getConcreteModelObjects<model::AirflowNetworkFan>();
4071 882 count += fans.size();
4072
4073 // Duct
4074
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkDuct> ducts = model.getConcreteModelObjects<model::AirflowNetworkDuct>();
4075 882 count += ducts.size();
4076
4077 // Equivalent Duct
4078
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkEquivalentDuct> equivds = model.getConcreteModelObjects<model::AirflowNetworkEquivalentDuct>();
4079 882 count += equivds.size();
4080
4081 // Leakage Ratio
4082
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkLeakageRatio> lrs = model.getConcreteModelObjects<model::AirflowNetworkLeakageRatio>();
4083 882 count += lrs.size();
4084
4085 // Constant Pressure Drops
4086
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkConstantPressureDrop> constps = model.getConcreteModelObjects<model::AirflowNetworkConstantPressureDrop>();
4087 882 count += constps.size();
4088
4089 // Outdoor Air Flow
4090
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkOutdoorAirflow> oafs = model.getConcreteModelObjects<model::AirflowNetworkOutdoorAirflow>();
4091 882 count += oafs.size();
4092
4093 // Duct VFs
4094
1/1
✓ Branch 1 taken 882 times.
882 std::vector<model::AirflowNetworkDuctViewFactors> ductvfs = model.getConcreteModelObjects<model::AirflowNetworkDuctViewFactors>();
4095 882 count += ductvfs.size();
4096
4097 // Occupant Ventilation Control
4098 std::vector<model::AirflowNetworkOccupantVentilationControl> occvcs =
4099
1/1
✓ Branch 1 taken 882 times.
882 model.getConcreteModelObjects<model::AirflowNetworkOccupantVentilationControl>();
4100 882 count += occvcs.size();
4101
4102
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 882 times.
882 if (count > 0) {
4103 ✗ LOG(Warn, "No AirflowNetworkSimulationControl found in model, skipping forward translation of " << count << " AirflowNetwork objects.");
4104 }
4105 882 }
4106 889 }
4107
4108 889 void ForwardTranslator::reset() {
4109 889 m_idfObjects.clear();
4110
4111 889 m_map.clear();
4112
4113 889 m_zoneDSOAsMap.clear();
4114
4115 889 m_anyNumberScheduleTypeLimits.reset();
4116
4117 889 m_interiorPartitionSurfaceConstruction.reset();
4118
4119 889 m_exteriorSurfaceConstruction.reset();
4120
4121 889 m_constructionHandleToReversedConstructions.clear();
4122
4123 889 m_logSink.setThreadId(std::this_thread::get_id());
4124
4125 889 m_logSink.resetStringStream();
4126 889 }
4127
4128 1 model::ConstructionBase ForwardTranslator::interiorPartitionSurfaceConstruction(model::Model& model) {
4129
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
2 if (m_interiorPartitionSurfaceConstruction) {
4130 ✗ return *m_interiorPartitionSurfaceConstruction;
4131 }
4132
4133
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 StandardOpaqueMaterial material(model, "MediumSmooth", 0.0254, 0.16, 800, 1090);
4134
1/1
✓ Branch 1 taken 1 time.
1 material.setThermalAbsorptance(0.4);
4135
1/1
✓ Branch 1 taken 1 time.
1 material.setSolarAbsorptance(0.4);
4136
1/1
✓ Branch 1 taken 1 time.
1 material.setVisibleAbsorptance(0.3);
4137
4138
1/1
✓ Branch 1 taken 1 time.
1 model::Construction construction(model);
4139
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 construction.setName("Interior Partition Surface Construction");
4140
1/1
✓ Branch 1 taken 1 time.
1 construction.insertLayer(0, material);
4141
1/1
✓ Branch 1 taken 1 time.
1 m_interiorPartitionSurfaceConstruction = construction;
4142
4143
1/1
✓ Branch 1 taken 1 time.
1 translateAndMapModelObject(material);
4144
1/1
✓ Branch 1 taken 1 time.
1 translateAndMapModelObject(construction);
4145
4146
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 return *m_interiorPartitionSurfaceConstruction;
4147 1 }
4148
4149 ✗ model::ConstructionBase ForwardTranslator::exteriorSurfaceConstruction(model::Model& model) {
4150 ✗ if (m_exteriorSurfaceConstruction) {
4151 ✗ return *m_exteriorSurfaceConstruction;
4152 }
4153
4154 ✗ StandardOpaqueMaterial material(model, "MediumSmooth", 0.1524, 0.49, 512, 880);
4155 ✗ material.setThermalAbsorptance(0.6);
4156 ✗ material.setSolarAbsorptance(0.6);
4157 ✗ material.setVisibleAbsorptance(0.5);
4158
4159 ✗ model::Construction construction(model);
4160 ✗ construction.setName("Interior Partition Surface Construction");
4161 ✗ construction.insertLayer(0, material);
4162 ✗ m_exteriorSurfaceConstruction = construction;
4163
4164 ✗ translateAndMapModelObject(material);
4165 ✗ translateAndMapModelObject(construction);
4166
4167 ✗ return *m_exteriorSurfaceConstruction;
4168 ✗ }
4169
4170 507 model::ConstructionBase ForwardTranslator::reverseConstruction(const model::ConstructionBase& construction) {
4171
2/2
✓ Branch 1 taken 507 times.
✓ Branch 4 taken 507 times.
507 auto it = m_constructionHandleToReversedConstructions.find(construction.handle());
4172
2/2
✓ Branch 2 taken 439 times.
✓ Branch 3 taken 68 times.
507 if (it != m_constructionHandleToReversedConstructions.end()) {
4173
1/1
✓ Branch 2 taken 439 times.
439 return it->second;
4174 }
4175
4176
3/3
✓ Branch 1 taken 68 times.
✓ Branch 5 taken 36 times.
✓ Branch 6 taken 32 times.
68 if (!construction.optionalCast<model::LayeredConstruction>()) {
4177
3/3
✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
✓ Branch 7 taken 36 times.
36 m_constructionHandleToReversedConstructions.insert(std::make_pair(construction.handle(), construction));
4178
1/1
✓ Branch 1 taken 36 times.
36 return construction;
4179 }
4180
4181
1/1
✓ Branch 1 taken 32 times.
32 auto layeredConstruction = construction.cast<model::LayeredConstruction>();
4182
4183
3/3
✓ Branch 1 taken 32 times.
✓ Branch 3 taken 30 times.
✓ Branch 4 taken 2 times.
32 if (layeredConstruction.isSymmetric()) {
4184
3/3
✓ Branch 1 taken 30 times.
✓ Branch 4 taken 30 times.
✓ Branch 7 taken 30 times.
30 m_constructionHandleToReversedConstructions.insert(std::make_pair(construction.handle(), construction));
4185
1/1
✓ Branch 1 taken 30 times.
30 return construction;
4186 }
4187
4188
2/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
4 if (construction.optionalCast<model::Construction>()) {
4189
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 model::Construction reversed = construction.cast<model::Construction>().reverseConstruction();
4190
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 m_constructionHandleToReversedConstructions.insert(std::make_pair(construction.handle(), reversed));
4191 2 return std::move(reversed);
4192 2 }
4193
4194 ✗ if (construction.optionalCast<model::ConstructionWithInternalSource>()) {
4195 model::ConstructionWithInternalSource reversed =
4196 ✗ construction.cast<model::ConstructionWithInternalSource>().reverseConstructionWithInternalSource();
4197 ✗ m_constructionHandleToReversedConstructions.insert(std::make_pair(construction.handle(), reversed));
4198 ✗ return std::move(reversed);
4199 ✗ }
4200
4201 // DLM: this is not right, should make reverseConstruction a virtual method on LayeredConstruction so it will work for ConstructionWithInternalSource, etc
4202 ✗ LOG(Error, "Do not know how to reverse construction " << construction);
4203
4204 ✗ model::MaterialVector layers = layeredConstruction.layers();
4205 ✗ std::reverse(layers.begin(), layers.end());
4206
4207 ✗ model::Construction reversed = model::Construction(construction.model());
4208 ✗ reversed.setName(construction.name().get() + " Reversed");
4209 ✗ reversed.setLayers(layers);
4210 ✗ m_constructionHandleToReversedConstructions.insert(std::make_pair(construction.handle(), reversed));
4211
4212 ✗ return std::move(reversed);
4213 32 }
4214
4215 889 void ForwardTranslator::resolveMatchedSurfaceConstructionConflicts(model::Model& model) {
4216 // DLM: there is duplicate code in Surface_Impl::construction
4217 // if you update this code you must update that code
4218
4219 889 std::set<Handle> processedSurfaces;
4220
4221
1/1
✓ Branch 1 taken 889 times.
889 model::SurfaceVector surfaces = model.getConcreteModelObjects<model::Surface>();
4222
2/2
✓ Branch 5 taken 3315 times.
✓ Branch 6 taken 889 times.
4204 for (auto& surface : surfaces) {
4223
4224
4/4
✓ Branch 2 taken 3315 times.
✓ Branch 5 taken 3315 times.
✓ Branch 8 taken 544 times.
✓ Branch 9 taken 2771 times.
3315 if (processedSurfaces.find(surface.handle()) != processedSurfaces.end()) {
4225 3315 continue;
4226 }
4227
4228
1/1
✓ Branch 1 taken 2771 times.
2771 model::OptionalSurface adjacentSurface = surface.adjacentSurface();
4229
2/2
✓ Branch 1 taken 2227 times.
✓ Branch 2 taken 544 times.
2771 if (!adjacentSurface) {
4230
2/2
✓ Branch 1 taken 2227 times.
✓ Branch 4 taken 2227 times.
2227 processedSurfaces.insert(surface.handle());
4231 2227 continue;
4232 }
4233
4234
1/1
✓ Branch 1 taken 544 times.
544 boost::optional<std::pair<model::ConstructionBase, int>> constructionWithSearchDistance = surface.constructionWithSearchDistance();
4235 boost::optional<std::pair<model::ConstructionBase, int>> adjacentConstructionWithSearchDistance =
4236
2/2
✓ Branch 1 taken 544 times.
✓ Branch 4 taken 544 times.
544 adjacentSurface->constructionWithSearchDistance();
4237
4238
6/6
✓ Branch 0 taken 391 times.
✓ Branch 1 taken 153 times.
✓ Branch 3 taken 106 times.
✓ Branch 4 taken 285 times.
✓ Branch 5 taken 106 times.
✓ Branch 6 taken 438 times.
544 if (constructionWithSearchDistance && !adjacentConstructionWithSearchDistance) {
4239
4240
2/2
✓ Branch 1 taken 106 times.
✓ Branch 4 taken 106 times.
106 model::ConstructionBase c1 = constructionWithSearchDistance->first;
4241
1/1
✓ Branch 1 taken 106 times.
106 model::ConstructionBase c2 = reverseConstruction(c1);
4242
4243
15/15
✓ Branch 1 taken 106 times.
✓ Branch 4 taken 106 times.
✓ Branch 7 taken 106 times.
✓ Branch 10 taken 106 times.
✓ Branch 13 taken 106 times.
✓ Branch 16 taken 106 times.
✓ Branch 19 taken 106 times.
✓ Branch 22 taken 106 times.
✓ Branch 25 taken 106 times.
✓ Branch 28 taken 106 times.
✓ Branch 31 taken 106 times.
✓ Branch 34 taken 106 times.
✓ Branch 40 taken 106 times.
✓ Branch 43 taken 106 times.
✓ Branch 46 taken 106 times.
106 LOG(Info, "Surface '" << surface.nameString() << "' has a construction and '" << adjacentSurface->nameString() << "' does not, using '"
4244 << surface.nameString() << "'\'s construction.");
4245
4246
1/1
✓ Branch 1 taken 106 times.
106 surface.setConstruction(c1);
4247
2/2
✓ Branch 1 taken 106 times.
✓ Branch 4 taken 106 times.
106 adjacentSurface->setConstruction(c2);
4248
2/2
✓ Branch 1 taken 106 times.
✓ Branch 4 taken 106 times.
106 processedSurfaces.insert(surface.handle());
4249
3/3
✓ Branch 1 taken 106 times.
✓ Branch 4 taken 106 times.
✓ Branch 7 taken 106 times.
106 processedSurfaces.insert(adjacentSurface->handle());
4250 106 continue;
4251 106 }
4252
4253
6/6
✓ Branch 1 taken 153 times.
✓ Branch 2 taken 285 times.
✓ Branch 3 taken 88 times.
✓ Branch 4 taken 65 times.
✓ Branch 5 taken 88 times.
✓ Branch 6 taken 350 times.
591 if (!constructionWithSearchDistance && adjacentConstructionWithSearchDistance) {
4254
4255
2/2
✓ Branch 1 taken 88 times.
✓ Branch 4 taken 88 times.
88 model::ConstructionBase c2 = adjacentConstructionWithSearchDistance->first;
4256
1/1
✓ Branch 1 taken 88 times.
88 model::ConstructionBase c1 = reverseConstruction(c2);
4257
4258
16/16
✓ Branch 1 taken 88 times.
✓ Branch 4 taken 88 times.
✓ Branch 7 taken 88 times.
✓ Branch 10 taken 88 times.
✓ Branch 13 taken 88 times.
✓ Branch 16 taken 88 times.
✓ Branch 19 taken 88 times.
✓ Branch 22 taken 88 times.
✓ Branch 25 taken 88 times.
✓ Branch 28 taken 88 times.
✓ Branch 31 taken 88 times.
✓ Branch 34 taken 88 times.
✓ Branch 37 taken 88 times.
✓ Branch 43 taken 88 times.
✓ Branch 46 taken 88 times.
✓ Branch 49 taken 88 times.
88 LOG(Info, "Surface '" << adjacentSurface->nameString() << "' has a construction and '" << surface.nameString() << "' does not, using '"
4259 << adjacentSurface->nameString() << "'\'s construction.");
4260
4261
1/1
✓ Branch 1 taken 88 times.
88 surface.setConstruction(c1);
4262
2/2
✓ Branch 1 taken 88 times.
✓ Branch 4 taken 88 times.
88 adjacentSurface->setConstruction(c2);
4263
2/2
✓ Branch 1 taken 88 times.
✓ Branch 4 taken 88 times.
88 processedSurfaces.insert(surface.handle());
4264
3/3
✓ Branch 1 taken 88 times.
✓ Branch 4 taken 88 times.
✓ Branch 7 taken 88 times.
88 processedSurfaces.insert(adjacentSurface->handle());
4265 88 continue;
4266 88 }
4267
4268
5/6
✓ Branch 1 taken 65 times.
✓ Branch 2 taken 285 times.
✓ Branch 4 taken 65 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 65 times.
✓ Branch 7 taken 285 times.
350 if (!constructionWithSearchDistance && !adjacentConstructionWithSearchDistance) {
4269 // no constructions, nothing to be done
4270
12/12
✓ Branch 1 taken 65 times.
✓ Branch 4 taken 65 times.
✓ Branch 7 taken 65 times.
✓ Branch 10 taken 65 times.
✓ Branch 13 taken 65 times.
✓ Branch 16 taken 65 times.
✓ Branch 19 taken 65 times.
✓ Branch 22 taken 65 times.
✓ Branch 25 taken 65 times.
✓ Branch 30 taken 65 times.
✓ Branch 33 taken 65 times.
✓ Branch 36 taken 65 times.
65 LOG(Error, "No construction for either surface '" << surface.nameString() << "', and '" << adjacentSurface->nameString() << "'");
4271
4272
2/2
✓ Branch 1 taken 65 times.
✓ Branch 4 taken 65 times.
65 processedSurfaces.insert(surface.handle());
4273
3/3
✓ Branch 1 taken 65 times.
✓ Branch 4 taken 65 times.
✓ Branch 7 taken 65 times.
65 processedSurfaces.insert(adjacentSurface->handle());
4274 65 continue;
4275 65 }
4276
4277 // both surfaces return a construction
4278
4279
7/7
✓ Branch 1 taken 285 times.
✓ Branch 4 taken 285 times.
✓ Branch 7 taken 285 times.
✓ Branch 10 taken 285 times.
✓ Branch 13 taken 285 times.
✓ Branch 15 taken 278 times.
✓ Branch 16 taken 7 times.
285 if (constructionWithSearchDistance->first.handle() == adjacentConstructionWithSearchDistance->first.handle()) {
4280
4281 // both surfaces have same construction
4282
4283
2/2
✓ Branch 1 taken 278 times.
✓ Branch 4 taken 278 times.
278 model::ConstructionBase c1 = constructionWithSearchDistance->first;
4284
1/1
✓ Branch 1 taken 278 times.
278 model::ConstructionBase c2 = reverseConstruction(c1);
4285
4286
4/5
✓ Branch 1 taken 278 times.
✓ Branch 4 taken 278 times.
✓ Branch 7 taken 278 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 278 times.
278 if (c1.handle() != c2.handle()) {
4287 ✗ LOG(Warn, "Both surfaces '" << surface.nameString() << "', and '" << adjacentSurface->nameString() << "' reference the same construction '"
4288 << c1.nameString() << "' but it is not symmetric, creating a reversed copy.");
4289
4290 // DLM: use surface name to choose which surface gets the original copy, not a good way but at least repeatable
4291 ✗ if (surface.nameString() < adjacentSurface->nameString()) {
4292 ✗ surface.setConstruction(c1);
4293 ✗ adjacentSurface->setConstruction(c2);
4294 } else {
4295 ✗ surface.setConstruction(c2);
4296 ✗ adjacentSurface->setConstruction(c1);
4297 }
4298 }
4299
4300
2/2
✓ Branch 1 taken 278 times.
✓ Branch 4 taken 278 times.
278 processedSurfaces.insert(surface.handle());
4301
3/3
✓ Branch 1 taken 278 times.
✓ Branch 4 taken 278 times.
✓ Branch 7 taken 278 times.
278 processedSurfaces.insert(adjacentSurface->handle());
4302 278 continue;
4303 278 }
4304
4305 // both surfaces return a construction and they are not the same
4306
4307
3/4
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 7 times.
7 if (constructionWithSearchDistance->second < adjacentConstructionWithSearchDistance->second) {
4308 // lower search distance to construction
4309 ✗ model::ConstructionBase c1 = constructionWithSearchDistance->first;
4310 ✗ model::ConstructionBase c2 = reverseConstruction(c1);
4311
4312 ✗ LOG(Info, "Surfaces '" << surface.nameString() << "', and '" << adjacentSurface->nameString()
4313 << "' reference different constructions, choosing '" << surface.nameString()
4314 << "'\'s construction based on search distance.");
4315
4316 ✗ surface.setConstruction(c1);
4317 ✗ adjacentSurface->setConstruction(c2);
4318 ✗ processedSurfaces.insert(surface.handle());
4319 ✗ processedSurfaces.insert(adjacentSurface->handle());
4320 ✗ continue;
4321 ✗ }
4322
4323
3/4
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 7 times.
7 if (constructionWithSearchDistance->second > adjacentConstructionWithSearchDistance->second) {
4324 // lower search distance to adjacent construction
4325 ✗ model::ConstructionBase c2 = adjacentConstructionWithSearchDistance->first;
4326 ✗ model::ConstructionBase c1 = reverseConstruction(c2);
4327
4328 ✗ LOG(Info, "Surfaces '" << surface.nameString() << "', and '" << adjacentSurface->nameString()
4329 << "' reference different constructions, choosing '" << adjacentSurface->nameString()
4330 << "'\'s construction based on search distance.");
4331
4332 ✗ surface.setConstruction(c1);
4333 ✗ adjacentSurface->setConstruction(c2);
4334 ✗ processedSurfaces.insert(surface.handle());
4335 ✗ processedSurfaces.insert(adjacentSurface->handle());
4336 ✗ continue;
4337 ✗ }
4338
4339 // both surfaces return a construction, they are not the same, and both have same search distance
4340
4341
2/5
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
14 if (constructionWithSearchDistance->first.optionalCast<model::LayeredConstruction>()
4342
7/13
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 7 times.
✓ Branch 10 taken 7 times.
✓ Branch 13 taken 7 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 7 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 7 times.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
28 && adjacentConstructionWithSearchDistance->first.optionalCast<model::LayeredConstruction>()) {
4343
4/5
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
✓ Branch 9 taken 7 times.
✗ Branch 10 not taken.
21 if (constructionWithSearchDistance->first.cast<model::LayeredConstruction>().reverseEqualLayers(
4344
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 adjacentConstructionWithSearchDistance->first.cast<model::LayeredConstruction>())) {
4345 // these constructions are reverse equal
4346
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 surface.setConstruction(constructionWithSearchDistance->first);
4347
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
7 adjacentSurface->setConstruction(adjacentConstructionWithSearchDistance->first);
4348
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 processedSurfaces.insert(surface.handle());
4349
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
7 processedSurfaces.insert(adjacentSurface->handle());
4350 7 continue;
4351 }
4352 }
4353
4354 // give up for now, we can add more later
4355 ✗ LOG(Error, "Could not resolve matched surface construction conflicts between surfaces '" << surface.nameString() << "', and '"
4356 << adjacentSurface->nameString() << "'");
4357 ✗ surface.setConstruction(constructionWithSearchDistance->first);
4358 ✗ adjacentSurface->setConstruction(adjacentConstructionWithSearchDistance->first);
4359 ✗ processedSurfaces.insert(surface.handle());
4360 ✗ processedSurfaces.insert(adjacentSurface->handle());
4361 3859 }
4362 889 }
4363
4364 889 void ForwardTranslator::resolveMatchedSubSurfaceConstructionConflicts(model::Model& model) {
4365 // DLM: there is duplicate code in SubSurface_Impl::construction
4366 // if you update this code you must update that code
4367
4368 889 std::set<Handle> processedSubSurfaces;
4369
4370
1/1
✓ Branch 1 taken 889 times.
889 model::SubSurfaceVector subSurfaces = model.getConcreteModelObjects<model::SubSurface>();
4371
2/2
✓ Branch 5 taken 397 times.
✓ Branch 6 taken 889 times.
1286 for (auto& subSurface : subSurfaces) {
4372
4373
4/4
✓ Branch 2 taken 397 times.
✓ Branch 5 taken 397 times.
✓ Branch 8 taken 44 times.
✓ Branch 9 taken 353 times.
397 if (processedSubSurfaces.find(subSurface.handle()) != processedSubSurfaces.end()) {
4374 397 continue;
4375 }
4376
4377
1/1
✓ Branch 1 taken 353 times.
353 model::OptionalSubSurface adjacentSubSurface = subSurface.adjacentSubSurface();
4378
2/2
✓ Branch 1 taken 309 times.
✓ Branch 2 taken 44 times.
353 if (!adjacentSubSurface) {
4379
2/2
✓ Branch 1 taken 309 times.
✓ Branch 4 taken 309 times.
309 processedSubSurfaces.insert(subSurface.handle());
4380 309 continue;
4381 }
4382
4383
1/1
✓ Branch 1 taken 44 times.
44 boost::optional<std::pair<model::ConstructionBase, int>> constructionWithSearchDistance = subSurface.constructionWithSearchDistance();
4384 boost::optional<std::pair<model::ConstructionBase, int>> adjacentConstructionWithSearchDistance =
4385
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
44 adjacentSubSurface->constructionWithSearchDistance();
4386
4387
6/6
✓ Branch 0 taken 22 times.
✓ Branch 1 taken 22 times.
✓ Branch 3 taken 21 times.
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 21 times.
✓ Branch 6 taken 23 times.
44 if (constructionWithSearchDistance && !adjacentConstructionWithSearchDistance) {
4388
4389
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 model::ConstructionBase c1 = constructionWithSearchDistance->first;
4390
1/1
✓ Branch 1 taken 21 times.
21 model::ConstructionBase c2 = reverseConstruction(c1);
4391
4392
15/15
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
✓ Branch 7 taken 21 times.
✓ Branch 10 taken 21 times.
✓ Branch 13 taken 21 times.
✓ Branch 16 taken 21 times.
✓ Branch 19 taken 21 times.
✓ Branch 22 taken 21 times.
✓ Branch 25 taken 21 times.
✓ Branch 28 taken 21 times.
✓ Branch 31 taken 21 times.
✓ Branch 34 taken 21 times.
✓ Branch 40 taken 21 times.
✓ Branch 43 taken 21 times.
✓ Branch 46 taken 21 times.
21 LOG(Info, "SubSurface '" << subSurface.nameString() << "' has a construction and '" << adjacentSubSurface->nameString()
4393 << "' does not, using '" << subSurface.nameString() << "'\'s construction.");
4394
4395
1/1
✓ Branch 1 taken 21 times.
21 subSurface.setConstruction(c1);
4396
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 adjacentSubSurface->setConstruction(c2);
4397
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 processedSubSurfaces.insert(subSurface.handle());
4398
3/3
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
✓ Branch 7 taken 21 times.
21 processedSubSurfaces.insert(adjacentSubSurface->handle());
4399 21 continue;
4400 21 }
4401
4402
6/6
✓ Branch 1 taken 22 times.
✓ Branch 2 taken 1 time.
✓ Branch 3 taken 13 times.
✓ Branch 4 taken 9 times.
✓ Branch 5 taken 13 times.
✓ Branch 6 taken 10 times.
45 if (!constructionWithSearchDistance && adjacentConstructionWithSearchDistance) {
4403
4404
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 model::ConstructionBase c2 = adjacentConstructionWithSearchDistance->first;
4405
1/1
✓ Branch 1 taken 13 times.
13 model::ConstructionBase c1 = reverseConstruction(c2);
4406
4407
16/16
✓ 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.
✓ Branch 19 taken 13 times.
✓ Branch 22 taken 13 times.
✓ Branch 25 taken 13 times.
✓ Branch 28 taken 13 times.
✓ Branch 31 taken 13 times.
✓ Branch 34 taken 13 times.
✓ Branch 37 taken 13 times.
✓ Branch 43 taken 13 times.
✓ Branch 46 taken 13 times.
✓ Branch 49 taken 13 times.
13 LOG(Info, "SubSurface '" << adjacentSubSurface->nameString() << "' has a construction and '" << subSurface.nameString()
4408 << "' does not, using '" << adjacentSubSurface->nameString() << "'\'s construction.");
4409
4410
1/1
✓ Branch 1 taken 13 times.
13 subSurface.setConstruction(c1);
4411
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 adjacentSubSurface->setConstruction(c2);
4412
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 processedSubSurfaces.insert(subSurface.handle());
4413
3/3
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
✓ Branch 7 taken 13 times.
13 processedSubSurfaces.insert(adjacentSubSurface->handle());
4414 13 continue;
4415 13 }
4416
4417
5/6
✓ Branch 1 taken 9 times.
✓ Branch 2 taken 1 time.
✓ Branch 4 taken 9 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 9 times.
✓ Branch 7 taken 1 time.
10 if (!constructionWithSearchDistance && !adjacentConstructionWithSearchDistance) {
4418 // no constructions, nothing to be done
4419
12/12
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
✓ Branch 10 taken 9 times.
✓ Branch 13 taken 9 times.
✓ Branch 16 taken 9 times.
✓ Branch 19 taken 9 times.
✓ Branch 22 taken 9 times.
✓ Branch 25 taken 9 times.
✓ Branch 30 taken 9 times.
✓ Branch 33 taken 9 times.
✓ Branch 36 taken 9 times.
9 LOG(Error, "No construction for either sub surface '" << subSurface.nameString() << "', and '" << adjacentSubSurface->nameString() << "'");
4420
4421
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
9 processedSubSurfaces.insert(subSurface.handle());
4422
3/3
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
9 processedSubSurfaces.insert(adjacentSubSurface->handle());
4423 9 continue;
4424 9 }
4425
4426 // both surfaces return a construction
4427
4428
6/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 15 taken 1 time.
✗ Branch 16 not taken.
1 if (constructionWithSearchDistance->first.handle() == adjacentConstructionWithSearchDistance->first.handle()) {
4429
4430 // both surfaces have same construction
4431
4432
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 model::ConstructionBase c1 = constructionWithSearchDistance->first;
4433
1/1
✓ Branch 1 taken 1 time.
1 model::ConstructionBase c2 = reverseConstruction(c1);
4434
4435
4/5
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 time.
1 if (c1.handle() != c2.handle()) {
4436 ✗ LOG(Warn, "Both sub surfaces '" << subSurface.nameString() << "', and '" << adjacentSubSurface->nameString()
4437 << "' reference the same construction '" << c1.nameString()
4438 << "' but it is not symmetric, creating a reversed copy.");
4439
4440 // DLM: use subSurface name to choose which surface gets the original copy, not a good way but at least repeatable
4441 ✗ if (subSurface.nameString() < adjacentSubSurface->nameString()) {
4442 ✗ subSurface.setConstruction(c1);
4443 ✗ adjacentSubSurface->setConstruction(c2);
4444 } else {
4445 ✗ subSurface.setConstruction(c2);
4446 ✗ adjacentSubSurface->setConstruction(c1);
4447 }
4448 }
4449
4450
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 processedSubSurfaces.insert(subSurface.handle());
4451
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
1 processedSubSurfaces.insert(adjacentSubSurface->handle());
4452 1 continue;
4453 1 }
4454
4455 // both surfaces return a construction and they are not the same
4456
4457 ✗ if (constructionWithSearchDistance->second < adjacentConstructionWithSearchDistance->second) {
4458 // lower search distance to construction
4459 ✗ model::ConstructionBase c1 = constructionWithSearchDistance->first;
4460 ✗ model::ConstructionBase c2 = reverseConstruction(c1);
4461
4462 ✗ LOG(Info, "SubSurfaces '" << subSurface.nameString() << "', and '" << adjacentSubSurface->nameString()
4463 << "' reference different constructions, choosing '" << subSurface.nameString()
4464 << "'\'s construction based on search distance.");
4465
4466 ✗ subSurface.setConstruction(c1);
4467 ✗ adjacentSubSurface->setConstruction(c2);
4468 ✗ processedSubSurfaces.insert(subSurface.handle());
4469 ✗ processedSubSurfaces.insert(adjacentSubSurface->handle());
4470 ✗ continue;
4471 ✗ }
4472
4473 ✗ if (constructionWithSearchDistance->second > adjacentConstructionWithSearchDistance->second) {
4474 // lower search distance to adjacent construction
4475 ✗ model::ConstructionBase c2 = adjacentConstructionWithSearchDistance->first;
4476 ✗ model::ConstructionBase c1 = reverseConstruction(c2);
4477
4478 ✗ LOG(Info, "SubSurfaces '" << subSurface.nameString() << "', and '" << adjacentSubSurface->nameString()
4479 << "' reference different constructions, choosing '" << adjacentSubSurface->nameString()
4480 << "'\'s construction based on search distance.");
4481
4482 ✗ subSurface.setConstruction(c1);
4483 ✗ adjacentSubSurface->setConstruction(c2);
4484 ✗ processedSubSurfaces.insert(subSurface.handle());
4485 ✗ processedSubSurfaces.insert(adjacentSubSurface->handle());
4486 ✗ continue;
4487 ✗ }
4488
4489 // both surfaces return a construction, they are not the same, and both have same search distance
4490
4491 ✗ if (constructionWithSearchDistance->first.optionalCast<model::LayeredConstruction>()
4492 ✗ && adjacentConstructionWithSearchDistance->first.optionalCast<model::LayeredConstruction>()) {
4493 ✗ if (constructionWithSearchDistance->first.cast<model::LayeredConstruction>().reverseEqualLayers(
4494 ✗ adjacentConstructionWithSearchDistance->first.cast<model::LayeredConstruction>())) {
4495 // these constructions are reverse equal
4496 ✗ subSurface.setConstruction(constructionWithSearchDistance->first);
4497 ✗ adjacentSubSurface->setConstruction(adjacentConstructionWithSearchDistance->first);
4498 ✗ processedSubSurfaces.insert(subSurface.handle());
4499 ✗ processedSubSurfaces.insert(adjacentSubSurface->handle());
4500 ✗ continue;
4501 }
4502 }
4503
4504 // give up for now, we can add more later
4505 ✗ LOG(Error, "Could not resolve matched construction conflicts between sub surfaces '" << subSurface.nameString() << "', and '"
4506 << adjacentSubSurface->nameString() << "'");
4507 ✗ subSurface.setConstruction(constructionWithSearchDistance->first);
4508 ✗ adjacentSubSurface->setConstruction(adjacentConstructionWithSearchDistance->first);
4509 ✗ processedSubSurfaces.insert(subSurface.handle());
4510 ✗ processedSubSurfaces.insert(adjacentSubSurface->handle());
4511 441 }
4512 889 }
4513
4514 856 void ForwardTranslator::createStandardOutputRequests(const model::Model& model) {
4515
2/2
✓ Branch 1 taken 844 times.
✓ Branch 2 taken 12 times.
856 if (!m_forwardTranslatorOptions.excludeHTMLOutputReport()) {
4516
3/3
✓ Branch 1 taken 844 times.
✓ Branch 5 taken 839 times.
✓ Branch 6 taken 5 times.
844 if (!model.getOptionalUniqueModelObject<model::OutputControlTableStyle>()) {
4517
1/1
✓ Branch 1 taken 839 times.
839 IdfObject& tableStyle = m_idfObjects.emplace_back(IddObjectType::OutputControl_Table_Style);
4518
2/2
✓ Branch 1 taken 839 times.
✓ Branch 4 taken 839 times.
839 tableStyle.setString(OutputControl_Table_StyleFields::ColumnSeparator, "HTML");
4519
2/2
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 837 times.
839 if (m_forwardTranslatorOptions.iPTabularOutput()) {
4520
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
4 tableStyle.setString(OutputControl_Table_StyleFields::UnitConversion, "InchPound");
4521 }
4522 }
4523 }
4524
4525
2/2
✓ Branch 1 taken 842 times.
✓ Branch 2 taken 14 times.
856 if (!m_forwardTranslatorOptions.excludeVariableDictionary()) {
4526
2/2
✓ Branch 1 taken 842 times.
✓ Branch 4 taken 842 times.
842 IdfObject rddRequest(IddObjectType::Output_VariableDictionary);
4527
2/2
✓ Branch 1 taken 842 times.
✓ Branch 4 taken 842 times.
1684 rddRequest.setString(Output_VariableDictionaryFields::KeyField, "IDF");
4528
2/2
✓ Branch 1 taken 842 times.
✓ Branch 4 taken 842 times.
842 rddRequest.setString(Output_VariableDictionaryFields::SortOption, "Unsorted");
4529
1/1
✓ Branch 1 taken 842 times.
842 m_idfObjects.push_back(rddRequest);
4530 842 }
4531
4532
2/2
✓ Branch 1 taken 842 times.
✓ Branch 2 taken 14 times.
856 if (!m_forwardTranslatorOptions.excludeSQliteOutputReport()) {
4533
3/3
✓ Branch 1 taken 842 times.
✓ Branch 5 taken 839 times.
✓ Branch 6 taken 3 times.
842 if (!model.getOptionalUniqueModelObject<model::OutputSQLite>()) {
4534
1/1
✓ Branch 1 taken 839 times.
839 IdfObject& sqliteOutput = m_idfObjects.emplace_back(IddObjectType::Output_SQLite);
4535
2/2
✓ Branch 1 taken 839 times.
✓ Branch 4 taken 839 times.
1678 sqliteOutput.setString(Output_SQLiteFields::OptionType, "SimpleAndTabular");
4536 }
4537 }
4538
4539 // ensure at least one life cycle cost exists to prevent crash in E+ 8
4540
2/2
✓ Branch 1 taken 837 times.
✓ Branch 2 taken 19 times.
856 if (!m_forwardTranslatorOptions.excludeLCCObjects()) {
4541 837 bool hasAtLeastOneCost = std::any_of(m_idfObjects.cbegin(), m_idfObjects.cend(), [](const auto& obj) {
4542
2/2
✓ Branch 1 taken 48809 times.
✓ Branch 4 taken 48809 times.
48809 auto iddObjType = obj.iddObject().type();
4543
1/1
✓ Branch 1 taken 48809 times.
48809 return (iddObjType == openstudio::IddObjectType::LifeCycleCost_NonrecurringCost)
4544
5/5
✓ Branch 0 taken 48802 times.
✓ Branch 1 taken 7 times.
✓ Branch 3 taken 48802 times.
✓ Branch 6 taken 2 times.
✓ Branch 7 taken 48800 times.
48809 || (iddObjType == openstudio::IddObjectType::LifeCycleCost_RecurringCosts);
4545 });
4546
4547
2/2
✓ Branch 0 taken 828 times.
✓ Branch 1 taken 9 times.
837 if (!hasAtLeastOneCost) {
4548 // add default cost
4549
1/1
✓ Branch 1 taken 828 times.
828 auto& idfObject = m_idfObjects.emplace_back(openstudio::IddObjectType::LifeCycleCost_NonrecurringCost);
4550
2/2
✓ Branch 1 taken 828 times.
✓ Branch 4 taken 828 times.
1656 idfObject.setString(LifeCycleCost_NonrecurringCostFields::Name, "Default Cost");
4551
2/2
✓ Branch 1 taken 828 times.
✓ Branch 4 taken 828 times.
828 idfObject.setString(LifeCycleCost_NonrecurringCostFields::Category, "Construction");
4552 828 idfObject.setDouble(LifeCycleCost_NonrecurringCostFields::Cost, 0.0);
4553
2/2
✓ Branch 1 taken 828 times.
✓ Branch 4 taken 828 times.
1656 idfObject.setString(LifeCycleCost_NonrecurringCostFields::StartofCosts, "ServicePeriod");
4554 }
4555 }
4556 856 }
4557
4558 14926 IdfObject ForwardTranslator::createAndRegisterIdfObject(const IddObjectType& idfObjectType, const model::ModelObject& modelObject) {
4559 14926 IdfObject idfObject(idfObjectType);
4560
1/1
✓ Branch 1 taken 14926 times.
14926 m_idfObjects.push_back(idfObject);
4561
3/3
✓ Branch 1 taken 14926 times.
✓ Branch 4 taken 14926 times.
✓ Branch 7 taken 14926 times.
14926 m_map.insert(std::make_pair(modelObject.handle(), idfObject));
4562 14926 return idfObject;
4563 ✗ }
4564
4565 9712 IdfObject ForwardTranslator::createRegisterAndNameIdfObject(const IddObjectType& idfObjectType, const model::ModelObject& modelObject) {
4566 9712 IdfObject idfObject = createAndRegisterIdfObject(idfObjectType, modelObject);
4567
3/3
✓ Branch 1 taken 9712 times.
✓ Branch 3 taken 8853 times.
✓ Branch 4 taken 859 times.
19424 if (OptionalString moName = modelObject.name()) {
4568
2/2
✓ Branch 1 taken 8853 times.
✓ Branch 4 taken 8853 times.
8853 idfObject.setName(*moName);
4569 9712 }
4570 9712 return idfObject;
4571 ✗ }
4572
4573 531 boost::optional<IdfFile> ForwardTranslator::findIdfFile(const std::string& path) {
4574
1/1
✓ Branch 1 taken 531 times.
531 std::stringstream ss;
4575
2/2
✓ Branch 1 taken 531 times.
✓ Branch 4 taken 531 times.
531 ss << ::energyplus::embedded_files::getFileAsString(path);
4576
2/2
✓ Branch 1 taken 531 times.
✓ Branch 4 taken 531 times.
1062 return IdfFile::load(ss, IddFileType::EnergyPlus);
4577 531 }
4578
4579 134 bool ForwardTranslator::isHVACComponentWithinUnitary(const model::HVACComponent& hvacComponent) {
4580
13/21
✓ Branch 1 taken 134 times.
✓ Branch 4 taken 71 times.
✓ Branch 5 taken 63 times.
✓ Branch 7 taken 71 times.
✓ Branch 10 taken 63 times.
✓ Branch 11 taken 8 times.
✓ Branch 13 taken 63 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 63 times.
✓ Branch 18 taken 63 times.
✓ Branch 19 taken 71 times.
✓ Branch 21 taken 71 times.
✓ Branch 22 taken 63 times.
✓ Branch 24 taken 134 times.
✗ Branch 25 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
402 return (hvacComponent.containingHVACComponent() || hvacComponent.containingZoneHVACComponent() || hvacComponent.containingStraightComponent());
4581 }
4582
4583 632 void ForwardTranslator::createFluidPropertiesMap() {
4584
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R11", ":/Resources/R11_FluidPropertiesDataSet.idf"));
4585
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R12", ":/Resources/R12_FluidPropertiesDataSet.idf"));
4586
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R22", ":/Resources/R22_FluidPropertiesDataSet.idf"));
4587
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R123", ":/Resources/R123_FluidPropertiesDataSet.idf"));
4588
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R134a", ":/Resources/R134a_FluidPropertiesDataSet.idf"));
4589
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R404a", ":/Resources/R404a_FluidPropertiesDataSet.idf"));
4590
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R407a", ":/Resources/R407a_FluidPropertiesDataSet.idf"));
4591
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R410a", ":/Resources/R410a_FluidPropertiesDataSet.idf"));
4592
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("NH3", ":/Resources/NH3_FluidPropertiesDataSet.idf"));
4593
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R507a", ":/Resources/R507a_FluidPropertiesDataSet.idf"));
4594
1/1
✓ Branch 2 taken 632 times.
632 m_fluidPropertiesMap.insert(make_pair("R744", ":/Resources/R744_FluidPropertiesDataSet.idf"));
4595 632 }
4596
4597 56 boost::optional<IdfObject> ForwardTranslator::createFluidProperties(const std::string& glycolType, int glycolConcentration) {
4598
4599
8/26
✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 56 times.
✗ Branch 9 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✓ Branch 17 taken 56 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 56 times.
✓ Branch 21 taken 56 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 56 times.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✓ Branch 27 taken 56 times.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
168 if (!(istringEqual("PropyleneGlycol", glycolType) || istringEqual("EthyleneGlycol", glycolType))) {
4600 ✗ return boost::none;
4601 }
4602
4603
1/1
✓ Branch 1 taken 56 times.
56 std::stringstream sstm;
4604
3/3
✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
✓ Branch 7 taken 56 times.
56 sstm << glycolType << "_" << glycolConcentration;
4605
1/1
✓ Branch 1 taken 56 times.
56 std::string glycolName = sstm.str();
4606
4607
1/1
✓ Branch 3 taken 56 times.
56 auto it = std::find_if(m_idfObjects.cbegin(), m_idfObjects.cend(), [&glycolName](const IdfObject& i) {
4608
2/4
✓ Branch 1 taken 5700 times.
✓ Branch 4 taken 5700 times.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
11400 return (i.iddObject().type().value() == openstudio::IddObjectType::FluidProperties_Name)
4609
10/14
✓ Branch 1 taken 5700 times.
✓ Branch 3 taken 165 times.
✓ Branch 4 taken 5535 times.
✓ Branch 6 taken 165 times.
✓ Branch 9 taken 165 times.
✓ Branch 12 taken 165 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 165 times.
✓ Branch 16 taken 165 times.
✓ Branch 17 taken 5535 times.
✓ Branch 19 taken 5700 times.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
17100 && openstudio::istringEqual(i.getString(FluidProperties_NameFields::FluidName, true).get(), glycolName);
4610 });
4611
1/2
✗ Branch 2 not taken.
✓ Branch 3 taken 56 times.
56 if (it != m_idfObjects.cend()) {
4612 ✗ return *it;
4613 }
4614
4615 // TODO: JM 2019-03-22 I am not sure you need this one
4616 // But I temporarily removed the \reference FluidAndGlycolNames from FluidProperties_GlycolConcentration to avoid problems of having two objects of
4617 // the same reference group bearing the same name (FluidProperties:Name also has the same reference group)
4618
1/1
✓ Branch 1 taken 56 times.
56 IdfObject& fluidPropGlyConcentration = m_idfObjects.emplace_back(openstudio::IddObjectType::FluidProperties_GlycolConcentration);
4619
1/1
✓ Branch 1 taken 56 times.
56 fluidPropGlyConcentration.setName(glycolName);
4620
1/1
✓ Branch 1 taken 56 times.
56 fluidPropGlyConcentration.setString(FluidProperties_GlycolConcentrationFields::GlycolType, glycolType);
4621
1/1
✓ Branch 1 taken 56 times.
56 fluidPropGlyConcentration.setDouble(FluidProperties_GlycolConcentrationFields::GlycolConcentration, glycolConcentration * 0.01);
4622
4623 // NOTE: do not do another emplace_back before returning
4624
1/1
✓ Branch 1 taken 56 times.
56 IdfObject& fluidPropName = m_idfObjects.emplace_back(openstudio::IddObjectType::FluidProperties_Name);
4625
1/1
✓ Branch 1 taken 56 times.
56 fluidPropName.setString(FluidProperties_NameFields::FluidName, glycolName);
4626
2/2
✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
56 fluidPropName.setString(FluidProperties_NameFields::FluidType, "Glycol");
4627
4628
1/1
✓ Branch 1 taken 56 times.
56 return {fluidPropName};
4629 56 }
4630
4631 4 boost::optional<IdfObject> ForwardTranslator::createFluidProperties(const std::string& fluidType) {
4632
4633 4 boost::optional<IdfObject> idfObject;
4634 4 boost::optional<IdfFile> idfFile;
4635
4636
1/1
✓ Branch 3 taken 4 times.
4 auto it = std::find_if(m_idfObjects.cbegin(), m_idfObjects.cend(), [&fluidType](const IdfObject& i) {
4637
2/4
✓ Branch 1 taken 90 times.
✓ Branch 4 taken 90 times.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
180 return (i.iddObject().type().value() == openstudio::IddObjectType::FluidProperties_Name)
4638
4/14
✓ Branch 1 taken 90 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 90 times.
✗ Branch 6 not taken.
✗ Branch 9 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✓ Branch 17 taken 90 times.
✓ Branch 19 taken 90 times.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
270 && openstudio::istringEqual(i.getString(FluidProperties_NameFields::FluidName, true).get(), fluidType);
4639 });
4640
1/2
✗ Branch 2 not taken.
✓ Branch 3 taken 4 times.
4 if (it != m_idfObjects.cend()) {
4641 ✗ return *it;
4642 }
4643
1/1
✓ Branch 1 taken 4 times.
4 auto objInMapIt = m_fluidPropertiesMap.find(fluidType);
4644
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 if (objInMapIt != m_fluidPropertiesMap.end()) {
4645
1/1
✓ Branch 2 taken 4 times.
4 idfFile = findIdfFile(objInMapIt->second);
4646 } else {
4647 ✗ LOG(Warn, "Fluid Type not valid choice: '" << fluidType << "'");
4648 ✗ return boost::none;
4649 }
4650
4651
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (idfFile) {
4652
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 std::vector<IdfObject> fluidObjects = idfFile->objects();
4653
4654
2/2
✓ Branch 5 taken 498 times.
✓ Branch 6 taken 4 times.
502 for (auto& i : fluidObjects) {
4655
5/5
✓ Branch 1 taken 498 times.
✓ Branch 4 taken 498 times.
✓ Branch 7 taken 498 times.
✓ Branch 10 taken 4 times.
✓ Branch 11 taken 494 times.
498 if (i.iddObject().type().value() == openstudio::IddObjectType::FluidProperties_Name) {
4656
1/1
✓ Branch 1 taken 4 times.
4 idfObject = i;
4657 }
4658
1/1
✓ Branch 1 taken 498 times.
498 m_idfObjects.push_back(i);
4659 }
4660 4 }
4661
4662 4 return idfObject;
4663 4 }
4664
4665 ✗ boost::optional<IdfObject> ForwardTranslator::createSimpleSchedule(const std::string& name,
4666 const std::vector<std::pair<openstudio::Time, double>>& defaultDay,
4667 const std::vector<std::pair<openstudio::Time, double>>& summerDesignDay,
4668 const std::vector<std::pair<openstudio::Time, double>>& winterDesignDay) {
4669
4670 ✗ IdfObject idfObject(openstudio::IddObjectType::Schedule_Compact);
4671
4672 ✗ idfObject.setName(name);
4673
4674 ✗ StringVector values;
4675 ✗ values.push_back("Through: 12/31");
4676 ✗ IdfExtensibleGroup eg = idfObject.pushExtensibleGroup(values);
4677 ✗ OS_ASSERT(!eg.empty());
4678
4679 ✗ if (!summerDesignDay.empty()) {
4680 ✗ bool hasEndTime = false;
4681 ✗ double endTimeValue = 0.0;
4682 ✗ values[0] = "For: SummerDesignDay";
4683 ✗ eg = idfObject.pushExtensibleGroup(values);
4684 ✗ OS_ASSERT(!eg.empty());
4685
4686 ✗ for (const auto& [time, val] : summerDesignDay) {
4687
4688 ✗ int minutes = time.minutes();
4689 ✗ int hours = time.hours();
4690
4691 ✗ if (0 == minutes && 0 == hours) {
4692 ✗ hasEndTime = true;
4693 ✗ endTimeValue = val;
4694 ✗ continue;
4695 }
4696 ✗ values[0] =
4697 ✗ "Until: " + std::string(hours < 10 ? "0" : "") + std::to_string(hours) + std::string(minutes < 10 ? ":0" : ":") + std::to_string(minutes);
4698 ✗ eg = idfObject.pushExtensibleGroup(values);
4699 ✗ OS_ASSERT(!eg.empty());
4700 ✗ values[0] = "";
4701 ✗ eg = idfObject.pushExtensibleGroup(values);
4702 ✗ OS_ASSERT(!eg.empty());
4703 ✗ bool ok = eg.setDouble(0, val);
4704 ✗ OS_ASSERT(ok);
4705 }
4706 ✗ if (hasEndTime) {
4707 ✗ values[0] = "Until: 24:00";
4708 ✗ eg = idfObject.pushExtensibleGroup(values);
4709 ✗ OS_ASSERT(!eg.empty());
4710 ✗ values[0] = "";
4711 ✗ eg = idfObject.pushExtensibleGroup(values);
4712 ✗ OS_ASSERT(!eg.empty());
4713 ✗ bool ok = eg.setDouble(0, endTimeValue);
4714 ✗ OS_ASSERT(ok);
4715 } else {
4716 ✗ LOG(Error, "Summer Design Day must have a value for all 24 hours");
4717 }
4718 }
4719
4720 ✗ if (!winterDesignDay.empty()) {
4721 ✗ bool hasEndTime = false;
4722 ✗ double endTimeValue = 0.0;
4723 ✗ values[0] = "For: WinterDesignDay";
4724 ✗ eg = idfObject.pushExtensibleGroup(values);
4725 ✗ OS_ASSERT(!eg.empty());
4726
4727 ✗ for (const auto& [time, val] : winterDesignDay) {
4728
4729 ✗ int minutes = time.minutes();
4730 ✗ int hours = time.hours();
4731
4732 ✗ if (0 == minutes && 0 == hours) {
4733 ✗ hasEndTime = true;
4734 ✗ endTimeValue = val;
4735 ✗ continue;
4736 }
4737 ✗ values[0] =
4738 ✗ "Until: " + std::string(hours < 10 ? "0" : "") + std::to_string(hours) + std::string(minutes < 10 ? ":0" : ":") + std::to_string(minutes);
4739 ✗ eg = idfObject.pushExtensibleGroup(values);
4740 ✗ OS_ASSERT(!eg.empty());
4741 ✗ values[0] = "";
4742 ✗ eg = idfObject.pushExtensibleGroup(values);
4743 ✗ OS_ASSERT(!eg.empty());
4744 ✗ bool ok = eg.setDouble(0, val);
4745 ✗ OS_ASSERT(ok);
4746 }
4747 ✗ if (hasEndTime) {
4748 ✗ values[0] = "Until: 24:00";
4749 ✗ eg = idfObject.pushExtensibleGroup(values);
4750 ✗ OS_ASSERT(!eg.empty());
4751 ✗ values[0] = "";
4752 ✗ eg = idfObject.pushExtensibleGroup(values);
4753 ✗ OS_ASSERT(!eg.empty());
4754 ✗ bool ok = eg.setDouble(0, endTimeValue);
4755 ✗ OS_ASSERT(ok);
4756 } else {
4757 ✗ LOG(Error, "Winter Design Day must have a value for all 24 hours");
4758 }
4759 }
4760
4761 ✗ if (!summerDesignDay.empty() || !winterDesignDay.empty()) {
4762 ✗ values[0] = "For: AllOtherDays";
4763 ✗ eg = idfObject.pushExtensibleGroup(values);
4764 ✗ OS_ASSERT(!eg.empty());
4765 } else {
4766 ✗ values[0] = "For: AllDays";
4767 ✗ eg = idfObject.pushExtensibleGroup(values);
4768 ✗ OS_ASSERT(!eg.empty());
4769 }
4770
4771 ✗ bool hasEndTime = false;
4772 ✗ double endTimeValue = 0.0;
4773 ✗ for (const auto& [time, val] : defaultDay) {
4774
4775 ✗ int minutes = time.minutes();
4776 ✗ int hours = time.hours();
4777
4778 ✗ if (0 == minutes && 0 == hours) {
4779 ✗ hasEndTime = true;
4780 ✗ endTimeValue = val;
4781 ✗ continue;
4782 }
4783 ✗ values[0] =
4784 ✗ "Until: " + std::string(hours < 10 ? "0" : "") + std::to_string(hours) + std::string(minutes < 10 ? ":0" : ":") + std::to_string(minutes);
4785 ✗ eg = idfObject.pushExtensibleGroup(values);
4786 ✗ OS_ASSERT(!eg.empty());
4787 ✗ values[0] = "";
4788 ✗ eg = idfObject.pushExtensibleGroup(values);
4789 ✗ OS_ASSERT(!eg.empty());
4790 ✗ bool ok = eg.setDouble(0, val);
4791 ✗ OS_ASSERT(ok);
4792 }
4793 ✗ if (hasEndTime) {
4794 ✗ values[0] = "Until: 24:00";
4795 ✗ eg = idfObject.pushExtensibleGroup(values);
4796 ✗ OS_ASSERT(!eg.empty());
4797 ✗ values[0] = "";
4798 ✗ eg = idfObject.pushExtensibleGroup(values);
4799 ✗ OS_ASSERT(!eg.empty());
4800 ✗ bool ok = eg.setDouble(0, endTimeValue);
4801 ✗ OS_ASSERT(ok);
4802 } else {
4803 ✗ LOG(Error, "Default Day must have a value for all 24 hours");
4804 }
4805
4806 ✗ m_idfObjects.push_back(idfObject);
4807
4808 ✗ return idfObject;
4809 ✗ }
4810
4811 65 void ForwardTranslator::fixSPMsForUnitarySystem(const model::HVACComponent& unitary, const std::string& fanInletNodeName,
4812 const std::string& fanOutletNodeName) {
4813
3/3
✓ Branch 1 taken 65 times.
✓ Branch 3 taken 44 times.
✓ Branch 4 taken 21 times.
130 if (auto airSystem = unitary.airLoopHVAC()) {
4814
6/6
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
✓ Branch 7 taken 44 times.
✓ Branch 10 taken 44 times.
✓ Branch 13 taken 44 times.
✓ Branch 16 taken 44 times.
88 auto supplyComponents = airSystem->supplyComponents(airSystem->supplyInletNode(), unitary);
4815
1/1
✓ Branch 1 taken 44 times.
44 auto oaSystems = subsetCastVector<model::AirLoopHVACOutdoorAirSystem>(supplyComponents);
4816
2/2
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 43 times.
44 if (!oaSystems.empty()) {
4817
3/3
✓ Branch 2 taken 1 time.
✓ Branch 5 taken 1 time.
✓ Branch 8 taken 1 time.
2 auto reliefComponents = oaSystems.back().oaComponents();
4818
1/1
✓ Branch 5 taken 1 time.
1 supplyComponents.insert(supplyComponents.end(), reliefComponents.begin(), reliefComponents.end());
4819 1 }
4820
1/1
✓ Branch 1 taken 44 times.
44 auto upstreamNodes = subsetCastVector<model::Node>(supplyComponents);
4821
4822
2/2
✓ Branch 5 taken 46 times.
✓ Branch 6 taken 44 times.
90 for (const auto& node : upstreamNodes) {
4823
2/2
✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
46 auto spms = subsetCastVector<model::SetpointManagerMixedAir>(node.setpointManagers());
4824
2/2
✓ Branch 5 taken 2 times.
✓ Branch 6 taken 46 times.
48 for (auto& spm : spms) {
4825 113 auto pred = [&spm](IdfObject& idfObject) {
4826
5/5
✓ Branch 1 taken 113 times.
✓ Branch 4 taken 113 times.
✓ Branch 7 taken 113 times.
✓ Branch 11 taken 3 times.
✓ Branch 12 taken 110 times.
113 if (idfObject.iddObject().type() == IddObjectType::SetpointManager_MixedAir) {
4827
1/1
✓ Branch 1 taken 3 times.
3 auto idfName = idfObject.name();
4828
1/1
✓ Branch 1 taken 3 times.
3 auto osName = spm.name();
4829
8/10
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 3 times.
✓ Branch 8 taken 3 times.
✓ Branch 11 taken 2 times.
✓ Branch 12 taken 1 time.
✓ Branch 13 taken 2 times.
✓ Branch 14 taken 1 time.
6 if (idfName && osName && (osName.get() == idfName.get())) {
4830 2 return true;
4831 }
4832 5 }
4833 111 return false;
4834 2 };
4835
1/1
✓ Branch 3 taken 2 times.
2 auto spm_idf = std::find_if(m_idfObjects.begin(), m_idfObjects.end(), pred);
4836
1/2
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
2 if (spm_idf != m_idfObjects.end()) {
4837
1/1
✓ Branch 2 taken 2 times.
2 auto result = spm_idf->getString(SetpointManager_MixedAirFields::FanInletNodeName);
4838
4/7
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 2 times.
✗ Branch 10 not taken.
2 if (!result || result->empty()) {
4839
1/1
✓ Branch 2 taken 2 times.
2 spm_idf->setString(SetpointManager_MixedAirFields::FanInletNodeName, fanInletNodeName);
4840 }
4841
1/1
✓ Branch 2 taken 2 times.
2 result = spm_idf->getString(SetpointManager_MixedAirFields::FanOutletNodeName);
4842
4/7
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 2 times.
✗ Branch 10 not taken.
2 if (!result || result->empty()) {
4843
1/1
✓ Branch 2 taken 2 times.
2 spm_idf->setString(SetpointManager_MixedAirFields::FanOutletNodeName, fanOutletNodeName);
4844 }
4845 2 }
4846 }
4847 46 }
4848 109 }
4849 65 }
4850
4851 } // namespace energyplus
4852
4853 } // namespace openstudio
4854