src/airflow/Test/DemoModel.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 <gtest/gtest.h> | ||
| 7 | //#include "ContamFixture.hpp" | ||
| 8 | #include "DemoModel.hpp" | ||
| 9 | //#include "../../model/Model.hpp" | ||
| 10 | #include "../../model/Building.hpp" | ||
| 11 | #include "../../model/Building_Impl.hpp" | ||
| 12 | #include "../../model/Space.hpp" | ||
| 13 | #include "../../model/Space_Impl.hpp" | ||
| 14 | #include "../../model/SpaceType.hpp" | ||
| 15 | #include "../../model/Surface.hpp" | ||
| 16 | #include "../../model/SubSurface.hpp" | ||
| 17 | #include "../../model/DesignSpecificationOutdoorAir.hpp" | ||
| 18 | #include "../../model/BuildingStory.hpp" | ||
| 19 | #include "../../model/ThermostatSetpointDualSetpoint.hpp" | ||
| 20 | #include "../../model/ThermostatSetpointDualSetpoint_Impl.hpp" | ||
| 21 | #include "../../model/ThermalZone.hpp" | ||
| 22 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 23 | #include "../../model/SizingZone.hpp" | ||
| 24 | #include "../../model/AirLoopHVAC.hpp" | ||
| 25 | #include "../../model/AirLoopHVAC_Impl.hpp" | ||
| 26 | #include "../../model/HVACTemplates.hpp" | ||
| 27 | #include "../../model/SetpointManagerSingleZoneReheat.hpp" | ||
| 28 | #include "../../model/SetpointManagerSingleZoneReheat_Impl.hpp" | ||
| 29 | #include "../../osversion/VersionTranslator.hpp" | ||
| 30 | #include "../../utilities/idf/Handle.hpp" | ||
| 31 | #include "../../utilities/geometry/Point3d.hpp" | ||
| 32 | |||
| 33 | 5 | boost::optional<openstudio::model::Model> buildDemoModel2012(openstudio::model::Model model) { | |
| 34 | // set outdoor air specifications | ||
| 35 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::Building building = model.getUniqueModelObject<openstudio::model::Building>(); |
| 36 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<openstudio::model::SpaceType> spaceType = building.spaceType(); |
| 37 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!spaceType) { |
| 38 | ✗ | return boost::none; | |
| 39 | } | ||
| 40 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | boost::optional<openstudio::model::DesignSpecificationOutdoorAir> oa = spaceType->designSpecificationOutdoorAir(); |
| 41 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!oa) { |
| 42 | ✗ | return boost::none; | |
| 43 | } | ||
| 44 | |||
| 45 |
4/5✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 5 times.
|
15 | if (!oa->setOutdoorAirMethod("Sum")) { |
| 46 | ✗ | return boost::none; | |
| 47 | } | ||
| 48 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 5 times.
|
5 | if (!oa->setOutdoorAirFlowperPerson(0.0)) { |
| 49 | ✗ | return boost::none; | |
| 50 | } | ||
| 51 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 5 times.
|
5 | if (!oa->setOutdoorAirFlowperFloorArea(0.00508)) { // 1 cfm/ft^2 = 0.00508 m/s |
| 52 | ✗ | return boost::none; | |
| 53 | } | ||
| 54 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 5 times.
|
5 | if (!oa->setOutdoorAirFlowRate(0.0)) { |
| 55 | ✗ | return boost::none; | |
| 56 | } | ||
| 57 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 5 times.
|
5 | if (!oa->setOutdoorAirFlowAirChangesperHour(0.0)) { |
| 58 | ✗ | return boost::none; | |
| 59 | } | ||
| 60 | |||
| 61 | 5 | double floorHeight = 3.0; | |
| 62 | |||
| 63 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::BuildingStory story1(model); |
| 64 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | story1.setName("Story 1"); |
| 65 |
1/1✓ Branch 1 taken 5 times.
|
5 | story1.setNominalZCoordinate(0.0); |
| 66 |
1/1✓ Branch 1 taken 5 times.
|
5 | story1.setNominalFloortoFloorHeight(floorHeight); |
| 67 | |||
| 68 | 5 | std::vector<openstudio::Point3d> points; | |
| 69 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(0, 0, 0)); |
| 70 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(0, 17, 0)); |
| 71 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(8, 17, 0)); |
| 72 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(8, 10, 0)); |
| 73 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(8, 0, 0)); |
| 74 | |||
| 75 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | boost::optional<openstudio::model::Space> library = openstudio::model::Space::fromFloorPrint(points, floorHeight, model); |
| 76 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!library) { |
| 77 | ✗ | return boost::none; | |
| 78 | } | ||
| 79 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
10 | library->setName("Library"); |
| 80 | |||
| 81 | 5 | points.clear(); | |
| 82 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(8, 10, 0)); |
| 83 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(8, 17, 0)); |
| 84 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(18, 17, 0)); |
| 85 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(18, 10, 0)); |
| 86 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(11, 10, 0)); |
| 87 | |||
| 88 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | boost::optional<openstudio::model::Space> office2 = openstudio::model::Space::fromFloorPrint(points, floorHeight, model); |
| 89 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!office2) { |
| 90 | ✗ | return boost::none; | |
| 91 | } | ||
| 92 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
10 | office2->setName("Office 2"); |
| 93 | |||
| 94 | 5 | points.clear(); | |
| 95 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(8, 0, 0)); |
| 96 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(8, 10, 0)); |
| 97 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(11, 10, 0)); |
| 98 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(11, 0, 0)); |
| 99 | |||
| 100 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | boost::optional<openstudio::model::Space> hallway = openstudio::model::Space::fromFloorPrint(points, floorHeight, model); |
| 101 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!hallway) { |
| 102 | ✗ | return boost::none; | |
| 103 | } | ||
| 104 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
10 | hallway->setName("Hallway"); |
| 105 | |||
| 106 | 5 | points.clear(); | |
| 107 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(11, 0, 0)); |
| 108 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(11, 10, 0)); |
| 109 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(18, 10, 0)); |
| 110 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | points.push_back(openstudio::Point3d(18, 0, 0)); |
| 111 | |||
| 112 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | boost::optional<openstudio::model::Space> office1 = openstudio::model::Space::fromFloorPrint(points, floorHeight, model); |
| 113 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!office1) { |
| 114 | ✗ | return boost::none; | |
| 115 | } | ||
| 116 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
10 | office1->setName("Office 1"); |
| 117 | |||
| 118 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | library->matchSurfaces(*office2); |
| 119 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | library->matchSurfaces(*hallway); |
| 120 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | hallway->matchSurfaces(*office1); |
| 121 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | hallway->matchSurfaces(*office2); |
| 122 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | office1->matchSurfaces(*office2); |
| 123 | |||
| 124 | // find thermostat | ||
| 125 | 5 | boost::optional<openstudio::model::ThermostatSetpointDualSetpoint> thermostat; | |
| 126 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
|
5 | for (openstudio::model::ThermostatSetpointDualSetpoint t : model.getConcreteModelObjects<openstudio::model::ThermostatSetpointDualSetpoint>()) { |
| 127 |
1/1✓ Branch 1 taken 5 times.
|
5 | thermostat = t; |
| 128 | 5 | break; | |
| 129 | 5 | } | |
| 130 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!thermostat) { |
| 131 | ✗ | return boost::none; | |
| 132 | } | ||
| 133 | |||
| 134 | // create thermal zones | ||
| 135 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::ThermalZone libraryZone(model); |
| 136 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::SizingZone librarySizing(model, libraryZone); |
| 137 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | libraryZone.setName("Library Zone"); |
| 138 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | libraryZone.setThermostatSetpointDualSetpoint(*thermostat); |
| 139 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | library->setThermalZone(libraryZone); |
| 140 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | library->setBuildingStory(story1); |
| 141 | |||
| 142 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::ThermalZone hallwayZone(model); |
| 143 | //model::SizingZone hallwaySizing(model, hallwayZone); | ||
| 144 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | hallwayZone.setName("Hallway Zone"); |
| 145 | //hallwayZone.setThermostatSetpointDualSetpoint(*thermostat); | ||
| 146 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | hallway->setThermalZone(hallwayZone); |
| 147 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | hallway->setBuildingStory(story1); |
| 148 | |||
| 149 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::ThermalZone office1Zone(model); |
| 150 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::SizingZone office1Sizing(model, office1Zone); |
| 151 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | office1Zone.setName("Office 1 Zone"); |
| 152 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | office1Zone.setThermostatSetpointDualSetpoint(*thermostat); |
| 153 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | office1->setThermalZone(office1Zone); |
| 154 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | office1->setBuildingStory(story1); |
| 155 | |||
| 156 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::ThermalZone office2Zone(model); |
| 157 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::SizingZone office2Sizing(model, office2Zone); |
| 158 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | office2Zone.setName("Office 2 Zone"); |
| 159 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | office2Zone.setThermostatSetpointDualSetpoint(*thermostat); |
| 160 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | office2->setThermalZone(office2Zone); |
| 161 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | office2->setBuildingStory(story1); |
| 162 | |||
| 163 | // add the air system | ||
| 164 |
1/1✓ Branch 1 taken 5 times.
|
5 | openstudio::model::Loop loop = openstudio::model::addSystemType3(model); |
| 165 |
1/1✓ Branch 1 taken 5 times.
|
5 | auto airLoop = loop.cast<openstudio::model::AirLoopHVAC>(); |
| 166 |
1/1✓ Branch 1 taken 5 times.
|
5 | airLoop.addBranchForZone(libraryZone); |
| 167 |
1/1✓ Branch 1 taken 5 times.
|
5 | airLoop.addBranchForZone(office1Zone); |
| 168 |
1/1✓ Branch 1 taken 5 times.
|
5 | airLoop.addBranchForZone(office2Zone); |
| 169 | |||
| 170 | 5 | boost::optional<openstudio::model::SetpointManagerSingleZoneReheat> setpointManager; | |
| 171 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
|
5 | for (openstudio::model::SetpointManagerSingleZoneReheat t : model.getConcreteModelObjects<openstudio::model::SetpointManagerSingleZoneReheat>()) { |
| 172 |
1/1✓ Branch 1 taken 5 times.
|
5 | setpointManager = t; |
| 173 | 5 | break; | |
| 174 | 5 | } | |
| 175 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!setpointManager) { |
| 176 | ✗ | return {}; | |
| 177 | } | ||
| 178 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | setpointManager->setControlZone(libraryZone); |
| 179 | |||
| 180 |
1/1✓ Branch 1 taken 5 times.
|
5 | return boost::optional<openstudio::model::Model>(model); |
| 181 | 5 | } | |
| 182 | |||
| 183 | 2 | boost::optional<openstudio::model::Model> addDemoModelDoorsWindows(openstudio::model::Model model) { | |
| 184 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | boost::optional<openstudio::model::Space> hallway = model.getConcreteModelObjectByName<openstudio::model::Space>("Hallway"); |
| 185 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | boost::optional<openstudio::model::Space> office1 = model.getConcreteModelObjectByName<openstudio::model::Space>("Office 1"); |
| 186 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | boost::optional<openstudio::model::Space> office2 = model.getConcreteModelObjectByName<openstudio::model::Space>("Office 2"); |
| 187 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | boost::optional<openstudio::model::Space> library = model.getConcreteModelObjectByName<openstudio::model::Space>("Library"); |
| 188 | |||
| 189 |
5/10✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
|
2 | if (!hallway || !office1 || !office2 || !library) { |
| 190 | ✗ | return boost::none; | |
| 191 | } | ||
| 192 | |||
| 193 | // Doors | ||
| 194 | // Hallway, Exterior Door | ||
| 195 | 2 | std::vector<openstudio::Point3d> vertices; | |
| 196 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.022, 0, 0)); |
| 197 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.978, 0, 0)); |
| 198 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.978, 0, 2.413)); |
| 199 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.022, 0, 2.413)); |
| 200 | |||
| 201 |
1/1✓ Branch 1 taken 2 times.
|
2 | openstudio::model::SubSurface exteriorDoor(vertices, model); |
| 202 | |||
| 203 |
6/6✓ 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.
|
2 | std::vector<openstudio::model::Surface> searchResults = hallway->findSurfaces(180.0, 180.0, 90.0, 90.0); |
| 204 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 205 | ✗ | return boost::none; | |
| 206 | } | ||
| 207 |
1/1✓ Branch 2 taken 2 times.
|
2 | openstudio::model::Surface southWall = searchResults[0]; |
| 208 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorDoor.setSurface(southWall); |
| 209 | |||
| 210 | // Hallway to Office 2 Door | ||
| 211 | 2 | vertices.clear(); | |
| 212 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.022, 10, 0)); |
| 213 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.978, 10, 0)); |
| 214 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.978, 10, 2.413)); |
| 215 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.022, 10, 2.413)); |
| 216 | |||
| 217 |
1/1✓ Branch 1 taken 2 times.
|
2 | openstudio::model::SubSurface interiorDoor0(vertices, model); |
| 218 | |||
| 219 |
6/6✓ 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.
|
2 | searchResults = office2->findSurfaces(180.0, 180.0, 90.0, 90.0); |
| 220 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 2) { |
| 221 | ✗ | return boost::none; | |
| 222 | } | ||
| 223 | 2 | int index = -1; | |
| 224 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 2 times.
|
6 | for (unsigned i = 0; i < 2; i++) { |
| 225 |
3/3✓ Branch 2 taken 4 times.
✓ Branch 9 taken 12 times.
✓ Branch 10 taken 2 times.
|
14 | for (const openstudio::Point3d& pt : searchResults[i].vertices()) { |
| 226 |
3/3✓ Branch 1 taken 12 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 10 times.
|
12 | if (pt.x() < 8.1) { |
| 227 | 2 | index = i; | |
| 228 | 2 | break; | |
| 229 | } | ||
| 230 | 4 | } | |
| 231 | } | ||
| 232 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | if (index < 0) { |
| 233 | ✗ | return boost::none; | |
| 234 | } | ||
| 235 |
1/1✓ Branch 2 taken 2 times.
|
2 | southWall = searchResults[index]; |
| 236 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor0.setSurface(southWall); |
| 237 | |||
| 238 |
1/1✓ Branch 3 taken 2 times.
|
2 | std::reverse(vertices.begin(), vertices.end()); |
| 239 |
1/1✓ Branch 1 taken 2 times.
|
2 | openstudio::model::SubSurface interiorDoor1 = openstudio::model::SubSurface(vertices, model); |
| 240 | |||
| 241 |
6/6✓ 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.
|
2 | searchResults = hallway->findSurfaces(0.0, 0.0, 90.0, 90.0); |
| 242 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 243 | ✗ | return boost::none; | |
| 244 | } | ||
| 245 |
1/1✓ Branch 2 taken 2 times.
|
2 | openstudio::model::Surface northWall = searchResults[0]; |
| 246 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor1.setSurface(northWall); |
| 247 | |||
| 248 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor0.setAdjacentSubSurface(interiorDoor1); |
| 249 | |||
| 250 | // Office 2 Exterior Door | ||
| 251 | 2 | vertices.clear(); | |
| 252 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.022, 17, 0)); |
| 253 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.022, 17, 2.413)); |
| 254 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.978, 17, 2.413)); |
| 255 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(9.978, 17, 0)); |
| 256 | |||
| 257 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorDoor = openstudio::model::SubSurface(vertices, model); |
| 258 | |||
| 259 |
6/6✓ 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.
|
2 | searchResults = office2->findSurfaces(0.0, 0.0, 90.0, 90.0); |
| 260 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 261 | ✗ | return boost::none; | |
| 262 | } | ||
| 263 | |||
| 264 |
1/1✓ Branch 2 taken 2 times.
|
2 | northWall = searchResults[0]; |
| 265 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorDoor.setSurface(northWall); |
| 266 | |||
| 267 | // Hallway to Office 1 Door | ||
| 268 | 2 | vertices.clear(); | |
| 269 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(11.0, 8.978, 0)); |
| 270 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(11.0, 8.978, 2.413)); |
| 271 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(11.0, 8.022, 2.413)); |
| 272 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(11.0, 8.022, 0)); |
| 273 | |||
| 274 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor0 = openstudio::model::SubSurface(vertices, model); |
| 275 | |||
| 276 |
6/6✓ 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.
|
2 | searchResults = hallway->findSurfaces(90.0, 90.0, 90.0, 90.0); |
| 277 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 278 | ✗ | return boost::none; | |
| 279 | } | ||
| 280 |
1/1✓ Branch 2 taken 2 times.
|
2 | openstudio::model::Surface eastWall = searchResults[0]; |
| 281 | |||
| 282 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor0.setSurface(eastWall); |
| 283 | |||
| 284 |
1/1✓ Branch 3 taken 2 times.
|
2 | std::reverse(vertices.begin(), vertices.end()); |
| 285 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor1 = openstudio::model::SubSurface(vertices, model); |
| 286 | |||
| 287 |
6/6✓ 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.
|
2 | searchResults = office1->findSurfaces(270.0, 270.0, 90.0, 90.0); |
| 288 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 289 | ✗ | return boost::none; | |
| 290 | } | ||
| 291 |
1/1✓ Branch 2 taken 2 times.
|
2 | openstudio::model::Surface westWall = searchResults[0]; |
| 292 | |||
| 293 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor1.setSurface(westWall); |
| 294 | |||
| 295 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor0.setAdjacentSubSurface(interiorDoor1); |
| 296 | |||
| 297 | // Office 1 Exterior Door | ||
| 298 | 2 | vertices.clear(); | |
| 299 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 8.978, 0)); |
| 300 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 8.978, 2.413)); |
| 301 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 8.022, 2.413)); |
| 302 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 8.022, 0)); |
| 303 | |||
| 304 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorDoor = openstudio::model::SubSurface(vertices, model); |
| 305 | |||
| 306 |
6/6✓ 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.
|
2 | searchResults = office1->findSurfaces(90.0, 90.0, 90.0, 90.0); |
| 307 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 308 | ✗ | return boost::none; | |
| 309 | } | ||
| 310 |
1/1✓ Branch 2 taken 2 times.
|
2 | eastWall = searchResults[0]; |
| 311 | |||
| 312 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorDoor.setSurface(eastWall); |
| 313 | |||
| 314 | // Hallway to Library Door | ||
| 315 | 2 | vertices.clear(); | |
| 316 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(8.0, 4.522, 0)); |
| 317 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(8.0, 4.522, 2.413)); |
| 318 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(8.0, 5.478, 2.413)); |
| 319 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(8.0, 5.478, 0)); |
| 320 | |||
| 321 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor0 = openstudio::model::SubSurface(vertices, model); |
| 322 | |||
| 323 |
6/6✓ 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.
|
2 | searchResults = hallway->findSurfaces(270.0, 270.0, 90.0, 90.0); |
| 324 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 325 | ✗ | return boost::none; | |
| 326 | } | ||
| 327 |
1/1✓ Branch 2 taken 2 times.
|
2 | westWall = searchResults[0]; |
| 328 | |||
| 329 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor0.setSurface(westWall); |
| 330 | |||
| 331 |
1/1✓ Branch 3 taken 2 times.
|
2 | std::reverse(vertices.begin(), vertices.end()); |
| 332 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor1 = openstudio::model::SubSurface(vertices, model); |
| 333 | |||
| 334 |
6/6✓ 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.
|
2 | searchResults = library->findSurfaces(90.0, 90.0, 90.0, 90.0); |
| 335 | 2 | index = -1; | |
| 336 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 2 times.
|
6 | for (unsigned i = 0; i < 2; i++) { |
| 337 |
3/3✓ Branch 2 taken 4 times.
✓ Branch 9 taken 12 times.
✓ Branch 10 taken 2 times.
|
14 | for (const openstudio::Point3d& pt : searchResults[i].vertices()) { |
| 338 |
3/3✓ Branch 1 taken 12 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 10 times.
|
12 | if (pt.y() < 0.1) { |
| 339 | 2 | index = i; | |
| 340 | 2 | break; | |
| 341 | } | ||
| 342 | 4 | } | |
| 343 | } | ||
| 344 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | if (index < 0) { |
| 345 | ✗ | return boost::none; | |
| 346 | } | ||
| 347 |
1/1✓ Branch 2 taken 2 times.
|
2 | eastWall = searchResults[index]; |
| 348 | |||
| 349 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor1.setSurface(eastWall); |
| 350 | |||
| 351 |
1/1✓ Branch 1 taken 2 times.
|
2 | interiorDoor0.setAdjacentSubSurface(interiorDoor1); |
| 352 | |||
| 353 | // Library Exterior Door | ||
| 354 | 2 | vertices.clear(); | |
| 355 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(6.022, 17, 0)); |
| 356 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(6.022, 17, 2.413)); |
| 357 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(6.978, 17, 2.413)); |
| 358 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(6.978, 17, 0)); |
| 359 | |||
| 360 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorDoor = openstudio::model::SubSurface(vertices, model); |
| 361 | |||
| 362 |
6/6✓ 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.
|
2 | searchResults = library->findSurfaces(0.0, 0.0, 90.0, 90.0); |
| 363 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 364 | ✗ | return boost::none; | |
| 365 | } | ||
| 366 | |||
| 367 |
1/1✓ Branch 2 taken 2 times.
|
2 | northWall = searchResults[0]; |
| 368 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorDoor.setSurface(northWall); |
| 369 | |||
| 370 | // Windows | ||
| 371 | // Office 1, South Wall | ||
| 372 | 2 | vertices.clear(); | |
| 373 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(12.0, 0, 0.806)); |
| 374 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(12.895, 0, 0.806)); |
| 375 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(12.895, 0, 2.413)); |
| 376 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(12.0, 0, 2.413)); |
| 377 | |||
| 378 |
1/1✓ Branch 1 taken 2 times.
|
2 | openstudio::model::SubSurface exteriorWindow(vertices, model); |
| 379 | |||
| 380 |
6/6✓ 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.
|
2 | searchResults = office1->findSurfaces(180.0, 180.0, 90.0, 90.0); |
| 381 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 382 | ✗ | return boost::none; | |
| 383 | } | ||
| 384 |
1/1✓ Branch 2 taken 2 times.
|
2 | southWall = searchResults[0]; |
| 385 | |||
| 386 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(southWall); |
| 387 | |||
| 388 | 2 | vertices.clear(); | |
| 389 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(13.2, 0, 0.806)); |
| 390 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(14.095, 0, 0.806)); |
| 391 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(14.095, 0, 2.413)); |
| 392 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(13.2, 0, 2.413)); |
| 393 | |||
| 394 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 395 | |||
| 396 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(southWall); |
| 397 | |||
| 398 | 2 | vertices.clear(); | |
| 399 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(14.905, 0, 0.806)); |
| 400 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(15.8, 0, 0.806)); |
| 401 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(15.8, 0, 2.413)); |
| 402 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(14.905, 0, 2.413)); |
| 403 | |||
| 404 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 405 | |||
| 406 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(southWall); |
| 407 | |||
| 408 | 2 | vertices.clear(); | |
| 409 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(16.105, 0, 0.806)); |
| 410 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(17.0, 0, 0.806)); |
| 411 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(17.0, 0, 2.413)); |
| 412 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(16.105, 0, 2.413)); |
| 413 | |||
| 414 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 415 | |||
| 416 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(southWall); |
| 417 | |||
| 418 | // Office 1, East Wall | ||
| 419 |
6/6✓ 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.
|
2 | searchResults = office1->findSurfaces(90.0, 90.0, 90.0, 90.0); |
| 420 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 421 | ✗ | return boost::none; | |
| 422 | } | ||
| 423 |
1/1✓ Branch 2 taken 2 times.
|
2 | eastWall = searchResults[0]; |
| 424 | |||
| 425 | 2 | vertices.clear(); | |
| 426 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 1.0, 0.806)); |
| 427 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 1.895, 0.806)); |
| 428 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 1.895, 2.413)); |
| 429 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 1.0, 2.413)); |
| 430 | |||
| 431 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 432 | |||
| 433 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(eastWall); |
| 434 | |||
| 435 | 2 | vertices.clear(); | |
| 436 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 2.2, 0.806)); |
| 437 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 3.095, 0.806)); |
| 438 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 3.095, 2.413)); |
| 439 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 2.2, 2.413)); |
| 440 | |||
| 441 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 442 | |||
| 443 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(eastWall); |
| 444 | |||
| 445 | 2 | vertices.clear(); | |
| 446 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 3.905, 0.806)); |
| 447 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 4.8, 0.806)); |
| 448 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 4.8, 2.413)); |
| 449 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 3.905, 2.413)); |
| 450 | |||
| 451 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 452 | |||
| 453 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(eastWall); |
| 454 | |||
| 455 | 2 | vertices.clear(); | |
| 456 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 5.105, 0.806)); |
| 457 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 6.0, 0.806)); |
| 458 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 6.0, 2.413)); |
| 459 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 5.105, 2.413)); |
| 460 | |||
| 461 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 462 | |||
| 463 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(eastWall); |
| 464 | |||
| 465 | // Library, South Wall | ||
| 466 |
6/6✓ 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.
|
2 | searchResults = library->findSurfaces(180.0, 180.0, 90.0, 90.0); |
| 467 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 468 | ✗ | return boost::none; | |
| 469 | } | ||
| 470 |
1/1✓ Branch 2 taken 2 times.
|
2 | southWall = searchResults[0]; |
| 471 | |||
| 472 | 2 | vertices.clear(); | |
| 473 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(1.0, 0, 0.806)); |
| 474 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(1.895, 0, 0.806)); |
| 475 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(1.895, 0, 2.413)); |
| 476 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(1.0, 0, 2.413)); |
| 477 | |||
| 478 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 479 | |||
| 480 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(southWall); |
| 481 | |||
| 482 | 2 | vertices.clear(); | |
| 483 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(2.2, 0, 0.806)); |
| 484 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(3.095, 0, 0.806)); |
| 485 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(3.095, 0, 2.413)); |
| 486 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(2.2, 0, 2.413)); |
| 487 | |||
| 488 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 489 | |||
| 490 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(southWall); |
| 491 | |||
| 492 | 2 | vertices.clear(); | |
| 493 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(3.905, 0, 0.806)); |
| 494 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(4.8, 0, 0.806)); |
| 495 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(4.8, 0, 2.413)); |
| 496 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(3.905, 0, 2.413)); |
| 497 | |||
| 498 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 499 | |||
| 500 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(southWall); |
| 501 | |||
| 502 | 2 | vertices.clear(); | |
| 503 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(5.105, 0, 0.806)); |
| 504 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(6.0, 0, 0.806)); |
| 505 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(6.0, 0, 2.413)); |
| 506 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(5.105, 0, 2.413)); |
| 507 | |||
| 508 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 509 | |||
| 510 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(southWall); |
| 511 | |||
| 512 | // Library, West Wall | ||
| 513 |
6/6✓ 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.
|
2 | searchResults = library->findSurfaces(270.0, 270.0, 90.0, 90.0); |
| 514 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 515 | ✗ | return boost::none; | |
| 516 | } | ||
| 517 |
1/1✓ Branch 2 taken 2 times.
|
2 | westWall = searchResults[0]; |
| 518 | |||
| 519 | 2 | vertices.clear(); | |
| 520 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 1.895, 0.806)); |
| 521 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 1.0, 0.806)); |
| 522 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 1.0, 2.413)); |
| 523 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 1.895, 2.413)); |
| 524 | |||
| 525 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 526 | |||
| 527 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 528 | |||
| 529 | 2 | vertices.clear(); | |
| 530 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 3.095, 0.806)); |
| 531 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 2.2, 0.806)); |
| 532 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 2.2, 2.413)); |
| 533 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 3.095, 2.413)); |
| 534 | |||
| 535 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 536 | |||
| 537 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 538 | |||
| 539 | 2 | vertices.clear(); | |
| 540 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 4.8, 0.806)); |
| 541 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 3.905, 0.806)); |
| 542 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 3.905, 2.413)); |
| 543 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 4.8, 2.413)); |
| 544 | |||
| 545 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 546 | |||
| 547 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 548 | |||
| 549 | 2 | vertices.clear(); | |
| 550 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 6.0, 0.806)); |
| 551 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 5.105, 0.806)); |
| 552 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 5.105, 2.413)); |
| 553 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 6.0, 2.413)); |
| 554 | |||
| 555 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 556 | |||
| 557 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 558 | |||
| 559 | 2 | vertices.clear(); | |
| 560 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 11.895, 0.806)); |
| 561 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 11.0, 0.806)); |
| 562 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 11.0, 2.413)); |
| 563 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 11.895, 2.413)); |
| 564 | |||
| 565 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 566 | |||
| 567 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 568 | |||
| 569 | 2 | vertices.clear(); | |
| 570 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 13.095, 0.806)); |
| 571 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 12.2, 0.806)); |
| 572 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 12.2, 2.413)); |
| 573 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 13.095, 2.413)); |
| 574 | |||
| 575 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 576 | |||
| 577 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 578 | |||
| 579 | 2 | vertices.clear(); | |
| 580 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 14.8, 0.806)); |
| 581 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 13.905, 0.806)); |
| 582 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 13.905, 2.413)); |
| 583 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 14.8, 2.413)); |
| 584 | |||
| 585 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 586 | |||
| 587 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 588 | |||
| 589 | 2 | vertices.clear(); | |
| 590 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 16.0, 0.806)); |
| 591 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 15.105, 0.806)); |
| 592 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 15.105, 2.413)); |
| 593 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(0.0, 16.0, 2.413)); |
| 594 | |||
| 595 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 596 | |||
| 597 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 598 | |||
| 599 | // Office 2, West Wall | ||
| 600 |
6/6✓ 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.
|
2 | searchResults = office2->findSurfaces(90.0, 90.0, 90.0, 90.0); |
| 601 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
|
2 | if (searchResults.size() != 1) { |
| 602 | ✗ | return boost::none; | |
| 603 | } | ||
| 604 |
1/1✓ Branch 2 taken 2 times.
|
2 | westWall = searchResults[0]; |
| 605 | |||
| 606 | 2 | vertices.clear(); | |
| 607 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 11.0, 0.806)); |
| 608 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 11.895, 0.806)); |
| 609 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 11.895, 2.413)); |
| 610 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 11.0, 2.413)); |
| 611 | |||
| 612 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 613 | |||
| 614 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 615 | |||
| 616 | 2 | vertices.clear(); | |
| 617 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 12.2, 0.806)); |
| 618 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 13.095, 0.806)); |
| 619 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 13.095, 2.413)); |
| 620 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 12.2, 2.413)); |
| 621 | |||
| 622 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 623 | |||
| 624 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 625 | |||
| 626 | 2 | vertices.clear(); | |
| 627 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 13.905, 0.806)); |
| 628 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 14.8, 0.806)); |
| 629 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 14.8, 2.413)); |
| 630 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 13.905, 2.413)); |
| 631 | |||
| 632 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 633 | |||
| 634 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 635 | |||
| 636 | 2 | vertices.clear(); | |
| 637 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 15.105, 0.806)); |
| 638 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 16.0, 0.806)); |
| 639 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 16.0, 2.413)); |
| 640 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | vertices.push_back(openstudio::Point3d(18.0, 15.105, 2.413)); |
| 641 | |||
| 642 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow = openstudio::model::SubSurface(vertices, model); |
| 643 | |||
| 644 |
1/1✓ Branch 1 taken 2 times.
|
2 | exteriorWindow.setSurface(westWall); |
| 645 | |||
| 646 | //return boost::none; | ||
| 647 |
1/1✓ Branch 1 taken 2 times.
|
2 | return boost::optional<openstudio::model::Model>(model); |
| 648 | 2 | } | |
| 649 | |||
| 650 | 2 | boost::optional<openstudio::model::Model> buildDemoModel2014(openstudio::model::Model model) { | |
| 651 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | boost::optional<openstudio::model::Model> optModel = buildDemoModel2012(model); |
| 652 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (optModel) { |
| 653 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | return addDemoModelDoorsWindows(optModel.get()); |
| 654 | } | ||
| 655 | ✗ | return boost::none; | |
| 656 | 2 | } | |
| 657 |