src/model/TableLookup_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_TABLELOOKUP_IMPL_HPP | ||
| 7 | #define MODEL_TABLELOOKUP_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "Curve_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class ModelObjectList; | ||
| 16 | class TableIndependentVariable; | ||
| 17 | |||
| 18 | namespace detail { | ||
| 19 | |||
| 20 | /** TableLookup_Impl is a Curve_Impl that is the implementation class for TableLookup.*/ | ||
| 21 | class MODEL_API TableLookup_Impl : public Curve_Impl | ||
| 22 | { | ||
| 23 | public: | ||
| 24 | /** @name Constructors and Destructors */ | ||
| 25 | //@{ | ||
| 26 | |||
| 27 | TableLookup_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 28 | |||
| 29 | TableLookup_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | TableLookup_Impl(const TableLookup_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | 136 | virtual ~TableLookup_Impl() override = default; | |
| 34 | |||
| 35 | //@} | ||
| 36 | /** @name Virtual Methods */ | ||
| 37 | //@{ | ||
| 38 | |||
| 39 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 40 | |||
| 41 | virtual IddObjectType iddObjectType() const override; | ||
| 42 | |||
| 43 | virtual int numVariables() const override; | ||
| 44 | |||
| 45 | virtual double evaluate(const std::vector<double>& independentVariables) const override; | ||
| 46 | |||
| 47 | virtual ModelObject clone(Model model) const override; | ||
| 48 | |||
| 49 | virtual std::vector<ModelObject> children() const override; | ||
| 50 | |||
| 51 | virtual std::vector<openstudio::IdfObject> remove() override; | ||
| 52 | |||
| 53 | //@} | ||
| 54 | /** @name Getters */ | ||
| 55 | //@{ | ||
| 56 | |||
| 57 | boost::optional<ModelObjectList> independentVariableList() const; | ||
| 58 | |||
| 59 | std::string normalizationMethod() const; | ||
| 60 | |||
| 61 | double normalizationDivisor() const; | ||
| 62 | |||
| 63 | boost::optional<double> minimumOutput() const; | ||
| 64 | |||
| 65 | boost::optional<double> maximumOutput() const; | ||
| 66 | |||
| 67 | std::string outputUnitType() const; | ||
| 68 | |||
| 69 | //@} | ||
| 70 | /** @name Setters */ | ||
| 71 | //@{ | ||
| 72 | |||
| 73 | bool setNormalizationMethod(const std::string& normalizationMethod); | ||
| 74 | |||
| 75 | bool setNormalizationDivisor(double normalizationDivisor); | ||
| 76 | |||
| 77 | bool setMinimumOutput(double minimumOutput); | ||
| 78 | void resetMinimumOutput(); | ||
| 79 | |||
| 80 | bool setMaximumOutput(double maximumOutput); | ||
| 81 | void resetMaximumOutput(); | ||
| 82 | |||
| 83 | bool setOutputUnitType(const std::string& outputUnitType); | ||
| 84 | |||
| 85 | //@} | ||
| 86 | /** @name Other */ | ||
| 87 | //@{ | ||
| 88 | |||
| 89 | bool addOutputValue(double outputValue); | ||
| 90 | bool removeOutputValue(unsigned groupIndex); | ||
| 91 | void removeAllOutputValues(); | ||
| 92 | std::vector<double> outputValues() const; | ||
| 93 | bool setOutputValues(const std::vector<double>& outputValues); | ||
| 94 | unsigned numberofOutputValues() const; | ||
| 95 | |||
| 96 | bool addIndependentVariable(const TableIndependentVariable& tableIndependentVariable); | ||
| 97 | bool removeIndependentVariable(const TableIndependentVariable& tableIndependentVariable); | ||
| 98 | void removeAllIndependentVariables(); | ||
| 99 | std::vector<TableIndependentVariable> independentVariables() const; | ||
| 100 | |||
| 101 | bool setIndependentVariableList(const boost::optional<ModelObjectList>& modelObjectList); | ||
| 102 | void resetIndependentVariableList(); | ||
| 103 | |||
| 104 | //@} | ||
| 105 | protected: | ||
| 106 | private: | ||
| 107 | − | REGISTER_LOGGER("openstudio.model.TableLookup"); | |
| 108 | }; | ||
| 109 | |||
| 110 | } // namespace detail | ||
| 111 | |||
| 112 | } // namespace model | ||
| 113 | } // namespace openstudio | ||
| 114 | |||
| 115 | #endif // MODEL_TABLELOOKUP_IMPL_HPP | ||
| 116 |