src/model/ElectricLoadCenterDistribution_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_ELECTRICLOADCENTERDISTRIBUTION_IMPL_HPP | ||
| 7 | #define MODEL_ELECTRICLOADCENTERDISTRIBUTION_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ParentObject_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class Schedule; | ||
| 16 | class Generator; | ||
| 17 | class Inverter; | ||
| 18 | class ElectricalStorage; | ||
| 19 | class ElectricLoadCenterTransformer; | ||
| 20 | class ElectricLoadCenterStorageConverter; | ||
| 21 | class ModelObjectList; | ||
| 22 | |||
| 23 | namespace detail { | ||
| 24 | |||
| 25 | /** ElectricLoadCenterDistribution_Impl is a ParentObject_Impl that is the implementation class for ElectricLoadCenterDistribution.*/ | ||
| 26 | class MODEL_API ElectricLoadCenterDistribution_Impl : public ParentObject_Impl | ||
| 27 | { | ||
| 28 | |||
| 29 | public: | ||
| 30 | /** @name Constructors and Destructors */ | ||
| 31 | //@{ | ||
| 32 | |||
| 33 | ElectricLoadCenterDistribution_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 34 | |||
| 35 | ElectricLoadCenterDistribution_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 36 | |||
| 37 | ElectricLoadCenterDistribution_Impl(const ElectricLoadCenterDistribution_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 38 | |||
| 39 | 52 | virtual ~ElectricLoadCenterDistribution_Impl() override = default; | |
| 40 | |||
| 41 | //@} | ||
| 42 | /** @name Virtual Methods */ | ||
| 43 | //@{ | ||
| 44 | |||
| 45 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 46 | |||
| 47 | virtual IddObjectType iddObjectType() const override; | ||
| 48 | |||
| 49 | virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override; | ||
| 50 | |||
| 51 | /// returns all generators, inverters, transformers, and electrical storage | ||
| 52 | virtual std::vector<ModelObject> children() const override; | ||
| 53 | |||
| 54 | /// remove the object from the model's workspace | ||
| 55 | virtual std::vector<openstudio::IdfObject> remove() override; | ||
| 56 | |||
| 57 | /// get a vector of allowable children types | ||
| 58 | virtual std::vector<IddObjectType> allowableChildTypes() const override; | ||
| 59 | |||
| 60 | /// returns all generators, inverters, transformers, and electrical storage | ||
| 61 | virtual ModelObject clone(Model model) const override; | ||
| 62 | |||
| 63 | //@} | ||
| 64 | /** @name Getters */ | ||
| 65 | //@{ | ||
| 66 | |||
| 67 | std::vector<Generator> generators() const; | ||
| 68 | |||
| 69 | std::string generatorOperationSchemeType() const; | ||
| 70 | |||
| 71 | bool isGeneratorOperationSchemeTypeDefaulted() const; | ||
| 72 | |||
| 73 | boost::optional<double> demandLimitSchemePurchasedElectricDemandLimit() const; | ||
| 74 | |||
| 75 | boost::optional<Schedule> trackScheduleSchemeSchedule() const; | ||
| 76 | |||
| 77 | boost::optional<std::string> trackMeterSchemeMeterName() const; | ||
| 78 | |||
| 79 | std::string electricalBussType() const; | ||
| 80 | |||
| 81 | bool isElectricalBussTypeDefaulted() const; | ||
| 82 | |||
| 83 | boost::optional<Inverter> inverter() const; | ||
| 84 | |||
| 85 | boost::optional<ElectricalStorage> electricalStorage() const; | ||
| 86 | |||
| 87 | boost::optional<ElectricLoadCenterTransformer> transformer() const; | ||
| 88 | |||
| 89 | // New | ||
| 90 | |||
| 91 | // Storage Operation Scheme, defaults to TrackFacilityElectricDemandStoreExcessOnSite | ||
| 92 | std::string storageOperationScheme() const; | ||
| 93 | bool isStorageOperationSchemeDefaulted() const; | ||
| 94 | |||
| 95 | // Storage Control Track Meter Name, required if operation = TrackMeterDemandStoreExcessOnSite | ||
| 96 | boost::optional<std::string> storageControlTrackMeterName() const; | ||
| 97 | |||
| 98 | // Storage Converter Object Name | ||
| 99 | boost::optional<ElectricLoadCenterStorageConverter> storageConverter() const; | ||
| 100 | |||
| 101 | // Maximum Storage State of Charge Fraction, required if storage, defaults | ||
| 102 | double maximumStorageStateofChargeFraction() const; | ||
| 103 | bool isMaximumStorageStateofChargeFractionDefaulted() const; | ||
| 104 | |||
| 105 | // Minimum Storage State of Charge Fraction, required if storage, defaults | ||
| 106 | double minimumStorageStateofChargeFraction() const; | ||
| 107 | bool isMinimumStorageStateofChargeFractionDefaulted() const; | ||
| 108 | |||
| 109 | // Design Storage Control Charge Power, required if FacilityDemandLeveling or TrackChargeDischargeSchedules | ||
| 110 | boost::optional<double> designStorageControlChargePower() const; | ||
| 111 | |||
| 112 | // Storage Charge Power Fraction Schedule Name, required if TrackChargeDischargeSchedules | ||
| 113 | // TODO: do I want to default that to daytime? | ||
| 114 | boost::optional<Schedule> storageChargePowerFractionSchedule() const; | ||
| 115 | |||
| 116 | // Design Storage Control Discharge Power, required if FacilityDemandLeveling or TrackChargeDischargeSchedules | ||
| 117 | boost::optional<double> designStorageControlDischargePower() const; | ||
| 118 | |||
| 119 | // Storage Charge Power Fraction Schedule Name, required if TrackChargeDischargeSchedules | ||
| 120 | // TODO: do I want to default that to daytime? | ||
| 121 | boost::optional<Schedule> storageDischargePowerFractionSchedule() const; | ||
| 122 | |||
| 123 | // Storage Control Utility Demand Target, required if FacilityDemandLeveling | ||
| 124 | boost::optional<double> storageControlUtilityDemandTarget() const; | ||
| 125 | |||
| 126 | // Storage Control Utility Demand Target Fraction Schedule Name, will be used only if FacilityDemandLeveling, defaults to 1.0 | ||
| 127 | Schedule storageControlUtilityDemandTargetFractionSchedule() const; | ||
| 128 | bool isStorageControlUtilityDemandTargetFractionScheduleDefaulted() const; | ||
| 129 | |||
| 130 | //@} | ||
| 131 | /** @name Setters */ | ||
| 132 | //@{ | ||
| 133 | |||
| 134 | bool addGenerator(const Generator& generator); | ||
| 135 | |||
| 136 | bool removeGenerator(const Generator& generator); | ||
| 137 | |||
| 138 | void resetGenerators(); | ||
| 139 | |||
| 140 | bool setGeneratorOperationSchemeType(const std::string& generatorOperationSchemeType); | ||
| 141 | |||
| 142 | void resetGeneratorOperationSchemeType(); | ||
| 143 | |||
| 144 | bool setDemandLimitSchemePurchasedElectricDemandLimit(double demandLimitSchemePurchasedElectricDemandLimit); | ||
| 145 | |||
| 146 | void resetDemandLimitSchemePurchasedElectricDemandLimit(); | ||
| 147 | |||
| 148 | bool setTrackScheduleSchemeSchedule(Schedule& schedule); | ||
| 149 | |||
| 150 | void resetTrackScheduleSchemeSchedule(); | ||
| 151 | |||
| 152 | bool setTrackMeterSchemeMeterName(const std::string& trackMeterSchemeMeterName); | ||
| 153 | |||
| 154 | void resetTrackMeterSchemeMeterName(); | ||
| 155 | |||
| 156 | bool setElectricalBussType(const std::string& electricalBussType); | ||
| 157 | |||
| 158 | void resetElectricalBussType(); | ||
| 159 | |||
| 160 | bool setInverter(const Inverter& inverter); | ||
| 161 | |||
| 162 | void resetInverter(); | ||
| 163 | |||
| 164 | bool setElectricalStorage(const ElectricalStorage& electricalStorage); | ||
| 165 | |||
| 166 | void resetElectricalStorage(); | ||
| 167 | |||
| 168 | bool setTransformer(const ElectricLoadCenterTransformer& transformer); | ||
| 169 | |||
| 170 | void resetTransformer(); | ||
| 171 | |||
| 172 | // Storage Operation Scheme | ||
| 173 | bool setStorageOperationScheme(const std::string& operationScheme); | ||
| 174 | void resetStorageOperationScheme(); | ||
| 175 | |||
| 176 | // Storage Control Track Meter Name, required if operation = TrackMeterDemandStoreExcessOnSite | ||
| 177 | bool setStorageControlTrackMeterName(const std::string& meterName); | ||
| 178 | void resetStorageControlTrackMeterName(); | ||
| 179 | |||
| 180 | // Storage Converter Object Name | ||
| 181 | bool setStorageConverter(const ElectricLoadCenterStorageConverter& converter); | ||
| 182 | void resetStorageConverter(); | ||
| 183 | |||
| 184 | // Maximum Storage State of Charge Fraction, required if storage, defaults | ||
| 185 | bool setMaximumStorageStateofChargeFraction(const double maxStateofCharge); | ||
| 186 | void resetMaximumStorageStateofChargeFraction(); | ||
| 187 | |||
| 188 | // Minimum Storage State of Charge Fraction, required if storage, defaults | ||
| 189 | bool setMinimumStorageStateofChargeFraction(const double minStateofCharge); | ||
| 190 | void resetMinimumStorageStateofChargeFraction(); | ||
| 191 | |||
| 192 | // Design Storage Control Charge Power, required if FacilityDemandLeveling or TrackChargeDischargeSchedules | ||
| 193 | bool setDesignStorageControlChargePower(const double designStorageControlChargePower); | ||
| 194 | void resetDesignStorageControlChargePower(); | ||
| 195 | |||
| 196 | // Storage Charge Power Fraction Schedule Name, required if TrackChargeDischargeSchedules | ||
| 197 | // TODO: do I want to default that to daytime? | ||
| 198 | bool setStorageChargePowerFractionSchedule(Schedule& schedule); | ||
| 199 | void resetStorageChargePowerFractionSchedule(); | ||
| 200 | |||
| 201 | // Design Storage Control Discharge Power, required if FacilityDemandLeveling or TrackChargeDischargeSchedules | ||
| 202 | bool setDesignStorageControlDischargePower(const double designStorageControlDischargePower); | ||
| 203 | void resetDesignStorageControlDischargePower(); | ||
| 204 | |||
| 205 | // Storage Charge Power Fraction Schedule Name, required if TrackChargeDischargeSchedules | ||
| 206 | // TODO: do I want to default that to daytime? | ||
| 207 | bool setStorageDischargePowerFractionSchedule(Schedule& schedule); | ||
| 208 | void resetStorageDischargePowerFractionSchedule(); | ||
| 209 | |||
| 210 | // Storage Control Utility Demand Target, required if FacilityDemandLeveling | ||
| 211 | bool setStorageControlUtilityDemandTarget(const double storageControlUtilityDemandTarget); | ||
| 212 | void resetStorageControlUtilityDemandTarget(); | ||
| 213 | |||
| 214 | // Storage Control Utility Demand Target Fraction Schedule Name, will be used only if FacilityDemandLeveling, defaults to 1.0 | ||
| 215 | bool setStorageControlUtilityDemandTargetFractionSchedule(Schedule& schedule); | ||
| 216 | void resetStorageControlUtilityDemandTargetFractionSchedule(); | ||
| 217 | |||
| 218 | //@} | ||
| 219 | /** @name Other */ | ||
| 220 | //@{ | ||
| 221 | |||
| 222 | bool validityCheck() const; | ||
| 223 | |||
| 224 | //@} | ||
| 225 | protected: | ||
| 226 | private: | ||
| 227 | − | REGISTER_LOGGER("openstudio.model.ElectricLoadCenterDistribution"); | |
| 228 | |||
| 229 | ModelObjectList generatorModelObjectList() const; | ||
| 230 | }; | ||
| 231 | |||
| 232 | } // namespace detail | ||
| 233 | |||
| 234 | } // namespace model | ||
| 235 | } // namespace openstudio | ||
| 236 | |||
| 237 | #endif // MODEL_ELECTRICLOADCENTERDISTRIBUTION_IMPL_HPP | ||
| 238 |