src/utilities/data/CalibrationResult.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 UTILITIES_DATA_CALIBRATIONRESULT_HPP | ||
| 7 | #define UTILITIES_DATA_CALIBRATIONRESULT_HPP | ||
| 8 | |||
| 9 | #include "../UtilitiesAPI.hpp" | ||
| 10 | #include "Attribute.hpp" | ||
| 11 | #include "DataEnums.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | |||
| 15 | class Date; | ||
| 16 | |||
| 17 | /** CalibrationBillingPeriod is wrapper around Attribute for storing information about model calibration. | ||
| 18 | */ | ||
| 19 | class UTILITIES_API CalibrationBillingPeriod | ||
| 20 | { | ||
| 21 | public: | ||
| 22 | /// Returns the expected name for attributes of this type, 'CalibrationBillingPeriod'. | ||
| 23 | static std::string attributeName(); | ||
| 24 | |||
| 25 | /// Creates a CalibrationBillingPeriod wrapper around attribute if it is correctly formatted. | ||
| 26 | static boost::optional<CalibrationBillingPeriod> fromAttribute(const Attribute& attribute); | ||
| 27 | |||
| 28 | /// Create attribute wrapper with all required information. | ||
| 29 | CalibrationBillingPeriod(const Date& startDate, unsigned numberOfDays, const std::string& consumptionUnit, | ||
| 30 | boost::optional<std::string> peakDemandUnit, boost::optional<double> consumption, boost::optional<double> peakDemand, | ||
| 31 | boost::optional<double> totalCost, boost::optional<double> modelConsumption, boost::optional<double> modelPeakDemand, | ||
| 32 | boost::optional<double> modelTotalCost); | ||
| 33 | |||
| 34 | /// Returns the attribute | ||
| 35 | Attribute attribute() const; | ||
| 36 | |||
| 37 | /** The date that the billing period starts. */ | ||
| 38 | Date startDate() const; | ||
| 39 | |||
| 40 | /** The date that the billing period ends. */ | ||
| 41 | Date endDate() const; | ||
| 42 | |||
| 43 | /** The duration of the billing period in days. */ | ||
| 44 | unsigned numberOfDays() const; | ||
| 45 | |||
| 46 | std::string consumptionUnit() const; | ||
| 47 | |||
| 48 | boost::optional<std::string> peakDemandUnit() const; | ||
| 49 | |||
| 50 | /** Returns the consumption in billing units. */ | ||
| 51 | boost::optional<double> consumption() const; | ||
| 52 | |||
| 53 | /** Returns the peak demand in billing units. */ | ||
| 54 | boost::optional<double> peakDemand() const; | ||
| 55 | |||
| 56 | /** Returns the total cost of the bill in dollars. */ | ||
| 57 | boost::optional<double> totalCost() const; | ||
| 58 | |||
| 59 | /** Returns the sum of modelConsumptionValues if it is not empty. */ | ||
| 60 | boost::optional<double> modelConsumption() const; | ||
| 61 | |||
| 62 | /** Returns the maximum peak over the billing period if available. */ | ||
| 63 | boost::optional<double> modelPeakDemand() const; | ||
| 64 | |||
| 65 | /** Returns total energy cost over the billing period if available. */ | ||
| 66 | boost::optional<double> modelTotalCost() const; | ||
| 67 | |||
| 68 | private: | ||
| 69 | CalibrationBillingPeriod(const Attribute& attribute); | ||
| 70 | |||
| 71 | Attribute m_attribute; | ||
| 72 | |||
| 73 | − | REGISTER_LOGGER("openstudio.CalibrationBillingPeriod"); | |
| 74 | }; | ||
| 75 | |||
| 76 | /** CalibrationUtilityBill is wrapper around Attribute for storing information about model calibration. | ||
| 77 | */ | ||
| 78 | class UTILITIES_API CalibrationUtilityBill | ||
| 79 | { | ||
| 80 | public: | ||
| 81 | /// Returns the expected name for attributes of this type, 'CalibrationUtilityBill'. | ||
| 82 | static std::string attributeName(); | ||
| 83 | |||
| 84 | /// Creates a CalibrationUtilityBill wrapper around attribute if it is correctly formatted. | ||
| 85 | static boost::optional<CalibrationUtilityBill> fromAttribute(const Attribute& attribute); | ||
| 86 | |||
| 87 | /// Create attribute wrapper with all required information. | ||
| 88 | CalibrationUtilityBill(const std::string& name, const FuelType& fuelType, const InstallLocationType& meterInstallLocation, | ||
| 89 | boost::optional<std::string> meterSpecificInstallLocation, boost::optional<EndUseCategoryType> meterEndUseCategory, | ||
| 90 | boost::optional<std::string> meterSpecificEndUse, const std::string& consumptionUnit, double consumptionUnitConversionFactor, | ||
| 91 | boost::optional<std::string> peakDemandUnit, boost::optional<double> peakDemandUnitConversionFactor, | ||
| 92 | boost::optional<unsigned> timestepsInPeakDemandWindow, boost::optional<double> minutesInPeakDemandWindow, | ||
| 93 | boost::optional<unsigned> numberBillingPeriodsInCalculations, boost::optional<double> CVRMSE, boost::optional<double> NMBE); | ||
| 94 | |||
| 95 | /// Returns the attribute | ||
| 96 | Attribute attribute() const; | ||
| 97 | |||
| 98 | std::string name() const; | ||
| 99 | |||
| 100 | FuelType fuelType() const; | ||
| 101 | |||
| 102 | InstallLocationType meterInstallLocation() const; | ||
| 103 | |||
| 104 | boost::optional<std::string> meterSpecificInstallLocation() const; | ||
| 105 | |||
| 106 | boost::optional<EndUseCategoryType> meterEndUseCategory() const; | ||
| 107 | |||
| 108 | boost::optional<std::string> meterSpecificEndUse() const; | ||
| 109 | |||
| 110 | std::string consumptionUnit() const; | ||
| 111 | |||
| 112 | double consumptionUnitConversionFactor() const; | ||
| 113 | |||
| 114 | boost::optional<std::string> peakDemandUnit() const; | ||
| 115 | |||
| 116 | boost::optional<double> peakDemandUnitConversionFactor() const; | ||
| 117 | |||
| 118 | boost::optional<unsigned> timestepsInPeakDemandWindow() const; | ||
| 119 | |||
| 120 | boost::optional<double> minutesInPeakDemandWindow() const; | ||
| 121 | |||
| 122 | boost::optional<unsigned> numberBillingPeriodsInCalculations() const; | ||
| 123 | |||
| 124 | boost::optional<double> CVRMSE() const; | ||
| 125 | |||
| 126 | boost::optional<double> NMBE() const; | ||
| 127 | |||
| 128 | /// Returns all CalibrationBillingPeriod associated with this CalibrationUtilityBill. | ||
| 129 | std::vector<CalibrationBillingPeriod> billingPeriods() const; | ||
| 130 | |||
| 131 | /// Add a CalibrationBillingPeriod to this CalibrationUtilityBill. | ||
| 132 | // cppcheck-suppress functionConst | ||
| 133 | bool addBillingPeriod(const CalibrationBillingPeriod& billingPeriod); | ||
| 134 | |||
| 135 | private: | ||
| 136 | CalibrationUtilityBill(const Attribute& attribute); | ||
| 137 | |||
| 138 | Attribute m_attribute; | ||
| 139 | |||
| 140 | − | REGISTER_LOGGER("openstudio.CalibrationUtilityBill"); | |
| 141 | }; | ||
| 142 | |||
| 143 | /** CalibrationResult is wrapper around Attribute for storing information about model calibration. | ||
| 144 | */ | ||
| 145 | class UTILITIES_API CalibrationResult | ||
| 146 | { | ||
| 147 | public: | ||
| 148 | /// Returns the expected name for attributes of this type, 'CalibrationResult'. | ||
| 149 | static std::string attributeName(); | ||
| 150 | |||
| 151 | /// Creates a CalibrationResult wrapper around attribute if it is correctly formatted. | ||
| 152 | static boost::optional<CalibrationResult> fromAttribute(const Attribute& attribute); | ||
| 153 | |||
| 154 | /// Constructs a new calibration result attribute | ||
| 155 | CalibrationResult(); | ||
| 156 | |||
| 157 | /// Returns the attribute | ||
| 158 | Attribute attribute() const; | ||
| 159 | |||
| 160 | /// get all utility bills | ||
| 161 | std::vector<CalibrationUtilityBill> utilityBills() const; | ||
| 162 | |||
| 163 | /// add a utility bill | ||
| 164 | // cppcheck-suppress functionConst | ||
| 165 | bool addUtilityBill(const CalibrationUtilityBill& utilityBill); | ||
| 166 | |||
| 167 | private: | ||
| 168 | CalibrationResult(const Attribute& attribute); | ||
| 169 | |||
| 170 | Attribute m_attribute; | ||
| 171 | |||
| 172 | − | REGISTER_LOGGER("openstudio.CalibrationResult"); | |
| 173 | }; | ||
| 174 | |||
| 175 | } // namespace openstudio | ||
| 176 | |||
| 177 | #endif // UTILITIES_DATA_CALIBRATIONRESULT_HPP | ||
| 178 |