src/model/ElectricLoadCenterInverterLookUpTable.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 "ElectricLoadCenterInverterLookUpTable.hpp" | ||
| 7 | #include "ElectricLoadCenterInverterLookUpTable_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Schedule.hpp" | ||
| 10 | #include "Schedule_Impl.hpp" | ||
| 11 | #include "ThermalZone.hpp" | ||
| 12 | #include "ThermalZone_Impl.hpp" | ||
| 13 | #include "ScheduleTypeLimits.hpp" | ||
| 14 | #include "ScheduleTypeRegistry.hpp" | ||
| 15 | |||
| 16 | #include <utilities/idd/IddEnums.hxx> | ||
| 17 | #include <utilities/idd/OS_ElectricLoadCenter_Inverter_LookUpTable_FieldEnums.hxx> | ||
| 18 | |||
| 19 | #include "../utilities/units/Unit.hpp" | ||
| 20 | |||
| 21 | #include "../utilities/core/Assert.hpp" | ||
| 22 | |||
| 23 | namespace openstudio { | ||
| 24 | namespace model { | ||
| 25 | |||
| 26 | namespace detail { | ||
| 27 | |||
| 28 | 2 | ElectricLoadCenterInverterLookUpTable_Impl::ElectricLoadCenterInverterLookUpTable_Impl(const IdfObject& idfObject, Model_Impl* model, | |
| 29 | 2 | bool keepHandle) | |
| 30 | 2 | : Inverter_Impl(idfObject, model, keepHandle) { | |
| 31 |
4/6✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 13 not taken.
|
2 | OS_ASSERT(idfObject.iddObject().type() == ElectricLoadCenterInverterLookUpTable::iddObjectType()); |
| 32 | 2 | } | |
| 33 | |||
| 34 | ✗ | ElectricLoadCenterInverterLookUpTable_Impl::ElectricLoadCenterInverterLookUpTable_Impl(const openstudio::detail::WorkspaceObject_Impl& other, | |
| 35 | ✗ | Model_Impl* model, bool keepHandle) | |
| 36 | ✗ | : Inverter_Impl(other, model, keepHandle) { | |
| 37 | ✗ | OS_ASSERT(other.iddObject().type() == ElectricLoadCenterInverterLookUpTable::iddObjectType()); | |
| 38 | ✗ | } | |
| 39 | |||
| 40 | ✗ | ElectricLoadCenterInverterLookUpTable_Impl::ElectricLoadCenterInverterLookUpTable_Impl(const ElectricLoadCenterInverterLookUpTable_Impl& other, | |
| 41 | ✗ | Model_Impl* model, bool keepHandle) | |
| 42 | ✗ | : Inverter_Impl(other, model, keepHandle) {} | |
| 43 | |||
| 44 | ✗ | const std::vector<std::string>& ElectricLoadCenterInverterLookUpTable_Impl::outputVariableNames() const { | |
| 45 | static const std::vector<std::string> result{ | ||
| 46 | "Inverter DC to AC Efficiency", "Inverter DC Input Electricity Rate", "Inverter DC Input Electricity Energy", | ||
| 47 | "Inverter AC Output Electricity Rate", "Inverter AC Output Electricity Energy", "Inverter Conversion Loss Power", | ||
| 48 | "Inverter Conversion Loss Energy", "Inverter Conversion Loss Decrement Energy", "Inverter Thermal Loss Rate", | ||
| 49 | ✗ | "Inverter Thermal Loss Energy", "Inverter Ancillary AC Electricity Rate", "Inverter Ancillary AC Electricity Energy"}; | |
| 50 | ✗ | return result; | |
| 51 | ✗ | } | |
| 52 | |||
| 53 | ✗ | IddObjectType ElectricLoadCenterInverterLookUpTable_Impl::iddObjectType() const { | |
| 54 | ✗ | return ElectricLoadCenterInverterLookUpTable::iddObjectType(); | |
| 55 | } | ||
| 56 | |||
| 57 | ✗ | std::vector<ScheduleTypeKey> ElectricLoadCenterInverterLookUpTable_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 58 | // TODO: Check schedule display names. | ||
| 59 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 60 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 61 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 62 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 63 | ✗ | if (std::find(b, e, OS_ElectricLoadCenter_Inverter_LookUpTableFields::AvailabilityScheduleName) != e) { | |
| 64 | ✗ | result.push_back(ScheduleTypeKey("ElectricLoadCenterInverterLookUpTable", "Availability")); | |
| 65 | } | ||
| 66 | ✗ | return result; | |
| 67 | ✗ | } | |
| 68 | |||
| 69 | 3 | boost::optional<Schedule> ElectricLoadCenterInverterLookUpTable_Impl::availabilitySchedule() const { | |
| 70 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ElectricLoadCenter_Inverter_LookUpTableFields::AvailabilityScheduleName); |
| 71 | } | ||
| 72 | |||
| 73 | 2 | boost::optional<ThermalZone> ElectricLoadCenterInverterLookUpTable_Impl::thermalZone() const { | |
| 74 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | return getObject<ModelObject>().getModelObjectTarget<ThermalZone>(OS_ElectricLoadCenter_Inverter_LookUpTableFields::ZoneName); |
| 75 | } | ||
| 76 | |||
| 77 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::radiativeFraction() const { | |
| 78 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::RadiativeFraction, true); | |
| 79 | } | ||
| 80 | |||
| 81 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::ratedMaximumContinuousOutputPower() const { | |
| 82 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::RatedMaximumContinuousOutputPower, true); | |
| 83 | } | ||
| 84 | |||
| 85 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::nightTareLossPower() const { | |
| 86 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::NightTareLossPower, true); | |
| 87 | } | ||
| 88 | |||
| 89 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::nominalVoltageInput() const { | |
| 90 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::NominalVoltageInput, true); | |
| 91 | } | ||
| 92 | |||
| 93 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::efficiencyAt10PowerAndNominalVoltage() const { | |
| 94 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat10_PowerandNominalVoltage, true); | |
| 95 | } | ||
| 96 | |||
| 97 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::efficiencyAt20PowerAndNominalVoltage() const { | |
| 98 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat20_PowerandNominalVoltage, true); | |
| 99 | } | ||
| 100 | |||
| 101 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::efficiencyAt30PowerAndNominalVoltage() const { | |
| 102 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat30_PowerandNominalVoltage, true); | |
| 103 | } | ||
| 104 | |||
| 105 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::efficiencyAt50PowerAndNominalVoltage() const { | |
| 106 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat50_PowerandNominalVoltage, true); | |
| 107 | } | ||
| 108 | |||
| 109 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::efficiencyAt75PowerAndNominalVoltage() const { | |
| 110 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat75_PowerandNominalVoltage, true); | |
| 111 | } | ||
| 112 | |||
| 113 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable_Impl::efficiencyAt100PowerAndNominalVoltage() const { | |
| 114 | 4 | return getDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat100_PowerandNominalVoltage, true); | |
| 115 | } | ||
| 116 | |||
| 117 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setAvailabilitySchedule(Schedule& schedule) { | |
| 118 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
4 | bool result = setSchedule(OS_ElectricLoadCenter_Inverter_LookUpTableFields::AvailabilityScheduleName, "ElectricLoadCenterInverterLookUpTable", |
| 119 | "Availability", schedule); | ||
| 120 | 1 | return result; | |
| 121 | } | ||
| 122 | |||
| 123 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetAvailabilitySchedule() { | |
| 124 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::AvailabilityScheduleName, ""); |
| 125 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 126 | 1 | } | |
| 127 | |||
| 128 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setThermalZone(const ThermalZone& thermalZone) { | |
| 129 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | return setPointer(OS_ElectricLoadCenter_Inverter_LookUpTableFields::ZoneName, thermalZone.handle()); |
| 130 | } | ||
| 131 | |||
| 132 | ✗ | void ElectricLoadCenterInverterLookUpTable_Impl::resetThermalZone() { | |
| 133 | ✗ | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::ZoneName, ""); | |
| 134 | ✗ | OS_ASSERT(result); | |
| 135 | ✗ | } | |
| 136 | |||
| 137 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setRadiativeFraction(boost::optional<double> radiativeFraction) { | |
| 138 | 1 | bool result(false); | |
| 139 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (radiativeFraction) { |
| 140 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::RadiativeFraction, radiativeFraction.get()); | |
| 141 | } else { | ||
| 142 | ✗ | resetRadiativeFraction(); | |
| 143 | ✗ | result = true; | |
| 144 | } | ||
| 145 | 1 | return result; | |
| 146 | } | ||
| 147 | |||
| 148 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetRadiativeFraction() { | |
| 149 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::RadiativeFraction, ""); |
| 150 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 151 | 1 | } | |
| 152 | |||
| 153 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setRatedMaximumContinuousOutputPower(boost::optional<double> ratedMaximumContinuousOutputPower) { | |
| 154 | 1 | bool result(false); | |
| 155 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (ratedMaximumContinuousOutputPower) { |
| 156 | result = | ||
| 157 | 1 | setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::RatedMaximumContinuousOutputPower, ratedMaximumContinuousOutputPower.get()); | |
| 158 | } else { | ||
| 159 | ✗ | resetRatedMaximumContinuousOutputPower(); | |
| 160 | ✗ | result = true; | |
| 161 | } | ||
| 162 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 163 | 1 | return result; | |
| 164 | } | ||
| 165 | |||
| 166 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetRatedMaximumContinuousOutputPower() { | |
| 167 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::RatedMaximumContinuousOutputPower, ""); |
| 168 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 169 | 1 | } | |
| 170 | |||
| 171 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setNightTareLossPower(boost::optional<double> nightTareLossPower) { | |
| 172 | 1 | bool result(false); | |
| 173 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (nightTareLossPower) { |
| 174 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::NightTareLossPower, nightTareLossPower.get()); | |
| 175 | } else { | ||
| 176 | ✗ | resetNightTareLossPower(); | |
| 177 | ✗ | result = true; | |
| 178 | } | ||
| 179 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 180 | 1 | return result; | |
| 181 | } | ||
| 182 | |||
| 183 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetNightTareLossPower() { | |
| 184 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::NightTareLossPower, ""); |
| 185 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 186 | 1 | } | |
| 187 | |||
| 188 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setNominalVoltageInput(boost::optional<double> nominalVoltageInput) { | |
| 189 | 1 | bool result(false); | |
| 190 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (nominalVoltageInput) { |
| 191 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::NominalVoltageInput, nominalVoltageInput.get()); | |
| 192 | } else { | ||
| 193 | ✗ | resetNominalVoltageInput(); | |
| 194 | ✗ | result = true; | |
| 195 | } | ||
| 196 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 197 | 1 | return result; | |
| 198 | } | ||
| 199 | |||
| 200 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetNominalVoltageInput() { | |
| 201 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::NominalVoltageInput, ""); |
| 202 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 203 | 1 | } | |
| 204 | |||
| 205 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setEfficiencyAt10PowerAndNominalVoltage( | |
| 206 | boost::optional<double> efficiencyAt10PowerAndNominalVoltage) { | ||
| 207 | 1 | bool result(false); | |
| 208 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (efficiencyAt10PowerAndNominalVoltage) { |
| 209 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat10_PowerandNominalVoltage, | |
| 210 | 1 | efficiencyAt10PowerAndNominalVoltage.get()); | |
| 211 | } else { | ||
| 212 | ✗ | resetEfficiencyAt10PowerAndNominalVoltage(); | |
| 213 | ✗ | result = true; | |
| 214 | } | ||
| 215 | 1 | return result; | |
| 216 | } | ||
| 217 | |||
| 218 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetEfficiencyAt10PowerAndNominalVoltage() { | |
| 219 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat10_PowerandNominalVoltage, ""); |
| 220 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 221 | 1 | } | |
| 222 | |||
| 223 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setEfficiencyAt20PowerAndNominalVoltage( | |
| 224 | boost::optional<double> efficiencyAt20PowerAndNominalVoltage) { | ||
| 225 | 1 | bool result(false); | |
| 226 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (efficiencyAt20PowerAndNominalVoltage) { |
| 227 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat20_PowerandNominalVoltage, | |
| 228 | 1 | efficiencyAt20PowerAndNominalVoltage.get()); | |
| 229 | } else { | ||
| 230 | ✗ | resetEfficiencyAt20PowerAndNominalVoltage(); | |
| 231 | ✗ | result = true; | |
| 232 | } | ||
| 233 | 1 | return result; | |
| 234 | } | ||
| 235 | |||
| 236 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetEfficiencyAt20PowerAndNominalVoltage() { | |
| 237 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat20_PowerandNominalVoltage, ""); |
| 238 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 239 | 1 | } | |
| 240 | |||
| 241 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setEfficiencyAt30PowerAndNominalVoltage( | |
| 242 | boost::optional<double> efficiencyAt30PowerAndNominalVoltage) { | ||
| 243 | 1 | bool result(false); | |
| 244 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (efficiencyAt30PowerAndNominalVoltage) { |
| 245 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat30_PowerandNominalVoltage, | |
| 246 | 1 | efficiencyAt30PowerAndNominalVoltage.get()); | |
| 247 | } else { | ||
| 248 | ✗ | resetEfficiencyAt30PowerAndNominalVoltage(); | |
| 249 | ✗ | result = true; | |
| 250 | } | ||
| 251 | 1 | return result; | |
| 252 | } | ||
| 253 | |||
| 254 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetEfficiencyAt30PowerAndNominalVoltage() { | |
| 255 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat30_PowerandNominalVoltage, ""); |
| 256 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 257 | 1 | } | |
| 258 | |||
| 259 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setEfficiencyAt50PowerAndNominalVoltage( | |
| 260 | boost::optional<double> efficiencyAt50PowerAndNominalVoltage) { | ||
| 261 | 1 | bool result(false); | |
| 262 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (efficiencyAt50PowerAndNominalVoltage) { |
| 263 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat50_PowerandNominalVoltage, | |
| 264 | 1 | efficiencyAt50PowerAndNominalVoltage.get()); | |
| 265 | } else { | ||
| 266 | ✗ | resetEfficiencyAt50PowerAndNominalVoltage(); | |
| 267 | ✗ | result = true; | |
| 268 | } | ||
| 269 | 1 | return result; | |
| 270 | } | ||
| 271 | |||
| 272 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetEfficiencyAt50PowerAndNominalVoltage() { | |
| 273 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat50_PowerandNominalVoltage, ""); |
| 274 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 275 | 1 | } | |
| 276 | |||
| 277 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setEfficiencyAt75PowerAndNominalVoltage( | |
| 278 | boost::optional<double> efficiencyAt75PowerAndNominalVoltage) { | ||
| 279 | 1 | bool result(false); | |
| 280 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (efficiencyAt75PowerAndNominalVoltage) { |
| 281 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat75_PowerandNominalVoltage, | |
| 282 | 1 | efficiencyAt75PowerAndNominalVoltage.get()); | |
| 283 | } else { | ||
| 284 | ✗ | resetEfficiencyAt75PowerAndNominalVoltage(); | |
| 285 | ✗ | result = true; | |
| 286 | } | ||
| 287 | 1 | return result; | |
| 288 | } | ||
| 289 | |||
| 290 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetEfficiencyAt75PowerAndNominalVoltage() { | |
| 291 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat75_PowerandNominalVoltage, ""); |
| 292 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 293 | 1 | } | |
| 294 | |||
| 295 | 1 | bool ElectricLoadCenterInverterLookUpTable_Impl::setEfficiencyAt100PowerAndNominalVoltage( | |
| 296 | boost::optional<double> efficiencyAt100PowerAndNominalVoltage) { | ||
| 297 | 1 | bool result(false); | |
| 298 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (efficiencyAt100PowerAndNominalVoltage) { |
| 299 | 1 | result = setDouble(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat100_PowerandNominalVoltage, | |
| 300 | 1 | efficiencyAt100PowerAndNominalVoltage.get()); | |
| 301 | } else { | ||
| 302 | ✗ | resetEfficiencyAt100PowerAndNominalVoltage(); | |
| 303 | ✗ | result = true; | |
| 304 | } | ||
| 305 | 1 | return result; | |
| 306 | } | ||
| 307 | |||
| 308 | 1 | void ElectricLoadCenterInverterLookUpTable_Impl::resetEfficiencyAt100PowerAndNominalVoltage() { | |
| 309 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Inverter_LookUpTableFields::Efficiencyat100_PowerandNominalVoltage, ""); |
| 310 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 311 | 1 | } | |
| 312 | |||
| 313 | } // namespace detail | ||
| 314 | |||
| 315 | 2 | ElectricLoadCenterInverterLookUpTable::ElectricLoadCenterInverterLookUpTable(const Model& model) | |
| 316 | 2 | : Inverter(ElectricLoadCenterInverterLookUpTable::iddObjectType(), model) { | |
| 317 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
✗ Branch 5 not taken.
|
2 | OS_ASSERT(getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()); |
| 318 | |||
| 319 | // TODO: Appropriately handle the following required object-list fields. | ||
| 320 | 2 | bool ok = true; | |
| 321 | // ok = setHandle(); | ||
| 322 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
|
2 | OS_ASSERT(ok); |
| 323 | 2 | } | |
| 324 | |||
| 325 | 7602 | IddObjectType ElectricLoadCenterInverterLookUpTable::iddObjectType() { | |
| 326 |
1/1✓ Branch 1 taken 7602 times.
|
7602 | return {IddObjectType::OS_ElectricLoadCenter_Inverter_LookUpTable}; |
| 327 | } | ||
| 328 | |||
| 329 | 3 | boost::optional<Schedule> ElectricLoadCenterInverterLookUpTable::availabilitySchedule() const { | |
| 330 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->availabilitySchedule(); |
| 331 | } | ||
| 332 | |||
| 333 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::radiativeFraction() const { | |
| 334 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->radiativeFraction(); |
| 335 | } | ||
| 336 | |||
| 337 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::ratedMaximumContinuousOutputPower() const { | |
| 338 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->ratedMaximumContinuousOutputPower(); |
| 339 | } | ||
| 340 | |||
| 341 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::nightTareLossPower() const { | |
| 342 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->nightTareLossPower(); |
| 343 | } | ||
| 344 | |||
| 345 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::nominalVoltageInput() const { | |
| 346 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->nominalVoltageInput(); |
| 347 | } | ||
| 348 | |||
| 349 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::efficiencyAt10PowerAndNominalVoltage() const { | |
| 350 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->efficiencyAt10PowerAndNominalVoltage(); |
| 351 | } | ||
| 352 | |||
| 353 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::efficiencyAt20PowerAndNominalVoltage() const { | |
| 354 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->efficiencyAt20PowerAndNominalVoltage(); |
| 355 | } | ||
| 356 | |||
| 357 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::efficiencyAt30PowerAndNominalVoltage() const { | |
| 358 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->efficiencyAt30PowerAndNominalVoltage(); |
| 359 | } | ||
| 360 | |||
| 361 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::efficiencyAt50PowerAndNominalVoltage() const { | |
| 362 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->efficiencyAt50PowerAndNominalVoltage(); |
| 363 | } | ||
| 364 | |||
| 365 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::efficiencyAt75PowerAndNominalVoltage() const { | |
| 366 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->efficiencyAt75PowerAndNominalVoltage(); |
| 367 | } | ||
| 368 | |||
| 369 | 4 | boost::optional<double> ElectricLoadCenterInverterLookUpTable::efficiencyAt100PowerAndNominalVoltage() const { | |
| 370 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->efficiencyAt100PowerAndNominalVoltage(); |
| 371 | } | ||
| 372 | |||
| 373 | 1 | bool ElectricLoadCenterInverterLookUpTable::setAvailabilitySchedule(Schedule& schedule) { | |
| 374 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setAvailabilitySchedule(schedule); |
| 375 | } | ||
| 376 | |||
| 377 | 1 | void ElectricLoadCenterInverterLookUpTable::resetAvailabilitySchedule() { | |
| 378 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetAvailabilitySchedule(); |
| 379 | 1 | } | |
| 380 | |||
| 381 | 1 | bool ElectricLoadCenterInverterLookUpTable::setRadiativeFraction(double radiativeFraction) { | |
| 382 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setRadiativeFraction(radiativeFraction); |
| 383 | } | ||
| 384 | |||
| 385 | 1 | void ElectricLoadCenterInverterLookUpTable::resetRadiativeFraction() { | |
| 386 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetRadiativeFraction(); |
| 387 | 1 | } | |
| 388 | |||
| 389 | 1 | bool ElectricLoadCenterInverterLookUpTable::setRatedMaximumContinuousOutputPower(double ratedMaximumContinuousOutputPower) { | |
| 390 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setRatedMaximumContinuousOutputPower(ratedMaximumContinuousOutputPower); |
| 391 | } | ||
| 392 | |||
| 393 | 1 | void ElectricLoadCenterInverterLookUpTable::resetRatedMaximumContinuousOutputPower() { | |
| 394 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetRatedMaximumContinuousOutputPower(); |
| 395 | 1 | } | |
| 396 | |||
| 397 | 1 | bool ElectricLoadCenterInverterLookUpTable::setNightTareLossPower(double nightTareLossPower) { | |
| 398 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setNightTareLossPower(nightTareLossPower); |
| 399 | } | ||
| 400 | |||
| 401 | 1 | void ElectricLoadCenterInverterLookUpTable::resetNightTareLossPower() { | |
| 402 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetNightTareLossPower(); |
| 403 | 1 | } | |
| 404 | |||
| 405 | 1 | bool ElectricLoadCenterInverterLookUpTable::setNominalVoltageInput(double nominalVoltageInput) { | |
| 406 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
1 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setNominalVoltageInput(nominalVoltageInput); |
| 407 | } | ||
| 408 | |||
| 409 | 1 | void ElectricLoadCenterInverterLookUpTable::resetNominalVoltageInput() { | |
| 410 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetNominalVoltageInput(); |
| 411 | 1 | } | |
| 412 | |||
| 413 | 1 | bool ElectricLoadCenterInverterLookUpTable::setEfficiencyAt10PowerAndNominalVoltage(double efficiencyAt10PowerAndNominalVoltage) { | |
| 414 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
2 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setEfficiencyAt10PowerAndNominalVoltage( |
| 415 | 2 | efficiencyAt10PowerAndNominalVoltage); | |
| 416 | } | ||
| 417 | |||
| 418 | 1 | void ElectricLoadCenterInverterLookUpTable::resetEfficiencyAt10PowerAndNominalVoltage() { | |
| 419 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetEfficiencyAt10PowerAndNominalVoltage(); |
| 420 | 1 | } | |
| 421 | |||
| 422 | 1 | bool ElectricLoadCenterInverterLookUpTable::setEfficiencyAt20PowerAndNominalVoltage(double efficiencyAt20PowerAndNominalVoltage) { | |
| 423 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
2 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setEfficiencyAt20PowerAndNominalVoltage( |
| 424 | 2 | efficiencyAt20PowerAndNominalVoltage); | |
| 425 | } | ||
| 426 | |||
| 427 | 1 | void ElectricLoadCenterInverterLookUpTable::resetEfficiencyAt20PowerAndNominalVoltage() { | |
| 428 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetEfficiencyAt20PowerAndNominalVoltage(); |
| 429 | 1 | } | |
| 430 | |||
| 431 | 1 | bool ElectricLoadCenterInverterLookUpTable::setEfficiencyAt30PowerAndNominalVoltage(double efficiencyAt30PowerAndNominalVoltage) { | |
| 432 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
2 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setEfficiencyAt30PowerAndNominalVoltage( |
| 433 | 2 | efficiencyAt30PowerAndNominalVoltage); | |
| 434 | } | ||
| 435 | |||
| 436 | 1 | void ElectricLoadCenterInverterLookUpTable::resetEfficiencyAt30PowerAndNominalVoltage() { | |
| 437 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetEfficiencyAt30PowerAndNominalVoltage(); |
| 438 | 1 | } | |
| 439 | |||
| 440 | 1 | bool ElectricLoadCenterInverterLookUpTable::setEfficiencyAt50PowerAndNominalVoltage(double efficiencyAt50PowerAndNominalVoltage) { | |
| 441 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
2 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setEfficiencyAt50PowerAndNominalVoltage( |
| 442 | 2 | efficiencyAt50PowerAndNominalVoltage); | |
| 443 | } | ||
| 444 | |||
| 445 | 1 | void ElectricLoadCenterInverterLookUpTable::resetEfficiencyAt50PowerAndNominalVoltage() { | |
| 446 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetEfficiencyAt50PowerAndNominalVoltage(); |
| 447 | 1 | } | |
| 448 | |||
| 449 | 1 | bool ElectricLoadCenterInverterLookUpTable::setEfficiencyAt75PowerAndNominalVoltage(double efficiencyAt75PowerAndNominalVoltage) { | |
| 450 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
2 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setEfficiencyAt75PowerAndNominalVoltage( |
| 451 | 2 | efficiencyAt75PowerAndNominalVoltage); | |
| 452 | } | ||
| 453 | |||
| 454 | 1 | void ElectricLoadCenterInverterLookUpTable::resetEfficiencyAt75PowerAndNominalVoltage() { | |
| 455 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetEfficiencyAt75PowerAndNominalVoltage(); |
| 456 | 1 | } | |
| 457 | |||
| 458 | 1 | bool ElectricLoadCenterInverterLookUpTable::setEfficiencyAt100PowerAndNominalVoltage(double efficiencyAt100PowerAndNominalVoltage) { | |
| 459 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
2 | return getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->setEfficiencyAt100PowerAndNominalVoltage( |
| 460 | 2 | efficiencyAt100PowerAndNominalVoltage); | |
| 461 | } | ||
| 462 | |||
| 463 | 1 | void ElectricLoadCenterInverterLookUpTable::resetEfficiencyAt100PowerAndNominalVoltage() { | |
| 464 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ElectricLoadCenterInverterLookUpTable_Impl>()->resetEfficiencyAt100PowerAndNominalVoltage(); |
| 465 | 1 | } | |
| 466 | |||
| 467 | /// @cond | ||
| 468 | ✗ | ElectricLoadCenterInverterLookUpTable::ElectricLoadCenterInverterLookUpTable( | |
| 469 | ✗ | std::shared_ptr<detail::ElectricLoadCenterInverterLookUpTable_Impl> impl) | |
| 470 | ✗ | : Inverter(std::move(impl)) {} | |
| 471 | /// @endcond | ||
| 472 | |||
| 473 | } // namespace model | ||
| 474 | } // namespace openstudio | ||
| 475 |