src/model/ElectricLoadCenterStorageConverter.cpp
| 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 | #include "ElectricLoadCenterStorageConverter.hpp" | ||
| 7 | #include "ElectricLoadCenterStorageConverter_Impl.hpp" | ||
| 8 | |||
| 9 | // TODO: Check the following class names against object getters and setters. | ||
| 10 | #include "Schedule.hpp" | ||
| 11 | #include "Schedule_Impl.hpp" | ||
| 12 | #include "Curve.hpp" | ||
| 13 | #include "Curve_Impl.hpp" | ||
| 14 | #include "ThermalZone.hpp" | ||
| 15 | #include "ThermalZone_Impl.hpp" | ||
| 16 | #include "Model.hpp" | ||
| 17 | #include "Model_Impl.hpp" | ||
| 18 | #include "ScheduleTypeLimits.hpp" | ||
| 19 | #include "ScheduleTypeRegistry.hpp" | ||
| 20 | |||
| 21 | #include "ElectricLoadCenterDistribution.hpp" | ||
| 22 | #include "ElectricLoadCenterDistribution_Impl.hpp" | ||
| 23 | |||
| 24 | #include <utilities/idd/IddFactory.hxx> | ||
| 25 | #include <utilities/idd/IddEnums.hxx> | ||
| 26 | #include <utilities/idd/OS_ElectricLoadCenter_Storage_Converter_FieldEnums.hxx> | ||
| 27 | |||
| 28 | #include "../utilities/units/Unit.hpp" | ||
| 29 | |||
| 30 | #include "../utilities/core/Assert.hpp" | ||
| 31 | |||
| 32 | namespace openstudio { | ||
| 33 | namespace model { | ||
| 34 | |||
| 35 | namespace detail { | ||
| 36 | |||
| 37 | 1 | ElectricLoadCenterStorageConverter_Impl::ElectricLoadCenterStorageConverter_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 38 | 1 | : ParentObject_Impl(idfObject, model, keepHandle) { | |
| 39 |
4/6✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 time.
✗ Branch 13 not taken.
|
1 | OS_ASSERT(idfObject.iddObject().type() == ElectricLoadCenterStorageConverter::iddObjectType()); |
| 40 | 1 | } | |
| 41 | |||
| 42 | ✗ | ElectricLoadCenterStorageConverter_Impl::ElectricLoadCenterStorageConverter_Impl(const openstudio::detail::WorkspaceObject_Impl& other, | |
| 43 | ✗ | Model_Impl* model, bool keepHandle) | |
| 44 | ✗ | : ParentObject_Impl(other, model, keepHandle) { | |
| 45 | ✗ | OS_ASSERT(other.iddObject().type() == ElectricLoadCenterStorageConverter::iddObjectType()); | |
| 46 | ✗ | } | |
| 47 | |||
| 48 | ✗ | ElectricLoadCenterStorageConverter_Impl::ElectricLoadCenterStorageConverter_Impl(const ElectricLoadCenterStorageConverter_Impl& other, | |
| 49 | ✗ | Model_Impl* model, bool keepHandle) | |
| 50 | ✗ | : ParentObject_Impl(other, model, keepHandle) {} | |
| 51 | |||
| 52 | ✗ | const std::vector<std::string>& ElectricLoadCenterStorageConverter_Impl::outputVariableNames() const { | |
| 53 | static const std::vector<std::string> result{ | ||
| 54 | "Converter AC to DC Efficiency", "Converter AC Input Electricity Rate", "Converter AC Input Electricity Energy", | ||
| 55 | "Converter DC Output Electricity Rate", "Converter DC Output Electricity Energy", "Converter Electricity Loss Rate", | ||
| 56 | "Converter Electricity Loss Energy", "Converter Electricity Loss Decrement Energy", "Converter Thermal Loss Rate", | ||
| 57 | ✗ | "Converter Thermal Loss Energy", "Converter Ancillary AC Electricity Rate", "Converter Ancillary AC Electricity Energy"}; | |
| 58 | ✗ | return result; | |
| 59 | ✗ | } | |
| 60 | |||
| 61 | ✗ | IddObjectType ElectricLoadCenterStorageConverter_Impl::iddObjectType() const { | |
| 62 | ✗ | return ElectricLoadCenterStorageConverter::iddObjectType(); | |
| 63 | } | ||
| 64 | |||
| 65 | ✗ | std::vector<ScheduleTypeKey> ElectricLoadCenterStorageConverter_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 66 | // TODO: Check schedule display names. | ||
| 67 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 68 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 69 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 70 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 71 | ✗ | if (std::find(b, e, OS_ElectricLoadCenter_Storage_ConverterFields::AvailabilityScheduleName) != e) { | |
| 72 | ✗ | result.push_back(ScheduleTypeKey("ElectricLoadCenterStorageConverter", "Availability")); | |
| 73 | } | ||
| 74 | ✗ | return result; | |
| 75 | ✗ | } | |
| 76 | |||
| 77 | // Private protected | ||
| 78 | 3 | boost::optional<Schedule> ElectricLoadCenterStorageConverter_Impl::optionalAvailabilitySchedule() const { | |
| 79 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ElectricLoadCenter_Storage_ConverterFields::AvailabilityScheduleName); |
| 80 | } | ||
| 81 | |||
| 82 | // Convenience method to find the ELCD linked to this storage device | ||
| 83 | ✗ | boost::optional<ElectricLoadCenterDistribution> ElectricLoadCenterStorageConverter_Impl::electricLoadCenterDistribution() const { | |
| 84 | ✗ | auto elcds = getObject<ModelObject>().getModelObjectSources<ElectricLoadCenterDistribution>(ElectricLoadCenterDistribution::iddObjectType()); | |
| 85 | ✗ | if (elcds.empty()) { | |
| 86 | // no error | ||
| 87 | ✗ | } else if (elcds.size() == 1u) { | |
| 88 | ✗ | return elcds[0]; | |
| 89 | } else { | ||
| 90 | // error | ||
| 91 | } | ||
| 92 | |||
| 93 | ✗ | return boost::none; | |
| 94 | ✗ | } | |
| 95 | |||
| 96 | 3 | Schedule ElectricLoadCenterStorageConverter_Impl::availabilitySchedule() const { | |
| 97 |
1/1✓ Branch 1 taken 3 times.
|
3 | boost::optional<Schedule> value = optionalAvailabilitySchedule(); |
| 98 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 2 taken 1 time.
|
3 | if (!value) { |
| 99 | //LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached."); | ||
| 100 | // I'm choosing to just return alwaysOnDiscreteSchedule | ||
| 101 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | return this->model().alwaysOnDiscreteSchedule(); |
| 102 | } | ||
| 103 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | return value.get(); |
| 104 | 3 | } | |
| 105 | |||
| 106 | 2 | bool ElectricLoadCenterStorageConverter_Impl::isAvailabilityScheduleDefaulted() const { | |
| 107 | 2 | return isEmpty(OS_ElectricLoadCenter_Storage_ConverterFields::AvailabilityScheduleName); | |
| 108 | } | ||
| 109 | |||
| 110 | 5 | std::string ElectricLoadCenterStorageConverter_Impl::powerConversionEfficiencyMethod() const { | |
| 111 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<std::string> value = getString(OS_ElectricLoadCenter_Storage_ConverterFields::PowerConversionEfficiencyMethod, true); |
| 112 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 113 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
10 | return value.get(); |
| 114 | 5 | } | |
| 115 | |||
| 116 | // Required if powerConversionEfficiencyMethod == "SimpleFixed" | ||
| 117 | 5 | boost::optional<double> ElectricLoadCenterStorageConverter_Impl::simpleFixedEfficiency() const { | |
| 118 | 5 | return getDouble(OS_ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, false); | |
| 119 | } | ||
| 120 | |||
| 121 | // Required if powerConversionEfficiencyMethod == "FunctionOfPower" | ||
| 122 | 4 | boost::optional<double> ElectricLoadCenterStorageConverter_Impl::designMaximumContinuousInputPower() const { | |
| 123 | 4 | return getDouble(OS_ElectricLoadCenter_Storage_ConverterFields::DesignMaximumContinuousInputPower, true); | |
| 124 | } | ||
| 125 | |||
| 126 | // Required if powerConversionEfficiencyMethod == "FunctionOfPower" | ||
| 127 | 5 | boost::optional<Curve> ElectricLoadCenterStorageConverter_Impl::efficiencyFunctionofPowerCurve() const { | |
| 128 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_ElectricLoadCenter_Storage_ConverterFields::EfficiencyFunctionofPowerCurveName); |
| 129 | } | ||
| 130 | |||
| 131 | 2 | double ElectricLoadCenterStorageConverter_Impl::ancillaryPowerConsumedInStandby() const { | |
| 132 |
1/1✓ Branch 1 taken 2 times.
|
2 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_ConverterFields::AncillaryPowerConsumedInStandby, true); |
| 133 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
|
2 | OS_ASSERT(value); |
| 134 |
1/1✓ Branch 1 taken 2 times.
|
4 | return value.get(); |
| 135 | } | ||
| 136 | |||
| 137 | 3 | bool ElectricLoadCenterStorageConverter_Impl::isAncillaryPowerConsumedInStandbyDefaulted() const { | |
| 138 | 3 | return isEmpty(OS_ElectricLoadCenter_Storage_ConverterFields::AncillaryPowerConsumedInStandby); | |
| 139 | } | ||
| 140 | |||
| 141 | 2 | boost::optional<ThermalZone> ElectricLoadCenterStorageConverter_Impl::thermalZone() const { | |
| 142 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | return getObject<ModelObject>().getModelObjectTarget<ThermalZone>(OS_ElectricLoadCenter_Storage_ConverterFields::ZoneName); |
| 143 | } | ||
| 144 | |||
| 145 | 1 | double ElectricLoadCenterStorageConverter_Impl::radiativeFraction() const { | |
| 146 |
1/1✓ Branch 1 taken 1 time.
|
1 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_ConverterFields::RadiativeFraction, true); |
| 147 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(value); |
| 148 |
1/1✓ Branch 1 taken 1 time.
|
2 | return value.get(); |
| 149 | } | ||
| 150 | |||
| 151 | 3 | bool ElectricLoadCenterStorageConverter_Impl::isRadiativeFractionDefaulted() const { | |
| 152 | 3 | return isEmpty(OS_ElectricLoadCenter_Storage_ConverterFields::RadiativeFraction); | |
| 153 | } | ||
| 154 | |||
| 155 | // Setters | ||
| 156 | |||
| 157 | 1 | bool ElectricLoadCenterStorageConverter_Impl::setAvailabilitySchedule(Schedule& schedule) { | |
| 158 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
4 | bool result = setSchedule(OS_ElectricLoadCenter_Storage_ConverterFields::AvailabilityScheduleName, "ElectricLoadCenterStorageConverter", |
| 159 | "Availability", schedule); | ||
| 160 | 1 | return result; | |
| 161 | } | ||
| 162 | |||
| 163 | 1 | void ElectricLoadCenterStorageConverter_Impl::resetAvailabilitySchedule() { | |
| 164 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::AvailabilityScheduleName, ""); |
| 165 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 166 | 1 | } | |
| 167 | |||
| 168 | // This method will automatically switch the PowerConversationEfficiencyMethod to "SimpleFixed" and reset the DesignMaximumContinuousInputPower and EfficiencyFunctionofPowerCurveName fields | ||
| 169 | 4 | bool ElectricLoadCenterStorageConverter_Impl::setSimpleFixedEfficiency(double simpleFixedEfficiency) { | |
| 170 | // Assign the Simple Fixed Efficiency | ||
| 171 | 4 | bool result = setDouble(OS_ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, simpleFixedEfficiency); | |
| 172 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (result) { |
| 173 | // Switch the Method | ||
| 174 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::PowerConversionEfficiencyMethod, "SimpleFixed"); |
| 175 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
|
4 | OS_ASSERT(result); |
| 176 | // Reset the two others | ||
| 177 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::DesignMaximumContinuousInputPower, ""); |
| 178 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
|
4 | OS_ASSERT(result); |
| 179 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::EfficiencyFunctionofPowerCurveName, ""); |
| 180 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
|
4 | OS_ASSERT(result); |
| 181 | } | ||
| 182 | 4 | return result; | |
| 183 | } | ||
| 184 | |||
| 185 | // This method will automatically switch the PowerConversationEfficiencyMethod to "FunctionOfPower" and reset the Simple Fixed Efficiency field. | ||
| 186 | 2 | bool ElectricLoadCenterStorageConverter_Impl::setDesignMaximumContinuousInputPower(double designMaximumContinuousInputPower) { | |
| 187 | // Assign the Design Maximum Continuous Input Power | ||
| 188 | 2 | bool result = setDouble(OS_ElectricLoadCenter_Storage_ConverterFields::DesignMaximumContinuousInputPower, designMaximumContinuousInputPower); | |
| 189 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (result) { |
| 190 | // Switch the Method | ||
| 191 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::PowerConversionEfficiencyMethod, "FunctionOfPower"); |
| 192 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 193 | // Reset the Simple Fixed Efficiency | ||
| 194 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, ""); |
| 195 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 196 | } | ||
| 197 | 2 | return result; | |
| 198 | } | ||
| 199 | |||
| 200 | // This method will automatically switch the PowerConversationEfficiencyMethod to "FunctionOfPower" and reset the Simple Fixed Efficiency field. | ||
| 201 | 1 | bool ElectricLoadCenterStorageConverter_Impl::setEfficiencyFunctionofPowerCurve(const Curve& efficiencyFunctionofPowerCurve) { | |
| 202 | // Set the curve | ||
| 203 | bool result = | ||
| 204 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | setPointer(OS_ElectricLoadCenter_Storage_ConverterFields::EfficiencyFunctionofPowerCurveName, efficiencyFunctionofPowerCurve.handle()); |
| 205 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (result) { |
| 206 | // Switch the Method | ||
| 207 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::PowerConversionEfficiencyMethod, "FunctionOfPower"); |
| 208 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 209 | // Reset the Simple Fixed Efficiency | ||
| 210 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, ""); |
| 211 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 212 | } | ||
| 213 | 1 | return result; | |
| 214 | } | ||
| 215 | |||
| 216 | 1 | bool ElectricLoadCenterStorageConverter_Impl::setAncillaryPowerConsumedInStandby(double ancillaryPowerConsumedInStandby) { | |
| 217 | 1 | bool result = setDouble(OS_ElectricLoadCenter_Storage_ConverterFields::AncillaryPowerConsumedInStandby, ancillaryPowerConsumedInStandby); | |
| 218 | 1 | return result; | |
| 219 | } | ||
| 220 | |||
| 221 | 1 | void ElectricLoadCenterStorageConverter_Impl::resetAncillaryPowerConsumedInStandby() { | |
| 222 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::AncillaryPowerConsumedInStandby, ""); |
| 223 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 224 | 1 | } | |
| 225 | |||
| 226 | 1 | bool ElectricLoadCenterStorageConverter_Impl::setThermalZone(const ThermalZone& thermalZone) { | |
| 227 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | bool result = setPointer(OS_ElectricLoadCenter_Storage_ConverterFields::ZoneName, thermalZone.handle()); |
| 228 | 1 | return result; | |
| 229 | } | ||
| 230 | |||
| 231 | ✗ | void ElectricLoadCenterStorageConverter_Impl::resetThermalZone() { | |
| 232 | ✗ | bool result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::ZoneName, ""); | |
| 233 | ✗ | OS_ASSERT(result); | |
| 234 | ✗ | } | |
| 235 | |||
| 236 | 1 | bool ElectricLoadCenterStorageConverter_Impl::setRadiativeFraction(double radiativeFraction) { | |
| 237 | 1 | bool result = setDouble(OS_ElectricLoadCenter_Storage_ConverterFields::RadiativeFraction, radiativeFraction); | |
| 238 | 1 | return result; | |
| 239 | } | ||
| 240 | |||
| 241 | 1 | void ElectricLoadCenterStorageConverter_Impl::resetRadiativeFraction() { | |
| 242 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Storage_ConverterFields::RadiativeFraction, ""); |
| 243 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 244 | 1 | } | |
| 245 | |||
| 246 | } // namespace detail | ||
| 247 | |||
| 248 | 1 | ElectricLoadCenterStorageConverter::ElectricLoadCenterStorageConverter(const Model& model) | |
| 249 | 1 | : ParentObject(ElectricLoadCenterStorageConverter::iddObjectType(), model) { | |
| 250 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 5 not taken.
|
1 | OS_ASSERT(getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()); |
| 251 | |||
| 252 | // This is actually the E+ default | ||
| 253 |
1/1✓ Branch 1 taken 1 time.
|
1 | setSimpleFixedEfficiency(0.95); |
| 254 | |||
| 255 | // Already defaults to alwaysOnDiscreteSchedule | ||
| 256 | //auto availableSchedule = model.alwaysOnDiscreteSchedule(); | ||
| 257 | //setAvailabilitySchedule(availableSchedule); | ||
| 258 | 1 | } | |
| 259 | |||
| 260 | 7600 | IddObjectType ElectricLoadCenterStorageConverter::iddObjectType() { | |
| 261 |
1/1✓ Branch 1 taken 7600 times.
|
7600 | return {IddObjectType::OS_ElectricLoadCenter_Storage_Converter}; |
| 262 | } | ||
| 263 | |||
| 264 | ✗ | std::vector<std::string> ElectricLoadCenterStorageConverter::powerConversionEfficiencyMethodValues() { | |
| 265 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), | |
| 266 | ✗ | OS_ElectricLoadCenter_Storage_ConverterFields::PowerConversionEfficiencyMethod); | |
| 267 | } | ||
| 268 | |||
| 269 | ✗ | boost::optional<ElectricLoadCenterDistribution> ElectricLoadCenterStorageConverter::electricLoadCenterDistribution() const { | |
| 270 | ✗ | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->electricLoadCenterDistribution(); | |
| 271 | } | ||
| 272 | |||
| 273 | 3 | Schedule ElectricLoadCenterStorageConverter::availabilitySchedule() const { | |
| 274 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->availabilitySchedule(); |
| 275 | } | ||
| 276 | |||
| 277 | 2 | bool ElectricLoadCenterStorageConverter::isAvailabilityScheduleDefaulted() const { | |
| 278 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->isAvailabilityScheduleDefaulted(); |
| 279 | } | ||
| 280 | |||
| 281 | 5 | std::string ElectricLoadCenterStorageConverter::powerConversionEfficiencyMethod() const { | |
| 282 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->powerConversionEfficiencyMethod(); |
| 283 | } | ||
| 284 | |||
| 285 | 5 | boost::optional<double> ElectricLoadCenterStorageConverter::simpleFixedEfficiency() const { | |
| 286 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->simpleFixedEfficiency(); |
| 287 | } | ||
| 288 | |||
| 289 | 4 | boost::optional<double> ElectricLoadCenterStorageConverter::designMaximumContinuousInputPower() const { | |
| 290 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->designMaximumContinuousInputPower(); |
| 291 | } | ||
| 292 | |||
| 293 | 5 | boost::optional<Curve> ElectricLoadCenterStorageConverter::efficiencyFunctionofPowerCurve() const { | |
| 294 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->efficiencyFunctionofPowerCurve(); |
| 295 | } | ||
| 296 | |||
| 297 | 2 | double ElectricLoadCenterStorageConverter::ancillaryPowerConsumedInStandby() const { | |
| 298 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->ancillaryPowerConsumedInStandby(); |
| 299 | } | ||
| 300 | |||
| 301 | 3 | bool ElectricLoadCenterStorageConverter::isAncillaryPowerConsumedInStandbyDefaulted() const { | |
| 302 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->isAncillaryPowerConsumedInStandbyDefaulted(); |
| 303 | } | ||
| 304 | |||
| 305 | 2 | boost::optional<ThermalZone> ElectricLoadCenterStorageConverter::thermalZone() const { | |
| 306 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->thermalZone(); |
| 307 | } | ||
| 308 | |||
| 309 | 1 | double ElectricLoadCenterStorageConverter::radiativeFraction() const { | |
| 310 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->radiativeFraction(); |
| 311 | } | ||
| 312 | |||
| 313 | 3 | bool ElectricLoadCenterStorageConverter::isRadiativeFractionDefaulted() const { | |
| 314 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->isRadiativeFractionDefaulted(); |
| 315 | } | ||
| 316 | |||
| 317 | // Setters | ||
| 318 | |||
| 319 | 1 | bool ElectricLoadCenterStorageConverter::setAvailabilitySchedule(Schedule& schedule) { | |
| 320 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->setAvailabilitySchedule(schedule); |
| 321 | } | ||
| 322 | |||
| 323 | 1 | void ElectricLoadCenterStorageConverter::resetAvailabilitySchedule() { | |
| 324 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->resetAvailabilitySchedule(); |
| 325 | 1 | } | |
| 326 | |||
| 327 | 4 | bool ElectricLoadCenterStorageConverter::setSimpleFixedEfficiency(double simpleFixedEfficiency) { | |
| 328 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->setSimpleFixedEfficiency(simpleFixedEfficiency); |
| 329 | } | ||
| 330 | |||
| 331 | 2 | bool ElectricLoadCenterStorageConverter::setDesignMaximumContinuousInputPower(double designMaximumContinuousInputPower) { | |
| 332 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->setDesignMaximumContinuousInputPower(designMaximumContinuousInputPower); |
| 333 | } | ||
| 334 | |||
| 335 | 1 | bool ElectricLoadCenterStorageConverter::setEfficiencyFunctionofPowerCurve(const Curve& efficiencyFunctionofPowerCurve) { | |
| 336 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->setEfficiencyFunctionofPowerCurve(efficiencyFunctionofPowerCurve); |
| 337 | } | ||
| 338 | |||
| 339 | 1 | bool ElectricLoadCenterStorageConverter::setAncillaryPowerConsumedInStandby(double ancillaryPowerConsumedInStandby) { | |
| 340 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->setAncillaryPowerConsumedInStandby(ancillaryPowerConsumedInStandby); |
| 341 | } | ||
| 342 | |||
| 343 | 1 | void ElectricLoadCenterStorageConverter::resetAncillaryPowerConsumedInStandby() { | |
| 344 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->resetAncillaryPowerConsumedInStandby(); |
| 345 | 1 | } | |
| 346 | |||
| 347 | 1 | bool ElectricLoadCenterStorageConverter::setThermalZone(const ThermalZone& thermalZone) { | |
| 348 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->setThermalZone(thermalZone); |
| 349 | } | ||
| 350 | |||
| 351 | ✗ | void ElectricLoadCenterStorageConverter::resetThermalZone() { | |
| 352 | ✗ | getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->resetThermalZone(); | |
| 353 | ✗ | } | |
| 354 | |||
| 355 | 1 | bool ElectricLoadCenterStorageConverter::setRadiativeFraction(double radiativeFraction) { | |
| 356 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->setRadiativeFraction(radiativeFraction); |
| 357 | } | ||
| 358 | |||
| 359 | 1 | void ElectricLoadCenterStorageConverter::resetRadiativeFraction() { | |
| 360 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterStorageConverter_Impl>()->resetRadiativeFraction(); |
| 361 | 1 | } | |
| 362 | |||
| 363 | /// @cond | ||
| 364 | 1 | ElectricLoadCenterStorageConverter::ElectricLoadCenterStorageConverter(std::shared_ptr<detail::ElectricLoadCenterStorageConverter_Impl> impl) | |
| 365 |
1/1✓ Branch 3 taken 1 time.
|
1 | : ParentObject(std::move(impl)) {} |
| 366 | /// @endcond | ||
| 367 | |||
| 368 | } // namespace model | ||
| 369 | } // namespace openstudio | ||
| 370 |