MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / electricLoadCenterDistribution

Method electricLoadCenterDistribution

src/model/Generator.cpp:44–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 }
43
44 boost::optional<ElectricLoadCenterDistribution> Generator_Impl::electricLoadCenterDistribution() const {
45 boost::optional<ElectricLoadCenterDistribution> result;
46 for (const auto& list : getObject<ModelObject>().getModelObjectSources<ModelObjectList>(ModelObjectList::iddObjectType())) {
47 auto elcds = list.getModelObjectSources<ElectricLoadCenterDistribution>(ElectricLoadCenterDistribution::iddObjectType());
48 if (elcds.empty()) {
49 // error
50 } else if (elcds.size() == 1u) {
51 return elcds[0];
52 } else {
53 // error
54 }
55 }
56 return boost::none;
57 }
58 /*
59std::vector<EMSActuatorNames> Generator_Impl::emsActuatorNames() const {
60 std::vector<EMSActuatorNames> actuators{{"On-Site Generator Control", "Requested Power"}};

Callers 1

removeMethod · 0.95

Calls 3

iddObjectTypeFunction · 0.70
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected