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/HeatPumpAirToWaterCoolingSpeedData_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_HEATPUMPAIRTOWATERCOOLINGSPEEDDATA_IMPL_HPP
7 #define MODEL_HEATPUMPAIRTOWATERCOOLINGSPEEDDATA_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ResourceObject_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Curve;
16 class HeatPumpAirToWaterCooling;
17
18 namespace detail {
19
20 /** HeatPumpAirToWaterCoolingSpeedData_Impl is a ResourceObject_Impl that is the implementation class for HeatPumpAirToWaterCoolingSpeedData.*/
21 class MODEL_API HeatPumpAirToWaterCoolingSpeedData_Impl : public ResourceObject_Impl
22 {
23 public:
24 /** @name Constructors and Destructors */
25 //@{
26
27 HeatPumpAirToWaterCoolingSpeedData_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
28
29 HeatPumpAirToWaterCoolingSpeedData_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
30
31 HeatPumpAirToWaterCoolingSpeedData_Impl(const HeatPumpAirToWaterCoolingSpeedData_Impl& other, Model_Impl* model, bool keepHandle);
32
33 91 virtual ~HeatPumpAirToWaterCoolingSpeedData_Impl() = default;
34
35 //@}
36 /** @name Virtual Methods */
37 //@{
38
39 virtual const std::vector<std::string>& outputVariableNames() const override;
40
41 virtual IddObjectType iddObjectType() const override;
42
43 // Overriding clone and children here because we want to try to remove the Curves (if they aren't used by something else)
44 // So we list them as children. But ResourceObject_Impl::clone would also clone them, so we override clone to call ModelObject_Impl::clone
45 virtual ModelObject clone(Model model) const override;
46
47 virtual std::vector<ModelObject> children() const override;
48
49 //@}
50 /** @name Getters */
51 //@{
52
53 boost::optional<double> ratedCoolingCapacity() const;
54
55 bool isRatedCoolingCapacityAutosized() const;
56
57 boost::optional<double> autosizedRatedCoolingCapacity();
58
59 double ratedCOPforCooling() const;
60
61 Curve normalizedCoolingCapacityFunctionofTemperatureCurve() const;
62
63 Curve coolingEnergyInputRatioFunctionofTemperatureCurve() const;
64
65 Curve coolingEnergyInputRatioFunctionofPLRCurve() const;
66
67 //@}
68 /** @name Setters */
69 //@{
70
71 bool setRatedCoolingCapacity(double ratedCoolingCapacity);
72
73 void autosizeRatedCoolingCapacity();
74
75 bool setRatedCOPforCooling(double ratedCOPforCooling);
76
77 bool setNormalizedCoolingCapacityFunctionofTemperatureCurve(const Curve& bivariateFunctions);
78
79 bool setCoolingEnergyInputRatioFunctionofTemperatureCurve(const Curve& bivariateFunctions);
80
81 bool setCoolingEnergyInputRatioFunctionofPLRCurve(const Curve& univariateFunctions);
82
83 //@}
84 /** @name Other */
85 //@{
86
87 // convenience function that returns a vector of HeatPumpAirToWaterCooling that use this as their Speed Data (either regular speed or Booster)
88 std::vector<HeatPumpAirToWaterCooling> heatPumpAirToWaterCoolings() const;
89
90 void autosize();
91
92 void applySizingValues();
93
94 //@}
95 protected:
96 private:
97 − REGISTER_LOGGER("openstudio.model.HeatPumpAirToWaterCoolingSpeedData");
98
99 // Optional getters for use by methods like children() so can remove() if the constructor fails.
100 // There are other ways for the public versions of these getters to fail--perhaps all required
101 // objects should be returned as boost::optionals
102 boost::optional<Curve> optionalNormalizedCoolingCapacityFunctionofTemperatureCurve() const;
103 boost::optional<Curve> optionalCoolingEnergyInputRatioFunctionofTemperatureCurve() const;
104 boost::optional<Curve> optionalCoolingEnergyInputRatioFunctionofPLRCurve() const;
105 };
106
107 } // namespace detail
108
109 } // namespace model
110 } // namespace openstudio
111
112 #endif // MODEL_HEATPUMPAIRTOWATERCOOLINGSPEEDDATA_IMPL_HPP
113