GCC Code Coverage Report


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

src/model/AirflowNetworkOccupantVentilationControl.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_AIRFLOWNETWORKOCCUPANTVENTILATIONCONTROL_HPP
7 #define MODEL_AIRFLOWNETWORKOCCUPANTVENTILATIONCONTROL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 // TODO: Check the following class names against object getters and setters.
17 class Curve;
18 class Schedule;
19
20 namespace detail {
21
22 class AirflowNetworkOccupantVentilationControl_Impl;
23
24 } // namespace detail
25
26 /** AirflowNetworkOccupantVentilationControl is a ModelObject that wraps the OpenStudio IDD object 'OS:AirflowNetworkOccupantVentilationControl'. */
27 class MODEL_API AirflowNetworkOccupantVentilationControl : public ModelObject
28 {
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32 // Remove this ctor unless a suitable default curve can be found
33 // explicit AirflowNetworkOccupantVentilationControl(const Model& model);
34 /** Construct an occupant ventilation control object with a low temperature curve. */
35 AirflowNetworkOccupantVentilationControl(const Model& model, const Curve& curve);
36
37 14 virtual ~AirflowNetworkOccupantVentilationControl() override = default;
38 // Default the copy and move operators because the virtual dtor is explicit
39 ✗ AirflowNetworkOccupantVentilationControl(const AirflowNetworkOccupantVentilationControl& other) = default;
40 8 AirflowNetworkOccupantVentilationControl(AirflowNetworkOccupantVentilationControl&& other) = default;
41 ✗ AirflowNetworkOccupantVentilationControl& operator=(const AirflowNetworkOccupantVentilationControl&) = default;
42 ✗ AirflowNetworkOccupantVentilationControl& operator=(AirflowNetworkOccupantVentilationControl&&) = default;
43
44 //@}
45
46 static IddObjectType iddObjectType();
47
48 /** @name Getters */
49 //@{
50 /** Returns the minimum opening time. */
51 double minimumOpeningTime() const;
52 /** Returns true if the minimum opening time is defaulted. */
53 bool isMinimumOpeningTimeDefaulted() const;
54 /** Returns the minimum closing time. */
55 double minimumClosingTime() const;
56 /** Returns true if the minimum closing time is defaulted. */
57 bool isMinimumClosingTimeDefaulted() const;
58
59 /** Returns the low temperature thermal comfort curve. */
60 Curve thermalComfortLowTemperatureCurve() const;
61 /** Returns the boundary temperature between the low and high temperature thermal comfort curves. */
62 double thermalComfortTemperatureBoundaryPoint() const;
63 /** Returns true if the boundary temperature is defaulted. */
64 bool isThermalComfortTemperatureBoundaryPointDefaulted() const;
65
66 /** Returns the high temperature thermal comfort curve. */
67 boost::optional<Curve> thermalComfortHighTemperatureCurve() const;
68 /** Returns the maximum PPD threshold. */
69 double maximumPredictedPercentageofDissatisfiedThreshold() const;
70 /** Returns true if the maximum PPD threshold is defaulted. */
71 bool isMaximumPredictedPercentageofDissatisfiedThresholdDefaulted() const;
72 /** Returns true if an occupancy check is to be performed as part of the opening probability check. */
73 bool occupancyCheck() const;
74 /** Returns true if the occupancy check is defaulted. */
75 bool isOccupancyCheckDefaulted() const;
76
77 /** Returns the opening probability schedule, if any. */
78 boost::optional<Schedule> openingProbabilitySchedule() const;
79
80 /** Returns the closing probability schedule, if any. */
81 boost::optional<Schedule> closingProbabilitySchedule() const;
82
83 //@}
84 /** @name Setters */
85 //@{
86 /** Sets the minimum opening time. */
87 bool setMinimumOpeningTime(double minimumOpeningTime);
88 /** Resets the minimum opening time. */
89 void resetMinimumOpeningTime();
90 /** Sets the minimum closing time. */
91 bool setMinimumClosingTime(double minimumClosingTime);
92 /** Resets the minimum closing time. */
93 void resetMinimumClosingTime();
94
95 /** Sets the low temperature thermal comfort curve. */
96 bool setThermalComfortLowTemperatureCurve(const Curve& curve);
97
98 //void resetThermalComfortLowTemperatureCurve();
99 /** Sets the temperature boundary point. */
100 bool setThermalComfortTemperatureBoundaryPoint(double thermalComfortTemperatureBoundaryPoint);
101 /** Resets the temperature boundary point. */
102 void resetThermalComfortTemperatureBoundaryPoint();
103
104 /** Sets the high temperature thermal comfort curve. */
105 bool setThermalComfortHighTemperatureCurve(const Curve& curve);
106 /** Resets the high temperature thermal comfort curve. */
107 void resetThermalComfortHighTemperatureCurve();
108 /** Sets the maximum PPD threshold. */
109 bool setMaximumPredictedPercentageofDissatisfiedThreshold(double maximumPredictedPercentageofDissatisfiedThreshold);
110 /** Resets the maximum PPD threshold. */
111 void resetMaximumPredictedPercentageofDissatisfiedThreshold();
112 /** Sets the occupancy check. */
113 void setOccupancyCheck(bool occupancyCheck);
114 /** Resets the occupancy check. */
115 void resetOccupancyCheck();
116
117 /** Sets the opening probability schedule. */
118 bool setOpeningProbabilitySchedule(Schedule& schedule);
119 /** Resets the opening probability schedule. */
120 void resetOpeningProbabilitySchedule();
121
122 /** Sets the closing probability schedule. */
123 bool setClosingProbabilitySchedule(Schedule& schedule);
124 /** Resets the closing probability schedule. */
125 void resetClosingProbabilitySchedule();
126
127 //@}
128 /** @name Other */
129 //@{
130
131 //@}
132 protected:
133 /// @cond
134 using ImplType = detail::AirflowNetworkOccupantVentilationControl_Impl;
135
136 explicit AirflowNetworkOccupantVentilationControl(std::shared_ptr<detail::AirflowNetworkOccupantVentilationControl_Impl> impl);
137
138 friend class detail::AirflowNetworkOccupantVentilationControl_Impl;
139 friend class Model;
140 friend class IdfObject;
141 friend class openstudio::detail::IdfObject_Impl;
142 /// @endcond
143 private:
144 REGISTER_LOGGER("openstudio.model.AirflowNetworkOccupantVentilationControl");
145 };
146
147 /** \relates AirflowNetworkOccupantVentilationControl*/
148 using OptionalAirflowNetworkOccupantVentilationControl = boost::optional<AirflowNetworkOccupantVentilationControl>;
149
150 /** \relates AirflowNetworkOccupantVentilationControl*/
151 using AirflowNetworkOccupantVentilationControlVector = std::vector<AirflowNetworkOccupantVentilationControl>;
152
153 } // namespace model
154 } // namespace openstudio
155
156 #endif // MODEL_AIRFLOWNETWORKOCCUPANTVENTILATIONCONTROL_HPP
157