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/ZoneHVACUnitHeater_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_ZONEHVACUNITHEATER_IMPL_HPP
7 #define MODEL_ZONEHVACUNITHEATER_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ZoneHVACComponent_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Schedule;
16 class HVACComponent;
17
18 namespace detail {
19
20 /** ZoneHVACUnitHeater_Impl is a ZoneHVACComponent_Impl that is the implementation class for ZoneHVACUnitHeater.*/
21
22 class MODEL_API ZoneHVACUnitHeater_Impl : public ZoneHVACComponent_Impl
23 {
24 public:
25 /** @name Constructors and Destructors */
26
27 ZoneHVACUnitHeater_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
28
29 ZoneHVACUnitHeater_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
30
31 ZoneHVACUnitHeater_Impl(const ZoneHVACUnitHeater_Impl& other, Model_Impl* model, bool keepHandle);
32
33 22 virtual ~ZoneHVACUnitHeater_Impl() override = default;
34
35 //@}
36 /** @name Virtual Methods */
37 //@{
38
39 virtual ModelObject clone(Model model) const override;
40
41 virtual std::vector<IdfObject> remove() override;
42
43 virtual const std::vector<std::string>& outputVariableNames() const override;
44
45 virtual IddObjectType iddObjectType() const override;
46
47 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
48
49 virtual std::vector<ModelObject> children() const override;
50
51 virtual unsigned inletPort() const override;
52
53 virtual unsigned outletPort() const override;
54
55 virtual ComponentType componentType() const override;
56 virtual std::vector<FuelType> coolingFuelTypes() const override;
57 virtual std::vector<FuelType> heatingFuelTypes() const override;
58 virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override;
59
60 //@}
61 /** @name Getters */
62 //@{
63
64 Schedule availabilitySchedule() const;
65
66 HVACComponent supplyAirFan() const;
67
68 boost::optional<double> maximumSupplyAirFlowRate() const;
69
70 bool isMaximumSupplyAirFlowRateAutosized() const;
71
72 std::string fanControlType() const;
73
74 HVACComponent heatingCoil() const;
75
76 boost::optional<double> maximumHotWaterFlowRate() const;
77
78 bool isMaximumHotWaterFlowRateAutosized() const;
79
80 double minimumHotWaterFlowRate() const;
81
82 bool isMinimumHotWaterFlowRateDefaulted() const;
83
84 double heatingConvergenceTolerance() const;
85
86 bool isHeatingConvergenceToleranceDefaulted() const;
87
88 boost::optional<double> autosizedMaximumSupplyAirFlowRate() const;
89
90 boost::optional<double> autosizedMaximumHotWaterFlowRate() const;
91
92 virtual void autosize() override;
93
94 virtual void applySizingValues() override;
95
96 //@}
97 /** @name Setters */
98 //@{
99
100 bool setAvailabilitySchedule(Schedule& schedule);
101
102 bool setSupplyAirFan(const HVACComponent& hvacComponent);
103
104 bool setMaximumSupplyAirFlowRate(boost::optional<double> maximumSupplyAirFlowRate);
105
106 void autosizeMaximumSupplyAirFlowRate();
107
108 bool setFanControlType(const std::string& fanControlType);
109
110 bool setHeatingCoil(const HVACComponent& hvacComponent);
111
112 bool setMaximumHotWaterFlowRate(boost::optional<double> maximumHotWaterFlowRate);
113
114 void resetMaximumHotWaterFlowRate();
115
116 void autosizeMaximumHotWaterFlowRate();
117
118 bool setMinimumHotWaterFlowRate(double minimumHotWaterFlowRate);
119
120 void resetMinimumHotWaterFlowRate();
121
122 bool setHeatingConvergenceTolerance(double heatingConvergenceTolerance);
123
124 void resetHeatingConvergenceTolerance();
125
126 //@}
127 /** @name Other */
128 //@{
129
130 protected:
131 private:
132 − REGISTER_LOGGER("openstudio.model.ZoneHVACUnitHeater");
133
134 // Optional getters for use by methods like children() so can remove() if the constructor fails.
135 boost::optional<Schedule> optionalAvailabilitySchedule() const;
136 boost::optional<HVACComponent> optionalSupplyAirFan() const;
137 boost::optional<HVACComponent> optionalHeatingCoil() const;
138
139 std::vector<std::string> fanControlTypeValues() const;
140
141 boost::optional<ModelObject> availabilityScheduleAsModelObject() const;
142 boost::optional<ModelObject> supplyAirFanAsModelObject() const;
143 boost::optional<ModelObject> heatingCoilAsModelObject() const;
144
145 bool setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
146 bool setSupplyAirFanAsModelObject(const boost::optional<ModelObject>& modelObject);
147 bool setHeatingCoilAsModelObject(const boost::optional<ModelObject>& modelObject);
148 };
149
150 } // namespace detail
151
152 } // namespace model
153 } // namespace openstudio
154
155 #endif // MODEL_ZONEHVACUNITHEATER_IMPL_HPP
156