GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 1 / 2
Functions: 100.0% 1 / 1 / 2
Branches: -% 0 / 1 / 1

src/model/Facility_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_FACILITY_IMPL_HPP
7 #define MODEL_FACILITY_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ParentObject_Impl.hpp"
11
12 #include "../utilities/data/CalibrationResult.hpp"
13 #include "../utilities/data/EndUses.hpp"
14 #include "../utilities/data/DataEnums.hpp"
15 #include "../utilities/core/Deprecated.hpp"
16
17 namespace openstudio {
18
19 namespace model {
20
21 class Building;
22 class OutputMeter;
23 class ExteriorLights;
24 class ExteriorFuelEquipment;
25 class ExteriorWaterEquipment;
26
27 namespace detail {
28
29 /** Facility_Impl is a ParentObject_Impl that is the implementation class for Facility.*/
30 class MODEL_API Facility_Impl : public ParentObject_Impl
31 {
32 public:
33 /** @name Constructors and Destructors */
34 //@{
35
36 Facility_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
37
38 Facility_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
39
40 Facility_Impl(const Facility_Impl& other, Model_Impl* model, bool keepHandle);
41
42 552 virtual ~Facility_Impl() override = default;
43
44 //@}
45
46 // return the parent object in the hierarchy
47 virtual boost::optional<ParentObject> parent() const override;
48
49 // return any children objects in the hierarchy
50 virtual std::vector<ModelObject> children() const override;
51
52 /// get a vector of allowable children types
53 virtual std::vector<IddObjectType> allowableChildTypes() const override;
54
55 // Get all output variable names that could be associated with this object.
56 virtual const std::vector<std::string>& outputVariableNames() const override;
57
58 virtual IddObjectType iddObjectType() const override;
59
60 /** @name Getters */
61 //@{
62
63 //@}
64 /** @name Setters */
65 //@{
66
67 //@}
68 /** @name Children */
69 //@{
70
71 /// get the building
72 boost::optional<Building> building() const;
73
74 // get meter requests for the facility
75 std::vector<OutputMeter> meters() const;
76
77 boost::optional<OutputMeter> getMeterByFuelType(const FuelType& fuelType, const std::string& reportingFrequency,
78 const boost::optional<EndUseType>& endUseType,
79 const boost::optional<std::string>& specificEndUse) const;
80
81 /// Returns all ExteriorLights.
82 std::vector<ExteriorLights> exteriorLights() const;
83
84 /// Returns all ExteriorFuelEquipment.
85 std::vector<ExteriorFuelEquipment> exteriorFuelEquipments() const;
86
87 /// Returns all ExteriorWaterEquipment.
88 std::vector<ExteriorWaterEquipment> exteriorWaterEquipments() const;
89
90 //@}
91 /** @name Other */
92 //@{
93
94 boost::optional<double> totalSiteEnergy() const;
95 boost::optional<double> netSiteEnergy() const;
96 boost::optional<double> totalSourceEnergy() const;
97 boost::optional<double> netSourceEnergy() const;
98
99 boost::optional<double> annualTotalCost(const FuelType& fuel) const;
100 boost::optional<double> annualTotalCostPerBldgArea(const FuelType& fuel) const;
101 boost::optional<double> annualTotalCostPerNetConditionedBldgArea(const FuelType& fuel) const;
102
103 boost::optional<double> annualTotalUtilityCost() const;
104 boost::optional<double> annualElectricTotalCost() const;
105 boost::optional<double> annualGasTotalCost() const;
106 boost::optional<double> annualDistrictCoolingTotalCost() const;
107 boost::optional<double> annualDistrictHeatingTotalCost() const;
108 boost::optional<double> annualWaterTotalCost() const;
109
110 boost::optional<double> economicsCapitalCost() const;
111 boost::optional<double> economicsEnergyCost() const;
112 boost::optional<double> economicsTLCC() const;
113 boost::optional<double> economicsVirtualRateGas() const;
114 boost::optional<double> economicsVirtualRateElec() const;
115 boost::optional<double> economicsVirtualRateCombined() const;
116 boost::optional<double> economicsSPB() const;
117 boost::optional<double> economicsDPB() const;
118 boost::optional<double> economicsNPV() const;
119 boost::optional<double> economicsIRR() const;
120
121 boost::optional<double> electricityHeating() const;
122 boost::optional<double> electricityCooling() const;
123 boost::optional<double> electricityInteriorLighting() const;
124 boost::optional<double> electricityExteriorLighting() const;
125 boost::optional<double> electricityInteriorEquipment() const;
126 boost::optional<double> electricityExteriorEquipment() const;
127 boost::optional<double> electricityFans() const;
128 boost::optional<double> electricityPumps() const;
129 boost::optional<double> electricityHeatRejection() const;
130 boost::optional<double> electricityHumidification() const;
131 boost::optional<double> electricityHeatRecovery() const;
132 boost::optional<double> electricityWaterSystems() const;
133 boost::optional<double> electricityRefrigeration() const;
134 boost::optional<double> electricityGenerators() const;
135 boost::optional<double> electricityTotalEndUses() const;
136
137 boost::optional<double> naturalGasHeating() const;
138 boost::optional<double> naturalGasCooling() const;
139 boost::optional<double> naturalGasInteriorLighting() const;
140 boost::optional<double> naturalGasExteriorLighting() const;
141 boost::optional<double> naturalGasInteriorEquipment() const;
142 boost::optional<double> naturalGasExteriorEquipment() const;
143 boost::optional<double> naturalGasFans() const;
144 boost::optional<double> naturalGasPumps() const;
145 boost::optional<double> naturalGasHeatRejection() const;
146 boost::optional<double> naturalGasHumidification() const;
147 boost::optional<double> naturalGasHeatRecovery() const;
148 boost::optional<double> naturalGasWaterSystems() const;
149 boost::optional<double> naturalGasRefrigeration() const;
150 boost::optional<double> naturalGasGenerators() const;
151 boost::optional<double> naturalGasTotalEndUses() const;
152
153 // gasoline
154 boost::optional<double> gasolineHeating() const;
155 boost::optional<double> gasolineCooling() const;
156 boost::optional<double> gasolineInteriorLighting() const;
157 boost::optional<double> gasolineExteriorLighting() const;
158 boost::optional<double> gasolineInteriorEquipment() const;
159 boost::optional<double> gasolineExteriorEquipment() const;
160 boost::optional<double> gasolineFans() const;
161 boost::optional<double> gasolinePumps() const;
162 boost::optional<double> gasolineHeatRejection() const;
163 boost::optional<double> gasolineHumidification() const;
164 boost::optional<double> gasolineHeatRecovery() const;
165 boost::optional<double> gasolineWaterSystems() const;
166 boost::optional<double> gasolineRefrigeration() const;
167 boost::optional<double> gasolineGenerators() const;
168 boost::optional<double> gasolineTotalEndUses() const;
169
170 // diesel
171 boost::optional<double> dieselHeating() const;
172 boost::optional<double> dieselCooling() const;
173 boost::optional<double> dieselInteriorLighting() const;
174 boost::optional<double> dieselExteriorLighting() const;
175 boost::optional<double> dieselInteriorEquipment() const;
176 boost::optional<double> dieselExteriorEquipment() const;
177 boost::optional<double> dieselFans() const;
178 boost::optional<double> dieselPumps() const;
179 boost::optional<double> dieselHeatRejection() const;
180 boost::optional<double> dieselHumidification() const;
181 boost::optional<double> dieselHeatRecovery() const;
182 boost::optional<double> dieselWaterSystems() const;
183 boost::optional<double> dieselRefrigeration() const;
184 boost::optional<double> dieselGenerators() const;
185 boost::optional<double> dieselTotalEndUses() const;
186
187 // coal
188 boost::optional<double> coalHeating() const;
189 boost::optional<double> coalCooling() const;
190 boost::optional<double> coalInteriorLighting() const;
191 boost::optional<double> coalExteriorLighting() const;
192 boost::optional<double> coalInteriorEquipment() const;
193 boost::optional<double> coalExteriorEquipment() const;
194 boost::optional<double> coalFans() const;
195 boost::optional<double> coalPumps() const;
196 boost::optional<double> coalHeatRejection() const;
197 boost::optional<double> coalHumidification() const;
198 boost::optional<double> coalHeatRecovery() const;
199 boost::optional<double> coalWaterSystems() const;
200 boost::optional<double> coalRefrigeration() const;
201 boost::optional<double> coalGenerators() const;
202 boost::optional<double> coalTotalEndUses() const;
203
204 // Fuel oil No 1
205 boost::optional<double> fuelOilNo1Heating() const;
206 boost::optional<double> fuelOilNo1Cooling() const;
207 boost::optional<double> fuelOilNo1InteriorLighting() const;
208 boost::optional<double> fuelOilNo1ExteriorLighting() const;
209 boost::optional<double> fuelOilNo1InteriorEquipment() const;
210 boost::optional<double> fuelOilNo1ExteriorEquipment() const;
211 boost::optional<double> fuelOilNo1Fans() const;
212 boost::optional<double> fuelOilNo1Pumps() const;
213 boost::optional<double> fuelOilNo1HeatRejection() const;
214 boost::optional<double> fuelOilNo1Humidification() const;
215 boost::optional<double> fuelOilNo1HeatRecovery() const;
216 boost::optional<double> fuelOilNo1WaterSystems() const;
217 boost::optional<double> fuelOilNo1Refrigeration() const;
218 boost::optional<double> fuelOilNo1Generators() const;
219 boost::optional<double> fuelOilNo1TotalEndUses() const;
220
221 // Fuel oil No 2
222 boost::optional<double> fuelOilNo2Heating() const;
223 boost::optional<double> fuelOilNo2Cooling() const;
224 boost::optional<double> fuelOilNo2InteriorLighting() const;
225 boost::optional<double> fuelOilNo2ExteriorLighting() const;
226 boost::optional<double> fuelOilNo2InteriorEquipment() const;
227 boost::optional<double> fuelOilNo2ExteriorEquipment() const;
228 boost::optional<double> fuelOilNo2Fans() const;
229 boost::optional<double> fuelOilNo2Pumps() const;
230 boost::optional<double> fuelOilNo2HeatRejection() const;
231 boost::optional<double> fuelOilNo2Humidification() const;
232 boost::optional<double> fuelOilNo2HeatRecovery() const;
233 boost::optional<double> fuelOilNo2WaterSystems() const;
234 boost::optional<double> fuelOilNo2Refrigeration() const;
235 boost::optional<double> fuelOilNo2Generators() const;
236 boost::optional<double> fuelOilNo2TotalEndUses() const;
237
238 // Propane
239 boost::optional<double> propaneHeating() const;
240 boost::optional<double> propaneCooling() const;
241 boost::optional<double> propaneInteriorLighting() const;
242 boost::optional<double> propaneExteriorLighting() const;
243 boost::optional<double> propaneInteriorEquipment() const;
244 boost::optional<double> propaneExteriorEquipment() const;
245 boost::optional<double> propaneFans() const;
246 boost::optional<double> propanePumps() const;
247 boost::optional<double> propaneHeatRejection() const;
248 boost::optional<double> propaneHumidification() const;
249 boost::optional<double> propaneHeatRecovery() const;
250 boost::optional<double> propaneWaterSystems() const;
251 boost::optional<double> propaneRefrigeration() const;
252 boost::optional<double> propaneGenerators() const;
253 boost::optional<double> propaneTotalEndUses() const;
254
255 // Other Fuel 1
256 boost::optional<double> otherFuel1Heating() const;
257 boost::optional<double> otherFuel1Cooling() const;
258 boost::optional<double> otherFuel1InteriorLighting() const;
259 boost::optional<double> otherFuel1ExteriorLighting() const;
260 boost::optional<double> otherFuel1InteriorEquipment() const;
261 boost::optional<double> otherFuel1ExteriorEquipment() const;
262 boost::optional<double> otherFuel1Fans() const;
263 boost::optional<double> otherFuel1Pumps() const;
264 boost::optional<double> otherFuel1HeatRejection() const;
265 boost::optional<double> otherFuel1Humidification() const;
266 boost::optional<double> otherFuel1HeatRecovery() const;
267 boost::optional<double> otherFuel1WaterSystems() const;
268 boost::optional<double> otherFuel1Refrigeration() const;
269 boost::optional<double> otherFuel1Generators() const;
270 boost::optional<double> otherFuel1TotalEndUses() const;
271
272 // Other Fuel2
273 boost::optional<double> otherFuel2Heating() const;
274 boost::optional<double> otherFuel2Cooling() const;
275 boost::optional<double> otherFuel2InteriorLighting() const;
276 boost::optional<double> otherFuel2ExteriorLighting() const;
277 boost::optional<double> otherFuel2InteriorEquipment() const;
278 boost::optional<double> otherFuel2ExteriorEquipment() const;
279 boost::optional<double> otherFuel2Fans() const;
280 boost::optional<double> otherFuel2Pumps() const;
281 boost::optional<double> otherFuel2HeatRejection() const;
282 boost::optional<double> otherFuel2Humidification() const;
283 boost::optional<double> otherFuel2HeatRecovery() const;
284 boost::optional<double> otherFuel2WaterSystems() const;
285 boost::optional<double> otherFuel2Refrigeration() const;
286 boost::optional<double> otherFuel2Generators() const;
287 boost::optional<double> otherFuel2TotalEndUses() const;
288
289 boost::optional<double> districtCoolingHeating() const;
290 boost::optional<double> districtCoolingCooling() const;
291 boost::optional<double> districtCoolingInteriorLighting() const;
292 boost::optional<double> districtCoolingExteriorLighting() const;
293 boost::optional<double> districtCoolingInteriorEquipment() const;
294 boost::optional<double> districtCoolingExteriorEquipment() const;
295 boost::optional<double> districtCoolingFans() const;
296 boost::optional<double> districtCoolingPumps() const;
297 boost::optional<double> districtCoolingHeatRejection() const;
298 boost::optional<double> districtCoolingHumidification() const;
299 boost::optional<double> districtCoolingHeatRecovery() const;
300 boost::optional<double> districtCoolingWaterSystems() const;
301 boost::optional<double> districtCoolingRefrigeration() const;
302 boost::optional<double> districtCoolingGenerators() const;
303 boost::optional<double> districtCoolingTotalEndUses() const;
304
305 boost::optional<double> districtHeatingHeating() const;
306 boost::optional<double> districtHeatingCooling() const;
307 boost::optional<double> districtHeatingInteriorLighting() const;
308 boost::optional<double> districtHeatingExteriorLighting() const;
309 boost::optional<double> districtHeatingInteriorEquipment() const;
310 boost::optional<double> districtHeatingExteriorEquipment() const;
311 boost::optional<double> districtHeatingFans() const;
312 boost::optional<double> districtHeatingPumps() const;
313 boost::optional<double> districtHeatingHeatRejection() const;
314 boost::optional<double> districtHeatingHumidification() const;
315 boost::optional<double> districtHeatingHeatRecovery() const;
316 boost::optional<double> districtHeatingWaterSystems() const;
317 boost::optional<double> districtHeatingRefrigeration() const;
318 boost::optional<double> districtHeatingGenerators() const;
319 boost::optional<double> districtHeatingTotalEndUses() const;
320
321 boost::optional<double> waterHeating() const;
322 boost::optional<double> waterCooling() const;
323 boost::optional<double> waterInteriorLighting() const;
324 boost::optional<double> waterExteriorLighting() const;
325 boost::optional<double> waterInteriorEquipment() const;
326 boost::optional<double> waterExteriorEquipment() const;
327 boost::optional<double> waterFans() const;
328 boost::optional<double> waterPumps() const;
329 boost::optional<double> waterHeatRejection() const;
330 boost::optional<double> waterHumidification() const;
331 boost::optional<double> waterHeatRecovery() const;
332 boost::optional<double> waterWaterSystems() const;
333 boost::optional<double> waterRefrigeration() const;
334 boost::optional<double> waterGenerators() const;
335 boost::optional<double> waterTotalEndUses() const;
336
337 boost::optional<double> hoursHeatingSetpointNotMet() const;
338 boost::optional<double> hoursCoolingSetpointNotMet() const;
339
340 boost::optional<EndUses> endUses() const;
341
342 boost::optional<CalibrationResult> calibrationResult() const;
343
344 //@}
345 protected:
346 boost::optional<double> elecUse() const;
347 boost::optional<double> elecCost() const;
348 boost::optional<double> gasUse() const;
349 boost::optional<double> gasCost() const;
350 boost::optional<double> getElecOrGasUse(bool getGas = true) const;
351 boost::optional<double> getElecOrGasCost(bool bGetGas = true) const;
352
353 private:
354 − REGISTER_LOGGER("openstudio.model.Facility");
355
356 boost::optional<ModelObject> buildingAsModelObject() const;
357 std::vector<ModelObject> metersAsModelObjects() const;
358 std::vector<ModelObject> exteriorLightsAsModelObjects() const;
359 std::vector<ModelObject> exteriorFuelEquipmentAsModelObjects() const;
360 std::vector<ModelObject> exteriorWaterEquipmentAsModelObjects() const;
361 };
362
363 } // namespace detail
364
365 } // namespace model
366 } // namespace openstudio
367
368 #endif // MODEL_FACILITY_IMPL_HPP
369