GCC Code Coverage Report


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

src/model/PlantComponentUserDefined.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_PLANTCOMPONENTUSERDEFINED_HPP
7 #define MODEL_PLANTCOMPONENTUSERDEFINED_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11 #include "EnergyManagementSystemProgramCallingManager.hpp"
12 #include "EnergyManagementSystemProgram.hpp"
13 #include "EnergyManagementSystemActuator.hpp"
14 #include "StraightComponent.hpp"
15 #include "ThermalZone.hpp"
16
17 namespace openstudio {
18 namespace model {
19
20 // TODO: Check the following class names against object getters and setters.
21 class EnergyManagementSystemProgramCallingManager;
22 class EnergyManagementSystemProgram;
23 class EnergyManagementSystemActuator;
24 class EnergyManagementSystemMeteredOutputVariable;
25 class Connection;
26 class Node;
27 class ThermalZone;
28
29 namespace detail {
30
31 class PlantComponentUserDefined_Impl;
32
33 } // namespace detail
34
35 /** PlantComponentUserDefined is a StraightComponent that wraps the OpenStudio IDD object 'OS:PlantComponent:UserDefined'. */
36 class MODEL_API PlantComponentUserDefined : public StraightComponent
37 {
38 public:
39 /** @name Constructors and Destructors */
40 //@{
41
42 explicit PlantComponentUserDefined(const Model& model);
43
44 13 virtual ~PlantComponentUserDefined() override = default;
45 // Default the copy and move operators because the virtual dtor is explicit
46 ✗ PlantComponentUserDefined(const PlantComponentUserDefined& other) = default;
47 ✗ PlantComponentUserDefined(PlantComponentUserDefined&& other) = default;
48 ✗ PlantComponentUserDefined& operator=(const PlantComponentUserDefined&) = default;
49 ✗ PlantComponentUserDefined& operator=(PlantComponentUserDefined&&) = default;
50
51 //@}
52
53 static IddObjectType iddObjectType();
54
55 static std::vector<std::string> plantLoadingModeValues();
56
57 static std::vector<std::string> plantLoopFlowRequestModeValues();
58
59 /** @name Getters */
60 //@{
61
62 std::string plantLoadingMode() const;
63
64 std::string plantLoopFlowRequestMode() const;
65
66 boost::optional<EnergyManagementSystemProgramCallingManager> mainModelProgramCallingManager() const;
67
68 boost::optional<EnergyManagementSystemProgramCallingManager> plantInitializationProgramCallingManager() const;
69
70 boost::optional<EnergyManagementSystemProgramCallingManager> plantSimulationProgramCallingManager() const;
71
72 boost::optional<EnergyManagementSystemProgram> mainModelProgram() const;
73
74 boost::optional<EnergyManagementSystemProgram> plantInitializationProgram() const;
75
76 boost::optional<EnergyManagementSystemProgram> plantSimulationProgram() const;
77
78 boost::optional<ThermalZone> ambientZone() const;
79
80 boost::optional<EnergyManagementSystemActuator> designVolumeFlowRateActuator() const;
81
82 boost::optional<EnergyManagementSystemActuator> minimumMassFlowRateActuator() const;
83
84 boost::optional<EnergyManagementSystemActuator> maximumMassFlowRateActuator() const;
85
86 boost::optional<EnergyManagementSystemActuator> minimumLoadingCapacityActuator() const;
87
88 boost::optional<EnergyManagementSystemActuator> maximumLoadingCapacityActuator() const;
89
90 boost::optional<EnergyManagementSystemActuator> optimalLoadingCapacityActuator() const;
91
92 boost::optional<EnergyManagementSystemActuator> outletTemperatureActuator() const;
93
94 boost::optional<EnergyManagementSystemActuator> massFlowRateActuator() const;
95
96 //@}
97 /** @name Setters */
98 //@{
99
100 bool setPlantLoadingMode(const std::string& plantLoadingMode);
101
102 bool setPlantLoopFlowRequestMode(const std::string& plantLoopFlowRequestMode);
103
104 bool setMainModelProgramCallingManager(const EnergyManagementSystemProgramCallingManager& energyManagementSystemProgramCallingManager);
105
106 void resetMainModelProgramCallingManager();
107
108 bool setPlantInitializationProgramCallingManager(const EnergyManagementSystemProgramCallingManager& energyManagementSystemProgramCallingManager);
109
110 void resetPlantInitializationProgramCallingManager();
111
112 bool setPlantSimulationProgramCallingManager(const EnergyManagementSystemProgramCallingManager& energyManagementSystemProgramCallingManager);
113
114 void resetPlantSimulationProgramCallingManager();
115
116 bool setMainModelProgram(const EnergyManagementSystemProgram& energyManagementSystemProgram);
117
118 void resetMainModelProgram();
119
120 bool setPlantInitializationProgram(const EnergyManagementSystemProgram& energyManagementSystemProgram);
121
122 void resetPlantInitializationProgram();
123
124 bool setPlantSimulationProgram(const EnergyManagementSystemProgram& energyManagementSystemProgram);
125
126 void resetPlantSimulationProgram();
127
128 bool setAmbientZone(const ThermalZone& thermalZone);
129
130 void resetAmbientZone();
131
132 bool setDesignVolumeFlowRateActuator(const EnergyManagementSystemActuator& energyManagementSystemActuator);
133
134 bool setMinimumMassFlowRateActuator(const EnergyManagementSystemActuator& energyManagementSystemActuator);
135
136 bool setMaximumMassFlowRateActuator(const EnergyManagementSystemActuator& energyManagementSystemActuator);
137
138 bool setMinimumLoadingCapacityActuator(const EnergyManagementSystemActuator& energyManagementSystemActuator);
139
140 bool setMaximumLoadingCapacityActuator(const EnergyManagementSystemActuator& energyManagementSystemActuator);
141
142 bool setOptimalLoadingCapacityActuator(const EnergyManagementSystemActuator& energyManagementSystemActuator);
143
144 bool setOutletTemperatureActuator(const EnergyManagementSystemActuator& energyManagementSystemActuator);
145
146 bool setMassFlowRateActuator(const EnergyManagementSystemActuator& energyManagementSystemActuator);
147
148 EnergyManagementSystemProgram
149 createInitProgram(const EnergyManagementSystemActuator& dvfrActuator, const EnergyManagementSystemActuator& mmfrActuator,
150 const EnergyManagementSystemActuator& mxfrActuator, const EnergyManagementSystemActuator& mlcActuator,
151 const EnergyManagementSystemActuator& mxlcActuator, const EnergyManagementSystemActuator& olcActuator, const Model& model);
152
153 EnergyManagementSystemProgram createSimProgram(const EnergyManagementSystemActuator& otActuator,
154 const EnergyManagementSystemActuator& mfrActuator, const Model& model);
155
156 //@}
157 /** @name Other */
158 //@{
159
160 // Will look into the MainModelProgram and the PlantSimulationProgram 's linked EMS Metered Output Variables
161 std::vector<EnergyManagementSystemMeteredOutputVariable> energyManagementSystemMeteredOutputVariables() const;
162
163 //@}
164 protected:
165 /// @cond
166 using ImplType = detail::PlantComponentUserDefined_Impl;
167
168 explicit PlantComponentUserDefined(std::shared_ptr<detail::PlantComponentUserDefined_Impl> impl);
169
170 friend class detail::PlantComponentUserDefined_Impl;
171 friend class Model;
172 friend class IdfObject;
173 friend class openstudio::detail::IdfObject_Impl;
174 /// @endcond
175 private:
176 REGISTER_LOGGER("openstudio.model.PlantComponentUserDefined");
177 };
178
179 /** \relates PlantComponentUserDefined*/
180 using OptionalPlantComponentUserDefined = boost::optional<PlantComponentUserDefined>;
181
182 /** \relates PlantComponentUserDefined*/
183 using PlantComponentUserDefinedVector = std::vector<PlantComponentUserDefined>;
184
185 } // namespace model
186 } // namespace openstudio
187
188 #endif // MODEL_PLANTCOMPONENTUSERDEFINED_HPP
189