src/model/Building_Impl.hpp
| 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 | #ifndef MODEL_BUILDING_IMPL_HPP | ||
| 7 | #define MODEL_BUILDING_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ParentObject_Impl.hpp" | ||
| 10 | |||
| 11 | namespace openstudio { | ||
| 12 | |||
| 13 | class Point3d; | ||
| 14 | class Transformation; | ||
| 15 | |||
| 16 | namespace model { | ||
| 17 | |||
| 18 | class Facility; | ||
| 19 | class OutputMeter; | ||
| 20 | class BuildingStory; | ||
| 21 | class ShadingSurfaceGroup; | ||
| 22 | class Surface; | ||
| 23 | class Space; | ||
| 24 | class SpaceType; | ||
| 25 | class DefaultConstructionSet; | ||
| 26 | class DefaultScheduleSet; | ||
| 27 | class DefaultScheduleType; | ||
| 28 | class ThermalZone; | ||
| 29 | class Building; | ||
| 30 | |||
| 31 | namespace detail { | ||
| 32 | |||
| 33 | /** Building_Impl is a ParentObject_Impl that is the implementation class for Building.*/ | ||
| 34 | class MODEL_API Building_Impl : public ParentObject_Impl | ||
| 35 | { | ||
| 36 | |||
| 37 | public: | ||
| 38 | /** @name Constructors and Destructors */ | ||
| 39 | //@{ | ||
| 40 | |||
| 41 | Building_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 42 | |||
| 43 | Building_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 44 | |||
| 45 | Building_Impl(const Building_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 46 | |||
| 47 | 1567 | virtual ~Building_Impl() override = default; | |
| 48 | |||
| 49 | //@} | ||
| 50 | |||
| 51 | virtual boost::optional<ParentObject> parent() const override; | ||
| 52 | |||
| 53 | virtual std::vector<IdfObject> remove() override; | ||
| 54 | |||
| 55 | virtual std::vector<ModelObject> children() const override; | ||
| 56 | |||
| 57 | virtual ModelObject clone(Model model) const override; | ||
| 58 | |||
| 59 | virtual bool setParent(ParentObject& newParent) override; | ||
| 60 | |||
| 61 | virtual std::vector<IddObjectType> allowableChildTypes() const override; | ||
| 62 | |||
| 63 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 64 | |||
| 65 | virtual IddObjectType iddObjectType() const override; | ||
| 66 | |||
| 67 | /** @name Getters */ | ||
| 68 | //@{ | ||
| 69 | |||
| 70 | double northAxis() const; | ||
| 71 | bool isNorthAxisDefaulted() const; | ||
| 72 | |||
| 73 | boost::optional<double> nominalFloortoFloorHeight() const; | ||
| 74 | |||
| 75 | boost::optional<int> standardsNumberOfStories() const; | ||
| 76 | |||
| 77 | boost::optional<int> standardsNumberOfAboveGroundStories() const; | ||
| 78 | |||
| 79 | boost::optional<int> standardsNumberOfLivingUnits() const; | ||
| 80 | |||
| 81 | boost::optional<double> nominalFloortoCeilingHeight() const; | ||
| 82 | |||
| 83 | boost::optional<std::string> standardsTemplate() const; | ||
| 84 | std::vector<std::string> suggestedStandardsTemplates() const; | ||
| 85 | |||
| 86 | boost::optional<std::string> standardsBuildingType() const; | ||
| 87 | std::vector<std::string> suggestedStandardsBuildingTypes() const; | ||
| 88 | |||
| 89 | bool relocatable() const; | ||
| 90 | bool isRelocatableDefaulted() const; | ||
| 91 | |||
| 92 | boost::optional<Schedule> getDefaultSchedule(const DefaultScheduleType& defaultScheduleType) const; | ||
| 93 | |||
| 94 | //@} | ||
| 95 | /** @name Setters */ | ||
| 96 | //@{ | ||
| 97 | |||
| 98 | bool setNorthAxis(double northAxis); | ||
| 99 | |||
| 100 | void resetNorthAxis(); | ||
| 101 | |||
| 102 | bool setNominalFloortoFloorHeight(double nominalFloortoFloorHeight); | ||
| 103 | |||
| 104 | void resetNominalFloortoFloorHeight(); | ||
| 105 | |||
| 106 | bool setStandardsNumberOfStories(int value); | ||
| 107 | void resetStandardsNumberOfStories(); | ||
| 108 | |||
| 109 | bool setStandardsNumberOfAboveGroundStories(int value); | ||
| 110 | void resetStandardsNumberOfAboveGroundStories(); | ||
| 111 | |||
| 112 | bool setStandardsNumberOfLivingUnits(int value); | ||
| 113 | void resetStandardsNumberOfLivingUnits(); | ||
| 114 | |||
| 115 | bool setNominalFloortoCeilingHeight(double nominalFloortoCeilingHeight); | ||
| 116 | void resetNominalFloortoCeilingHeight(); | ||
| 117 | |||
| 118 | bool setStandardsTemplate(const std::string& standardsTemplate); | ||
| 119 | void resetStandardsTemplate(); | ||
| 120 | |||
| 121 | bool setStandardsBuildingType(const std::string& standardsBuildingType); | ||
| 122 | void resetStandardsBuildingType(); | ||
| 123 | |||
| 124 | bool setRelocatable(bool isRelocatable); | ||
| 125 | void resetRelocatable(); | ||
| 126 | |||
| 127 | //@} | ||
| 128 | |||
| 129 | boost::optional<SpaceType> spaceType() const; | ||
| 130 | |||
| 131 | bool setSpaceType(const SpaceType& spaceType); | ||
| 132 | |||
| 133 | void resetSpaceType(); | ||
| 134 | |||
| 135 | boost::optional<DefaultConstructionSet> defaultConstructionSet() const; | ||
| 136 | |||
| 137 | bool setDefaultConstructionSet(const DefaultConstructionSet& defaultConstructionSet); | ||
| 138 | |||
| 139 | void resetDefaultConstructionSet(); | ||
| 140 | |||
| 141 | boost::optional<DefaultScheduleSet> defaultScheduleSet() const; | ||
| 142 | |||
| 143 | bool setDefaultScheduleSet(const DefaultScheduleSet& defaultScheduleSet); | ||
| 144 | |||
| 145 | void resetDefaultScheduleSet(); | ||
| 146 | |||
| 147 | std::vector<OutputMeter> meters() const; | ||
| 148 | |||
| 149 | std::vector<BuildingStory> buildingStories() const; | ||
| 150 | |||
| 151 | boost::optional<Facility> facility() const; | ||
| 152 | |||
| 153 | std::vector<Space> spaces() const; | ||
| 154 | |||
| 155 | std::vector<ShadingSurfaceGroup> shadingSurfaceGroups() const; | ||
| 156 | |||
| 157 | std::vector<ThermalZone> thermalZones() const; | ||
| 158 | |||
| 159 | std::vector<Surface> exteriorWalls() const; | ||
| 160 | |||
| 161 | std::vector<Surface> roofs() const; | ||
| 162 | |||
| 163 | double floorArea() const; | ||
| 164 | |||
| 165 | boost::optional<double> conditionedFloorArea() const; | ||
| 166 | |||
| 167 | double exteriorSurfaceArea() const; | ||
| 168 | |||
| 169 | double exteriorWallArea() const; | ||
| 170 | |||
| 171 | double airVolume() const; | ||
| 172 | |||
| 173 | double numberOfPeople() const; | ||
| 174 | |||
| 175 | double peoplePerFloorArea() const; | ||
| 176 | |||
| 177 | double floorAreaPerPerson() const; | ||
| 178 | |||
| 179 | double lightingPower() const; | ||
| 180 | |||
| 181 | double lightingPowerPerFloorArea() const; | ||
| 182 | |||
| 183 | double lightingPowerPerPerson() const; | ||
| 184 | |||
| 185 | double electricEquipmentPower() const; | ||
| 186 | |||
| 187 | double electricEquipmentPowerPerFloorArea() const; | ||
| 188 | |||
| 189 | double electricEquipmentPowerPerPerson() const; | ||
| 190 | |||
| 191 | double gasEquipmentPower() const; | ||
| 192 | |||
| 193 | double gasEquipmentPowerPerFloorArea() const; | ||
| 194 | |||
| 195 | double gasEquipmentPowerPerPerson() const; | ||
| 196 | |||
| 197 | double hotWaterEquipmentPower() const; | ||
| 198 | |||
| 199 | double hotWaterEquipmentPowerPerFloorArea() const; | ||
| 200 | |||
| 201 | double hotWaterEquipmentPowerPerPerson() const; | ||
| 202 | |||
| 203 | double infiltrationDesignFlowRate() const; | ||
| 204 | |||
| 205 | double infiltrationDesignFlowPerSpaceFloorArea() const; | ||
| 206 | |||
| 207 | double infiltrationDesignFlowPerExteriorSurfaceArea() const; | ||
| 208 | |||
| 209 | double infiltrationDesignFlowPerExteriorWallArea() const; | ||
| 210 | |||
| 211 | double infiltrationDesignAirChangesPerHour() const; | ||
| 212 | |||
| 213 | Transformation transformation() const; | ||
| 214 | |||
| 215 | double exteriorPerimeter() const; | ||
| 216 | |||
| 217 | std::vector<std::vector<Point3d>> generateSkylightPattern(double skylightToProjectedFloorRatio, double desiredWidth, | ||
| 218 | double desiredHeight) const; | ||
| 219 | |||
| 220 | protected: | ||
| 221 | private: | ||
| 222 | − | REGISTER_LOGGER("openstudio.model.Building"); | |
| 223 | |||
| 224 | boost::optional<ModelObject> spaceTypeAsModelObject() const; | ||
| 225 | boost::optional<ModelObject> defaultConstructionSetAsModelObject() const; | ||
| 226 | boost::optional<ModelObject> defaultScheduleSetAsModelObject() const; | ||
| 227 | std::vector<ModelObject> metersAsModelObjects() const; | ||
| 228 | std::vector<ModelObject> buildingStoriesAsModelObjects() const; | ||
| 229 | boost::optional<ModelObject> facilityAsModelObject() const; | ||
| 230 | std::vector<ModelObject> spacesAsModelObjects() const; | ||
| 231 | std::vector<ModelObject> shadingSurfaceGroupsAsModelObjects() const; | ||
| 232 | std::vector<ModelObject> thermalZonesAsModelObjects() const; | ||
| 233 | std::vector<ModelObject> exteriorWallsAsModelObjects() const; | ||
| 234 | std::vector<ModelObject> roofsAsModelObjects() const; | ||
| 235 | |||
| 236 | bool setSpaceTypeAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 237 | bool setDefaultConstructionSetAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 238 | bool setDefaultScheduleSetAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 239 | }; | ||
| 240 | |||
| 241 | } // namespace detail | ||
| 242 | |||
| 243 | } // namespace model | ||
| 244 | } // namespace openstudio | ||
| 245 | |||
| 246 | #endif // MODEL_BUILDING_IMPL_HPP | ||
| 247 |