src/model/Loop_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_LOOP_IMPL_HPP | ||
| 7 | #define MODEL_LOOP_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ParentObject_Impl.hpp" | ||
| 10 | |||
| 11 | namespace openstudio { | ||
| 12 | |||
| 13 | class AppGFuelType; | ||
| 14 | class ComponentType; | ||
| 15 | class FuelType; | ||
| 16 | |||
| 17 | namespace model { | ||
| 18 | |||
| 19 | class Node; | ||
| 20 | class HVACComponent; | ||
| 21 | class Splitter; | ||
| 22 | class Mixer; | ||
| 23 | class AvailabilityManagerAssignmentList; | ||
| 24 | |||
| 25 | namespace detail { | ||
| 26 | |||
| 27 | class Model_Impl; | ||
| 28 | |||
| 29 | class MODEL_API Loop_Impl : public ParentObject_Impl | ||
| 30 | { | ||
| 31 | |||
| 32 | public: | ||
| 33 | Loop_Impl(IddObjectType type, Model_Impl* model); | ||
| 34 | |||
| 35 | Loop_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 36 | |||
| 37 | Loop_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 38 | |||
| 39 | Loop_Impl(const Loop_Impl& other, Model_Impl* model, bool keepHandles); | ||
| 40 | |||
| 41 | 1884 | virtual ~Loop_Impl() override = default; | |
| 42 | |||
| 43 | /** This pure virtual method is intended to be overriden by child classes (namely PlantLoop and AirLoopHVAC) to create the basic topology of the | ||
| 44 | * loop, that is to create the supply/demand inlet/outlet nodes, splitters and mixers as appropriate */ | ||
| 45 | virtual void createTopology() = 0; | ||
| 46 | |||
| 47 | virtual Node supplyInletNode() const = 0; | ||
| 48 | |||
| 49 | virtual Node supplyOutletNode() const = 0; | ||
| 50 | |||
| 51 | virtual std::vector<Node> supplyOutletNodes() const = 0; | ||
| 52 | |||
| 53 | virtual Node demandInletNode() const = 0; | ||
| 54 | |||
| 55 | virtual std::vector<Node> demandInletNodes() const = 0; | ||
| 56 | |||
| 57 | virtual Node demandOutletNode() const = 0; | ||
| 58 | |||
| 59 | virtual std::vector<ModelObject> children() const override; | ||
| 60 | |||
| 61 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 62 | |||
| 63 | virtual std::vector<ModelObject> supplyComponents(const HVACComponent& inletComp, const HVACComponent& outletComp, | ||
| 64 | openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 65 | |||
| 66 | virtual std::vector<ModelObject> demandComponents(const HVACComponent& inletComp, const HVACComponent& outletComp, | ||
| 67 | openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 68 | |||
| 69 | virtual std::vector<ModelObject> supplyComponents(openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 70 | |||
| 71 | virtual std::vector<ModelObject> demandComponents(openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 72 | |||
| 73 | virtual std::vector<ModelObject> components(openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 74 | |||
| 75 | std::vector<ModelObject> components(const HVACComponent& inletComp, const HVACComponent& outletComp, | ||
| 76 | openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 77 | |||
| 78 | virtual boost::optional<ModelObject> component(openstudio::Handle handle) const; | ||
| 79 | |||
| 80 | virtual boost::optional<ModelObject> demandComponent(openstudio::Handle handle) const; | ||
| 81 | |||
| 82 | virtual boost::optional<ModelObject> supplyComponent(openstudio::Handle handle) const; | ||
| 83 | |||
| 84 | // virtual std::vector<ModelObject> supplyComponents(std::vector<HVACComponent> inletComps, std::vector<HVACComponent> outletComps, | ||
| 85 | // openstudio::IddObjectType type) const; | ||
| 86 | |||
| 87 | // virtual std::vector<ModelObject> demandComponents(std::vector<HVACComponent> inletComps, std::vector<HVACComponent> outletComps, | ||
| 88 | // openstudio::IddObjectType type) const; | ||
| 89 | |||
| 90 | virtual std::vector<openstudio::IdfObject> remove() override; | ||
| 91 | |||
| 92 | virtual ModelObject clone(Model model) const override; | ||
| 93 | |||
| 94 | virtual Splitter demandSplitter() const = 0; | ||
| 95 | |||
| 96 | virtual Mixer demandMixer() const = 0; | ||
| 97 | |||
| 98 | virtual void autosize(); | ||
| 99 | |||
| 100 | virtual void applySizingValues(); | ||
| 101 | |||
| 102 | virtual AvailabilityManagerAssignmentList availabilityManagerAssignmentList() const = 0; | ||
| 103 | |||
| 104 | virtual ComponentType componentType() const; | ||
| 105 | virtual std::vector<FuelType> coolingFuelTypes() const; | ||
| 106 | virtual std::vector<FuelType> heatingFuelTypes() const; | ||
| 107 | virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const; | ||
| 108 | |||
| 109 | private: | ||
| 110 | REGISTER_LOGGER("openstudio.model.Loop"); | ||
| 111 | |||
| 112 | boost::optional<ModelObject> supplyInletNodeAsModelObject() const; | ||
| 113 | boost::optional<ModelObject> supplyOutletNodeAsModelObject() const; | ||
| 114 | boost::optional<ModelObject> demandInletNodeAsModelObject() const; | ||
| 115 | boost::optional<ModelObject> demandOutletNodeAsModelObject() const; | ||
| 116 | }; | ||
| 117 | |||
| 118 | } // namespace detail | ||
| 119 | |||
| 120 | } // namespace model | ||
| 121 | |||
| 122 | } // namespace openstudio | ||
| 123 | |||
| 124 | #endif | ||
| 125 |