src/model/ElectricEquipmentDefinition.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_ELECTRICEQUIPMENTDEFINITION_HPP | ||
| 7 | #define MODEL_ELECTRICEQUIPMENTDEFINITION_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "SpaceLoadDefinition.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | namespace detail { | ||
| 16 | |||
| 17 | class ElectricEquipmentDefinition_Impl; | ||
| 18 | |||
| 19 | } // namespace detail | ||
| 20 | |||
| 21 | /** ElectricEquipmentDefinition is a SpaceLoadDefinition that wraps the OpenStudio IDD object | ||
| 22 | * 'OS_ElectricEquipment_Definition'. Its fields are derived from the EnergyPlus IDD object | ||
| 23 | * 'ElectricEquipment'. \sa ElectricEquipment | ||
| 24 | */ | ||
| 25 | class MODEL_API ElectricEquipmentDefinition : public SpaceLoadDefinition | ||
| 26 | { | ||
| 27 | public: | ||
| 28 | /** @name Constructors and Destructors */ | ||
| 29 | //@{ | ||
| 30 | |||
| 31 | explicit ElectricEquipmentDefinition(const Model& model); | ||
| 32 | |||
| 33 | 1034 | virtual ~ElectricEquipmentDefinition() override = default; | |
| 34 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 35 | ✗ | ElectricEquipmentDefinition(const ElectricEquipmentDefinition& other) = default; | |
| 36 | 3 | ElectricEquipmentDefinition(ElectricEquipmentDefinition&& other) = default; | |
| 37 | ✗ | ElectricEquipmentDefinition& operator=(const ElectricEquipmentDefinition&) = default; | |
| 38 | ✗ | ElectricEquipmentDefinition& operator=(ElectricEquipmentDefinition&&) = default; | |
| 39 | |||
| 40 | //@} | ||
| 41 | /** @name Static Methods */ | ||
| 42 | //@{ | ||
| 43 | |||
| 44 | static IddObjectType iddObjectType(); | ||
| 45 | |||
| 46 | static std::vector<std::string> validDesignLevelCalculationMethodValues(); | ||
| 47 | |||
| 48 | //@} | ||
| 49 | /** @name Getters */ | ||
| 50 | //@{ | ||
| 51 | |||
| 52 | std::string designLevelCalculationMethod() const; | ||
| 53 | boost::optional<double> designLevel() const; | ||
| 54 | boost::optional<double> wattsperSpaceFloorArea() const; | ||
| 55 | boost::optional<double> wattsperPerson() const; | ||
| 56 | |||
| 57 | double fractionLatent() const; | ||
| 58 | bool isFractionLatentDefaulted() const; | ||
| 59 | |||
| 60 | double fractionRadiant() const; | ||
| 61 | bool isFractionRadiantDefaulted() const; | ||
| 62 | |||
| 63 | double fractionLost() const; | ||
| 64 | bool isFractionLostDefaulted() const; | ||
| 65 | |||
| 66 | //@} | ||
| 67 | /** @name Setters */ | ||
| 68 | //@{ | ||
| 69 | |||
| 70 | /** Also sets designLevelCalculationMethod accordingly. */ | ||
| 71 | bool setDesignLevel(double designLevel); | ||
| 72 | |||
| 73 | /** Also sets designLevelCalculationMethod accordingly. */ | ||
| 74 | bool setWattsperSpaceFloorArea(double wattsperSpaceFloorArea); | ||
| 75 | |||
| 76 | /** Also sets designLevelCalculationMethod accordingly. */ | ||
| 77 | bool setWattsperPerson(double wattsperPerson); | ||
| 78 | |||
| 79 | bool setFractionLatent(double fractionLatent); | ||
| 80 | void resetFractionLatent(); | ||
| 81 | |||
| 82 | bool setFractionRadiant(double fractionRadiant); | ||
| 83 | void resetFractionRadiant(); | ||
| 84 | |||
| 85 | bool setFractionLost(double fractionLost); | ||
| 86 | void resetFractionLost(); | ||
| 87 | |||
| 88 | //@} | ||
| 89 | /** @name Other */ | ||
| 90 | //@{ | ||
| 91 | |||
| 92 | /** Returns the design level represented by this definition, assuming floorArea (m^2) and | ||
| 93 | * numPeople. */ | ||
| 94 | double getDesignLevel(double floorArea, double numPeople) const; | ||
| 95 | |||
| 96 | /** Returns the watts/m^2 represented by this definition, assuming floorArea (m^2) and | ||
| 97 | * numPeople. */ | ||
| 98 | double getPowerPerFloorArea(double floorArea, double numPeople) const; | ||
| 99 | |||
| 100 | /** Returns the watts/person represented by this definition, assuming floorArea (m^2) and | ||
| 101 | * numPeople. */ | ||
| 102 | double getPowerPerPerson(double floorArea, double numPeople) const; | ||
| 103 | |||
| 104 | /** If method is a \link validDesignLevelCalculationMethodValues valid design level | ||
| 105 | * calculation method \endlink, changes this definition to an equivalent power level, under | ||
| 106 | * the assumptions of floorArea (m^2) and numPeople. */ | ||
| 107 | bool setDesignLevelCalculationMethod(const std::string& method, double floorArea, double numPeople); | ||
| 108 | |||
| 109 | //@} | ||
| 110 | protected: | ||
| 111 | /// @cond | ||
| 112 | using ImplType = detail::ElectricEquipmentDefinition_Impl; | ||
| 113 | |||
| 114 | friend class Model; | ||
| 115 | friend class openstudio::IdfObject; | ||
| 116 | |||
| 117 | explicit ElectricEquipmentDefinition(std::shared_ptr<detail::ElectricEquipmentDefinition_Impl> impl); | ||
| 118 | |||
| 119 | /// @endcond | ||
| 120 | private: | ||
| 121 | REGISTER_LOGGER("openstudio.model.ElectricEquipmentDefinition"); | ||
| 122 | }; | ||
| 123 | |||
| 124 | /** \relates ElectricEquipmentDefinition*/ | ||
| 125 | using OptionalElectricEquipmentDefinition = boost::optional<ElectricEquipmentDefinition>; | ||
| 126 | |||
| 127 | /** \relates ElectricEquipmentDefinition*/ | ||
| 128 | using ElectricEquipmentDefinitionVector = std::vector<ElectricEquipmentDefinition>; | ||
| 129 | |||
| 130 | } // namespace model | ||
| 131 | } // namespace openstudio | ||
| 132 | |||
| 133 | #endif // MODEL_ELECTRICEQUIPMENTDEFINITION_HPP | ||
| 134 |