src/sdd/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 "ForwardTranslator.hpp" | ||
| 7 | |||
| 8 | #include "../model/Model.hpp" | ||
| 9 | #include "../model/Model_Impl.hpp" | ||
| 10 | #include "../model/ModelObject.hpp" | ||
| 11 | #include "../model/ModelObject_Impl.hpp" | ||
| 12 | #include "../model/Material.hpp" | ||
| 13 | #include "../model/Material_Impl.hpp" | ||
| 14 | #include "../model/ConstructionBase.hpp" | ||
| 15 | #include "../model/ConstructionBase_Impl.hpp" | ||
| 16 | #include "../model/ClimateZones.hpp" | ||
| 17 | #include "../model/ClimateZones_Impl.hpp" | ||
| 18 | #include "../model/Site.hpp" | ||
| 19 | #include "../model/Site_Impl.hpp" | ||
| 20 | #include "../model/Facility.hpp" | ||
| 21 | #include "../model/Facility_Impl.hpp" | ||
| 22 | #include "../model/Building.hpp" | ||
| 23 | #include "../model/Building_Impl.hpp" | ||
| 24 | #include "../model/ThermalZone.hpp" | ||
| 25 | #include "../model/ThermalZone_Impl.hpp" | ||
| 26 | #include "../model/Surface.hpp" | ||
| 27 | #include "../model/Surface_Impl.hpp" | ||
| 28 | #include "../model/SubSurface.hpp" | ||
| 29 | #include "../model/SubSurface_Impl.hpp" | ||
| 30 | #include "../model/ShadingSurface.hpp" | ||
| 31 | #include "../model/ShadingSurface_Impl.hpp" | ||
| 32 | #include "../model/ShadingSurfaceGroup.hpp" | ||
| 33 | #include "../model/ShadingSurfaceGroup_Impl.hpp" | ||
| 34 | #include "../model/CoilHeatingGasMultiStageStageData.hpp" | ||
| 35 | #include "../model/Connection.hpp" | ||
| 36 | #include "../model/CoolingTowerPerformanceCoolTools.hpp" | ||
| 37 | #include "../model/StandardsInformationMaterial.hpp" | ||
| 38 | #include "../model/StandardsInformationConstruction.hpp" | ||
| 39 | #include "../model/PortList.hpp" | ||
| 40 | #include "../model/ComponentData.hpp" | ||
| 41 | #include "../model/ConvergenceLimits.hpp" | ||
| 42 | #include "../model/CoolingTowerPerformanceYorkCalc.hpp" | ||
| 43 | #include "../model/CurveBicubic.hpp" | ||
| 44 | #include "../model/CurveBiquadratic.hpp" | ||
| 45 | #include "../model/CurveCubic.hpp" | ||
| 46 | #include "../model/CurveDoubleExponentialDecay.hpp" | ||
| 47 | #include "../model/CurveExponent.hpp" | ||
| 48 | #include "../model/CurveExponentialDecay.hpp" | ||
| 49 | #include "../model/CurveExponentialSkewNormal.hpp" | ||
| 50 | #include "../model/CurveFanPressureRise.hpp" | ||
| 51 | #include "../model/CurveFunctionalPressureDrop.hpp" | ||
| 52 | #include "../model/CurveLinear.hpp" | ||
| 53 | #include "../model/CurveQuadratic.hpp" | ||
| 54 | #include "../model/CurveQuadraticLinear.hpp" | ||
| 55 | #include "../model/CurveQuartic.hpp" | ||
| 56 | #include "../model/CurveRectangularHyperbola1.hpp" | ||
| 57 | #include "../model/CurveRectangularHyperbola2.hpp" | ||
| 58 | #include "../model/CurveSigmoid.hpp" | ||
| 59 | #include "../model/CurveTriquadratic.hpp" | ||
| 60 | #include "../model/TableLookup.hpp" | ||
| 61 | #include "../model/TableIndependentVariable.hpp" | ||
| 62 | #include "../model/DefaultConstructionSet.hpp" | ||
| 63 | #include "../model/DefaultScheduleSet.hpp" | ||
| 64 | #include "../model/DefaultSurfaceConstructions.hpp" | ||
| 65 | #include "../model/DefaultSubSurfaceConstructions.hpp" | ||
| 66 | #include "../model/DesignSpecificationZoneAirDistribution.hpp" | ||
| 67 | #include "../model/HeatBalanceAlgorithm.hpp" | ||
| 68 | #include "../model/InsideSurfaceConvectionAlgorithm.hpp" | ||
| 69 | #include "../model/LifeCycleCost.hpp" | ||
| 70 | #include "../model/LifeCycleCostParameters.hpp" | ||
| 71 | #include "../model/LightingDesignDay.hpp" | ||
| 72 | #include "../model/LightingSimulationControl.hpp" | ||
| 73 | #include "../model/OutputMeter.hpp" | ||
| 74 | #include "../model/ModelObjectList.hpp" | ||
| 75 | #include "../model/OutputControlReportingTolerances.hpp" | ||
| 76 | #include "../model/OutputControlResilienceSummaries.hpp" | ||
| 77 | #include "../model/OutputVariable.hpp" | ||
| 78 | #include "../model/OutsideSurfaceConvectionAlgorithm.hpp" | ||
| 79 | #include "../model/CoilCoolingDXMultiSpeedStageData.hpp" | ||
| 80 | #include "../model/ComponentCostAdjustments.hpp" | ||
| 81 | #include "../model/CurrencyType.hpp" | ||
| 82 | #include "../model/ControllerWaterCoil.hpp" | ||
| 83 | #include "../model/SetpointManagerMixedAir.hpp" | ||
| 84 | #include "../model/BoilerSteam.hpp" | ||
| 85 | #include "../model/Node.hpp" | ||
| 86 | #include "../model/RenderingColor.hpp" | ||
| 87 | #include "../model/ScheduleCompact.hpp" | ||
| 88 | #include "../model/ScheduleConstant.hpp" | ||
| 89 | #include "../model/ScheduleFixedInterval.hpp" | ||
| 90 | #include "../model/ScheduleVariableInterval.hpp" | ||
| 91 | #include "../model/ScheduleRuleset.hpp" | ||
| 92 | #include "../model/ScheduleYear.hpp" | ||
| 93 | #include "../model/ScheduleDay.hpp" | ||
| 94 | #include "../model/ScheduleTypeLimits.hpp" | ||
| 95 | #include "../model/ScheduleWeek.hpp" | ||
| 96 | #include "../model/RunPeriod.hpp" | ||
| 97 | #include "../model/ScheduleRule.hpp" | ||
| 98 | #include "../model/SimulationControl.hpp" | ||
| 99 | #include "../model/DesignDay.hpp" | ||
| 100 | #include "../model/WeatherFileConditionType.hpp" | ||
| 101 | #include "../model/WeatherFileDays.hpp" | ||
| 102 | |||
| 103 | // TODO: once UtilityCost objects are wrapped | ||
| 104 | // #include "../model/UtilityCost_Charge_Block.hpp" | ||
| 105 | // #include "../model/UtilityCost_Charge_Simple.hpp" | ||
| 106 | // #include "../model/UtilityCost_Computation.hpp" | ||
| 107 | // #include "../model/UtilityCost_Qualify.hpp" | ||
| 108 | // #include "../model/UtilityCost_Ratchet.hpp" | ||
| 109 | // #include "../model/UtilityCost_Tariff.hpp" | ||
| 110 | // #include "../model/UtilityCost_Variable.hpp" | ||
| 111 | |||
| 112 | #include "../model/ProgramControl.hpp" | ||
| 113 | #include "../model/RadianceParameters.hpp" | ||
| 114 | #include "../model/ShadowCalculation.hpp" | ||
| 115 | #include "../model/SiteGroundReflectance.hpp" | ||
| 116 | #include "../model/SiteGroundTemperatureBuildingSurface.hpp" | ||
| 117 | #include "../model/SiteGroundTemperatureDeep.hpp" | ||
| 118 | #include "../model/SiteGroundTemperatureFCfactorMethod.hpp" | ||
| 119 | #include "../model/SiteGroundTemperatureShallow.hpp" | ||
| 120 | #include "../model/SiteWaterMainsTemperature.hpp" | ||
| 121 | #include "../model/SizingParameters.hpp" | ||
| 122 | #include "../model/SkyTemperature.hpp" | ||
| 123 | #include "../model/IlluminanceMap.hpp" | ||
| 124 | #include "../model/InternalMass.hpp" | ||
| 125 | #include "../model/Timestep.hpp" | ||
| 126 | #include "../model/UtilityBill.hpp" | ||
| 127 | #include "../model/Version.hpp" | ||
| 128 | #include "../model/WeatherFile.hpp" | ||
| 129 | #include "../model/YearDescription.hpp" | ||
| 130 | #include "../model/ZoneAirContaminantBalance.hpp" | ||
| 131 | #include "../model/ZoneAirHeatBalanceAlgorithm.hpp" | ||
| 132 | #include "../model/ZoneCapacitanceMultiplierResearchSpecial.hpp" | ||
| 133 | #include "../model/ZoneHVACEquipmentList.hpp" | ||
| 134 | |||
| 135 | #include "../utilities/plot/ProgressBar.hpp" | ||
| 136 | #include "../utilities/core/Assert.hpp" | ||
| 137 | #include "../utilities/core/FilesystemHelpers.hpp" | ||
| 138 | #include "../utilities/core/StringHelpers.hpp" | ||
| 139 | |||
| 140 | #include <thread> | ||
| 141 | #include <algorithm> | ||
| 142 | |||
| 143 | #include <pugixml.hpp> | ||
| 144 | |||
| 145 | namespace openstudio { | ||
| 146 | namespace sdd { | ||
| 147 | |||
| 148 |
1/1✓ Branch 4 taken 1 time.
|
1 | ForwardTranslator::ForwardTranslator() : m_autoHardSize(false), m_autoEfficiency(false) { |
| 149 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_logSink.setLogLevel(Warn); |
| 150 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_logSink.setChannelRegex(boost::regex("openstudio\\.sdd\\.ForwardTranslator")); |
| 151 |
1/1✓ Branch 2 taken 1 time.
|
1 | m_logSink.setThreadId(std::this_thread::get_id()); |
| 152 | 1 | } | |
| 153 | |||
| 154 | 1 | ForwardTranslator::~ForwardTranslator() = default; | |
| 155 | |||
| 156 | 1 | bool ForwardTranslator::modelToSDD(const openstudio::model::Model& model, const openstudio::path& path, ProgressBar* progressBar) { | |
| 157 | 1 | m_progressBar = progressBar; | |
| 158 | 1 | m_translatedObjects.clear(); | |
| 159 | 1 | m_ignoreTypes.clear(); | |
| 160 | 1 | m_ignoreObjects.clear(); | |
| 161 | |||
| 162 |
1/1✓ Branch 2 taken 1 time.
|
1 | m_logSink.setThreadId(std::this_thread::get_id()); |
| 163 | |||
| 164 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_logSink.resetStringStream(); |
| 165 | |||
| 166 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | auto modelCopy = model.clone().cast<model::Model>(); |
| 167 | |||
| 168 | // remove unused resource objects | ||
| 169 |
1/1✓ Branch 1 taken 1 time.
|
1 | modelCopy.purgeUnusedResourceObjects(); |
| 170 | |||
| 171 |
1/1✓ Branch 1 taken 1 time.
|
1 | pugi::xml_document doc; |
| 172 | |||
| 173 |
1/1✓ Branch 1 taken 1 time.
|
1 | bool result = this->translateModel(modelCopy, doc); |
| 174 |
1/1✓ Branch 1 taken 1 time.
|
1 | logUntranslatedObjects(modelCopy); |
| 175 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | if (!result) { |
| 176 | ✗ | return false; | |
| 177 | } | ||
| 178 | |||
| 179 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (exists(path)) { |
| 180 |
1/1✓ Branch 1 taken 1 time.
|
1 | remove(path); |
| 181 | } | ||
| 182 | |||
| 183 |
3/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✗ Branch 7 not taken.
✓ Branch 8 taken 1 time.
|
1 | if (!exists(path.parent_path())) { |
| 184 | ✗ | create_directory(path.parent_path()); | |
| 185 | } | ||
| 186 | |||
| 187 |
1/1✓ Branch 1 taken 1 time.
|
1 | openstudio::filesystem::ofstream file(path, std::ios_base::binary); |
| 188 |
1/2✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
|
1 | if (file.is_open()) { |
| 189 |
1/1✓ Branch 1 taken 1 time.
|
1 | doc.save(file, " "); |
| 190 |
1/1✓ Branch 1 taken 1 time.
|
1 | file.close(); |
| 191 | 1 | return true; | |
| 192 | } | ||
| 193 | |||
| 194 | ✗ | return false; | |
| 195 | 1 | } | |
| 196 | |||
| 197 | ✗ | std::vector<LogMessage> ForwardTranslator::warnings() const { | |
| 198 | ✗ | std::vector<LogMessage> result; | |
| 199 | ✗ | std::vector<LogMessage> allMessages = m_logSink.logMessages(); | |
| 200 | ✗ | std::copy_if(allMessages.cbegin(), allMessages.cend(), std::back_inserter(result), | |
| 201 | ✗ | [](const auto& logMessage) { return logMessage.logLevel() == Warn; }); | |
| 202 | ✗ | return result; | |
| 203 | ✗ | } | |
| 204 | |||
| 205 | ✗ | std::vector<LogMessage> ForwardTranslator::errors() const { | |
| 206 | ✗ | std::vector<LogMessage> result; | |
| 207 | ✗ | std::vector<LogMessage> allMessages = m_logSink.logMessages(); | |
| 208 | ✗ | std::copy_if(allMessages.cbegin(), allMessages.cend(), std::back_inserter(result), | |
| 209 | ✗ | [](const auto& logMessage) { return logMessage.logLevel() > Warn; }); | |
| 210 | ✗ | return result; | |
| 211 | ✗ | } | |
| 212 | |||
| 213 | 90 | std::string ForwardTranslator::escapeName(std::string name) { | |
| 214 | /// JMT: I don't think this function does what its name implies | ||
| 215 | // TODO: this does nothing! | ||
| 216 | 90 | return name; | |
| 217 | } | ||
| 218 | |||
| 219 | 1 | bool ForwardTranslator::translateModel(const openstudio::model::Model& model, pugi::xml_document& document) { | |
| 220 |
1/1✓ Branch 1 taken 1 time.
|
1 | pugi::xml_node sddElement = document.append_child("SDDXML"); |
| 221 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | sddElement.append_attribute("xmlns:xsi") = "http://www.w3.org/2001/XMLSchema-instance"; |
| 222 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | sddElement.append_attribute("xmlns:xsd") = "http://www.w3.org/2001/XMLSchema"; |
| 223 | |||
| 224 | // set ruleset, where should this data come from? | ||
| 225 |
1/1✓ Branch 1 taken 1 time.
|
1 | pugi::xml_node rulesetFilenameElement = sddElement.append_child("RulesetFilename"); |
| 226 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | rulesetFilenameElement.append_attribute("file") = "CEC 2013 NonRes.bin"; // DLM: only allow one value for now |
| 227 | |||
| 228 | // set project, where should this data come from? | ||
| 229 |
1/1✓ Branch 1 taken 1 time.
|
1 | pugi::xml_node projectElement = sddElement.append_child("Proj"); |
| 230 | |||
| 231 | // DLM: what name to use here? | ||
| 232 |
1/1✓ Branch 1 taken 1 time.
|
1 | pugi::xml_node projectNameElement = projectElement.append_child("Name"); |
| 233 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | projectNameElement.text() = "unknown"; |
| 234 | |||
| 235 | // site data | ||
| 236 |
1/1✓ Branch 1 taken 1 time.
|
1 | boost::optional<model::ClimateZones> climateZones = model.getOptionalUniqueModelObject<model::ClimateZones>(); |
| 237 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | if (climateZones) { |
| 238 | // todo: check document year | ||
| 239 | ✗ | std::vector<model::ClimateZone> zones = climateZones->getClimateZones("CEC"); | |
| 240 | ✗ | std::string value = zones[0].value(); | |
| 241 | ✗ | if (!zones.empty() && !value.empty()) { | |
| 242 | try { | ||
| 243 | ✗ | int valueNum = boost::lexical_cast<int>(value); | |
| 244 | ✗ | value = "ClimateZone" + std::to_string(valueNum); | |
| 245 | ✗ | } catch (const boost::bad_lexical_cast&) { | |
| 246 | ✗ | } | |
| 247 | |||
| 248 | ✗ | pugi::xml_node projectClimateZoneElement = projectElement.append_child("CliZn"); | |
| 249 | ✗ | projectClimateZoneElement.text() = value.c_str(); | |
| 250 | |||
| 251 | ✗ | m_translatedObjects[climateZones->handle()] = projectClimateZoneElement; | |
| 252 | } | ||
| 253 | ✗ | } | |
| 254 | |||
| 255 | // set lat, lon, elev | ||
| 256 | // DLM: do not translate forward, Issue 242: Forward Translator - Remove Proj:Lat/Lon/Elevation translation | ||
| 257 | /* | ||
| 258 | * boost::optional<model::Site> site = model.getOptionalUniqueModelObject<model::Site>(); | ||
| 259 | * | ||
| 260 | * if (site){ | ||
| 261 | * double latitude = site->latitude(); | ||
| 262 | * pugi::xml_node latElement = projectElement.append_child("Lat"); | ||
| 263 | * latElement.text().set(latitude); // OR openstudio::string_conversions::number(latitude).c_str() | ||
| 264 | * | ||
| 265 | * double longitude = site->longitude(); | ||
| 266 | * pugi::xml_node longElement = projectElement.append_child("Long"); | ||
| 267 | * longElement.text().set(longitude); // OR openstudio::string_conversions::number(longitude).c_str() | ||
| 268 | * | ||
| 269 | * double elevationSI = site->elevation(); | ||
| 270 | * double elevationIP = elevationSI/0.3048; | ||
| 271 | * pugi::xml_node elevationElement = projectElement.append_child("Elevation"); | ||
| 272 | * elevationElement.text().set(elevationIP); // OR openstudio::string_conversions::number(elevationIP).c_str() | ||
| 273 | * | ||
| 274 | * m_translatedObjects[site->handle()] = latElement; | ||
| 275 | * } | ||
| 276 | */ | ||
| 277 | |||
| 278 | // todo: write out epw file path | ||
| 279 | // todo: write out ddy file and set path | ||
| 280 | //<DDWeatherFile>C:/svn-CBECC-Com-130521/CBECC-Com13/Data/EPW/SACRAMENTO-EXECUTIVE_724830_CZ2010.ddy</DDWeatherFile> | ||
| 281 | //<AnnualWeatherFile>C:/svn-CBECC-Com-130521/CBECC-Com13/Data/EPW/SACRAMENTO-EXECUTIVE_724830_CZ2010.epw</AnnualWeatherFile> | ||
| 282 | //<HVACAutoSizing>1</HVACAutoSizing> | ||
| 283 | //<SimDsgnDays>1</SimDsgnDays> | ||
| 284 | //<RunPeriodBeginMonth>0</RunPeriodBeginMonth> | ||
| 285 | //<RunPeriodBeginDay>0</RunPeriodBeginDay> | ||
| 286 | //<RunPeriodEndMonth>0</RunPeriodEndMonth> | ||
| 287 | //<RunPeriodEndDay>0</RunPeriodEndDay> | ||
| 288 | //<RunPeriodYear>0</RunPeriodYear> | ||
| 289 | |||
| 290 | // do materials before constructions | ||
| 291 |
1/1✓ Branch 1 taken 1 time.
|
1 | std::vector<model::Material> materials = model.getModelObjects<model::Material>(); |
| 292 |
1/1✓ Branch 3 taken 1 time.
|
1 | std::sort(materials.begin(), materials.end(), WorkspaceObjectNameLess()); |
| 293 | |||
| 294 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | if (m_progressBar) { |
| 295 | ✗ | m_progressBar->setWindowTitle(toString("Translating Materials")); | |
| 296 | ✗ | m_progressBar->setMinimum(0); | |
| 297 | ✗ | m_progressBar->setMaximum((int)materials.size()); | |
| 298 | ✗ | m_progressBar->setValue(0); | |
| 299 | } | ||
| 300 | |||
| 301 | // Given the old test, Mat is directly nested under Proj | ||
| 302 |
2/2✓ Branch 5 taken 16 times.
✓ Branch 6 taken 1 time.
|
17 | for (const model::Material& material : materials) { |
| 303 | |||
| 304 |
1/1✓ Branch 1 taken 16 times.
|
16 | translateMaterial(material, projectElement); |
| 305 | |||
| 306 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 16 times.
|
16 | if (m_progressBar) { |
| 307 | ✗ | m_progressBar->setValue(m_progressBar->value() + 1); | |
| 308 | } | ||
| 309 | } | ||
| 310 | |||
| 311 | // do constructions before geometry | ||
| 312 | |||
| 313 |
1/1✓ Branch 1 taken 1 time.
|
1 | std::vector<model::ConstructionBase> constructions = model.getModelObjects<model::ConstructionBase>(); |
| 314 |
1/1✓ Branch 3 taken 1 time.
|
1 | std::sort(constructions.begin(), constructions.end(), WorkspaceObjectNameLess()); |
| 315 | |||
| 316 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | if (m_progressBar) { |
| 317 | ✗ | m_progressBar->setWindowTitle(toString("Translating Constructions")); | |
| 318 | ✗ | m_progressBar->setMinimum(0); | |
| 319 | ✗ | m_progressBar->setMaximum(3 * ((int)constructions.size())); // three loops below | |
| 320 | ✗ | m_progressBar->setValue(0); | |
| 321 | } | ||
| 322 | |||
| 323 | 1 | std::set<Handle> surfaceConstructions; | |
| 324 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 8 taken 24 times.
✓ Branch 9 taken 1 time.
|
25 | for (const model::Surface& surface : model.getConcreteModelObjects<model::Surface>()) { |
| 325 |
1/1✓ Branch 1 taken 24 times.
|
24 | boost::optional<model::ConstructionBase> construction = surface.construction(); |
| 326 |
1/2✓ Branch 0 taken 24 times.
✗ Branch 1 not taken.
|
24 | if (construction) { |
| 327 |
3/3✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
|
24 | surfaceConstructions.insert(construction->handle()); |
| 328 | } | ||
| 329 | 25 | } | |
| 330 | |||
| 331 | 1 | std::set<Handle> doorConstructions; | |
| 332 | 1 | std::set<Handle> fenestrationConstructions; | |
| 333 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 8 taken 2 times.
✓ Branch 9 taken 1 time.
|
3 | for (const model::SubSurface& subSurface : model.getConcreteModelObjects<model::SubSurface>()) { |
| 334 |
1/1✓ Branch 1 taken 2 times.
|
2 | boost::optional<model::ConstructionBase> construction = subSurface.construction(); |
| 335 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (construction) { |
| 336 |
1/1✓ Branch 1 taken 2 times.
|
2 | std::string subSurfaceType = subSurface.subSurfaceType(); |
| 337 |
15/26✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 9 taken 1 time.
✓ Branch 12 taken 1 time.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 20 taken 1 time.
✓ Branch 21 taken 2 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 2 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 1 time.
✓ Branch 27 taken 1 time.
✗ 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.
|
8 | if (istringEqual("Door", subSurfaceType) || istringEqual("OverheadDoor", subSurfaceType)) { |
| 338 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | doorConstructions.insert(construction->handle()); |
| 339 | } else { | ||
| 340 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | fenestrationConstructions.insert(construction->handle()); |
| 341 | } | ||
| 342 | 2 | } | |
| 343 | 3 | } | |
| 344 | |||
| 345 | // translate surface constructions | ||
| 346 |
2/2✓ Branch 5 taken 13 times.
✓ Branch 6 taken 1 time.
|
14 | for (const model::ConstructionBase& constructionBase : constructions) { |
| 347 |
4/4✓ Branch 2 taken 13 times.
✓ Branch 5 taken 13 times.
✓ Branch 8 taken 9 times.
✓ Branch 9 taken 4 times.
|
13 | if (surfaceConstructions.find(constructionBase.handle()) == surfaceConstructions.end()) { |
| 348 | 9 | continue; | |
| 349 | } | ||
| 350 | |||
| 351 |
1/1✓ Branch 1 taken 4 times.
|
4 | translateConstructionBase(constructionBase, projectElement); |
| 352 | |||
| 353 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
|
4 | if (m_progressBar) { |
| 354 | ✗ | m_progressBar->setValue(m_progressBar->value() + 1); | |
| 355 | } | ||
| 356 | } | ||
| 357 | |||
| 358 | // translate door constructions | ||
| 359 |
2/2✓ Branch 5 taken 13 times.
✓ Branch 6 taken 1 time.
|
14 | for (const model::ConstructionBase& constructionBase : constructions) { |
| 360 |
4/4✓ Branch 2 taken 13 times.
✓ Branch 5 taken 13 times.
✓ Branch 8 taken 12 times.
✓ Branch 9 taken 1 time.
|
13 | if (doorConstructions.find(constructionBase.handle()) == doorConstructions.end()) { |
| 361 | 12 | continue; | |
| 362 | } | ||
| 363 | |||
| 364 |
1/1✓ Branch 1 taken 1 time.
|
1 | translateDoorConstruction(constructionBase, projectElement); |
| 365 | |||
| 366 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | if (m_progressBar) { |
| 367 | ✗ | m_progressBar->setValue(m_progressBar->value() + 1); | |
| 368 | } | ||
| 369 | } | ||
| 370 | |||
| 371 | // translate fenestration constructions | ||
| 372 |
2/2✓ Branch 5 taken 13 times.
✓ Branch 6 taken 1 time.
|
14 | for (const model::ConstructionBase& constructionBase : constructions) { |
| 373 |
4/4✓ Branch 2 taken 13 times.
✓ Branch 5 taken 13 times.
✓ Branch 8 taken 12 times.
✓ Branch 9 taken 1 time.
|
13 | if (fenestrationConstructions.find(constructionBase.handle()) == fenestrationConstructions.end()) { |
| 374 | 12 | continue; | |
| 375 | } | ||
| 376 | |||
| 377 |
1/1✓ Branch 1 taken 1 time.
|
1 | translateFenestrationConstruction(constructionBase, projectElement); |
| 378 | |||
| 379 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | if (m_progressBar) { |
| 380 | ✗ | m_progressBar->setValue(m_progressBar->value() + 1); | |
| 381 | } | ||
| 382 | } | ||
| 383 | |||
| 384 | // translate site shading | ||
| 385 |
1/1✓ Branch 1 taken 1 time.
|
1 | std::vector<model::ShadingSurfaceGroup> shadingSurfaceGroups = model.getConcreteModelObjects<model::ShadingSurfaceGroup>(); |
| 386 |
1/1✓ Branch 3 taken 1 time.
|
1 | std::sort(shadingSurfaceGroups.begin(), shadingSurfaceGroups.end(), WorkspaceObjectNameLess()); |
| 387 | |||
| 388 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | if (m_progressBar) { |
| 389 | ✗ | m_progressBar->setWindowTitle(toString("Translating Site Shading")); | |
| 390 | ✗ | m_progressBar->setMinimum(0); | |
| 391 | ✗ | m_progressBar->setMaximum((int)shadingSurfaceGroups.size()); | |
| 392 | ✗ | m_progressBar->setValue(0); | |
| 393 | } | ||
| 394 | |||
| 395 |
2/2✓ Branch 5 taken 3 times.
✓ Branch 6 taken 1 time.
|
4 | for (const model::ShadingSurfaceGroup& shadingSurfaceGroup : shadingSurfaceGroups) { |
| 396 |
5/5✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 11 taken 1 time.
✓ Branch 12 taken 2 times.
|
6 | if (istringEqual(shadingSurfaceGroup.shadingSurfaceType(), "Site")) { |
| 397 | |||
| 398 |
1/1✓ Branch 1 taken 1 time.
|
1 | Transformation transformation = shadingSurfaceGroup.siteTransformation(); |
| 399 | |||
| 400 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 8 taken 1 time.
|
2 | for (const model::ShadingSurface& shadingSurface : shadingSurfaceGroup.shadingSurfaces()) { |
| 401 |
1/1✓ Branch 1 taken 1 time.
|
1 | translateShadingSurface(shadingSurface, transformation, projectElement); |
| 402 | 1 | } | |
| 403 | 1 | } | |
| 404 | |||
| 405 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | if (m_progressBar) { |
| 406 | ✗ | m_progressBar->setValue(m_progressBar->value() + 1); | |
| 407 | } | ||
| 408 | } | ||
| 409 | |||
| 410 | // translate the building | ||
| 411 |
1/1✓ Branch 1 taken 1 time.
|
1 | boost::optional<model::Building> building = model.getOptionalUniqueModelObject<model::Building>(); |
| 412 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (building) { |
| 413 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | translateBuilding(*building, projectElement); |
| 414 | } | ||
| 415 | |||
| 416 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::BoilerSteam::iddObjectType()); |
| 417 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ClimateZones::iddObjectType()); // might not be translated but it is checked |
| 418 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CoilCoolingDXMultiSpeedStageData::iddObjectType()); |
| 419 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CoilHeatingGasMultiStageStageData::iddObjectType()); |
| 420 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ComponentCostAdjustments::iddObjectType()); |
| 421 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ComponentData::iddObjectType()); |
| 422 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::Connection::iddObjectType()); |
| 423 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ControllerWaterCoil::iddObjectType()); |
| 424 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ConvergenceLimits::iddObjectType()); |
| 425 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CoolingTowerPerformanceCoolTools::iddObjectType()); |
| 426 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CoolingTowerPerformanceYorkCalc::iddObjectType()); |
| 427 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurrencyType::iddObjectType()); |
| 428 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveBicubic::iddObjectType()); |
| 429 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveBiquadratic::iddObjectType()); |
| 430 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveCubic::iddObjectType()); |
| 431 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveDoubleExponentialDecay::iddObjectType()); |
| 432 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveExponent::iddObjectType()); |
| 433 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveExponentialDecay::iddObjectType()); |
| 434 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveExponentialSkewNormal::iddObjectType()); |
| 435 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveFanPressureRise::iddObjectType()); |
| 436 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveFunctionalPressureDrop::iddObjectType()); |
| 437 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveLinear::iddObjectType()); |
| 438 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveQuadratic::iddObjectType()); |
| 439 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveQuadraticLinear::iddObjectType()); |
| 440 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveQuartic::iddObjectType()); |
| 441 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveRectangularHyperbola1::iddObjectType()); |
| 442 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveRectangularHyperbola2::iddObjectType()); |
| 443 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveSigmoid::iddObjectType()); |
| 444 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::CurveTriquadratic::iddObjectType()); |
| 445 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::DefaultConstructionSet::iddObjectType()); |
| 446 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::DesignDay::iddObjectType()); |
| 447 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::DefaultScheduleSet::iddObjectType()); |
| 448 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::DesignSpecificationZoneAirDistribution::iddObjectType()); |
| 449 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::DefaultSurfaceConstructions::iddObjectType()); |
| 450 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::DefaultSubSurfaceConstructions::iddObjectType()); |
| 451 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::Facility::iddObjectType()); |
| 452 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::HeatBalanceAlgorithm::iddObjectType()); |
| 453 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::IlluminanceMap::iddObjectType()); |
| 454 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::InsideSurfaceConvectionAlgorithm::iddObjectType()); |
| 455 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::InternalMass::iddObjectType()); |
| 456 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::LifeCycleCost::iddObjectType()); |
| 457 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::LifeCycleCostParameters::iddObjectType()); |
| 458 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::LightingDesignDay::iddObjectType()); |
| 459 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::LightingSimulationControl::iddObjectType()); |
| 460 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ModelObjectList::iddObjectType()); |
| 461 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::Node::iddObjectType()); |
| 462 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::OutputControlReportingTolerances::iddObjectType()); |
| 463 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::OutputControlResilienceSummaries::iddObjectType()); |
| 464 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::OutputMeter::iddObjectType()); |
| 465 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::OutputVariable::iddObjectType()); |
| 466 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::OutsideSurfaceConvectionAlgorithm::iddObjectType()); |
| 467 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::PortList::iddObjectType()); |
| 468 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ProgramControl::iddObjectType()); |
| 469 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::RadianceParameters::iddObjectType()); |
| 470 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::RenderingColor::iddObjectType()); |
| 471 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::RunPeriod::iddObjectType()); |
| 472 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleCompact::iddObjectType()); |
| 473 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleConstant::iddObjectType()); |
| 474 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleDay::iddObjectType()); |
| 475 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleFixedInterval::iddObjectType()); |
| 476 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleRule::iddObjectType()); |
| 477 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleRuleset::iddObjectType()); |
| 478 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleTypeLimits::iddObjectType()); |
| 479 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleVariableInterval::iddObjectType()); |
| 480 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleWeek::iddObjectType()); |
| 481 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ScheduleYear::iddObjectType()); |
| 482 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::SetpointManagerMixedAir::iddObjectType()); |
| 483 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ShadowCalculation::iddObjectType()); |
| 484 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::SimulationControl::iddObjectType()); |
| 485 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::Site::iddObjectType()); // might not be translated but it is checked |
| 486 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::SiteGroundReflectance::iddObjectType()); |
| 487 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::SiteGroundTemperatureBuildingSurface::iddObjectType()); |
| 488 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::SiteWaterMainsTemperature::iddObjectType()); |
| 489 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::SizingParameters::iddObjectType()); |
| 490 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::SkyTemperature::iddObjectType()); |
| 491 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::StandardsInformationConstruction::iddObjectType()); |
| 492 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::StandardsInformationMaterial::iddObjectType()); |
| 493 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::TableLookup::iddObjectType()); |
| 494 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::TableIndependentVariable::iddObjectType()); |
| 495 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::Timestep::iddObjectType()); |
| 496 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::UtilityBill::iddObjectType()); |
| 497 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::Version::iddObjectType()); |
| 498 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::WeatherFile::iddObjectType()); |
| 499 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::WeatherFileConditionType::iddObjectType()); |
| 500 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::WeatherFileDays::iddObjectType()); |
| 501 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::YearDescription::iddObjectType()); |
| 502 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ZoneAirContaminantBalance::iddObjectType()); |
| 503 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ZoneAirHeatBalanceAlgorithm::iddObjectType()); |
| 504 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ZoneCapacitanceMultiplierResearchSpecial::iddObjectType()); |
| 505 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_ignoreTypes.push_back(model::ZoneHVACEquipmentList::iddObjectType()); |
| 506 | |||
| 507 | // TODO: once UtilityCost objects are wrapped | ||
| 508 | //m_ignoreTypes.push_back(model::UtilityCost_Charge_Block::iddObjectType()); | ||
| 509 | //m_ignoreTypes.push_back(model::UtilityCost_Charge_Simple::iddObjectType()); | ||
| 510 | //m_ignoreTypes.push_back(model::UtilityCost_Computation::iddObjectType()); | ||
| 511 | //m_ignoreTypes.push_back(model::UtilityCost_Qualify::iddObjectType()); | ||
| 512 | //m_ignoreTypes.push_back(model::UtilityCost_Ratchet::iddObjectType()); | ||
| 513 | //m_ignoreTypes.push_back(model::UtilityCost_Tariff::iddObjectType()); | ||
| 514 | //m_ignoreTypes.push_back(model::UtilityCost_Variable::iddObjectType()); | ||
| 515 | |||
| 516 | 1 | return true; | |
| 517 | 1 | } | |
| 518 | |||
| 519 | 1 | void ForwardTranslator::logUntranslatedObjects(const model::Model& model) { | |
| 520 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto allModelObjects = model.modelObjects(); |
| 521 |
2/2✓ Branch 5 taken 268 times.
✓ Branch 6 taken 1 time.
|
269 | for (const auto& mo : allModelObjects) { |
| 522 | // If mo is not in m_translatedObjects | ||
| 523 |
4/4✓ Branch 2 taken 268 times.
✓ Branch 5 taken 268 times.
✓ Branch 8 taken 207 times.
✓ Branch 9 taken 61 times.
|
268 | if (m_translatedObjects.find(mo.handle()) == m_translatedObjects.end()) { |
| 524 | // If mo.iddObjectType is not int the m_ignoreTypes list | ||
| 525 |
4/4✓ Branch 2 taken 207 times.
✓ Branch 7 taken 207 times.
✓ Branch 10 taken 37 times.
✓ Branch 11 taken 170 times.
|
207 | if (std::find(m_ignoreTypes.begin(), m_ignoreTypes.end(), mo.iddObjectType()) == m_ignoreTypes.end()) { |
| 526 | // If mo is not in the m_ignoreObjects list | ||
| 527 |
3/4✓ Branch 2 taken 37 times.
✓ Branch 7 taken 37 times.
✓ Branch 10 taken 37 times.
✗ Branch 11 not taken.
|
37 | if (std::find(m_ignoreObjects.begin(), m_ignoreObjects.end(), mo.handle()) == m_ignoreObjects.end()) { |
| 528 |
7/7✓ Branch 1 taken 37 times.
✓ Branch 4 taken 37 times.
✓ Branch 7 taken 37 times.
✓ Branch 10 taken 37 times.
✓ Branch 14 taken 37 times.
✓ Branch 17 taken 37 times.
✓ Branch 20 taken 37 times.
|
37 | LOG(Error, mo.briefDescription() << " was not translated."); |
| 529 | } | ||
| 530 | } | ||
| 531 | } | ||
| 532 | } | ||
| 533 | 1 | } | |
| 534 | |||
| 535 | } // namespace sdd | ||
| 536 | } // namespace openstudio | ||
| 537 |