GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 75.7% 2692 / 0 / 3558
Functions: 93.9% 46 / 0 / 49
Branches: 68.3% 2616 / 0 / 3828

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