| 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 | /* |
| 59 | std::vector<EMSActuatorNames> Generator_Impl::emsActuatorNames() const { |
| 60 | std::vector<EMSActuatorNames> actuators{{"On-Site Generator Control", "Requested Power"}}; |
no test coverage detected