src/model/HVACComponent_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_HVACCOMPONENT_IMPL_HPP | ||
| 7 | #define MODEL_HVACCOMPONENT_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ParentObject_Impl.hpp" | ||
| 10 | #include "AirLoopHVAC.hpp" | ||
| 11 | #include "AirLoopHVACOutdoorAirSystem.hpp" | ||
| 12 | #include "PlantLoop.hpp" | ||
| 13 | |||
| 14 | namespace openstudio { | ||
| 15 | |||
| 16 | class AppGFuelType; | ||
| 17 | class ComponentType; | ||
| 18 | class FuelType; | ||
| 19 | |||
| 20 | namespace model { | ||
| 21 | |||
| 22 | class Node; | ||
| 23 | |||
| 24 | class Splitter; | ||
| 25 | |||
| 26 | class ZoneHVACComponent; | ||
| 27 | |||
| 28 | namespace detail { | ||
| 29 | |||
| 30 | class MODEL_API HVACComponent_Impl : public ParentObject_Impl | ||
| 31 | { | ||
| 32 | public: | ||
| 33 | HVACComponent_Impl(IddObjectType type, Model_Impl* model); | ||
| 34 | |||
| 35 | HVACComponent_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 36 | |||
| 37 | HVACComponent_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 38 | |||
| 39 | HVACComponent_Impl(const HVACComponent_Impl& other, Model_Impl* model, bool keepHandles); | ||
| 40 | |||
| 41 | 43060 | virtual ~HVACComponent_Impl() override = default; | |
| 42 | |||
| 43 | virtual boost::optional<AirLoopHVAC> airLoopHVAC() const; | ||
| 44 | |||
| 45 | virtual boost::optional<PlantLoop> plantLoop() const; | ||
| 46 | |||
| 47 | virtual boost::optional<Loop> loop() const; | ||
| 48 | |||
| 49 | virtual boost::optional<AirLoopHVACOutdoorAirSystem> airLoopHVACOutdoorAirSystem() const; | ||
| 50 | |||
| 51 | virtual bool addToNode(Node& node); | ||
| 52 | |||
| 53 | virtual bool addToSplitter(Splitter& splitter); | ||
| 54 | |||
| 55 | virtual boost::optional<ParentObject> parent() const override; | ||
| 56 | |||
| 57 | virtual std::vector<ModelObject> children() const override; | ||
| 58 | |||
| 59 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 60 | |||
| 61 | virtual void disconnect(); | ||
| 62 | |||
| 63 | virtual std::vector<IdfObject> remove() override; | ||
| 64 | |||
| 65 | virtual bool isRemovable() const; | ||
| 66 | |||
| 67 | // children controls what we see in the Inspector in OS App, and it's not necessarilly what we want to clone | ||
| 68 | // So the parent/children link is broken on purpose here as it will forward to ModelObject_Impl::clone and **not** ParentObject_Impl | ||
| 69 | virtual ModelObject clone(Model model) const override; | ||
| 70 | |||
| 71 | /** This function returns a vector of HVACComponent that are directly downstream | ||
| 72 | * from this object on an AirLoopHVAC or PlantLoop. | ||
| 73 | * @param[in] previous is used to indicate which path of edges to return | ||
| 74 | **/ | ||
| 75 | virtual std::vector<HVACComponent> edges(const boost::optional<HVACComponent>& previous); | ||
| 76 | |||
| 77 | virtual boost::optional<HVACComponent> containingHVACComponent() const; | ||
| 78 | |||
| 79 | virtual boost::optional<ZoneHVACComponent> containingZoneHVACComponent() const; | ||
| 80 | |||
| 81 | virtual boost::optional<StraightComponent> containingStraightComponent() const; | ||
| 82 | |||
| 83 | bool addToNode(Node& node, const HVACComponent& systemStartComponent, const HVACComponent& systemEndComponent, unsigned componentInletPort, | ||
| 84 | unsigned componentOutletPort); | ||
| 85 | |||
| 86 | bool removeFromLoop(const HVACComponent& systemStartComponent, const HVACComponent& systemEndComponent, unsigned componentInletPort, | ||
| 87 | unsigned componentOutletPort); | ||
| 88 | |||
| 89 | virtual void autosize(); | ||
| 90 | |||
| 91 | virtual void applySizingValues(); | ||
| 92 | |||
| 93 | virtual std::vector<EMSActuatorNames> emsActuatorNames() const override; | ||
| 94 | |||
| 95 | virtual std::vector<std::string> emsInternalVariableNames() const override; | ||
| 96 | |||
| 97 | virtual ComponentType componentType() const = 0; | ||
| 98 | virtual std::vector<FuelType> coolingFuelTypes() const = 0; | ||
| 99 | virtual std::vector<FuelType> heatingFuelTypes() const = 0; | ||
| 100 | virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const = 0; | ||
| 101 | |||
| 102 | protected: | ||
| 103 | friend class Model_Impl; | ||
| 104 | friend class AirLoopHVAC_Impl; | ||
| 105 | |||
| 106 | mutable boost::optional<AirLoopHVAC> m_airLoopHVAC; | ||
| 107 | mutable boost::optional<PlantLoop> m_plantLoop; | ||
| 108 | mutable boost::optional<AirLoopHVACOutdoorAirSystem> m_airLoopHVACOutdoorAirSystem; | ||
| 109 | |||
| 110 | private: | ||
| 111 | REGISTER_LOGGER("openstudio.model.HVACComponent"); | ||
| 112 | |||
| 113 | boost::optional<ModelObject> airLoopHVACAsModelObject() const; | ||
| 114 | boost::optional<ModelObject> plantLoopAsModelObject() const; | ||
| 115 | boost::optional<ModelObject> airLoopHVACOutdoorAirSystemAsModelObject() const; | ||
| 116 | }; | ||
| 117 | |||
| 118 | } // namespace detail | ||
| 119 | |||
| 120 | } // namespace model | ||
| 121 | } // namespace openstudio | ||
| 122 | |||
| 123 | #endif | ||
| 124 |