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/GeneratorFuelSupply_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_GENERATORFUELSUPPLY_IMPL_HPP
7 #define MODEL_GENERATORFUELSUPPLY_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Node;
16 class Schedule;
17 class CurveCubic;
18 class GeneratorFuelCell;
19 class FuelSupplyConstituent;
20
21 namespace detail {
22
23 /** GeneratorFuelSupply_Impl is a ModelObject_Impl that is the implementation class for GeneratorFuelSupply.*/
24 class MODEL_API GeneratorFuelSupply_Impl : public ModelObject_Impl
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 GeneratorFuelSupply_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
31
32 GeneratorFuelSupply_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
33
34 GeneratorFuelSupply_Impl(const GeneratorFuelSupply_Impl& other, Model_Impl* model, bool keepHandle);
35
36 14 virtual ~GeneratorFuelSupply_Impl() override = default;
37
38 //@}
39 /** @name Virtual Methods */
40 //@{
41
42 virtual const std::vector<std::string>& outputVariableNames() const override;
43
44 virtual IddObjectType iddObjectType() const override;
45
46 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
47
48 virtual std::vector<IddObjectType> allowableChildTypes() const;
49
50 virtual std::vector<ModelObject> children() const;
51
52 //extensible fields
53 bool addConstituent(const FuelSupplyConstituent& constituent);
54 bool addConstituent(const std::string& name, double molarFraction);
55
56 bool removeConstituent(unsigned groupIndex);
57 void removeAllConstituents();
58
59 std::vector<FuelSupplyConstituent> constituents() const;
60
61 //@}
62 /** @name Getters */
63 //@{
64
65 std::string fuelTemperatureModelingMode() const;
66
67 boost::optional<Node> fuelTemperatureReferenceNode() const;
68
69 boost::optional<Schedule> fuelTemperatureSchedule() const;
70
71 CurveCubic compressorPowerMultiplierFunctionofFuelRateCurve() const;
72
73 double compressorHeatLossFactor() const;
74
75 std::string fuelType() const;
76
77 boost::optional<double> liquidGenericFuelLowerHeatingValue() const;
78
79 boost::optional<double> liquidGenericFuelHigherHeatingValue() const;
80
81 boost::optional<double> liquidGenericFuelMolecularWeight() const;
82
83 boost::optional<double> liquidGenericFuelCO2EmissionFactor() const;
84
85 unsigned int numberofConstituentsinGaseousConstituentFuelSupply() const;
86
87 // Convenience function to check that it's equal to 1.0 (If no constituents, returns 0 and warns)
88 double sumofConstituentsMolarFractions() const;
89
90 // Return optional parent generator
91 boost::optional<GeneratorFuelCell> fuelCell() const;
92
93 //@}
94 /** @name Setters */
95 //@{
96
97 bool setFuelTemperatureModelingMode(const std::string& fuelTemperatureModelingMode);
98
99 void resetFuelTemperatureModelingMode();
100
101 bool setFuelTemperatureReferenceNode(const Node& connection);
102
103 void resetFuelTemperatureReferenceNode();
104
105 bool setFuelTemperatureSchedule(Schedule& schedule);
106
107 void resetFuelTemperatureSchedule();
108
109 bool setCompressorPowerMultiplierFunctionofFuelRateCurve(const CurveCubic& cubicCurves);
110
111 bool setCompressorHeatLossFactor(double compressorHeatLossFactor);
112
113 void resetCompressorHeatLossFactor();
114
115 bool setFuelType(const std::string& fuelType);
116
117 void resetFuelType();
118
119 bool setLiquidGenericFuelLowerHeatingValue(double liquidGenericFuelLowerHeatingValue);
120
121 void resetLiquidGenericFuelLowerHeatingValue();
122
123 bool setLiquidGenericFuelHigherHeatingValue(double liquidGenericFuelHigherHeatingValue);
124
125 void resetLiquidGenericFuelHigherHeatingValue();
126
127 bool setLiquidGenericFuelMolecularWeight(double liquidGenericFuelMolecularWeight);
128
129 void resetLiquidGenericFuelMolecularWeight();
130
131 bool setLiquidGenericFuelCO2EmissionFactor(double liquidGenericFuelCO2EmissionFactor);
132
133 void resetLiquidGenericFuelCO2EmissionFactor();
134
135 //@}
136 /** @name Other */
137 //@{
138
139 //@}
140 protected:
141 private:
142 − REGISTER_LOGGER("openstudio.model.GeneratorFuelSupply");
143 // Not to be exposed publicly, automatically handled by addConstituent, removeConstituent
144 bool setNumberofConstituentsinGaseousConstituentFuelSupply(unsigned int numberofConstituentsinGaseousConstituentFuelSupply);
145 void resetNumberofConstituentsinGaseousConstituentFuelSupply();
146 };
147
148 } // namespace detail
149
150 } // namespace model
151 } // namespace openstudio
152
153 #endif // MODEL_GENERATORFUELSUPPLY_IMPL_HPP
154